kernel: init: initialize stm32 ccm sections
Initialize the ccm_bss section to zero. Copy the ccm_data section from the rom section. Signed-off-by: Erwin Rol <erwin@erwinrol.com>
This commit is contained in:
parent
e4890181b4
commit
1dc41d19b3
1 changed files with 8 additions and 0 deletions
|
@ -142,6 +142,10 @@ void _bss_zero(void)
|
|||
{
|
||||
memset(&__bss_start, 0,
|
||||
((u32_t) &__bss_end - (u32_t) &__bss_start));
|
||||
#ifdef CONFIG_CCM_BASE_ADDRESS
|
||||
memset(&__ccm_bss_start, 0,
|
||||
((u32_t) &__ccm_bss_end - (u32_t) &__ccm_bss_start));
|
||||
#endif
|
||||
#ifdef CONFIG_APPLICATION_MEMORY
|
||||
memset(&__app_bss_start, 0,
|
||||
((u32_t) &__app_bss_end - (u32_t) &__app_bss_start));
|
||||
|
@ -162,6 +166,10 @@ void _data_copy(void)
|
|||
{
|
||||
memcpy(&__data_ram_start, &__data_rom_start,
|
||||
((u32_t) &__data_ram_end - (u32_t) &__data_ram_start));
|
||||
#ifdef CONFIG_CCM_BASE_ADDRESS
|
||||
memcpy(&__ccm_data_start, &__ccm_data_rom_start,
|
||||
((u32_t) &__ccm_data_end - (u32_t) &__ccm_data_start));
|
||||
#endif
|
||||
#ifdef CONFIG_APPLICATION_MEMORY
|
||||
memcpy(&__app_data_ram_start, &__app_data_rom_start,
|
||||
((u32_t) &__app_data_ram_end - (u32_t) &__app_data_ram_start));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue