PlatformIO Community

STM32F072C8T6 No default startup file

I made myself custom board json file for that mcu based on board file for stm32f072 nucleo board. I made sure to make custon enviroment in platformio.ini for my board, and even tried platform pulled from git.
I am getting “Error: There is no default startup file for stm32f072c8 MCU!”
I am unable to build any code even though startup file for that mcu is present.
How do i specify startup file for that mcu to be startup_stm32f072xb.s?

It can be a bug, because name implies support only for 072xb, even though ST clearly states that 072x8 are supported by that file too.

What is your platformio.ini?

I had to modify framework to make it include correct files. I didn’t post solution here because proper build for that micro involved making custom linker script and modifying ST libraries. I got it to work, but it is messy. I wont put my platformio.ini file here.
Anyway, way better solution is to move to STM32F072CBT6 which has double the flash, doesnt cost much more, is drop-in replacement and almost does work properly out-of-the-box.
There is one more thing that i had to fix, ST libraries shipped with platformio are outdated and code generated with newest version of CubeMX will fail to compile due to changes in CAN driver.

@valeros please help.

Hi @tosmaz! The build script for STM32Cube framework is being refactored at the moment and when it’s ready it’ll be released with the latest STM32Cube version. Sorry for the inconvenience.