From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5921 invoked by alias); 2 Sep 2007 21:55:31 -0000 Received: (qmail 5912 invoked by uid 22791); 2 Sep 2007 21:55:31 -0000 X-Spam-Check-By: sourceware.org Received: from mail1.sun.ac.za (HELO mail1.sun.ac.za) (146.232.64.12) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 02 Sep 2007 21:55:26 +0000 Received: from stbex01.stb.sun.ac.za ([146.232.20.101] helo=STBEVS01.stb.sun.ac.za) by mail1.sun.ac.za with esmtp (Exim 4.50) id 1IRxPb-0005aU-PJ for ecos-discuss@ecos.sourceware.org; Sun, 02 Sep 2007 23:55:21 +0200 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Sun, 02 Sep 2007 21:55:00 -0000 Message-ID: From: "Meiring, H, Mnr " To: 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: [ECOS] Memory layout recommendation X-SW-Source: 2007-09/txt/msg00010.txt.bz2 Hi All, I have succesfully got ecos(or the hello world app using eCos) running on t= he Atmel at91sam7a2 ev kit(out of RAM).=20 At the moment the port is integrated into the at91sam7 family, but it is a = bit messy. I think I will later change the at91sam7a2 to a separate platfor= m port due to the lack of similarity between the sam7s and x platforms.=20 What to do for a board with 16k internal RAM and 1 external SRAM chips of 5= 12 KB each. Do I ignore the internal RAM? And if not what sections would yo= u recommend be put there? I have set the .ldi and .h memory configuration files to successfully work = in RAM, but would welcome some motivated comment/advice on the ROM setup th= ereof. .ldi file MEMORY { sram : ORIGIN =3D 0x00000000, LENGTH =3D 0x4000 //internal ram ram : ORIGIN =3D 0x48000000, LENGTH =3D 0x80000 //external ram rom : ORIGIN =3D 0x40000000, LENGTH =3D 0x100000 //external flash } SECTIONS { SECTIONS_BEGIN CYG_LABEL_DEFN(__reserved_bootmon) =3D 0x00000000; . =3D CYG_LABEL_DEFN= (__reserved_bootmon) + 0x01000; SECTION_rom_vectors (rom, 0x40000000, LMA_EQ_VMA) SECTION_text (rom, ALIGN (0x1), LMA_EQ_VMA) SECTION_fini (rom, ALIGN (0x4), LMA_EQ_VMA) SECTION_rodata (rom, ALIGN (0x4), LMA_EQ_VMA) SECTION_rodata1 (rom, ALIGN (0x4), LMA_EQ_VMA) SECTION_fixup (rom, ALIGN (0x4), LMA_EQ_VMA) SECTION_gcc_except_table (rom, ALIGN (0x4), LMA_EQ_VMA)=20=20=20=20 SECTION_fixed_vectors (ram, 0x48000040, LMA_EQ_VMA) SECTION_data (ram, ALIGN (0x4), FOLLOWING (.gcc_except_table)) SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA) CYG_LABEL_DEFN(__heap1) =3D ALIGN (0x8); SECTIONS_END } .h file #ifndef __ASSEMBLER__ #include #include #endif #define CYGMEM_REGION_ram (0x48000000) #define CYGMEM_REGION_ram_SIZE (0x80000) #define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W) #define CYGMEM_REGION_rom (0x40000000) #define CYGMEM_REGION_rom_SIZE (0x100000) #define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R) #ifndef __ASSEMBLER__ extern char CYG_LABEL_NAME (__reserved_bootmon) []; #endif #define CYGMEM_SECTION_reserved_bootmon (CYG_LABEL_NAME (__reserved_bootmon= )) #define CYGMEM_SECTION_reserved_bootmon_SIZE (0x01000) #ifndef __ASSEMBLER__ extern char CYG_LABEL_NAME (__heap1) []; #endif #define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1)) #define CYGMEM_SECTION_heap1_SIZE (0x48080000 - (size_t) CYG_LABEL_NAME (__= heap1)) =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 Thanks in advance Regards, Hendrik Meiring =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss