mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(coredump): add coredump_extram attribute
Closes https://github.com/espressif/esp-idf/issues/15429
(cherry picked from commit 5ba3e9df98)
This commit is contained in:
@@ -87,6 +87,10 @@ void test_panic_print_backtrace(void);
|
||||
void test_panic_halt(void);
|
||||
#endif /* CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT */
|
||||
|
||||
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY && CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY
|
||||
void test_panic_extram_attr(void);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -222,5 +222,9 @@ void app_main(void)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY && CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY
|
||||
HANDLE_TEST(test_name, test_panic_extram_attr);
|
||||
#endif
|
||||
|
||||
die("Unknown test name");
|
||||
}
|
||||
|
||||
@@ -430,6 +430,16 @@ void test_capture_dram(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY && CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY
|
||||
COREDUMP_EXTRAM_ATTR uint32_t g_extram_bss_var;
|
||||
COREDUMP_EXTRAM_NOINIT_ATTR uint32_t g_extram_noinit_var;
|
||||
void test_panic_extram_attr(void)
|
||||
{
|
||||
g_extram_bss_var = 123456;
|
||||
g_extram_noinit_var = 789012;
|
||||
assert(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_ESP_SYSTEM_USE_FRAME_POINTER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user