-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Describe the bug
When the RP2040 core (either earlephilhower's arduino-pico layer, or the pico SDK under it) has a fatal error, it uses a panic(...) macro, which prints an error message to the debug console. This is very useful for knowing what went wrong.
To Reproduce
- Open this project
- Run the project.
Expected behavior
The serial console should include the "OMG I AM PANICKING" message.
However, it does not, the chip just stops running at that point.
Environment (please complete the following information):
- OS: Linux (but likely irrelevant)
- Browser: Firefox (but likely irrelevant)
Additional context
It's relatively rare for end users to call panic(...) themselves but it's a common diagnostic. For example! I was helping debug this person's issue by having them use Wokwi, and it turns out they were setting an invalid I2C pin for the port they were using. This would have been trivially obvious if the panic message had shown up, but instead the chip just goes dead.
I have experimented with using the USB-based serial port instead, but also don't see panic messages there.
I'm pretty sure panic messages to show on serial with the real hardware (again it's a pretty important diagnostic) but I can reproduce that if desired to make sure.