Closed tsaarni closed 6 years ago
See http://docs.platformio.org/en/latest/projectconf/section_env_build.html#build-flags
You can pass a custom LD script with -Wl,-T/path/to/ld_script.ld
. You can also use Built-In variables http://docs.platformio.org/en/latest/projectconf/section_env_build.html#built-in-variables
Thanks for the PR!
This overrides LD script at users own project only, so do you mean that generic STM32F030F4 board support should NOT be added to platformio itself?
Thanks for considering.
Personally, I don't like this ldscripts
common folder between different frameworks. I would avoid it.
I'm in the progress of adding support for generic STM32F030F4 boards (cheap ones from ebay). These are not supported by mbed-os upstream but it seems the only major difference to NUCLEO_F030R8 is the RAM and flash memory sizes. After modifying the linker script I can successfully upload and run code on the board.
I noticed that
platform-ststm32/ldscripts
contain some custom linker scripts. It does not seem to be possible to utilize these within builder-framework-mbed. In this patch I add the possibility to use these ldscripts instead of the default scripts from mbed-os.However, I'm unsure of couple of things that I'd like to check with you:
Do you in general see that mbed-os ldscripts should be overrided, or should I try to push generic board support to mbed-os project instead?
Many boards in
platform-ststm32/boards/*
defineldscript
but apparently they have not been used in mbed builds so far. Is there a risk that this patch will break those builds now as there is a possibility thatplatform-ststm32/ldscript/*
gets used in a build that previously used mbed-os script? I could modify the patch to prioritize mbed-os script insntead of the one defined inldscript
.