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

85
1217

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:

85 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!

  18. I’m truly enjoying the design and layout of your site. It’s a very easy on the eyes which
    makes it much more pleasant for me to come here and visit more often. Did you hire out
    a designer to create your theme? Great work!

  19. Thanks for your personal marvelous posting! I genuinely
    enjoyed reading it, you’re a great author. I
    will be sure to bookmark your blog and definitely will come back someday.
    I want to encourage you to definitely continue your great writing, have a nice evening!

  20. Definitely believe that which you said. Your favorite reason seemed to be on the internet the simplest thing to be aware of.
    I say to you, I definitely get annoyed while people think about worries that they plainly
    do not know about. You managed to hit the nail upon the top and also defined
    out the whole thing without having side effect , people could take a signal.

    Will probably be back to get more. Thanks

  21. What’s Going down i am new to this, I stumbled upon this I have discovered
    It absolutely useful and it has helped me out loads.

    I hope to give a contribution & aid different customers
    like its aided me. Great job.

  22. Saya telah telah berselancar online lebih dari 2 jam
    hari ini, namun saya tidak pernah menemukan artikel menarik seperti milik Anda.
    It’s cukup berharga bagi saya. Secara pribadi , jika semua
    pemilik web dan blogger membuat konten yang baik seperti yang Anda lakukan, web akan menjadi lebih
    berguna dari sebelumnya.

    Here is my blog; Joker game slot

  23. Please let me know if you’re looking for a author for
    your site. You have some really good posts and I feel I would be a good asset.

    If you ever want to take some of the load off, I’d really like
    to write some content for your blog in exchange for a
    link back to mine. Please blast me an email if interested.
    Kudos!

  24. Hi I am so delighted I found your blog, I really found you by mistake, while I was researching on Yahoo for something
    else, Anyways I am here now and would just like to say kudos for a fantastic post and a all round thrilling blog (I also love the
    theme/design), I don’t have time to read through it all at the minute but I have saved it
    and also added in your RSS feeds, so when I have time I will be back to read a lot more,
    Please do keep up the great work.

    Here is my web page: kebe.top

  25. After I initially commented I seem to have clicked the
    -Notify me when new comments are added- checkbox and from now on whenever a comment is added I
    recieve four emails with the same comment.

    Perhaps there is a means you are able to remove me from
    that service? Thanks a lot!

    My web-site; popaholics.net

  26. Simply wish to say your article is as astonishing. The
    clarity on your put up is simply cool and that i could suppose you’re an expert on this
    subject. Well with your permission allow me to clutch your feed to keep up to date with coming
    near near post. Thanks one million and please carry on the enjoyable work.

  27. I blog quite often and I truly appreciate your content.
    This great article has truly peaked my interest. I am going to take a note of your blog and keep checking for new details about once a
    week. I opted in for your RSS feed too.

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here