增加踩内存分析以及宏定义
authorCaisking <Casiking@zhihuishixun.com>
Thu, 5 Jun 2025 10:03:11 +0000 (18:03 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Thu, 5 Jun 2025 10:03:11 +0000 (18:03 +0800)
code/sdk/application/brandy/brandy_recovery/recovery_display.c
code/sdk/build/config/target_config/brandy/config.py
code/sdk/kernel/liteos/liteos_v207.1.0/Huawei_LiteOS/kernel/base/mem/bestfit/los_memory_internal.h

index 4f667cd..7edf5c5 100644 (file)
@@ -158,6 +158,10 @@ void recovery_display_sample(void)
 
 void recovery_display_init(void)
 {
+#ifdef MEMORY_CORRUPTION
+    PRINT("memory corruption, no display\n");
+    return;
+ #endif
     uint32_t ret;
     uapi_pm_control(PM_DISPLAY_POWER_UP_AND_RUN);
     uapi_tcxo_delay_ms(DISP_POWER_ON_DELAY_MS);
index 6e9e5e0..d05b149 100644 (file)
@@ -376,6 +376,7 @@ target = {
             'BLE_INSTRUCT',
             # 'AILPAY_SUPPORT',
             # 'FACTORYTEST_SERVICE',
+            # 'MEMORY_CORRUPTION',
             
         ],
         #添加自定义应用
index 970eca5..dd6654b 100644 (file)
 #include "los_typedef.h"
 #include "los_memory_pri.h"
 
+#ifdef  MEMORY_CORRUPTION
+#define LOSCFG_MEM_LEAKCHECK 1
+#define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK 1
+#define LOSCFG_MEM_RECORD_LR_CNT 4
+#define LOSCFG_MEM_OMIT_LR_CNT 2
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */