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

Linker errors with 0.5.2 and arm-none-eabi-gcc #92

Closed
phil-opp opened this issue Aug 20, 2018 · 3 comments
Closed

Linker errors with 0.5.2 and arm-none-eabi-gcc #92

phil-opp opened this issue Aug 20, 2018 · 3 comments

Comments

@phil-opp
Copy link
Contributor

When I try to link embed-rs/stm32f7-dicovery-rewrite with arm-none-eabi-gcc 4.9.3, I get the following error with cortex-m-rt 0.5.2:

error: linking with `arm-none-eabi-gcc` failed: exit code: 1
  |
  = note: "arm-none-eabi-gcc" "-L" […]
  = note: /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: 
          BUG(cortex-m-rt): the reset vector is missing
          /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: 
          BUG(cortex-m-rt): the exception vectors are missing
          collect2: error: ld returned 1 exit status

With cortex-m-rt 0.5.1, it builds without problems.

@adamgreig
Copy link
Member

See #89 - the new linker script (changed to support LLD) doesn't support old GCC 4.8, and perhaps also therefore 4.9 which you're using. Are you able to update to a newer GCC? 4.9.3 is from 2015 and the latest is 8.2; you can grab pre-built images directly from ARM so upgrading is usually fairly painless.

Alternatively you might be able to swap to using LLD and thereby not require an ARM GCC toolchain at all...

@phil-opp
Copy link
Contributor Author

Thanks for the quick answer! I'll try if I can get LLD working.

Perhaps it's a good idea to bump the version to 0.6.0 if it is breaking for some users. It was time consuming for me to find out which crate introduced the breakage after I ran cargo update.

@phil-opp
Copy link
Contributor Author

Linking with LLD works fine. Thanks!

wez added a commit to atsamd-rs/atsamd that referenced this issue Aug 26, 2018
I'm seeing rust-embedded/cortex-m-rt#92 here
too; hopefully have this resolved now.
wez added a commit to atsamd-rs/atsamd that referenced this issue Aug 26, 2018
I'm seeing rust-embedded/cortex-m-rt#92 here
too; hopefully have this resolved now.
wez added a commit to atsamd-rs/atsamd that referenced this issue Aug 26, 2018
I'm seeing rust-embedded/cortex-m-rt#92 here
too; hopefully have this resolved now.
wez added a commit to atsamd-rs/atsamd that referenced this issue Aug 26, 2018
I was seeing rust-embedded/cortex-m-rt#92 here
too, so needed to upgrade gcc both on my local system and in the CI
config.

rtfm's `app!` macro doesn't know how to emit an appropriate `entry!`
call, so the rtfm based examples now have a little bit of glue for
that.
wez added a commit to atsamd-rs/atsamd that referenced this issue Aug 26, 2018
I was seeing rust-embedded/cortex-m-rt#92 here
too, so needed to upgrade gcc both on my local system and in the CI
config.

rtfm's `app!` macro doesn't know how to emit an appropriate `entry!`
call, so the rtfm based examples now have a little bit of glue for
that.
kaizensparc pushed a commit to kaizensparc/atsamd that referenced this issue Dec 24, 2021
I was seeing rust-embedded/cortex-m-rt#92 here
too, so needed to upgrade gcc both on my local system and in the CI
config.

rtfm's `app!` macro doesn't know how to emit an appropriate `entry!`
call, so the rtfm based examples now have a little bit of glue for
that.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants