Library functions running in RAM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux