[ECOS] Mapping specific code to specific regions in memory
Jonathan Larmour
jlarmour@redhat.co.uk
Thu Jun 22 09:51:00 GMT 2000
Amlan Chakraborty wrote:
>
> I am using ECOS with ARM PID7t as the target.
>
> Can anyone tell me how do I place some object files
> into some particular region of the memory?
You need to change your linker script. Have a look at the linker
documentation at
http://www.gnu.org/manual/ld-2.9.1/html_chapter/ld_toc.html
and in particular "Memory Layout" and "Specifying Output Sections". Some of
this is best done in the eCos memory layout tool built into the
Configuration Tool (which is Windows-only at present), but some
hand-tweaking will be required to specify the object files.
> Also how
> do I configure the heap to be in some particular
> region of the memory?
This is being worked on in a generic way right now. But for now, what you
can probably do is create a linker output section (e.g. ".heap" )in the
desired location in memory, and edit the linker script to place the input
section .heap into the output section .heap, e.g.
.heap { *(.heap) }
Finally go to language/c/libc/VERSION/src/stdlib/malloc.cxx and add the
line "" to the pool definition there, i.e.
cyg_uint8 cyg_libc_malloc_memorypool[ CYGNUM_LIBC_MALLOC_MEMPOOL_SIZE ]
__attribute__((section(".heap")))
CYGBLD_ATTRIB_WEAK;
This should force this array to be placed in the section ".heap".
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
More information about the Ecos-discuss
mailing list