Kit STM32F4 Discovery- Bài 0: IDE lập trình

58
2201

Giới thiệu về CooCox CoIDE cho STM32

Có rất nhiều môi trường phát triển tích hợp (IDE – Integrated Development Environment) hỗ trợ việc lập trình với vi điều khiển STM32F407VG. Có thể kể đến các IDE phổ biến sau:

  • uVISION (Keil)
  • IAR Embeded Workbench for ARM
  • Altium Tasking VX-Toolset
  • Atolic TrueStudio
  • CooCox CoIDE

Trong các IDE nói trên, mỗi IDE đều có những ưu nhược điểm riêng. Việc lựa chọn IDE nào tùy thuộc vào thói quen, kinh nghiệm cũng như khả năng chi trả của người lập trình. Trong tài liệu này tác giả chọn công cụ CooCox CoIDE vì đây là bộ công cụ miễn phí hoàn toàn, được xây dựng trên nền tảng Eclipse nên kế thừa các ưu điểm của Eclipse, trong đó nổi bật nhất là sự hỗ trợ mạnh mẽ công việc soạn thảo code, mang đến sự thoải mái cho người lập trình, nhất là những người mới bắt đầu. Ngoài ra CoIDE còn hỗ trợ người dùng trong việc tạo và quản lý project, cho phép lựa chọn chip, thêm bớt thiết bị ngoại vi, driver và thư viện tương ứng. Với người mới học, CoIDE thực sự sẽ là một người bạn đồng hành hết sức tuyệt vời.

Để mở CoIDE click vào biểu tượng sau:

                Khi mở ra CoIDE trông như một cửa sổ Eclipse thông thường:

Để tạo project, từ dòng menu của CoIDE chọn Project\New Project, cửa sổ New Project xuất hiện:

Tại đây người dùng cần chọn đường dẫn tới nơi dự định chứa project của mình và nhập vào tên project, sau đó nhấn Next. Ở trang tiếp theo, chọn Chip, nhấn Next để tiếp tục:

Ở trang Chip người dùng cần browse tới dòng chip cần chọn rồi nhấn Finish. Trong trường hợp này ta chọn STM32F407VG như ở hình dưới.

Sau khi nhấn Finish, cửa sổ Repository mở ra. Tại đây chúng ta cần chọn các thành phần ngoại vi mà chúng ta sử dụng. Trước khi chọn các thành phần ngoại vi chúng ta lưu ý CoIDE đã tạo cho chúng ta project mới với file main.c ở trong. Nội dung file main.c như sau:

int main(void)
{

    while(1)
    {
    }
}

Đây có thể coi như chương trình “hello word” của thế giới nhúng.

Việc lựa chọn các thành phần ngoại vi nào tùy thuộc vào project chúng ta muốn phát triển. Từ chương sau chúng ta sẽ đi vào cụ thể từng project cơ bản.

vài hình ảnh về CooCox CoIDE :

Debug với J-Link / J-Trace:

Chọn debugger JTAG / SWD /…:

Chọn dòng vi điều khiển:

58 COMMENTS

  1. Its such as you read my mind! You seem to know a lot approximately this, such
    as you wrote the e-book in it or something. I feel that you could do with some p.c.

    to drive the message house a bit, however other than that, that is excellent
    blog. An excellent read. I’ll certainly be back.

  2. I really like your blog.. very nice colors & theme. Did you make this website
    yourself or did you hire someone to do it for you?
    Plz respond as I’m looking to design my own blog and would like to find out where u got this from.

    thanks a lot

  3. Hey! This is kind of off topic but I need some
    advice from an established blog. Is it hard to set up your own blog?
    I’m not very techincal but I can figure things out pretty quick.

    I’m thinking about creating my own but I’m not sure where
    to begin. Do you have any ideas or suggestions?
    Thank you

  4. Hey there would you mind letting me know which web host you’re using?
    I’ve loaded your blog in 3 completely different browsers
    and I must say this blog loads a lot quicker then most.
    Can you suggest a good web hosting provider at a reasonable price?

    Thanks a lot, I appreciate it!

  5. Greetings from Los angeles! I’m bored to tears at work so I decided to browse your site on my iphone during lunch break.
    I enjoy the knowledge you provide here and can’t wait to take a look
    when I get home. I’m shocked at how fast your blog loaded on my phone ..
    I’m not even using WIFI, just 3G .. Anyhow, amazing blog!

  6. Youг styⅼе is very unique in compаrison to other folks I have reɑd stufff from.
    I appreciate you for postiung when you’ve got the opportunity,
    Gueѕs I will jᥙst bookmark this web site.

  7. After I originally commented I seem to have clicked on the -Notify me
    when new comments are added- checkbox and now every time a comment is
    added I get 4 emails with the same comment. There has to be a means you can remove me from that service?
    Appreciate it!

    Review my site geegram.net

  8. hey there and thank you for your information – I’ve definitely
    picked up anything new from right here. I did however expertise several technical points using this site, since
    I experienced to reload the website a lot of times previous
    to I could get it to load properly. I had been wondering if your hosting
    is OK? Not that I’m complaining, but slow loading instances times will very frequently affect your placement in google and
    could damage your quality score if advertising and
    marketing with Adwords. Anyway I’m adding this RSS to my e-mail and could look out for much more of your respective intriguing content.
    Ensure that you update this again soon..

    Also visit my site: https://www.fastspeech.org/healthy-meal-suggestions-for-breastfeeding-moms/

  9. Good website! I really love how it is easy on my eyes and the data are well written. I am wondering
    how I could be notified whenever a new post has been made.
    I’ve subscribed to your RSS which must do the trick! Have a nice
    day!

    my website iwebaz.com

  10. With havin so much content do you ever run into any
    problems of plagorism or copyright violation?
    My blog has a lot of exclusive content I’ve either written myself
    or outsourced but it appears a lot of it is popping it
    up all over the internet without my permission.
    Do you know any techniques to help stop content from being stolen? I’d genuinely appreciate it.

    Feel free to visit my web blog; spyep.com

  11. Wonderful goods from you, man. I’ve understand your stuff previous to and you are
    just too magnificent. I really like what you have acquired here, really like what you’re
    saying and the way in which you say it. You make it
    enjoyable and you still care for to keep it sensible. I can’t wait to read far more from you.

    This is really a tremendous website.

  12. Hey would you mind stating which blog platform you’re working with?
    I’m planning to start my own blog soon but I’m having
    a difficult time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking for something completely unique.

    P.S Sorry for getting off-topic but I had to ask!

  13. I know this if off topic but I’m looking into starting my
    own weblog and was curious what all is needed to get set up?
    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet savvy so I’m not 100% certain. Any suggestions or
    advice would be greatly appreciated. Cheers

  14. Undeniably believe that which you stated. Your favorite reason appeared to be on the web the easiest thing to be aware
    of. I say to you, I certainly get irked while people consider worries that
    they just do not know about. You managed to hit the nail upon the top and defined out the whole thing without
    having side effect , people could take a signal. Will likely be back to get more.
    Thanks

  15. It’s really a great and helpful piece of information. I’m happy that you simply shared this useful info with us.
    Please keep us up to date like this. Thanks for sharing.

  16. I simply could not leave your web site prior to suggesting that
    I extremely loved the usual info an individual supply for your guests?
    Is gonna be back regularly in order to check up on new posts

  17. You are so awesome! I do not believe I’ve read a single thing like that before.
    So wonderful to discover someone with unique thoughts on this subject matter.

    Seriously.. thanks for starting this up. This website is one
    thing that’s needed on the internet, someone with a little originality!

LEAVE A REPLY

Please enter your comment!
Please enter your name here