public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Meiring, H, Mnr <meiring@sun.ac.za>" <meiring@sun.ac.za>
To: <ecos-discuss@ecos.sourceware.org>
Subject: [ECOS] Memory layout recommendation
Date: Sun, 02 Sep 2007 21:55:00 -0000	[thread overview]
Message-ID: <FC829C66C7DA824A96A893C28F1B7AD969E892@STBEVS01.stb.sun.ac.za> (raw)


Hi All,

I have succesfully got ecos(or the hello world app using eCos) running on the Atmel at91sam7a2 ev kit(out of RAM). 

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 platform port due to the lack of similarity between the sam7s and x platforms. 

What to do for a board with 16k internal RAM and 1 external SRAM chips of 512 KB each. Do I ignore the internal RAM? And if not what sections would you 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 thereof.

.ldi file

MEMORY
{
    sram : ORIGIN = 0x00000000, LENGTH = 0x4000        //internal ram
    ram  : ORIGIN = 0x48000000, LENGTH = 0x80000       //external ram
    rom  : ORIGIN = 0x40000000, LENGTH = 0x100000     //external flash
}

SECTIONS
{
    SECTIONS_BEGIN
    CYG_LABEL_DEFN(__reserved_bootmon) = 0x00000000; . = 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)    
    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) = ALIGN (0x8);
    SECTIONS_END
}

.h file

#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>

#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))
                        
Thanks in advance

Regards,
Hendrik Meiring
                        

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

             reply	other threads:[~2007-09-02 21:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-02 21:55 Meiring, H, Mnr <meiring@sun.ac.za> [this message]
2007-09-03 19:30 ` Sergei Gavrikov

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=FC829C66C7DA824A96A893C28F1B7AD969E892@STBEVS01.stb.sun.ac.za \
    --to=meiring@sun.ac.za \
    --cc=ecos-discuss@ecos.sourceware.org \
    /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).