[ECOS] heap error

Jonathan Larmour jlarmour@redhat.com
Mon Dec 11 13:09:00 GMT 2000


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


More information about the Ecos-discuss mailing list