mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'fix/xtensa_bss_end_alignment' into 'master'
fix(panic): fix _bss_end alignment for esp32s2 and esp32s3 See merge request espressif/esp-idf!45469
This commit is contained in:
@@ -333,7 +333,7 @@ SECTIONS
|
||||
mutable[dram0_bss]
|
||||
/* mutable libs end */
|
||||
|
||||
ALIGNED_SYMBOL(8, _bss_end)
|
||||
ALIGNED_SYMBOL(16, _bss_end)
|
||||
} > dram0_0_seg
|
||||
|
||||
.flash.appdesc : ALIGN(0x10)
|
||||
|
||||
@@ -283,7 +283,7 @@ SECTIONS
|
||||
mutable[dram0_bss]
|
||||
/* mutable libs end */
|
||||
|
||||
ALIGNED_SYMBOL(8, _bss_end)
|
||||
ALIGNED_SYMBOL(16, _bss_end)
|
||||
} > dram0_0_seg
|
||||
|
||||
ASSERT(((_bss_end - ORIGIN(dram0_0_seg)) <= LENGTH(dram0_0_seg)),
|
||||
|
||||
@@ -97,7 +97,7 @@ void esp_restart_noos(void)
|
||||
// If stack_addr is from External Memory (CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM is used)
|
||||
// then need to switch SP to Internal Memory otherwise
|
||||
// we will get the "Cache disabled but cached memory region accessed" error after Cache_Read_Disable.
|
||||
uint32_t new_sp = ALIGN_DOWN(_bss_end, 16);
|
||||
uint32_t new_sp = ALIGN_DOWN((uint32_t)&_bss_end, 16);
|
||||
SET_STACK(new_sp);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -102,7 +102,7 @@ void esp_restart_noos(void)
|
||||
// If stack_addr is from External Memory (CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM is used)
|
||||
// then need to switch SP to Internal Memory otherwise
|
||||
// we will get the "Cache disabled but cached memory region accessed" error after Cache_Read_Disable.
|
||||
uint32_t new_sp = ALIGN_DOWN(_bss_end, 16);
|
||||
uint32_t new_sp = ALIGN_DOWN((uint32_t)&_bss_end, 16);
|
||||
SET_STACK(new_sp);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user