Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there anyway to use panic_semihosting with this crate? #39

Open
ebakoba opened this issue Oct 18, 2020 · 1 comment
Open

Is there anyway to use panic_semihosting with this crate? #39

ebakoba opened this issue Oct 18, 2020 · 1 comment

Comments

@ebakoba
Copy link

ebakoba commented Oct 18, 2020

Every example declares its own #[panic_handler] function.

When I use only panic_semihosting crate, I get an error stating:

  = note: arm-none-eabi-ld: /home/pi/.rustup/toolchains/nightly-armv7-unknown-linux-gnueabihf/lib/rustlib/thumbv7m-none-eabi/lib/libcore-c83b634e1f0ecbbe.rlib(core-c83b634e1f0ecbbe.core.2smtzb3g-cgu.0.rcgu.o): in function `core::panicking::panic_fmt':
          /rustc/043eca7f0b34d12e61c44206beca740628647080//library/core/src/panicking.rs:85: undefined reference to `rust_begin_unwind'

If I use both on the same time, I obviously get the duplicate error.

Right now, I have only been able to succeed with self-decleared panic-handler function.

@thalesfragoso
Copy link
Member

I think the example declares its own panic_handler to avoid pulling in more dependencies, you don't need to define it yourself for this crate to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants