I've created a custom variant according to the guide: https://github.com/stm32duino/Arduino_C ... 28board%29
In this particular case, its an F042 board with a custom bootloader, I've been able to adjust the linker script in the variant successfully, however I also require some changes to the start-up file.
I followed this guide: https://github.com/stm32duino/Arduino_C ... efinitions
In boards.txt I added the following line to the board-def.
Code: Select all
GenF0.menu.pnum.CAN_F042K6TX.build.startup_file=-DCUSTOM_STARTUP_FILE
However, when this line is enabled I am getting an error - essentially it cannot find the file in the variant folder.
Code: Select all
In file included from C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.11.0\cores\arduino\stm32\startup_stm32yyxx.S:1:
C:\Users\user\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.11.0\cores\arduino\stm32\stm32_def_build.h:541:4: warning: #warning "No CMSIS startup file defined, custom one should be used" [-Wcpp]
541 | #warning "No CMSIS startup file defined, custom one should be used"
| ^~~~~~~
Sketch uses 11892 bytes (52%) of program storage space. Maximum is 22528 bytes.
Global variables use 1212 bytes (20%) of dynamic memory, leaving 4740 bytes for local variables. Maximum is 5952 bytes.
Input appreciated.