Where to put panic implementations? #18

Closed
opened 2025-11-06 08:13:04 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @jonas-schievink on GitHub (Apr 30, 2019).

Originally assigned to: @berkus on GitHub.

There's quite a few panic implementations now, so I think it'd be useful to list them here. I'm not sure where exactly they should be put though, because some of them are platform-independent while others aren't. Personally I think these belong in their own section.

List of crates:

  • panic-halt: Halts the processor on panics
  • panic-abort: Causes an abort on panics (nightly-only)
  • panic-ramdump: Writes the panic message into the beginning of RAM and enters an infinite loop; the message can be extracted by attaching a debugger (Cortex-M only)
  • panic-semihosting: Prints the panic message via semihosting to an attached debugger (Cortex-M only)
  • panic-itm: Prints the panic through the chip's ITM to a debugger attached to the SWO pin (Cortex-M with ITM only)
Originally created by @jonas-schievink on GitHub (Apr 30, 2019). Originally assigned to: @berkus on GitHub. There's quite a few panic implementations now, so I think it'd be useful to list them here. I'm not sure where exactly they should be put though, because some of them are platform-independent while others aren't. Personally I think these belong in their own section. List of crates: * [`panic-halt`](https://github.com/korken89/panic-halt): Halts the processor on panics * [`panic-abort`](https://github.com/japaric/panic-abort): Causes an abort on panics (nightly-only) * [`panic-ramdump`](https://github.com/therealprof/panic-ramdump): Writes the panic message into the beginning of RAM and enters an infinite loop; the message can be extracted by attaching a debugger (Cortex-M only) * [`panic-semihosting`](https://github.com/rust-embedded/panic-semihosting): Prints the panic message via semihosting to an attached debugger (Cortex-M only) * [`panic-itm`](https://github.com/rust-embedded/panic-itm): Prints the panic through the chip's ITM to a debugger attached to the SWO pin (Cortex-M with ITM only)
GiteaMirror added the enhancement label 2025-11-06 08:13:04 -06:00
Author
Owner

@jonas-schievink commented on GitHub (May 7, 2019):

Forgot about panic-never.

@jonas-schievink commented on GitHub (May 7, 2019): Forgot about [`panic-never`](https://docs.rs/panic-never).
Author
Owner

@Disasm commented on GitHub (May 7, 2019):

Maybe these deserve to be in the panic-section too:

@Disasm commented on GitHub (May 7, 2019): Maybe these deserve to be in the panic-section too: * [`no-panic`](https://crates.io/crates/no-panic) * [`dont_panic`](https://crates.io/crates/dont_panic) + [`dont_panic_slice`](https://crates.io/crates/dont_panic_slice)
Author
Owner

@berkus commented on GitHub (Nov 24, 2024):

PR is ready for review.

@berkus commented on GitHub (Nov 24, 2024): PR is ready for review.
Author
Owner

@BartMassey commented on GitHub (Nov 25, 2024):

panic-rtt ?

@BartMassey commented on GitHub (Nov 25, 2024): `panic-rtt` ?
Author
Owner

@berkus commented on GitHub (Nov 28, 2024):

@BartMassey pls review

@berkus commented on GitHub (Nov 28, 2024): @BartMassey pls review
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-embedded-rust#18