Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

LD segfaults when compiling the nucleo_f031k6 blinky example #287

Closed
riktw opened this issue Aug 31, 2017 · 3 comments
Closed

LD segfaults when compiling the nucleo_f031k6 blinky example #287

riktw opened this issue Aug 31, 2017 · 3 comments

Comments

@riktw
Copy link

riktw commented Aug 31, 2017

Hello,

I tried compiling the nucleo_f031k6 blinky example and I got the following error:
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
compilation terminated.

When I compile a different example, the nucleo_f103rb or stm32f072_discovery it works as expected.

I am running Debian 9 as OS and I tried it with both the 2017 q2 release and the latest version from git.
It seems that there is something wrong with the nucleo_f031k6 example or configs as other examples compile just fine.
Any idea what it could be?

@salkinium
Copy link
Member

GNU Linker is buggy as heck for Cortex-M.
We've had a similar issue before, which eventually went away when we upgraded toolchains.
There's nothing you can do, except trial-and-error: poking around the linkerscript or moving objects around files until it doesn't crash anymore. I've tried to get a minimal example with this behavior, but I failed which was quite frustrating.

@salkinium
Copy link
Member

salkinium commented Aug 31, 2017

So the linker doesn't crash in our Travis CI environment running Ubuntu 14.04 and also not on my local machine (OS X 10.12) both with the 2017Q2 toolchain.

We are using the official pre-compiled toolchain though, maybe Debian distributes their own compiled version?

@riktw
Copy link
Author

riktw commented Aug 31, 2017

Hey

Thanks, I installed the latest (Version 6-2017-q2-update) version of the toolchain from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads instead of the one installed by using apt install and now it works as expected :)

@riktw riktw closed this as completed Aug 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants