From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20485 invoked by alias); 1 Aug 2007 11:07:50 -0000 Received: (qmail 20164 invoked by uid 22791); 1 Aug 2007 11:07:48 -0000 X-Spam-Check-By: sourceware.org Received: from fk-out-0910.google.com (HELO fk-out-0910.google.com) (209.85.128.186) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Aug 2007 11:07:46 +0000 Received: by fk-out-0910.google.com with SMTP id 26so158392fkx for ; Wed, 01 Aug 2007 04:07:43 -0700 (PDT) Received: by 10.82.116.15 with SMTP id o15mr530239buc.1185966463174; Wed, 01 Aug 2007 04:07:43 -0700 (PDT) Received: by 10.82.171.4 with HTTP; Wed, 1 Aug 2007 04:07:43 -0700 (PDT) Message-ID: Date: Wed, 01 Aug 2007 11:07:00 -0000 From: Ramana To: lts-rudolph@gmx.de Subject: RE: execute code in ram, linker script Cc: binutils@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00012.txt.bz2 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" >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