ld: support ".ramtext" section hook to place functions in ram

We already had the hooks for ccmram and ram1 and ram2 and ram3 and xsram
for "other" ram sections, but there was no method, out of the box, for
placing a function in "normal" ram.  The "easy" method of labelling a
function as ".data.someramfunc" causes warnings because code isn't meant
to have a name like ".data*" so we must explicitly add a new code
section.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
master
Karl Palsson 2 years ago
parent 54319107b0
commit b88196f807
  1. 1
      ld/linker.ld.S
  2. 1
      lib/cortex-m-generic.ld

@ -127,6 +127,7 @@ SECTIONS
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
*(.ramtext*) /* "text" functions to run in ram */
. = ALIGN(4);
_edata = .;
} >ram AT >rom

@ -98,6 +98,7 @@ SECTIONS
.data : {
_data = .;
*(.data*) /* Read-write initialized data */
*(.ramtext*) /* "text" functions to run in ram */
. = ALIGN(4);
_edata = .;
} >ram AT >rom

Loading…
Cancel
Save