Beginning in mbed and STM32
.
PROCEDURE FOR FIRST PROGRAM
1) First thing is making Account on ARM Mbed. Please select confirmation link sending by ARM on registered email for further process.
2) If you have not downloaded STM32/STLINK/NUCLEO drivers then please download and installed for communicating with your board. - You can check it using following steps (Windows user)
A) : Go to my computer /PC
B): Right click and select properties > Device manager
C): Look at US B port availability , if you find STMicroelectronics virtual COM port, then you are on right way..
Ok, Now we can connect or communicate with our Board, next thing is open Mbed page and selecting proper board from available options.
1) First requirement is : Add the device >> Initially you have no any selected device, so click on IC symbol.
2) Now, choose related device /BoardV >> I selected my NUCLEO board for further programming.
Quote:
while(!(succeed == try()))
3) Now board is added into your account / Workspace, now you can program . Select the workspace right click and select New Program
Please check this image :
Select default (or ANY) template , so you can easily include mbed.h library and other dependencies. IF you selected empty Template then you will have to do extra effort. Check the below image for more information :
Ok, Now next thing is modifying main.ccp file.
4) Remove the content of main.cpp file and add the following program code : You can Import from below link
[Repository '/users/radhey04ec/code/Blink_mbed_First_Prog/' not found]
or Here the code is :
main.c Code
#include "mbed.h" int main() { DigitalOut led(LED3); while (true) { led = 1; wait(0.5); led = 0; wait(0.5); } }
.... Lets understand ....
- include "mbed.h" is your header file ,require to to do operation on mbed platform
DigitalOut is class and object is led, here you define pin name (LED3)
You can get the help directly on IDE , just need to move mouse pointer at side of function and try to right click at there. Check this image :
After writing whole program then click on compile button , now your platform compiling the code and after finishing the process your code binary file automatically download just need to copy and paste in your ST drive.
Because ST supports Drag band drop programming method.
You can check RAM and Flash usages status of code in workspace
So, This is about our first tutorial, the basic intro of mbed.
Thanks
Jaydeep Shah Electronics Engineer Research and development department
Email : radhey04ec@gmail.com
1 comment on Beginning in mbed and STM32:
Please log in to post comments.
If You have any questions Please email : radhey04ec@gmail.com
Jaydeep Shah