Here are some instructions about how to build arm-gcc: # How to read this document: # # # comment # $ execute command # ! Alter File # < remove line # > insert line ################### # binutils-2.12.1 # ################### $ mkdir binutils $ cd binutils $ tar xjf ../binutils-2.12.1.tar.bz2 # The ARM-Magic WORD is the same as for PE ! binutils-2.12.1/include/coff/arm.h (Line 78) < #define ARMMAGIC 0xa00 /* I just made this up */ > #define ARMMAGIC 0x1c0 /* Me too :) */ # That's because ARMPEMAGIC == ARMMAGIC ! binutils-2.12.1/bfd/coffcode.h (Line 1862) < case ARMPEMAGIC: > /* case ARMPEMAGIC: */ # That's one tricky.. Visual Embedded Studio Linker # adds relocation offset found in .text section # So we would double that offset... ! binutils-2.12.1/bfd/coff-arm.c (Lines 277 and 290) < true > false $ binutils-2.12.1/configure --target=arm-coff # Some Relocation stuff only works with those flags ! Makefile (Line 107) < CFLAGS = -g -O2 > CFLAGS = -g -O2 -DARM_WINCE -DTE_WINCE $ make $ sudo make install $ cd .. ########### # GCC-3.1 # ########### $ mkdir gcc $ cd gcc $ tar xzf ../gcc-3.1.tar.gz # Maybe we shouldn't try to compile crtstuff.c at all ! gcc-3.1/gcc/crtstuff.c (Lines 419 and 543) < #error "What are you doing with crtstuff.c, then?" < #error "What are you doing with crtstuff.c, then?" # Visual Embedded Tools linker assumes no prefix ! gcc-3.1/gcc/config/arm/coff.h (Line 27) < #define USER_LABEL_PREFIX "_" > #define USER_LABEL_PREFIX "" $ gcc-3.1/configure --target=arm-coff # thumb relocations don't work properly, we don't need them # for iPAQ < MULTILIB_OPTIONS = ... marm/thumb mno-thumb-interwork/nthumb-interwork > MULTILIB_OPTIONS = ... < MULTILIB_DIRNAMES = .... thumb ... > MULTILIB_DIRNAMES = .... ... $ cd libiberty $ make $ cd ../gcc $ make LANGUAGES="c" $ sudo make install LANGUAGES="c" $ cd .. # The next ones should be replaced by your original # Visual Embedded Tools header files, so don't execute # the following lines, if you've already have them $ sudo mkdir /usr/local/lib/gcc-lib/arm-coff/3.1/include/ $ sudo gcc/fixinc.sh /usr/local/lib/gcc-lib/arm-coff/3.1/include/ ################### # Generating code # ################### # insert your cpu - type here... be careful, strongarm knows # a data type misalignment trap which may be avoided by # -malignment-trap ( only needed, if -mcpu!=strongarm[...] ) arm-coff-gcc -S -o CODE.S -mcpu=strongarm1100 -O3 \ -I/usr/local/lib/gcc-lib/arm-coff/3.1/include -I/usr/include CODE.c