Giter Site home page Giter Site logo

Comments (4)

japaric avatar japaric commented on May 18, 2024

I can repro this with rustc 1.22.0-nightly (6f87d20a7 2017-09-29), but linking works fine with 1.22.0-nightly (325ba23d5 2017-09-19). So this may be a rustc regression. I can't bisect the toolchain to nail down the problem right now so I'll advise you to rollback your toolchain version for now.

from cortex-m-quickstart.

pftbest avatar pftbest commented on May 18, 2024

@japaric msp430-quickstart also doesn't work atm, but it fails with a different error message.

from cortex-m-quickstart.

attdona avatar attdona commented on May 18, 2024

I'm just started experimenting with rust for cortex-m and I get a similar problem

$ rustc -V
rustc 1.22.0-nightly (417c73891 2017-10-05)

$ xargo build --example hello
 Compiling r0 v0.2.2
 Compiling cortex-m v0.2.12
 Compiling vcell v0.1.0
 Compiling aligned v0.1.1
 Compiling cortex-m-rt v0.2.5
 Compiling cortex-m-semihosting v0.1.3
 Compiling cc3200 v0.0.1 (file:///home/adona/ZAKKE/rust/cc3200)
 Compiling volatile-register v0.2.0
error: linking with `arm-none-eabi-ld` failed: exit code: 1

= note: arm-none-eabi-ld: 
      You must specify the exception handlers.
      Create a non `pub` static variable with type
      `cortex_m::exception::Handlers` and place it in the
      '.rodata.exceptions' section. (cf. #[link_section]). Apply the
      `#[used]` attribute to the variable to make it reach the linker.
      arm-none-eabi-ld: 
      Invalid '.rodata.exceptions' section.
      Make sure to place a static with type `cortex_m::exception::Handlers`
      in that section (cf. #[link_section]) ONLY ONCE.

from cortex-m-quickstart.

japaric avatar japaric commented on May 18, 2024

This was fixed in cortex-m-rt v0.3.6 so closing. If you still the issue try updating your lockfile.

@attdona That looks like a different issue. The exceptions / interrupts link sections were renamed in cortex-m-rt v0.3.x and you are using v0.2.x. My guess is that you are using a recent svd2rust which only works with cortex-m-rt v0.3.x and cortex-m-quickstart v0.2.x. If you are following one of my first blog post and using cortex-m-quickstart v0.1x then you have to use an older svd2rust releases: v0.7.x is the version used in the blog post (this information is in the blog post). Though I suggest you use cortex-m-quickstart v0.2.x.

from cortex-m-quickstart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.