platformio / platform-titiva

TI TIVA: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/titiva
Apache License 2.0
10 stars 10 forks source link

Compiling uses wrong linker script with libopencm3 framework #3

Open smaug-g opened 6 years ago

smaug-g commented 6 years ago

See thread: thread

This goes over my head, but when building, the compiler seems to be using the incorrect linker script. According to the board file, it should use

"ldscript": "lm4fcpp_blizzard.ld"

but in reality it uses:

"~/.platformio/packages/framework-libopencm3/lib/lm4f/libopencm3_lm4f.ld"

The issue is that libopencm3_lm4f.ld does not define memory regions. The compiler will build and upload the code, but the processor will go into a blocking handler and sit in a while(1) loop.

I fixed the issue by defining the memory regions in libopencm3_lm4f.ld.

I was told by PlatformIO's maxgerhardt to open an issue here.

klvnptr commented 4 years ago

depending on your board type, put this into your platformio.ini file:

build_flags = -Wl,-Tlm4fcpp_blizzard.ld

check out the JSON files to figure out which one you should use:

https://github.com/platformio/platform-titiva/tree/develop/boards