EmbDev.net

Forum: ARM programming with GCC/GNU tools gcc interwork init code


von Liam S. (liamstask)


Rate this post
useful
not useful
I'm just now working on converting some of my SAM7X code over to C++,
taking cues from the popular "Building Bare Metal Systems" series of
articles.  I have the C++ runtime in decent shape and most things seem
to be working as expected.

My problem is that the libc.a that my project links against is

/usr/local/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/inte 
rwork/libc.a

and that version of libc.a does not have init.o included.  The function
I'm ultimately trying to get at is __libc_init_array to initialize
static constructors.  The example projects from the Bare Metal series
show the equivalent of

/usr/local/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/libc 
.a

being linked in, which in my toolchain does include init.o and the
symbol for __libc_init_array, but I can't quite figure out how to
specify that.

My project is based on the FreeRTOS, originally from the SAM7X256 lwIP
demo which has a makefile very similar to Martin's.  I'm using the
toolchain compiled by Darrik Spaude for OS X intel - the latest version
he has there is 4.2.2.

Should the interwork version of libc.a include this?  Is some other
aspect of my configuration screwy?  Thanks for any tips!

von Shachar S. (shachar)


Rate this post
useful
not useful
Hi,

Did any one solve this problem ?
I am facing the same problem  when porting the "Building Bare Metal
Systems"  C++ example to SAM7X ARM.

Regards,

Shachar Harussi

Liam Staskawicz wrote:
> I'm just now working on converting some of my SAM7X code over to C++,
> taking cues from the popular "Building Bare Metal Systems" series of
> articles.  I have the C++ runtime in decent shape and most things seem
> to be working as expected.
>
> My problem is that the libc.a that my project links against is
>
> /usr/local/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/inte 
rwork/libc.a
>
> and that version of libc.a does not have init.o included.  The function
> I'm ultimately trying to get at is __libc_init_array to initialize
> static constructors.  The example projects from the Bare Metal series
> show the equivalent of
>
> /usr/local/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/libc .a
>
> being linked in, which in my toolchain does include init.o and the
> symbol for __libc_init_array, but I can't quite figure out how to
> specify that.
>
> My project is based on the FreeRTOS, originally from the SAM7X256 lwIP
> demo which has a makefile very similar to Martin's.  I'm using the
> toolchain compiled by Darrik Spaude for OS X intel - the latest version
> he has there is 4.2.2.
>
> Should the interwork version of libc.a include this?  Is some other
> aspect of my configuration screwy?  Thanks for any tips!

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.