Files
IoTManager/include/DebugTrace.h

34 lines
1.3 KiB
C
Raw Normal View History

2024-09-20 11:07:08 +03:00
#pragma once
2024-09-20 13:22:49 +03:00
// В папке toolchchain с которым собирались
// (Для esp32 например %%USERPROFILE%/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin)
// из командной строки Windows (cmd) запустить файл c параметрами:
// xtensa-esp32-elf-addr2line.exe -pfiaC -e Путь_к_файлу/firmware.elf Стэк_адресов_из_сообщения
// %%USERPROFILE%/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin xtensa-esp32-elf-addr2line.exe -pfiaC -e .pio/build/esp32_4mb3f/firmware.elf Стэк_адресов
2024-09-20 11:07:08 +03:00
#include "Global.h"
2024-11-22 22:45:10 +03:00
#if defined(ESP32) && !defined(esp32c3m_4mb) && !defined(esp32c6_4mb) && !defined(esp32c6_8mb)
2024-09-20 11:07:08 +03:00
#define RESTART_DEBUG_INFO
2024-11-22 22:45:10 +03:00
#endif
#if defined(RESTART_DEBUG_INFO)
2024-09-20 11:07:08 +03:00
#define CONFIG_RESTART_DEBUG_STACK_DEPTH 15
typedef struct {
size_t heap_total;
size_t heap_free;
size_t heap_free_min;
time_t heap_min_time;
uint32_t backtrace[CONFIG_RESTART_DEBUG_STACK_DEPTH];
} re_restart_debug_t;
2024-11-16 15:00:04 +03:00
__NOINIT_ATTR static int8_t bootloop_panic_count;
2024-09-20 11:07:08 +03:00
2024-11-16 15:00:04 +03:00
void IRAM_ATTR debugUpdate();
2024-09-20 11:07:08 +03:00
#endif // RESTART_DEBUG_INFO
2024-09-21 11:28:46 +03:00
2024-11-16 15:00:04 +03:00
2024-09-21 11:28:46 +03:00
2024-09-20 11:07:08 +03:00
extern "C" void __real_esp_panic_handler(void*);
void printDebugTrace();
void sendDebugTraceAndFreeMemory(bool);
2024-09-20 12:05:34 +03:00
2024-11-16 15:00:04 +03:00
void startWatchDog();
2024-11-17 22:35:32 +03:00
//extern "C" bool verifyRollbackLater();
2024-09-20 12:05:34 +03:00
void verifyFirmware();