Browse Source

ld: add symbols for starts and ends of all regions

This makes the boundaries accessible from within the code,
e.g., to set up the MPU.
pull/1402/head
Stefan Tauner 3 years ago
parent
commit
778318c307
  1. 18
      ld/linker.ld.S

18
ld/linker.ld.S

@ -148,64 +148,82 @@ SECTIONS
#if defined(_CCM) #if defined(_CCM)
.ccm : { .ccm : {
_ccm = .;
*(.ccmram*) *(.ccmram*)
. = ALIGN(4); . = ALIGN(4);
_eccm = .;
} >ccm } >ccm
#endif #endif
#if defined(_RAM1) #if defined(_RAM1)
.ram1 : { .ram1 : {
_ram1 = .;
*(.ram1*) *(.ram1*)
. = ALIGN(4); . = ALIGN(4);
_eram1 = .;
} >ram1 } >ram1
#endif #endif
#if defined(_RAM2) #if defined(_RAM2)
.ram2 : { .ram2 : {
_ram2 = .;
*(.ram2*) *(.ram2*)
. = ALIGN(4); . = ALIGN(4);
_eram2 = .;
} >ram2 } >ram2
#endif #endif
#if defined(_RAM3) #if defined(_RAM3)
.ram3 : { .ram3 : {
_ram3 = .;
*(.ram3*) *(.ram3*)
. = ALIGN(4); . = ALIGN(4);
_eram3 = .;
} >ram3 } >ram3
#endif #endif
#if defined(_RAM4) #if defined(_RAM4)
.ram4 : { .ram4 : {
_ram4 = .;
*(.ram4*) *(.ram4*)
. = ALIGN(4); . = ALIGN(4);
_eram4 = .;
} >ram4 } >ram4
#endif #endif
#if defined(_RAM5) #if defined(_RAM5)
.ram5 : { .ram5 : {
_ram5 = .;
*(.ram5*) *(.ram5*)
. = ALIGN(4); . = ALIGN(4);
_eram5 = .;
} >ram5 } >ram5
#endif #endif
#if defined(_XSRAM) #if defined(_XSRAM)
.xsram : { .xsram : {
_xsram = .;
*(.xsram*) *(.xsram*)
. = ALIGN(4); . = ALIGN(4);
_exsram = .;
} >xsram } >xsram
#endif #endif
#if defined(_XDRAM) #if defined(_XDRAM)
.xdram : { .xdram : {
_xdram = .;
*(.xdram*) *(.xdram*)
. = ALIGN(4); . = ALIGN(4);
_exdram = .;
} >xdram } >xdram
#endif #endif
#if defined(_NFCRAM) #if defined(_NFCRAM)
.nfcram : { .nfcram : {
_nfcram = .;
*(.nfcram*) *(.nfcram*)
. = ALIGN(4); . = ALIGN(4);
_enfcram = .;
} >nfcram } >nfcram
#endif #endif

Loading…
Cancel
Save