Compile error when exporting project in uVision

Hi,

I’m proting mbed os to a custom stm32f407 board and trying to following the guide from TM32F407VET6 black board project. The link is : STM32F407VET6_Hello - Using low cost STM32F407VET6 boards with mbed. | Mbed.

The blink project is running well if I use the online compiler, bin is successfully generated and programed to my board. Then I tried to export the project to uVision, then the errors occur as shown in attached picture. It seems some config error in uVision. Is there anyone know how to solve it?

Thanks.

Hello Li,

I haven’t tested it but the following could work:

In the exported uVision project, open the STM32F407VET6_Hello.uvprojx file and at line 380 delete
-fno-c++-static-destructors

NOTE: With that option Mbed is trying to minimize code size. However, it doesn’t seem to work with uVision. For more details see Disable C++ static destructors in ARMC6 compiler by kjbracey · Pull Request #11726 · ARMmbed/mbed-os · GitHub.

Best regards, Zoltan

1 Like

yes, it works. Thank you!