9 years, 1 month ago.

mbed port stm32f411ce MCU

Hi!

Recenly I've been asking the question regarding porting mbed Nucleo F411RE code to STM32F411CEU processor. Here's what my question was about:

Quote:

I'm engaged in the project where we use LPC1768 MCU but in the future we'll have to port the code to the custom STM32 F411CE based device.

To save the time while the new device is being produced I plan firstly to buy Nucleo F411RE board and port to it the existing code written for LPC178.

Is the code written for ST Nucleo F411RE and including some mbed libraries and FreeRTOS easily portable to F411CE microcontroller?

mbedAustin from mbed answered that there shouldn't be any issues as the processors are the same except form-factor.

I've started porting the code to custom PCB and faced the problem: when I create simple blinky project based on Nucleo F411RE board in the online compiler, then export it to Keil IDE, compile and load it to the STM32F411CEU chip it doesn't work and I can't even debug it because the debugger doesn't enter main function - it hangs on after executing reset handler. It seems that mbed startup file is incorrect but I don't know what's exactly wrong (maybe initial SP or PC values are incorrect). Trying to find solution I downloaded mbed source files from mbed-src repository, compiled them without system_stm32f4xx and startup_stm32f4xx file (instead of them I used those provided by Keil run-time environment manager). After that blinking and other more complex functionality worked and I was able to debug the code but it to took me much time to handle all the mbed files and resolve compilation errors.

What could be the reason of the behaviour described above and how can I use mbed library for STM32F411CEU processor instead of compiling the whole bunch of mbed source files?

Thanks!

Best regards, Dmitry.

Question relating to:

1 Answer

8 years, 11 months ago.

Dmitry,

This suggests that there is a difference between the startup files used by mbed for the 411RE board and the startup files used for the 411CEU board. I suspect this reflects a difference in the chips themselves. To this I suggest using the 411RE board and mbed to prototype with and then when you are ready to switch chips perform the offline export and switch out the startup files.