Files
IoTManager/include/DebugTrace.h
2024-09-21 11:28:46 +03:00

31 lines
1.2 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
// В папке 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 Стэк_адресов
#include "Global.h"
#define RESTART_DEBUG_INFO
#if defined(RESTART_DEBUG_INFO) && defined(ESP32) && !defined(esp32c3m_4mb)
#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;
#endif // RESTART_DEBUG_INFO
__NOINIT_ATTR static int8_t bootloop_panic_count;
extern "C" void __real_esp_panic_handler(void*);
void printDebugTrace();
void sendDebugTraceAndFreeMemory(bool);
void IRAM_ATTR debugUpdate();
extern "C" bool verifyRollbackLater();
void verifyFirmware();