Giter Site home page Giter Site logo

Comments (9)

japaric avatar japaric commented on May 18, 2024 1

@bootchk Sorry about that. Xargo v0.3.9 can't compile compiler-builtins -- this is a regression cf. japaric/xargo#167. Please switch back to version v0.3.8. (the command for that is cargo install xargo --vers 0.3.8, IIRC)

from cortex-m-quickstart.

bootchk avatar bootchk commented on May 18, 2024

I see this is probably related to your PR about codegen units 32.

from cortex-m-quickstart.

japaric avatar japaric commented on May 18, 2024

Fixed in cortex-m-rt v0.3.6. Affected users try cargo update.

from cortex-m-quickstart.

bootchk avatar bootchk commented on May 18, 2024

I completely rebuilt my vagga container (whose script follows the tutorial.) Now I get:

  • "cargo" "build" "--release" "--manifest-path" "/tmp/xargo.2i7nVBhmkMAs/Cargo.toml" "--target" "thumbv7m-none-eabi" "-v" "-p" "compiler_builtins"
    error: no matching version = 0.0.0 found for package compiler_builtins (required by sysroot)
    location searched: file:///work/.home/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcompiler_builtins
    versions found: 0.1.0
    consider running cargo update to update a path dependency's locked version

For my commands:

echo Copied blinky.rs into project
cp blinky.rs demo/src/main.rs
cd demo
unset CARGO_INCREMENTAL
cargo clean
rm -rf ../.home/.xargo
cargo update
xargo build --target thumbv7m-none-eabi -v
arm-none-eabi-readelf -A target/thumbv7m-none-eabi/release/demo

?Related to rust-lang/cargo#4486

Again, I am rookie. Not sure when to do "cargo update" but if I rebuilt my container completely, I don't think I need it. My script for building the container (following the tutorial) could easily be flawed.

from cortex-m-quickstart.

bootchk avatar bootchk commented on May 18, 2024

Now:

= note: arm-none-eabi-ld:
The interrupt handlers are missing. If you are not linking to a device
crate then you supply the interrupt handlers yourself. Check the
documentation.

I will check that I built my "nordic" device crate correctly.

Please let me know if my reports are premature. Thanks for your work.

from cortex-m-quickstart.

bootchk avatar bootchk commented on May 18, 2024

But the tail of my blinky.rs is:

`// This part is the same as before
#[allow(dead_code)]
#[used]
#[link_section = ".rodata.interrupts"]
static INTERRUPTS: [extern "C" fn(); 240] = [default_handler; 240];

extern "C" fn default_handler() {
asm::bkpt();
}`

Which I think is the interrupt handler for all interrupt vectors.

from cortex-m-quickstart.

japaric avatar japaric commented on May 18, 2024

#[link_section = ".rodata.interrupts"]

The link section has been renamed to .vector_table.interrupts in cortex-m-rt v0.3.x. it was .rodata.interrupts in cortex-m-rt v0.2.x.

If you are linking to a device crate, a crate generated using svd2rust, make sure you are using the latest version of svd2rust with cortex-m-rt v0.3.x. The .vector_table.interrupts link section comes from that crate.

from cortex-m-quickstart.

bootchk avatar bootchk commented on May 18, 2024

Thanks, it compiles and links now. Sorry for using stale version.

FYI I also tried lld-5.0. It doesn't find link.x down in the dependencies, and chokes on link.x syntax (lld not quite compatible with gcc ld scripts yet).

from cortex-m-quickstart.

japaric avatar japaric commented on May 18, 2024

FYI I also tried lld-5.0. It doesn't find link.x down in the dependencies, and chokes on link.x syntax (lld not quite compatible with gcc ld scripts yet).

Yeah, I know; I try lld every now and then. It would be great if lld had full support for ld-style linker scripts because we eventually (may) want to embed lld in rustc. If that happens then we wouldn't need arm-none-eabi-ld to link Cortex-M programs; we couild simply use the lld embedded in rustc.

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.