joostn wrote:So these functions must be copied by the bootloader to IRAM and run from there, before code would be able to run directly from flash.
So could this be done using something like this?
...
I tried a few things but couldn't get EXCLUDE_FILE to work at all. Stumbled upon this:
http://sourcerytools.com/pipermail/arm- ... 00224.html
which suggests EXCLUDE_FILE should be repeated multiple times in the line, but still it doesn't seem to match my .o files.
It should mention object files, parts of the libmain.a instead of the archive itself, e.g.
--- eagle.app.v6.ld 2014-11-28 05:43:13.065557060 +0300
+++ eagle.app.v6.flash.ld 2014-11-30 17:19:27.363125457 +0300
@@ -155,7 +155,7 @@
*(.entry.text)
*(.init.literal)
*(.init)
- *(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
+ *app_main.o(.literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
*(.fini.literal)
*(.fini)
*(.gnu.version)
@@ -176,6 +176,7 @@
{
_irom0_text_start = ABSOLUTE(.);
*(.irom0.literal .irom.literal .irom.text.literal .irom0.text .irom.text)
+ *(EXCLUDE_FILE(*app_main.o) .literal .text .literal.* .text.* .stub .gnu.warning .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
_irom0_text_end = ABSOLUTE(.);
} >irom0_0_seg :irom0_0_phdr
}
This script produces ELF as expected, but still doesn't work when I flash it. Maybe I'm doing something wrong as well...