From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29909 invoked by alias); 2 Apr 2008 06:12:52 -0000 Received: (qmail 29900 invoked by uid 22791); 2 Apr 2008 06:12:51 -0000 X-Spam-Check-By: sourceware.org Received: from wr-out-0506.google.com (HELO wr-out-0506.google.com) (64.233.184.236) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 Apr 2008 06:12:27 +0000 Received: by wr-out-0506.google.com with SMTP id 67so2041487wri.3 for ; Tue, 01 Apr 2008 23:12:25 -0700 (PDT) Received: by 10.143.163.10 with SMTP id q10mr5593690wfo.141.1207116743540; Tue, 01 Apr 2008 23:12:23 -0700 (PDT) Received: by 10.143.155.18 with HTTP; Tue, 1 Apr 2008 23:12:23 -0700 (PDT) Message-ID: Date: Wed, 02 Apr 2008 06:12:00 -0000 From: "Tom Deconinck" To: airdelroy , ecos-discuss@sourceware.org In-Reply-To: <16435229.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080128160738.64350@gmx.net> <20080128164654.GC10795@lunn.ch> <20080128170611.58540@gmx.net> <20080128170951.GD10795@lunn.ch> <20080128171909.64340@gmx.net> <16435229.post@talk.nabble.com> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] RAM Images on AT91SAM7s256 X-SW-Source: 2008-04/txt/msg00008.txt.bz2 On Wed, Apr 2, 2008 at 3:48 AM, airdelroy wrote: > > I am also trying to get a RAM image running on an AT91SAM7s256. I ultimately > will run my applications from the flash, would like to debug in RAM. > Currently I can load via sam-ba a rom image that will communicate over the > serial port, so I have this to start from. > > Sam-ba I believe uses the first 8k of RAM. So I think that the ldi file > should look like this: > > > MEMORY > { > ram : ORIGIN = 0x00202000, LENGTH = 0xE000 > } > > SECTIONS > { > SECTIONS_BEGIN > SECTION_rom_vectors (ram, 0x00202000, LMA_EQ_VMA) > SECTION_fixed_vectors (ram, 0x00200040, LMA_EQ_VMA) > SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA) > > SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA) > SECTION_rodata (ram, ALIGN (0x4), LMA_EQ_VMA) > SECTION_rodata1 (ram, ALIGN (0x4), LMA_EQ_VMA) > SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA) > SECTION_gcc_except_table (ram, ALIGN (0x4), LMA_EQ_VMA) > SECTION_data (ram, ALIGN (0x4), LMA_EQ_VMA) > > SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) > CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); > SECTIONS_END > } > > Is the SECTION_fixed_vectors section correct? Or should it be: > > SECTION_fixed_vectors (ram, ALIGN (0x1), LMA_EQ_VMA) > > I think I found my version in some other arm variant... > > Also should I modify these? > #define CYGMEM_REGION_ram (0x00200000) > #define CYGMEM_REGION_ram_SIZE (0x10000) > > Now I need to modify startup code for vector memory remapping. Where do I > find the RAM code that needs to be modified? > > thanks, > Aaron > -- > View this message in context: http://www.nabble.com/RAM-Images-on-AT91SAM7s256-tp15138638p16435229.html > Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com. > > According to me, your fixed_vectors section is correct, if you use SECTION_fixed_vectors (ram, ALIGN (0x1), LMA_EQ_VMA), the linker will place the vectors just after the rom section. However since you talk about the SAM-BA boot, this setting will probably overwrite a part of that bootloader and cause havoc. If you would use a JTAG probe to load in your RAM image, that setting is correct, in your case you probably need to place them after the SAM-BA boot thing. Note that the exception and interrupt vectors have to be at address 0x0. Startup assembly code can be found in hal\arm\at91\at91sam7s\current\include\hal_platform_setup.h specific for AT91 and alikes And the code that relocates vectors and such: hal\arm\arch\current\src\vectors.S Tom -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss