This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: ROMRAM question
On 2006-12-04, dirk husemann <hud@zurich.ibm.com> wrote:
>> The question I have is this: is there an 'easy' way (i.e built
>> into the config tool perhaps) of not copying certain areas of
>> my application into SDRAM?
I don't know of any way using ecosconfig.
> don't include the firmware images with the application?
> instead store them in separate flash partitions or in JFFS2?
That sounds like a bit of a hassle.
I assume that the ROMRAM startup code only copies sections it
knows about a-priori, so any user-defined sections that were
added to the elf file without the HAL's knowledge will sit it
ROM and not be copied.
There are three options I can think of for putting your data
into the image in a user-defined section so that it doesn't get
copied into RAM by the ROMRAM startup code:
1. You can use __attribute__((section="secname")) to store
things in user-defined linker sections, you'll have to
modify the linker script to place the user-defined sections
in ROM. I don't think this is going to be easy.
2. You can use objcopy to add a user-defined section to an elf
file (or simplay create an elf file containing a
user-defined section).
3. You can use the --add-section and --add-section-flags
linker flags to add a user-defined section to an elf file.
Make sure the "progbits" flag on the section is set to indicate
that you want the section in the hex file.
I think options 2 and 3 will need to done on the application
elf file _after_ it's been linked and before it's converted to
hex.
--
Grant Edwards grante Yow! Can you MAIL a BEAN
at CAKE?
visi.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss