Store and access user library functions in ROM

Posts: 6
Joined: Sun Dec 20, 2015 11:27 am

Store and access user library functions in ROM

Postby bovensiepen » Tue Dec 29, 2015 11:34 am


I'm trying to get warm with the FreeRTOS sdk and the locating of user library code. I try at the moment to store some functions in the ROM instead of the RAM by modifying the like this:

Code: Select all

diff --git a/ld/ b/ld/
index 9206889..da636b7 100644
--- a/ld/
+++ b/ld/
@@ -168,6 +168,7 @@ SECTIONS
     *libphy.a:(.literal .text .literal.* .text.*)
     *libc.a:(.literal .text .literal.* .text.*)
     *libm.a:(.literal .text .literal.* .text.*)
+    *libmyfunctions.a:(.literal .text .literal.* .text.*)
     *(.literal.* .text.*)
     _irom0_text_end = ABSOLUTE(.);
   } >irom0_0_seg :irom0_0_phdr
The code is working fine as long as I just call stuff from this library but in case I want to pass data to a library function or I want to access system code from the library I get the following exception:
Fatal exception (28):
I would expect that there is some issue with code referring between RAM and ROM as I notice that this exception indicates some kind of memory violation error.

Now my question would be how do you currently handle library code which is to big to fit into the RAM? I would expect that locating them in the ROM is the standard way of doing it.


Posts: 16
Joined: Thu Dec 10, 2015 6:47 am

Re: Store and access user library functions in ROM

Postby ESP_Faye » Wed Jan 13, 2016 9:01 am


Please have a try with this new ld files. Sorry for the inconvenience.
(7.11 KiB) Downloaded 165 times

Who is online

Users browsing this forum: famlee, jotman01 and 11 guests