execute code in ram, linker script
Ramana
ramana.venkat83@gmail.com
Wed Aug 1 11:07:00 GMT 2007
Hello Klaus,
As far as i know, you can set the VMA as your RAM address and LMA
as your flash memory that will give your expected behavior.
Here is how you can do that
PHDRS{
-------------
seg_flash PT_LOAD ; /* if you want to specify the segment */
--------------------
}
MEMORY{
-------------------
---------------------------
ram_mem : ORIGIN = xxxxx, LENGTH = xxxxx
flash_mem : ORIGIN = xxxxx, LENGTH = xxxxx
--------------
}
SECTIONS{
-------------------------
----------------------
FLASH_RAM :{
---------------------
-----------------------
} >ram_mem AT>flash_mem :seg_flash
------------------
----------------------
}
Am I wrong?
Regards,
Ram
>---------- Forwarded message ----------
>From: "Klaus Rudolph" <lts-rudolph@gmx.de>
>To: binutils@sourceware.org
>Date: Mon, 30 Jul 2007 20:15:32 +0200
>Subject: execute code in ram, linker script
>Hi again,
>
>I need a section in a linker script which should put my code to the
flash and give my the >addresses like linked in ram.
>My startup code should move the code from flash to ram. Absolutly
normal I hope.
>
>But I am not find the correct way to do it.
>
>Please help!
>
>4 sections needed (.text, .data, .bss and my stupied Flash->RAM section)
>
>Could someone give me an example. I also need the symbol definition
for the copy >routine.
>
>Please help!
> Klaus
More information about the Binutils
mailing list