public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] heap error
@ 2000-12-09  2:59 Joerg Rapka
  2000-12-11 13:09 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Joerg Rapka @ 2000-12-09  2:59 UTC (permalink / raw)
  To: ecos-discuss

Hi

I got the following error message, if I make the sample application
"hello.c".

$ make hello
m68k-elf-gcc -mcpu32 -msoft-float -c -o
hello.o -g -Wall -I/m/project/ecos/d103_
MvbApi/d103_install/include -ffunction-sections -fdata-sections hello.c
m68k-elf-gcc -mcpu32 -msoft-float -nostartfiles -L/m/project/ecos/d103_MvbAp
i/d1
03_install/lib -Wl,--gc-sections -o hello hello.o -Ttarget.ld -nostdlib
/m/project/ecos/d103_MvbApi/d103_install/lib/libtarget.a(services_memalloc_c
ommo
n_heaps.o): In function `global destructors keyed to
49900.cygmem_pool_heap1':
/m/Project/eCos/d103_MvbApi/d103_build/services/memalloc/common/current/heap
s.cx
x:19: undefined reference to `___heap1'
collect2: ld returned 1 exit status
make: *** [hello] Error 1

My configuration is as follows:
- Windows 2000 host
- m68k based target
- eCos configuration tools V1.3.1.2
- sources from CVS repository with tag "ecos-sw-2000-12-08"
- use template "elix"
- add memory region "heap1" to current configuration

I can solve the problem, if I modify the file "target.ld" located in the
"lib" directory of the install tree (in my case
"/m/project/ecos/d103_MvbApi/d103_install/lib").

Change line from
  __heap1   = ALIGN (0x2);
to
  ___heap1   = ALIGN (0x2);

What is going wrong there?

Thanks for help.
Best regards, Joerg

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

* Re: [ECOS] heap error
  2000-12-09  2:59 [ECOS] heap error Joerg Rapka
@ 2000-12-11 13:09 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2000-12-11 13:09 UTC (permalink / raw)
  To: Joerg Rapka; +Cc: ecos-discuss

Joerg Rapka wrote:
> 
> Hi
> 
> I got the following error message, if I make the sample application
> "hello.c".
> 
> $ make hello
> m68k-elf-gcc -mcpu32 -msoft-float -c -o
> hello.o -g -Wall -I/m/project/ecos/d103_
> MvbApi/d103_install/include -ffunction-sections -fdata-sections hello.c
> m68k-elf-gcc -mcpu32 -msoft-float -nostartfiles -L/m/project/ecos/d103_MvbAp
> i/d1
> 03_install/lib -Wl,--gc-sections -o hello hello.o -Ttarget.ld -nostdlib
> /m/project/ecos/d103_MvbApi/d103_install/lib/libtarget.a(services_memalloc_c
> ommo
> n_heaps.o): In function `global destructors keyed to
> 49900.cygmem_pool_heap1':
> /m/Project/eCos/d103_MvbApi/d103_build/services/memalloc/common/current/heap
> s.cx
> x:19: undefined reference to `___heap1'
> collect2: ld returned 1 exit status
> make: *** [hello] Error 1
> 
> My configuration is as follows:
> - Windows 2000 host
> - m68k based target
> - eCos configuration tools V1.3.1.2
> - sources from CVS repository with tag "ecos-sw-2000-12-08"
> - use template "elix"
> - add memory region "heap1" to current configuration
> 
> I can solve the problem, if I modify the file "target.ld" located in the
> "lib" directory of the install tree (in my case
> "/m/project/ecos/d103_MvbApi/d103_install/lib").
> 
> Change line from
>   __heap1   = ALIGN (0x2);
> to
>   ___heap1   = ALIGN (0x2);
> 
> What is going wrong there?

At a guess you need to regenerate the .ldi files from the .mlt files using
a more recent version of the eCos configuration tool. The relevant bit
should look like this:

    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);

and you need to make sure CYG_LABEL_DEFN is defined in basetype.h
appropriately in your m68k-elf port.

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-12-11 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-09  2:59 [ECOS] heap error Joerg Rapka
2000-12-11 13:09 ` 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).