I was investigating how to feed a custom linker file to compiler while building a project based on famework-stm32cube. (Project is generated via stm32CubeMx, and the linker file is in "project_root_dir/*_FLASH.ld)
I’ve got the following message: Warning! Cannot find a linker script for the required board! Firmware will be linked with a default linker script!
Hi @valeros ! Thanks for the answer. I’ve tried this earlier: -Wl,-T$PROJECT_DIR/STM32F401RE_FLASH.ld
This doesn’t work for me, still got Warning! Cannot find a linker script for the required board! Firmware will be linked with a default linker script!
Still have to copy the .ld file to .framework-stm32cube directory. This is not convenient way that does not allow doing it automatically after each code generation.
Don’t copy it to the framework folder, because with the next update it will be deleted. Just keep your ld script in the root folder of your project, add it to your project using build flags and you should be fine. You also can give your script a notable name so you can distinguish between your script and the default one.
Hi @valeros! I’m aware of copying it to the framework directory. buiild_flags directive doesn’t work for me. My guess that there is a way to declare the path that still out of my knowledge in PlatformIO.
I suppose that warning might be a bit misleading, we will try to reimplement it or change the text in the next release. As for now, it’s fine to see that warning even when you specified your own linker script as long as you can successfully compile your project.