fixed panic handler
parent
6ea4a0356a
commit
df7d4d92fb
14
src/jannex.c
14
src/jannex.c
|
@ -192,7 +192,7 @@ void initJannex()
|
||||||
ESP_LOGI(jannexTAG, "Chip model: %s", getChipModelString(chip_info.model));
|
ESP_LOGI(jannexTAG, "Chip model: %s", getChipModelString(chip_info.model));
|
||||||
ESP_LOGI(jannexTAG, "\" revision: %i", chip_info.revision);*/
|
ESP_LOGI(jannexTAG, "\" revision: %i", chip_info.revision);*/
|
||||||
|
|
||||||
if (coredumpAvailable)
|
if (coredumpAvailable)
|
||||||
{
|
{
|
||||||
|
|
||||||
ESP_LOGE(jannexTAG, "-------- CORE DUMP INFO END --------");
|
ESP_LOGE(jannexTAG, "-------- CORE DUMP INFO END --------");
|
||||||
|
@ -223,16 +223,16 @@ void __wrap_esp_panic_handler(panic_info_t *info)
|
||||||
panicRetryCounter++;
|
panicRetryCounter++;
|
||||||
|
|
||||||
// Convert the integer to a string
|
// Convert the integer to a string
|
||||||
char retryCounterStr[10]; // Adjust the size as needed
|
// char retryCounterStr[10]; // Adjust the size as needed
|
||||||
snprintf(retryCounterStr, sizeof(retryCounterStr), "%d", panicRetryCounter);
|
// snprintf(retryCounterStr, sizeof(retryCounterStr), "%d", panicRetryCounter);
|
||||||
|
|
||||||
// Create the message with the retry counter value
|
// Create the message with the retry counter value
|
||||||
char message[100]; // Adjust the size as needed
|
// char message[100]; // Adjust the size as needed
|
||||||
strcpy(message, "Panic has been triggered by the program! Retry counter: ");
|
// strcpy(message, "Panic has been triggered by the program! Retry counter: ");
|
||||||
strcat(message, retryCounterStr);
|
// strcat(message, retryCounterStr);
|
||||||
|
|
||||||
// Print the message using esp_rom_printf
|
// Print the message using esp_rom_printf
|
||||||
esp_rom_printf(message);
|
esp_rom_printf("Panic has been triggered by the program!");
|
||||||
|
|
||||||
// Call the original panic handler function to finish processing this error (creating a core dump for example...)
|
// Call the original panic handler function to finish processing this error (creating a core dump for example...)
|
||||||
__real_esp_panic_handler(info);
|
__real_esp_panic_handler(info);
|
||||||
|
|
Loading…
Reference in New Issue