I'm compiling for a ADuC7026 with 8K of internal RAM (62K of FLASH). These chips are unable to run at full speed out of FLASH (due to access timing issues) and I need to execute some instructions faster, which can be done by executing from the internal RAM. So I need to move some executable stuff from FLASH to RAM when required (at start up similar to the .data section).
What I have done is subdivide the internal RAM into two regions in the MEMORY section of the linker script (it makes no difference if I do this or not). I have created a SECTION in the script to accomodate the RAM based executable. The VMA of the SECTION is in one of the RAM regions, but an LMA in between the RODATA (constants) and the DATA (initialised data) SECTIONS. {I have also added assignments in the linker script and modified the startup file so that there is [or would be] a transfer of the executable from its LMA to its VMA}
Everything seems to be fine except that the .hex file that is output does not include the exectuable portion that needs to be transfered to RAM. The .map file shows the space allocated for it in the output, and the .elf file has the executable in its correct location (in RAM), and the .data section is correctly placed. [ie there's a hole in the output file where the executable should be, but is not]
How do I convince ld (or possible objcopy) to keep the executable from the rogue SECTION in the correct place in the output?
Read-Only
Author Reinhard Keil
Posted 1-Apr-2005 13:40 GMT
Toolset ARM
RE: GNU ld: moving executable to RAM
Reinhard Keil
With GNU we did not succeed in relocating functions to RAM.
In the current ARM Eval Version (V2.11, download from http://www.keil.com/demo) we even provide an example project for ADuC702x that shows how to locate ISR functions to RAM. Take a look to example: \Keil\ARM\Boards\ADI\ADuC702X\Dimmer - Target: The Dimmer project is a simple program for the ADuC7026
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.