How to config STM32F030C6T6 support arduino framework?

I have updated GitHub - maxgerhardt/pio-f030-test.

Please remove your old version + test latest version.

(EDIT: Had to reupload, now you can test.)

it work can runing !!
but not have list in platformio ?

if i make new project can use or how to make project ?

ldscript.ld << this can’t use ?

Yes, PlatformIO doesn’t have a genericSTM32F030C6 definition, or… any of the generic STM32F0 board definitions (JSON files). Only some “special” boards, like the Nucleo, or Disco(very) boards. This needs to be fixed by the developers.

What you need is the boards folder with the genericSTM32F030C6.json file (the other JSON file can be ignored), the ldscript.ld in the main project directoy and the platformio.ini with at least the current content.

The ldscript.ld you posted above is for a STM32F031 with all wrong flash + RAM sizes…

and doesn’t have the STM32Duino specific usages for LD_MAX_FLASH_SIZE etc. I copy-pasted the STM32F030 one since STM32Duino did not have one and compilation would fail and just changed comments, actual content stayed the same (since all things like Flash and RAM size is done via a variable set at link time).

I see you already opened How to use STM32F030C6T6 ? ¡ Issue #623 ¡ platformio/platform-ststm32 ¡ GitHub. This is the correct way to go.

why i add
;board_build.ldscript = ldscript.ld
have
*** [.pio\build\genericSTM32F030C6\firmware.elf] Error 1

need use only all new project ?

If you comment it out, the builder script will try to find the linker script in the STM32Duino folder, but since Arduino_Core_STM32/variants/STM32F0xx/F030C6T at main ¡ stm32duino/Arduino_Core_STM32 ¡ GitHub does not have a ldscript.ld, it will fail.

That’s why you need the ldscript.ld file in the project folder and board_build.ldscript = ldscript.ld.

how to make file ldscript.ld for STM32F0xx ?

The linker script I posted is already valid, no need to make a new one.

1 Like