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: Help about adding new sections for ARM platform


Thanks Jay,
you are right.

I have just saved a new configuration using your .mlt file and everything is ok. Since the fixed_text section is defined in the arm.ld file, it must be marked as linker-defined in the memory layout.
This is coherent with the definition of section init_code thas is linker-defined, too.

Thanks again and best regards.


Llandre:

I have included a corrected ".mlt" file that does what you want.  The key
item here is the linker-defined vs. user-defined section (go figure).  It
seems that in order to get the SECTION_<section_name> definition you must
specify the section as linker-defined.

I also corrected the .bss section -- it is not relocated, as it only exists
in RAM, not in the ROM image.

As far as the ".mlt" file syntax, I originally thought as you did, but
realized that it really is <VMA-start> <VMA-next> <LMA-start> <LMA-next>,
with the exception of the first section, which defines all four parameters.
This section is typically the "rom_vectors" section, but in your case it is
the "fixed_vectors".  This just doesn't seem right, so I suspect that there
is more to the syntax encoding that what we've deduced so far.  The source
code for the Memory Layout Tool should be the authority on the issue
(documented in the code).  Does anyone know where it is?

Note: I copied my original reply to the ecos-discuss list, but the redhat
mail server bounced it, because it didn't like the html file that I
attached.

Here is the corrected "<TARGET>_romram.mlt" file:
version 0
region ROM 0 200000 1 !
region SDRAM c000000 400000 0 !
section rom_vectors 0 1 0 1 1 0 1 0 0 0 !
section fixed_vectors 0 1 0 1 1 1 1 1 20 20 init_code init_code !
section init_code 0 4 0 1 0 0 0 1 fixed_text !
section fixed_text 0 4 1 1 1 1 0 1 c000000 text text !
section text 0 4 1 1 0 1 0 1 fini fini !
section fini 0 4 1 1 0 1 0 1 rodata rodata !
section rodata 0 4 1 1 0 1 0 1 rodata1 rodata1 !
section rodata1 0 4 1 1 0 1 0 1 fixup fixup !
section fixup 0 4 1 1 0 1 0 1 gcc_except_table gcc_except_table !
section gcc_except_table 0 4 1 1 0 1 0 1 data data !
section data 0 4 1 1 0 1 0 0 bss !
section bss 0 4 0 1 0 1 0 1 heap1 heap1 !
section heap1 0 8 0 0 0 0 0 0 !

Jay

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