Move noinit to after BSS segment,
Now dynamically allocates noinit area size stores it after the bss before the heap and stack.
This commit is contained in:
parent
c9dedfd402
commit
110c82c225
|
@ -3,25 +3,21 @@
|
||||||
SEARCH_DIR(.)
|
SEARCH_DIR(.)
|
||||||
GROUP(-lgcc -lc -lnosys)
|
GROUP(-lgcc -lc -lnosys)
|
||||||
|
|
||||||
NOINIT_SIZE = 0x100;
|
|
||||||
RAM_SIZE = 64K;
|
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH (rx) : ORIGIN = 0x08020, LENGTH = 0x78000
|
FLASH (rx) : ORIGIN = 0x08020, LENGTH = 0x78000
|
||||||
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = RAM_SIZE - NOINIT_SIZE
|
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||||
NOINIT (rwx): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = NOINIT_SIZE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
noinit (NOLOAD):
|
.noinit(NOLOAD):
|
||||||
{
|
{
|
||||||
PROVIDE(__start_noinit_data = .);
|
PROVIDE(__start_noinit_data = .);
|
||||||
KEEP(*(.noinit))
|
*(.noinit)
|
||||||
PROVIDE(__stop_noinit_data = .);
|
PROVIDE(__stop_noinit_data = .);
|
||||||
} >NOINIT
|
} > RAM
|
||||||
}
|
} INSERT AFTER .bss
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
|
15
gcc_nrf52.ld
15
gcc_nrf52.ld
|
@ -3,25 +3,21 @@
|
||||||
SEARCH_DIR(.)
|
SEARCH_DIR(.)
|
||||||
GROUP(-lgcc -lc -lnosys)
|
GROUP(-lgcc -lc -lnosys)
|
||||||
|
|
||||||
NOINIT_SIZE = 0x100;
|
|
||||||
RAM_SIZE = 64K;
|
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
FLASH (rx) : ORIGIN = 0x00000, LENGTH = 0x78000
|
FLASH (rx) : ORIGIN = 0x00000, LENGTH = 0x78000
|
||||||
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = RAM_SIZE - NOINIT_SIZE
|
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||||
NOINIT (rwx): ORIGIN = ORIGIN(RAM) + LENGTH(RAM), LENGTH = NOINIT_SIZE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
noinit (NOLOAD):
|
.noinit(NOLOAD):
|
||||||
{
|
{
|
||||||
PROVIDE(__start_noinit_data = .);
|
PROVIDE(__start_noinit_data = .);
|
||||||
KEEP(*(.noinit))
|
*(.noinit)
|
||||||
PROVIDE(__stop_noinit_data = .);
|
PROVIDE(__stop_noinit_data = .);
|
||||||
} >NOINIT
|
} > RAM
|
||||||
}
|
} INSERT AFTER .bss
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
@ -54,6 +50,7 @@ SECTIONS
|
||||||
PROVIDE(__stop_log_filter_data = .);
|
PROVIDE(__stop_log_filter_data = .);
|
||||||
} > RAM
|
} > RAM
|
||||||
|
|
||||||
|
|
||||||
} INSERT AFTER .data;
|
} INSERT AFTER .data;
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|
Loading…
Reference in New Issue
Block a user