public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ramana <ramana.venkat83@gmail.com>
To: lts-rudolph@gmx.de
Cc: binutils@sourceware.org
Subject: RE: execute code in ram, linker script
Date: Wed, 01 Aug 2007 11:07:00 -0000	[thread overview]
Message-ID: <b03d0a830708010407y5cc12647l5fccbcaf31221069@mail.gmail.com> (raw)

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

             reply	other threads:[~2007-08-01 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 11:07 Ramana [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-07-30 19:15 Klaus Rudolph
2007-08-03  0:38 ` Erik Christiansen
2007-08-03  5:28   ` Klaus Rudolph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b03d0a830708010407y5cc12647l5fccbcaf31221069@mail.gmail.com \
    --to=ramana.venkat83@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=lts-rudolph@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).