3
votes

Question: How to add the standard library to arm-fslc-linux-gnueabi-gcc

Background: I just had bitbake compile the meta-toolchain in the Yocto project. I then installed the resulting SDK-toolchain

$ ./build/tmp/deploy/sdk/fslc-framebuffer-glibc-x86_64-meta-toolchain-armv7at2hf-neon-toolchain-2.4.2.sh

which then installed the SDK-toolchain in /opt/fslc-framebuffer/2.4.2/

I can then easily run the executable to source the correct environment variables.

$ ./opt/fslc-framebuffer/2.4.2/environment-setup-armv7at2hf-neon-fslc-linux-gnueabi

I now have access to the cross-compiler arm-fslc-linux-gnueabi-gcc

So far so good...

I then downloaded the barebone SDK from NXP here. It's a great piece of work, but it might be somewhat outdated. First unzip the file, and then follow steps within the SDK readme.pdf.

Following the readme.pdf i do the following: To build the SDK, use the ./tools/build_sdk command from the root folder. I get multiple error but they are all related to the standard library such as:

iMX6_Platform_SDK/sdk/drivers/accelerometer/src/mma8451.c:31:10: fatal error: string.h: No such file or directory #include <string.h> 
iMX6_Platform_SDK/sdk/include/sdk.h:40:10: fatal error: stdio.h: No such file or directory #include <stdio.h>

So how do I solve this? Do I cross compile the standard library or do I get the binary some other place?

1

1 Answers

7
votes

SDK build by yocto is little bit different than normal arm toolchain.
I believe you used
arm-fslc-linux-gnueabi-gcc hello.c
but actually you need to use Makefiles or Macros like below,

${CC} hello.c -o hello

Write this directly into your terminal or put it into a makefile.