Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9771857

Browse files
committed
feat: ✨ Add panic handling section
1 parent 527e836 commit 9771857

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

‎README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ This project is developed and maintained by the [Resources team][team].
8585
- [WIP](#wip)
8686
- [no-std crates](#no-std-crates)
8787
- [WIP](#wip-1)
88+
- [Panic handling](#DON'T-PANIC)
8889
- [Firmware projects](#firmware-projects)
8990
- [Old books, blogs, and training materials](#old-books-blogs-and-training-materials)
9091
- [License](#license)
@@ -1277,7 +1278,6 @@ Work in progress drivers. Help the authors make these crates awesome!
12771278
1. [nom](https://crates.io/crates/nom): parser combinator framework - [![crates.io](https://img.shields.io/crates/v/nom.svg)](https://crates.io/crates/nom)
12781279
1. [null-terminated](https://crates.io/crates/null-terminated): generic null-terminated arrays - [![crates.io](https://img.shields.io/crates/v/null-terminated.svg)](https://crates.io/crates/null-terminated)
12791280
1. [num-format](https://crates.io/crates/num-format): Crate for producing string representations of numbers, formatted according to international standards, e.g. "1,000,000" for US English - [![crates.io](https://img.shields.io/crates/v/num-format.svg)](https://crates.io/crates/num-format)
1280-
1. [`panic-persist`]: A panic handler crate inspired by `panic-ramdump` that logs panic messages to a region of RAM defined by the user, allowing for discovery of panic messages post-mortem using normal program control flow. - [![crates.io](https://img.shields.io/crates/v/panic-persist.svg)](https://crates.io/crates/panic-persist)
12811281
1. [pc-keyboard]: A PS/2 keyboard protocol driver. Transport (bit-banging or SPI) agnostic, but can convert Set 2 Scancodes into Unicode. [![crates.io](https://img.shields.io/crates/v/pc-keyboard.svg)](https://crates.io/crates/pc-keyboard)
12821282
1. [qei](https://crates.io/crates/qei) : A qei wrapper that allows you to extend your qei timers from a 16-bit integer to a 64-bit integer. - [![crates.io](https://img.shields.io/crates/v/qei.svg)](https://crates.io/crates/qei)
12831283
1. [qemu-exit]: Quit a running QEMU session with user-defined exit code. Useful for unit or integration tests using QEMU. - [![crates.io](https://img.shields.io/crates/v/qemu-exit.svg)](https://crates.io/crates/qemu-exit)
@@ -1299,8 +1299,8 @@ Work in progress drivers. Help the authors make these crates awesome!
12991299
1. [adafruit-bluefruit-protocol]: A `no_std` parser for the [Adafruit Bluefruit LE Connect controller protocol]. - [![crates.io](https://img.shields.io/crates/v/adafruit-bluefruit-protocol)](https://crates.io/crates/adafruit-bluefruit-protocol)
13001300
1. [wtx](https://github.com/c410-f3r/wtx): Among other things, provides implementations to interact with HTTP, WebSockets and Databases.
13011301

1302+
[no-std-category]: https://crates.io/categories/no-std
13021303
[`cmim`]: https://crates.io/crates/cmim
1303-
[`panic-persist`]: https://crates.io/crates/panic-persist
13041304
[bitmatch]: https://crates.io/crates/bitmatch
13051305
[biquad]: https://crates.io/crates/biquad
13061306
[embassy]: https://github.com/akiles/embassy
@@ -1326,7 +1326,30 @@ Work in progress crates. Help the authors make these crates awesome!
13261326
- [OxCC](https://github.com/jonlamb-gh/oxcc): A port of Open Source Car Control written in Rust
13271327
- [Rubble](https://github.com/jonas-schievink/rubble): A pure-Rust embedded BLE stack [![crates.io](https://img.shields.io/crates/v/rubble.svg)](https://crates.io/crates/rubble)
13281328

1329-
[no-std-category]: https://crates.io/categories/no-std
1329+
## DON'T PANIC
1330+
1331+
There are many ways to handle panics in embedded devices, these crates provide helpful variants.
1332+
1333+
1. [`dont_panic`] + [`dont_panic_slice`]: panic!()-like macro that causes linking error instead of panicking. May be used to statically ensure some code won't panic.
1334+
1. [`no-panic`]: Attribute macro to require that the compiler prove a function can't ever panic.
1335+
1. [`panic-abort`]: Causes an abort on panics (nightly-only)
1336+
1. [`panic-halt`]: Halts the processor on panics
1337+
1. [`panic-itm`]: Prints the panic through the chip's ITM to a debugger attached to the SWO pin (Cortex-M with ITM only)
1338+
1. [`panic-never`]: This crate guarantees that your application is free of panicking branches.
1339+
1. [`panic-persist`]: A panic handler crate inspired by `panic-ramdump` that logs panic messages to a region of RAM defined by the user, allowing for discovery of panic messages post-mortem using normal program control flow. - [![crates.io](https://img.shields.io/crates/v/panic-persist.svg)](https://crates.io/crates/panic-persist)
1340+
1. [`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)
1341+
1. [`panic-semihosting`]: Prints the panic message via semihosting to an attached debugger (Cortex-M only)
1342+
1343+
[`dont_panic_slice`]: https://crates.io/crates/dont_panic_slice
1344+
[`dont_panic`]: https://crates.io/crates/dont_panic
1345+
[`no-panic`]: https://crates.io/crates/no-panic
1346+
[`panic-abort`]: https://github.com/japaric/panic-abort
1347+
[`panic-halt`]: https://github.com/korken89/panic-halt
1348+
[`panic-itm`]: https://github.com/rust-embedded/cortex-m/tree/master/panic-itm
1349+
[`panic-never`]: https://docs.rs/panic-never
1350+
[`panic-persist`]: https://crates.io/crates/panic-persist
1351+
[`panic-ramdump`]: https://github.com/therealprof/panic-ramdump
1352+
[`panic-semihosting`]: https://github.com/rust-embedded/panic-semihosting
13301353

13311354
## Firmware projects
13321355

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /