ld: support ".noinit*" uninitialized ram section
Add support for a section(s) ".noinit*" that will be allocated in ram, but not cleared or initialized. This can be used for passing variables between a bootloader and an app for instance, or even just between restarts of your application. Without any assigned usages of the section, there is zero change in ram usage. The align does nothing when the prior section was already aligned.
This commit is contained in:
parent
1acfa1c917
commit
54319107b0
|
@ -118,6 +118,12 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
|
||||
/* ram, but not cleared on reset, eg boot/app comms */
|
||||
.noinit (NOLOAD) : {
|
||||
*(.noinit*)
|
||||
} >ram
|
||||
. = ALIGN(4);
|
||||
|
||||
.data : {
|
||||
_data = .;
|
||||
*(.data*) /* Read-write initialized data */
|
||||
|
|
|
@ -89,6 +89,12 @@ SECTIONS
|
|||
. = ALIGN(4);
|
||||
_etext = .;
|
||||
|
||||
/* ram, but not cleared on reset, eg boot/app comms */
|
||||
.noinit (NOLOAD) : {
|
||||
*(.noinit*)
|
||||
} >ram
|
||||
. = ALIGN(4);
|
||||
|
||||
.data : {
|
||||
_data = .;
|
||||
*(.data*) /* Read-write initialized data */
|
||||
|
|
Loading…
Reference in New Issue