esp32/panichandler: Support building against IDFv5.4.2.
The IDF panic handler resets the watchdog timeout to prevent the printing
of the error message from being cut off by a WDT reset. We use the exact
same function call in our wrapper function for the same purpose.
In IDFv5.4.2 the function used for this was changed from
`esp_panic_handler_reconfigure_wdts` to `esp_panic_handler_feed_wdts`,
specifically in this commit:
cd887ef59a
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
This commit is contained in:
parent
a9801f9960
commit
431b79146e
1 changed files with 10 additions and 1 deletions
|
|
@ -42,11 +42,20 @@
|
|||
#endif
|
||||
|
||||
void __real_esp_panic_handler(void *);
|
||||
void esp_panic_handler_reconfigure_wdts(uint32_t timeout_ms);
|
||||
void panic_print_str(const char *str);
|
||||
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 4, 2)
|
||||
void esp_panic_handler_reconfigure_wdts(uint32_t timeout_ms);
|
||||
#else
|
||||
void esp_panic_handler_feed_wdts(void);
|
||||
#endif
|
||||
|
||||
void MICROPY_WRAP_PANICHANDLER_FUN(__wrap_esp_panic_handler)(void *info) {
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 4, 2)
|
||||
esp_panic_handler_reconfigure_wdts(1000);
|
||||
#else
|
||||
esp_panic_handler_feed_wdts();
|
||||
#endif
|
||||
|
||||
const static char *msg = MICROPY_WRAP_PANICHANDLER_STR(
|
||||
"\r\n"
|
||||
|
|
|
|||
Loading…
Reference in a new issue