* Library functions running in RAM
@ 2014-02-03 12:06 Janáček Jiří
0 siblings, 0 replies; 2+ messages in thread
From: Janáček Jiří @ 2014-02-03 12:06 UTC (permalink / raw)
To: gcc-help
Dear all,
I am trying to produce the linker description file to allow the execution of some functions from RAM of Cortex-R4. These functions are compiled in a library.lib.
How should the linker description look to simply attach just needed functions from given library into the RAM section?
I have tried to apply a dirty way by enumerating the needed objects.
By using ar.exe I got a list of objects within included within the library. I need just a few functions contained in some of objects.
Nevertheless I received an error message that the regions FLASH0 and RAM_CODE overflowed by some Bytes (even KB) although there is enough space defined for these regions.
SECTIONS
{
.text :
{
KEEP(*(.intvecs))
*(.text*)
*(EXCLUDE_FILE(a.obj b.obj))
*(.rodata*)
} > FLASH0
.ram_funcs :
{
ram_funcs_start = .;
a.obj (*(.text*))
b.obj (*(.text*))
} > RAM_CODE AT > FLASH0
ram_funcs_size = SIZEOF(.ram_funcs);
ram_funcs_load_start = LOADADDR(.ram_funcs);
etc.
Of course, the program will perform copying the RAM functions from ROM during start-up.
Environment:
ARM Cortex-R4
GCC 4.8 2013q4
Kind regards
JiriJ
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: Library functions running in RAM
@ 2014-02-03 13:57 Janáček Jiří
0 siblings, 0 replies; 2+ messages in thread
From: Janáček Jiří @ 2014-02-03 13:57 UTC (permalink / raw)
To: gcc-help
-----Original Message-----
From: Janáček Jiří
Sent: Monday, February 03, 2014 1:06 PM
To: 'gcc-help@gcc.gnu.org'
Subject: Library functions running in RAM
Dear all,
I am trying to produce the linker description file to allow the execution of some functions from RAM of Cortex-R4. These functions are compiled in a library.lib.
How should the linker description look to simply attach just needed functions from given library into the RAM section?
I have tried to apply a dirty way by enumerating the needed objects.
By using ar.exe I got a list of objects within included within the library. I need just a few functions contained in some of objects.
Nevertheless I received an error message that the regions FLASH0 and RAM_CODE overflowed by some Bytes (even KB) although there is enough space defined for these regions.
SECTIONS
{
.text :
{
KEEP(*(.intvecs))
*(.text*)
*(EXCLUDE_FILE(a.obj b.obj))
*(.rodata*)
} > FLASH0
.ram_funcs :
{
ram_funcs_start = .;
a.obj (*(.text*))
b.obj (*(.text*))
} > RAM_CODE AT > FLASH0
ram_funcs_size = SIZEOF(.ram_funcs);
ram_funcs_load_start = LOADADDR(.ram_funcs);
etc.
Of course, the program will perform copying the RAM functions from ROM during start-up.
Environment:
ARM Cortex-R4
GCC 4.8 2013q4
Kind regards
JiriJ
--------------------------------------
Dear all,
I have applied a few changes and re-ordered the sections:
SECTIONS
{
.ram_funcs :
{
ram_funcs_start = .;
*a.obj (.text*)
*b.obj (.text*)
} > RAM_CODE AT > FLASH0
ram_funcs_size = SIZEOF(.ram_funcs);
ram_funcs_load_start = LOADADDR(.ram_funcs);
.text :
{
KEEP(*(.intvecs))
*(EXCLUDE_FILE(a.obj b.obj), .text)
*(.text*)
*(.rodata*)
} > FLASH0
etc.
But the linker complains there are undefined references to the functions just defined in the objects a.obj and b.obj..
These object files are located in the known/defined path - the same one where other object files produced by the compiler are located.
Thanks for your hints in advance,
JiriJ
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-03 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-03 12:06 Library functions running in RAM Janáček Jiří
2014-02-03 13:57 Janáček Jiří
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).