fix: bootloader RAM regions

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent a243b6beea
commit b11e8a3255
+11 -10
View File
@@ -103,7 +103,7 @@ SECTIONS
_sidata = .; _sidata = .;
/* Initialized data sections goes into RAM, load LMA copy after code */ /* Initialized data sections goes into RAM, load LMA copy after code */
.data : AT ( _sidata ) .data :
{ {
. = ALIGN(4); . = ALIGN(4);
_sdata = .; /* create a global symbol at data start */ _sdata = .; /* create a global symbol at data start */
@@ -111,12 +111,12 @@ SECTIONS
*(.data*) /* .data* sections */ *(.data*) /* .data* sections */
. = ALIGN(4); . = ALIGN(4);
_edata = .; /* define a global symbol at data end */ _edata = .; /* define a global symbol at data end */
} >CCM } >RAM AT> FLASH
/* Uninitialized data section */ /* Uninitialized data section */
. = ALIGN(4);
.bss : .bss :
{ {
. = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */ /* This is used by the startup in order to initialize the .bss secion */
_sbss = .; /* define a global symbol at bss start */ _sbss = .; /* define a global symbol at bss start */
/* __bss_start__ = _sbss; */ /* __bss_start__ = _sbss; */
@@ -125,14 +125,14 @@ SECTIONS
*(COMMON) *(COMMON)
. = ALIGN(4); . = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */ _ebss = .; /* define a global symbol at bss end */
} >CCM } >RAM
/* Non-zeroed data section */ /* Non-zeroed data section */
. = ALIGN(4); . = ALIGN(4);
.noinit (NOLOAD) : .noinit (NOLOAD) :
{ {
*(.noinit) *(.noinit)
} >CCM } >RAM
/* collect all uninitialized .ccm sections */ /* collect all uninitialized .ccm sections */
.ram (NOLOAD) : .ram (NOLOAD) :
@@ -142,14 +142,15 @@ SECTIONS
*(.ram) *(.ram)
} >RAM } >RAM
/* User_heap_stack section, used to check that there is enough RAM left */ .ccm (NOLOAD) :
._user_heap_stack :
{ {
. = ALIGN(4); . = ALIGN(4);
. = . + _Min_Heap_Size; _sccm = .;
. = . + _Main_Stack_Size; *(.ccm)
. = ALIGN(4); . = ALIGN(4);
} >RAM . = . + _Main_Stack_Size;
_eccm = .;
} >CCM
/* MEMORY_bank1 section, code must be located here explicitly */ /* MEMORY_bank1 section, code must be located here explicitly */
/* Example: extern int foo(void) __attribute__ ((section (".mb1text"))); */ /* Example: extern int foo(void) __attribute__ ((section (".mb1text"))); */