mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-27 12:50:39 +03:00
add HIMEM debugging tools (check free size, and memory test) (#1852)
* Update defines.h * Update esp_sys.h * Update esp_sys.cpp * Add files via upload * Update perfmon.c * Update main.cpp * Update main.cpp * Delete himem_memory_check.c * Add files via upload * Update defines.h * Update himem_memory_check.cpp * Update main.cpp * Update himem_memory_check.cpp * Update himem_memory_check.h * Update main.cpp
This commit is contained in:
@@ -54,6 +54,14 @@
|
||||
#endif
|
||||
#endif //DEBUG_ENABLE_SYSINFO
|
||||
|
||||
|
||||
#ifdef USE_HIMEM_IF_AVAILABLE
|
||||
#include "esp32/himem.h"
|
||||
#ifdef DEBUG_HIMEM_MEMORY_CHECK
|
||||
#include "himem_memory_check.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern const char* GIT_TAG;
|
||||
extern const char* GIT_REV;
|
||||
extern const char* GIT_BRANCH;
|
||||
@@ -160,12 +168,6 @@ extern "C" void app_main(void)
|
||||
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLE_SYSINFO
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL( 4, 0, 0 )
|
||||
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Device Info" + get_device_info() );
|
||||
ESP_LOGD(TAG, "Device infos %s", get_device_info().c_str());
|
||||
#endif
|
||||
#endif //DEBUG_ENABLE_SYSINFO
|
||||
|
||||
ESP_LOGI(TAG, "\n\n\n\n\n"); // Add mark on log to see when it restarted
|
||||
|
||||
@@ -200,6 +202,20 @@ extern "C" void app_main(void)
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "=================================================");
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, versionFormated);
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Reset reason: " + getResetReason());
|
||||
|
||||
#ifdef DEBUG_ENABLE_SYSINFO
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL( 4, 0, 0 )
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Device Info : " + get_device_info() );
|
||||
ESP_LOGD(TAG, "Device infos %s", get_device_info().c_str());
|
||||
#endif
|
||||
#endif //DEBUG_ENABLE_SYSINFO
|
||||
|
||||
#ifdef USE_HIMEM_IF_AVAILABLE
|
||||
#ifdef DEBUG_HIMEM_MEMORY_CHECK
|
||||
LogFile.WriteToFile(ESP_LOG_INFO, TAG, "Himem mem check : " + himem_memory_check() );
|
||||
ESP_LOGD(TAG, "Himem mem check %s", himem_memory_check().c_str());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CheckIsPlannedReboot();
|
||||
CheckOTAUpdate();
|
||||
|
||||
Reference in New Issue
Block a user