Page 1 of 1

Store and access user library functions in ROM

Posted: Tue Dec 29, 2015 11:34 am
by bovensiepen
Hi,

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 eagle.pro.v7.common.ld like this:

Code: Select all

diff --git a/ld/eagle.pro.v7.common.ld b/ld/eagle.pro.v7.common.ld
index 9206889..da636b7 100644
--- a/ld/eagle.pro.v7.common.ld
+++ b/ld/eagle.pro.v7.common.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):
epc=0x400b6928
excvaddr=0x0000000c
rtn_addr=0x800b7e4c
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.


/daniel

Re: Store and access user library functions in ROM

Posted: Wed Jan 13, 2016 9:01 am
by ESP_Faye
Hi,

Please have a try with this new ld files. Sorry for the inconvenience.