On 22.08.2012 22:24, Matthew Gretton-Dann wrote: >>> 1) How have you configured GCC? (What does gcc -v show?) >> >> Using built-in specs. >> COLLECT_GCC=arm-none-eabi-gcc >> COLLECT_LTO_WRAPPER=/home/joe/bin/arm/libexec/gcc/arm-none-eabi/4.7.1/lto-wrapper >> Target: arm-none-eabi >> Configured with: ../configure --prefix=/home/joe/bin/arm/ >> --enable-interwork --enable-multilib --with-newlib >> --with-headers=/tmp/newlib-1.19.0/newlib/libc/include >> --target=arm-none-eabi --disable-nls --disable-shared --disable-threads >> --with-gnu-ld --with-gnu-as --disable-libssp --disable-libmudflap >> --disable-libgomp --with-dwarf2 -v --disable-werror --with-cpu=cortex-m3 >> --with-cpu=cortex-m4 --with-tune=cortex-m3 --with-tune=cortex-m4 >> --with-mode=thumb --enable-target-optspace --with-float=hard >> --with-float=soft --enable-languages=c,c++ >> Thread model: single >> gcc version 4.7.1 (GCC) > > The multiple --with-cpu/--with-tune/--with-float options are > confusing, although probably OK as 'rightmost' should win. Ah okay, interesting. I was deliberately adding both because I work with both the Cortex-M3 and Cortex-M4 and wanted to build one GCC that works for both. Is this not possible? It wouldn't be a problem to build different gccs (only inconvenient), but that would be very good to know (if it's at all possible). > You only need one of each of --with-cpu, --with-tune, and > --with-float. [As an aside --with-cpu implies --with-tune for the > same CPU]. > > What I think you are missing is a default FPU though. Add > --with-fpu=fpv4-sp-d16 to the configure line, and that should help. > > In summary I think you want the following --with-* options on your command line: > > --with-cpu=cortex-m4 --with-fpu=fpv4-sp-d16 --with-mode=thumb > --with-float=soft Okay, I'm rebuilding right now. Curious though, since you specified "--with-float=soft" -- at the moment, softfloat is working (actually it's the only thing working), so what exactly does "with-float=soft" do in conjunction with a default FPU specification? I find the options kind of confusing to be honest and don't really know what they do exactly. >>> arm-none-eabi-gcc -Wall -O2 -g -mcpu=cortex-m4 -mfloat-abi=hard -mthumb \ >>> -std=c99 -c -o foo.o foo.c -print-multi-directory >> >> This shows surprisingly little (only the CWD): >> . > > This means that GCC has selected the default library to use, which > isn't what you want. If the compiler has been configured correctly > then I would expect the output to be 'fpu'. Okay, I'll check that. > Once you've rebuilt GCC you will also need to build newlib again. > Your configuration options for that should be fine - as it will pick > the multilibs up from GCC. > > I hope this helps. It does greatly. I'm compiling both gcc and newlib right now again and will report what the results are. Thank you very much for your support. Best regards, Joe