fix(esp_common/esp_fault): make ESP_FAULT_ASSERT survive optimization

ESP_FAULT_ASSERT(C) was silently deleted by the optimizer when C is a cached
flag/status already proven by a preceding `if (!C) return/goto`: the compiler
folds C to a constant and drops all three checks, removing the fault-injection
protection with no warning.
This commit is contained in:
harshal.patil
2026-06-18 17:00:42 +05:30
parent 0c2ebe3180
commit 3e246a64a3
21 changed files with 216 additions and 23 deletions
@@ -21,7 +21,7 @@
#if CONFIG_ULP_COPROC_RUN_FROM_HP_MEM
#define SRAM_END ULP_HP_MEM_START
#else
#define SRAM_END 0x4FFAEFC0 /* 2nd stage bootloader iram_loader_seg start address */
#define SRAM_END 0x4FFADFC0 /* 2nd stage bootloader iram_loader_seg start address */
#endif
#define SRAM_SIZE SRAM_END - SRAM_START
#else
@@ -29,7 +29,7 @@
#if CONFIG_ULP_COPROC_RUN_FROM_HP_MEM
#define SRAM_LOW_END ULP_HP_MEM_START
#else
#define SRAM_LOW_END 0x4FF2CBD0 /* 2nd stage bootloader iram_loader_seg start address */
#define SRAM_LOW_END 0x4FF2BBD0 /* 2nd stage bootloader iram_loader_seg start address */
#endif
#define SRAM_LOW_SIZE SRAM_LOW_END - SRAM_LOW_START