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]

initialized variables/code in sram


Hello!

I have custom board with ARM7 (AT9155800) with external RAM and ROM:
MEMORY
{
     sram : ORIGIN = 0, LENGTH = 0x2000        <--- on chip 8KB ram
     rom : ORIGIN = 0x1000000, LENGTH = 0x200000
     ram : ORIGIN = 0x2000000, LENGTH = 0x80000
}

I can put uninitialized variables in SRAM:
int abc __attribute__ ( section (".sram"));

But how can I put initialized variables or code to SRAM?
void func1(void) __attribute__ ( section (".sram"));
void func1(void)
{
}

When I start in RAM is no problem - the debugger load the .sram section.

To work in ROM  I must correct vectors.S to initialize this .sram section, 
but I need start and end address of this section in ROM (like 
.__rom_data_start).

Other words I need second data and bss sections in SRAM, not in RAM


best regards
Ilko


-- 
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]