Page 1 of 1

Link problem with PPC demo

Posted: Wed Sep 05, 2012 9:41 pm
by Peter A
Hi,
I just downloaded Chibios and I'm trying to build the PPC demo using GCC 4.6.3. However, I get the link issues below:

c:/sysgcc/powerpc-eabi/bin/../lib/gcc/powerpc-eabi/4.6.3\libgcc.a(eabi.o): In function `__eabi':
c:\gnu\auto\gcc-bu-2.22+gcc-4.6.3+gmp-4.2.4+mpfr-2.4.1+mpc-0.8+newlib-1.20.0-powerpc-eabi\powerpc-eabi\libgcc/../.././gcc/eabi.S:2
22: undefined reference to `__init'
c:/sysgcc/powerpc-eabi/bin/../lib/gcc/powerpc-eabi/4.6.3\libgcc.a(eabi.o):(.got2+0x4): undefined reference to `_SDA_BASE_'
c:/sysgcc/powerpc-eabi/bin/../lib/gcc/powerpc-eabi/4.6.3\libgcc.a(eabi.o):(.got2+0x8): undefined reference to `__SDATA_START__'
c:/sysgcc/powerpc-eabi/bin/../lib/gcc/powerpc-eabi/4.6.3\libgcc.a(eabi.o):(.got2+0xc): undefined reference to `__SBSS_END__'
c:/sysgcc/powerpc-eabi/bin/../lib/gcc/powerpc-eabi/4.6.3\libgcc.a(eabi.o):(.got2+0x10): undefined reference to `_SDA2_BASE_'
c:/sysgcc/powerpc-eabi/bin/../lib/gcc/powerpc-eabi/4.6.3\libgcc.a(eabi.o):(.got2+0x14): undefined reference to `__SDATA2_START__'
c:/sysgcc/powerpc-eabi/bin/../lib/gcc/powerpc-eabi/4.6.3\libgcc.a(eabi.o):(.got2+0x18): undefined reference to `__SBSS2_END__'
collect2: ld returned 1 exit status
make: *** [ch.elf] Error 1

Any ideas?

BR
/Peter

Re: Link problem with PPC demo

Posted: Thu Sep 06, 2012 7:27 am
by Giovanni
Hi Peter,

The demo is compilable with the CodeSourcery GCC compiler, your compilers seems to expect some symbols that the current ch.ld file does not provide (there are equivalents but named differently).

Is your compiler self-built or can be downloaded somewhere?

Giovanni

Re: Link problem with PPC demo

Posted: Thu Sep 06, 2012 7:42 am
by Peter A
Hi,
thanks for reply! I am using a prebuilt compiler from http://gnutoolchains.com/download/. I also noticed that most of the symbols missing are allready defined in ch.ld, and I was able to get rid of all the errors but the __init related, as I don't realy find an equivallent to that one.

But maybe its easier then to use the codesourcery compiler, if its not to costly...

BR
/Peter

Re: Link problem with PPC demo

Posted: Thu Sep 06, 2012 8:01 am
by mabl
Correct me if I'm wrong, but aren't the pure "light" toolchains free from Codesourcery?

EDIT: I.e. https://sourcery.mentor.com/GNUToolchai ... lite=Power

Re: Link problem with PPC demo

Posted: Thu Sep 06, 2012 10:11 am
by Peter A
Thanks for the link! Installing that toolchain and running it from cygwin builds the PPC demo project without any modifications what so ever :)

BR
/Peter