Git Product home page Git Product logo

Comments (4)

jonas-schievink avatar jonas-schievink commented on July 23, 2024 1

The problem isn't "eabihf" but "thumbv7em", you have to remove the e

(correction: "eabihf" is also a problem since there's no floating-point unit)

from rtic.

japaric avatar japaric commented on July 23, 2024

uxtab r0, r0, r1

Sounds like you chose the wrong compilation target. The ARM documentation says:

This 32-bit Thumb instruction is available in ARMv6T2 and above. For the ARMv7-M architecture, it are only available in an ARMv7E-M implementation.

It seems that you are using the thumbv7em-none-eabi[hf] target. For blue-pill you must use the thumbv7m-none-eabi target. If you are using the thumbv7m-none-eabi target this could be a codegen bug in the compiler (in LLVM).

from rtic.

LunNova avatar LunNova commented on July 23, 2024

I was using the wrong target.

Might be worth updating the documentation section "Optionally, set a default build target" https://docs.rs/cortex-m-quickstart/0.1.8/cortex_m_quickstart/ to mention that eabihf isn't always right depending on the target processor. From https://japaric.github.io/blue-pill/blue_pill/#usage you're directed to the quickstart crate without being warned to change it.

After changing the target to "thumbv7em-none-eabi" it still generates the uxtab instruction at opt-level = 0.

I rm -rf ~/.xargo and ran xargo clean. Is there anything else that might need removed?

Program received signal SIGTRAP, Trace/breakpoint trap.
cortex_m_rt::default_handler::h09ef7fbcd51f80a2 (ef=0x20004e00)
    at C:\Users\Luna\.cargo\registry\src\github.com-1ecc6299db9ec823\cortex-m-rt-0.3.8\src\lib.rs:459
459         asm::bkpt();
(gdb) bt
#0  cortex_m_rt::default_handler::h09ef7fbcd51f80a2 (ef=0x20004e00)
    at C:\Users\Luna\.cargo\registry\src\github.com-1ecc6299db9ec823\cortex-m-rt-0.3.8\src\lib.rs:459
#1  <signal handler called>
#2  0x08000252 in blue_pill_usb_keyboard::main::_$u7b$$u7b$closure$u7d$$u7d$::hbb85efdde22dada6 (_t=0x20004f87) at src\main.rs:109
#3  0x08005622 in cortex_m_rtfm::atomic::hc58ac6892de4c8fc (t=0x20004f97,
    f=...)
    at C:\Users\Luna\.cargo\registry\src\github.com-1ecc6299db9ec823\cortex-m-rtfm-0.2.2\src/lib.rs:110
#4  0x080001e2 in blue_pill_usb_keyboard::main::h89da4d3b38bebe0d ()
    at src\main.rs:102
#5  0x080055d4 in cortex_m_rt::lang_items::start::h934682ce0b6544a0 (
    main=0x80001bb <blue_pill_usb_keyboard::main::h89da4d3b38bebe0d>,
    _argc=0, _argv=0x0)
    at C:\Users\Luna\.cargo\registry\src\github.com-1ecc6299db9ec823\cortex-m-rt-0.3.8\src/lang_items.rs:31
#6  0x0800127e in main ()
(gdb) x/i 0x08000252
   0x8000252 <blue_pill_usb_keyboard::main::_$u7b$$u7b$closure$u7d$$u7d$::hbb85efdde22dada6+96>:        uxtab   r0, r0, r1

from rtic.

LunNova avatar LunNova commented on July 23, 2024

Thanks @japaric / @jonas-schievink , it's working now :)

from rtic.

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.