Saturday, March 21, 2015

STM32 Nucleo: first program

Hello,


Today we'll see how to run our first program on the STM32 F411RE using MBED,  the ARM development plateform.

MBED allows microcontrollers applications designers like you and me to easily develop and deploy their applications for various plateforms of which the STM32 nucleo ones are part.
Many basic functions are implemented, as well are a lot of drivers are available, avoiding the need to find them all over the web, and allowing to easily program at a higher level than with a standard compiler.
Your programs are stored on the web, so you can develop in several places, or computers you'll always be able to find them.



So let's start with our first program, by following this link : http://developer.mbed.org/.

- Connect on the site and create a new account
- Then go to "plateform" and select the one corresponding to your nucleo.

For F411RE, you'll reach this page (http://developer.mbed.org/platforms/ST-Nucleo-F411RE/)

 
 
-Click on "add to mbed compiler"
 
And from here you can enter the compiler part of MBED, by clicking the link on the top right.

Then, you'll create a new application by clicking on "New".
The site will propose you some examples of programs linked to your plateform, choose  “Nucleo_blink_led”.



In the tree explorer click on "main.cpp".



And the code appears. It wil blick the LD2 diode. Just click on "compileé, the program is compiled, linked and a binary file is generated and available for download.
Fetch it, then connect your nucleo board and put the program on it as you could do it with a USB key. Click on the éreset" button, and the led is blinking!

So as you can see, it is very easy to start progrmming the STM32, the "web-IDE" is very powerful and allows to share your programs, create teams and make your dev' available from anywhere.

Have fun!!!




No comments:

Post a Comment