Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 9 months ago.
I am so confused about mbed
Hi everybody,
I am Ozgur from Istanbul and I am working on motor controllers and mobile robots. It might be clear for others but there are some things that I don't get. I have experiences with stm32f429 and HAL library. I have used HAL and Cubemx for motor control. Now, I need to communicate with ROS but I dont want to use controllers such as arduino because stm32f4 is much more advanced chip. As a result of my research I saw that nucleo board communicates with ROS via ROSserial mbed package. In that point I have some some questions about functioning. First of all, can I use cubemx and HAL library to progam nucleo? If possible which IDE should I use after cubemx? Is keil fine? If there are any tutorial about what I am tring to do could you send me a link? Thank you all.
Best regards.
1 Answer
8 years, 9 months ago.
Hi Ozgur,
So there are two ways (at least) to setup a project for a nucleo board. 1) You can use mbed either online or offline. All the high level driver API and low level HAL stuff is included for your Nucleo board as part of the mbed library. Or 2) you can use the Nucleo board with the Cube confugurator in just the same way you use Cube for any other project with an STM micro. The debug interface chip on the nucleo works as a regular STLink debugger, so you can program and debug the target micro that way.
I have not use ROSserial library. It would help to have a link to the specific library module you are looking at. I only see one library on mbed.org with a similar name, but it is kind of old.
If you are using an mbed library, then you need to use mbed OS. You will not be using cube configurator at all - mbed replaces this.
In terms of IDEs, there are many that will work, so it does get a little confusing if you haven't run into this before.
There is always the online IDE. You can get pretty far with that. This is the simplest option by far.
Keil works great offline with mbed, if you have a license. It is also free for M3 and M4 projects up to 32kB of code; unfortunately that is not really enough for an mbed project. Mbed does have some overhead in terms of code size. Also there is actually a totally free version for STM32 cortex M0 parts, if you want to or can go that way.
http://www2.keil.com/stmicroelectronics-stm32/mdk
ST has a free version of Eclipse that is all setup for programming and debugging their STM32 parts and it works fine with mbed library. Unfortunatley, setting up a project can be a bit tricky, but once you get everything set it works well. I recommend the mbed-cli tool for creating an offline mbed project (rather than try to export from the IDE).
http://www.openstm32.org/HomePage https://docs.mbed.com/docs/mbed-os-handbook/en/5.1/dev_tools/cli/
There are many more IDEs that can work as well. If you are using mbed, I would probably stick with one that is on mbed's official export list so you can let it handle all the project configuration stuff for you.
Graham