This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: execute code in ram, linker script
- From: Ramana <ramana dot venkat83 at gmail dot com>
- To: lts-rudolph at gmx dot de
- Cc: binutils at sourceware dot org
- Date: Wed, 1 Aug 2007 16:37:43 +0530
- Subject: RE: execute code in ram, linker script
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