Link problem with PPC demo

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
Peter A
Posts: 3
Joined: Wed Sep 05, 2012 9:24 pm

Link problem with PPC demo

Post 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
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Link problem with PPC demo

Post 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
Peter A
Posts: 3
Joined: Wed Sep 05, 2012 9:24 pm

Re: Link problem with PPC demo

Post 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
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: Link problem with PPC demo

Post 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
Peter A
Posts: 3
Joined: Wed Sep 05, 2012 9:24 pm

Re: Link problem with PPC demo

Post 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
Post Reply