Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling uses wrong linker script with libopencm3 framework #3

Open
smaug-g opened this issue Jun 8, 2018 · 1 comment
Open

Compiling uses wrong linker script with libopencm3 framework #3

smaug-g opened this issue Jun 8, 2018 · 1 comment

Comments

@smaug-g
Copy link

smaug-g commented Jun 8, 2018

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
Copy link

klvnptr commented Sep 8, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants