This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: malloc vs. new


Actually....  I have.  But I'm not sure they are correct. I cannot figure out 
how to target a ROM-based redboot target.  If I do an ecosconfig and 
import redboot_ROM.ecm instead of the RAM version, the resulting elf 
file appears to have addresses starting at 0x02020000 (RAM) instead of
0x01000000 which is the Flash.  Is there something else I'm supposed to 
do or will the addresses get automagically adjusted upon upload?

-tim


On Monday 24 June 2002 05:55 pm, Scott Dattalo wrote:
> On 24 Jun 2002, Gary Thomas wrote:
> > Is your platform an EB40 or EB40A?
>
> I have both, but for the moment I was targeting the EB40 since eCos works
> "out of the box" for it. Ultimately, I'll target my own platform which
> will be different than both of these, but more similar to the EB40A (e.g.
> I plan on using the 40008).
>
> > The "proper" way is to define a new platform.  This can be much the same
> > as an extant one, in fact, all that might be different is the mlt_*
> > files.  Look at the (ARM) Cirrus Logic edbxxx platforms.  One platform
> > HAL is used for 4 different boards (platforms).
>
> Great! I look into a EB40a mlt_* version, (assuming Tim hasn't done one
> already).
>
> Thanks,
> Scott
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

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

#endif
#define CYGMEM_REGION_ram (0x02000000)
//#define CYGMEM_REGION_ram_SIZE (0x80000)
#define CYGMEM_REGION_ram_SIZE (0x100000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x01000000)
//#define CYGMEM_REGION_rom_SIZE (0x20000)
#define CYGMEM_REGION_rom_SIZE (0x1200000)
#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 (0x10000)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x02080000 - (size_t) CYG_LABEL_NAME (__heap1))
// eCos memory layout - Wed Apr 11 13:49:55 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
//    sram : ORIGIN = 0x00000000, LENGTH = 0x2000
    sram : ORIGIN = 0x00000000, LENGTH = 0x40000
//    ram : ORIGIN = 0x02000000, LENGTH = 0x80000
    ram : ORIGIN = 0x02000000, LENGTH = 0x100000
//    rom : ORIGIN = 0x01000000, LENGTH = 0x20000
    rom : ORIGIN = 0x01000000, LENGTH = 0x200000
}

SECTIONS
{
    SECTIONS_BEGIN
    CYG_LABEL_DEFN(__reserved_bootmon) = 0x01000000; . = CYG_LABEL_DEFN(__reserved_bootmon) + 0x10000;
    SECTION_rom_vectors (rom, ALIGN (0x8), 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 (sram, 0x20, LMA_EQ_VMA)
    SECTION_data (ram, 0x02000000, FOLLOWING (.gcc_except_table))
    SECTION_bss (ram, ALIGN (0x4), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}
// eCos memory layout - Mon Jul 23 11:49:04 2001

// This is a generated file - do not edit

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

#endif
#define CYGMEM_REGION_sram (0)
//#define CYGMEM_REGION_sram_SIZE (0x1000)
#define CYGMEM_REGION_sram_SIZE (0x400000)
#define CYGMEM_REGION_sram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_ram (0x2000000)
//#define CYGMEM_REGION_ram_SIZE (0x80000)
#define CYGMEM_REGION_ram_SIZE (0x100000)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
//#define CYGMEM_SECTION_heap1_SIZE (0x2080000 - (size_t) CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (0x2100000 - (size_t) CYG_LABEL_NAME (__heap1))
// eCos memory layout - Mon Jul 23 11:49:04 2001

// This is a generated file - do not edit

#include <cyg/infra/cyg_type.inc>

MEMORY
{
//    sram : ORIGIN = 0, LENGTH = 0x1000
    sram : ORIGIN = 0x00000000, LENGTH = 0x40000
//    ram : ORIGIN = 0x2000000, LENGTH = 0x80000
    ram : ORIGIN = 0x02000000, LENGTH = 0x100000
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_fixed_vectors (sram, 0x20, LMA_EQ_VMA)
    SECTION_rom_vectors (ram, 0x2000000, 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
}

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]