Allow Panic replacement #463

Merged
kilograham merged 1 commit from panic_replacement into develop 2021-06-02 13:04:38 -05:00
kilograham commented 2021-05-31 16:39:55 -05:00 (Migrated from github.com)

set PICO_PANIC_FUNCTION=foo to use foo
set PICO_PANIC_FUNCTION= to just breakpoint.

set `PICO_PANIC_FUNCTION=foo` to use `foo` set `PICO_PANIC_FUNCTION=` to just breakpoint.
Wren6991 (Migrated from github.com) reviewed 2021-05-31 16:39:55 -05:00
kilograham commented 2021-05-31 16:44:40 -05:00 (Migrated from github.com)

fixes #256

fixes #256
liamfraser (Migrated from github.com) approved these changes 2021-06-01 09:22:07 -05:00
tempelmann commented 2024-08-09 12:44:19 -05:00 (Migrated from github.com)

Is this still supposed to work? I just tried, by adding this line to CMakeLists.txt:

set(PICO_PANIC_FUNCTION tt_panic_handler)

And then implemented it in the main cpp file:

extern "C" void __attribute__((noreturn)) tt_panic_handler(const char *fmt, ...) {
	printf("\nPANIC: %d\n", fmt);
	…

But when I panic, it still uses the default handler.

Is this still supposed to work? I just tried, by adding this line to CMakeLists.txt: set(PICO_PANIC_FUNCTION tt_panic_handler) And then implemented it in the main cpp file: ``` extern "C" void __attribute__((noreturn)) tt_panic_handler(const char *fmt, ...) { printf("\nPANIC: %d\n", fmt); … ``` But when I panic, it still uses the default handler.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!463
No description provided.