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, "\" revision: %i", chip_info.revision);*/
|
||||
|
||||
if (coredumpAvailable)
|
||||
if (coredumpAvailable)
|
||||
{
|
||||
|
||||
ESP_LOGE(jannexTAG, "-------- CORE DUMP INFO END --------");
|
||||
|
@ -223,16 +223,16 @@ void __wrap_esp_panic_handler(panic_info_t *info)
|
|||
panicRetryCounter++;
|
||||
|
||||
// Convert the integer to a string
|
||||
char retryCounterStr[10]; // Adjust the size as needed
|
||||
snprintf(retryCounterStr, sizeof(retryCounterStr), "%d", panicRetryCounter);
|
||||
// char retryCounterStr[10]; // Adjust the size as needed
|
||||
// snprintf(retryCounterStr, sizeof(retryCounterStr), "%d", panicRetryCounter);
|
||||
|
||||
// Create the message with the retry counter value
|
||||
char message[100]; // Adjust the size as needed
|
||||
strcpy(message, "Panic has been triggered by the program! Retry counter: ");
|
||||
strcat(message, retryCounterStr);
|
||||
// char message[100]; // Adjust the size as needed
|
||||
// strcpy(message, "Panic has been triggered by the program! Retry counter: ");
|
||||
// strcat(message, retryCounterStr);
|
||||
|
||||
// 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...)
|
||||
__real_esp_panic_handler(info);
|
||||
|
|
Loading…
Reference in New Issue