public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Mapping specific code to specific regions in memory
@ 2000-06-22  1:07 Amlan  Chakraborty
  2000-06-22  9:51 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Amlan  Chakraborty @ 2000-06-22  1:07 UTC (permalink / raw)
  To: ecos-discuss

Hi

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? Also how
do I configure the heap to be in some particular
region of the memory?

I want my interrupt stack and complete interrupt handler code in the
memory with zero wait states on the arm board (i.e. SSRAM)

Regards Amlan




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Mapping specific code to specific regions in memory
  2000-06-22  1:07 [ECOS] Mapping specific code to specific regions in memory Amlan  Chakraborty
@ 2000-06-22  9:51 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2000-06-22  9:51 UTC (permalink / raw)
  To: Amlan Chakraborty; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-22  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-22  1:07 [ECOS] Mapping specific code to specific regions in memory Amlan  Chakraborty
2000-06-22  9:51 ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).