Store and access user library functions in ROM

User avatar
bovensiepen
Posts: 9
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

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

ESP_Faye
Posts: 25
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

Hi,

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

Who is online

Users browsing this forum: No registered users and 94 guests