14.4.2010 13:58, trisha yad kirjoitti:
Hi, I made a very simple program #include<stdio.h> int main() { float a=2.3; printf("%f",a); } and compile with arm-none-linux-gnueabi-gcc -mfloat-abi=softfp -mfpu=vfpv3-d16 -mcpu=cortex-a9 test.c and I got Illegal instruction.
From what? From the previous simple program, from the 'printf()' function in the prebuilt C library or what? When using a prebuilt toolchain one must make sure that it provides a suitable C library for the target CPU. If the optimal compiler switches would be the : -mfloat-abi=softfp -mfpu=vfpv3-d16 -mcpu=cortex-a9 then one should use these already when compiling the C library routines. Who made the C library, probably made it for some totally different CPU variation :( So please find out which ARM CPUs the CodeSourcery toolchain will support in its prebuilt C libraries! A quick look at the "Getting Started" for the "Lite" told that the following two multilibs were provided : 1. for '-march=armv4t' 2. for '-mthumb -march=armv7-a'