public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* execute code in ram, linker script
@ 2007-07-30 19:15 Klaus Rudolph
  2007-08-03  0:38 ` Erik Christiansen
  0 siblings, 1 reply; 4+ messages in thread
From: Klaus Rudolph @ 2007-07-30 19:15 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: execute code in ram, linker script
@ 2007-08-01 11:07 Ramana
  0 siblings, 0 replies; 4+ messages in thread
From: Ramana @ 2007-08-01 11:07 UTC (permalink / raw)
  To: lts-rudolph; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-03  5:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-30 19:15 execute code in ram, linker script Klaus Rudolph
2007-08-03  0:38 ` Erik Christiansen
2007-08-03  5:28   ` Klaus Rudolph
2007-08-01 11:07 Ramana

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).