Git Product home page Git Product logo

Comments (6)

xieyuheng avatar xieyuheng commented on May 22, 2024
  /home/xyh/magismoke/discovery/src/05-led-roulette (master)
cargo --version
cargo 1.29.0-nightly (0ec7281b9 2018-08-20)

  /home/xyh/magismoke/discovery/src/05-led-roulette (master)
rustc --version
rustc 1.30.0-nightly (fc81e3624 2018-09-07)

from discovery.

japaric avatar japaric commented on May 22, 2024

Sorry about this, I published a new version of the stm32f30x crate without making adequate preparations and testing, but the problem should now be fixed.

To get the fix you'll have to update some crates in your dependency graph by either deleting the Cargo.lock file or calling cargo update.

Let me know if this still doesn't work after you have tried that!

from discovery.

xieyuheng avatar xieyuheng commented on May 22, 2024

Thank you Sir.
The problem is fixed now.


In another note.
Is the use of target -> ../../target/ safe with cargo ?

I understand it is used to reduce compiling time,
but if I cargo build in 05-led-roulette
and then in 06-hello-world,
and then again in 05-led-roulette,
only the first build will success.

something like the following will happen :

  /home/xyh/magismoke/discovery/src/06-hello-world (master)
cargo build
   Compiling vcell v0.1.0
   Compiling aligned v0.2.0
   Compiling r0 v0.2.2
   Compiling bare-metal v0.2.3
   Compiling nb v0.1.1
   Compiling void v1.0.2
   Compiling cast v0.2.2
   Compiling cortex-m v0.5.7
   Compiling typenum v1.10.0
   Compiling cortex-m-rt v0.6.2
   Compiling stm32f30x v0.7.1
   Compiling volatile-register v0.2.0
   Compiling embedded-hal v0.2.1
   Compiling f3 v0.6.1
   Compiling cortex-m-rt v0.5.7
   Compiling generic-array v0.11.1
   Compiling lsm303dlhc v0.2.0
   Compiling l3gd20 v0.2.0
   Compiling stm32f30x-hal v0.2.0
   Compiling aux6 v0.1.0 (file:///home/xyh/magismoke/discovery/src/06-hello-world/auxiliary)
   Compiling hello-world v0.1.0 (file:///home/xyh/magismoke/discovery/src/06-hello-world)
error: language item required, but not found: `eh_personality`

error: aborting due to previous error

error: Could not compile `hello-world`.

To learn more, run the command again with --verbose.

  101  /home/xyh/magismoke/discovery/src/06-hello-world (master)

and

  /home/xyh/magismoke/discovery/src/05-led-roulette (master)
cargo build
   Compiling panic-abort v0.2.0
   Compiling aux5 v0.1.0 (file:///home/xyh/magismoke/discovery/src/05-led-roulette/auxiliary)
   Compiling led-roulette v0.1.0 (file:///home/xyh/magismoke/discovery/src/05-led-roulette)
error: language item required, but not found: `eh_personality`

error: aborting due to previous error

error: Could not compile `led-roulette`.

To learn more, run the command again with --verbose.

  101  /home/xyh/magismoke/discovery/src/05-led-roulette (master)
ll

from discovery.

xieyuheng avatar xieyuheng commented on May 22, 2024

and the Cargo.lock file follows this target -> ../../target/ to ../../Cargo.lock

from discovery.

japaric avatar japaric commented on May 22, 2024

Is the use of target -> ../../target/ safe with cargo ?

That's just a convenience and has no effect on the build. All the projects are part of a workspace so they share their build artifacts in the target directory that's in the root of the repository.

but if I cargo build in 05-led-roulette

If you read through the book in order it'll tell that you have to use cargo build --target thumbv7em-none-eabihf in projects 05 and 06. You can use just cargo build in the other projects because thumbv7em-none-eabihf has been set as default compilation target in .cargo/config.

$ cd 05-led-roulette
$ cargo clean
$ cargo build --target thumbv7em-none-eabihf && echo OK
    Finished dev [unoptimized + debuginfo] target(s) in 38.91s
OK

$ cd ../06-hello-world
$ cargo build --target thumbv7em-none-eabihf && echo OK
    Finished dev [unoptimized + debuginfo] target(s) in 0.30s
OK

from discovery.

xieyuheng avatar xieyuheng commented on May 22, 2024

Thanks again for your patient explainntaions.
I am closing this issue.

from discovery.

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.