Zdenek Krejci wrote:
> I have downloaded arm-elf-gcc to be able compile my sample code that I
> downloaded from olimex.com
> when I trying to compile it by
> arm-elf-gcc -c -O2 -g -mcpu=arm7tdmi main.c -o main.oenv
> it just give me
> main.c:2:38: error: AnalogDevices/ioaduc7026.h: No such file or
> main.c: In function ‘main’:
> main.c:18: error: ‘GP0DAT’ undeclared (first use in this function)
> main.c:18: error: (Each undeclared identifier is reported only once
> main.c:18: error: for each function it appears in.)
> main.c:19: error: ‘GP4DAT’ undeclared (first use in this function)
> I find out that the header isn't in my compiler should I download it and
> somehow add to the include directory in arm gcc ? Or is it not just bad
> version or something? Bec I tough the arm gcc should have all of those
> files... or not?
Some binary distributions for the GNU cross-toolchain include a few
header-files with register defintions for some controllers (I did add a
few to the WinARM package, but the latest WinARM version is rather old).
arm-gcc is made from the GNU gcc-sources and these sources do not
include any register-defintion-files. So no, it does not "have" these
files per default.
The given header-file name looks like it's the one from IAR EWARM. You
may download the EWARM evaluation-version to get the header-file but
IAR's header-files usually depend on special extensions of EWARM which
are not available in the GNU toolchain.
I got generic header-files with register-definitions for AD702x from an
Analog Devices developer-CD. IRC Keil/ARM mirrors these header-files too
(search keil.com for aduc7026).
The startup-code for EWARM will not be compatible with the GNU
assembler, so startup-code has to be ported and linker-script has to be
It's not the best idea to do the first steps with the GNU
cross-toolchain with code made for another toolset. Search the net for
example-code made for arm-gcc/arm-binutils (maybe even my old examples
will help a little bit to get started: