should aduc7026.h be part of arm-elf-gcc

OP #1657515
Rate this post
• ▲ useful
▼ not useful
Hi
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 
directory
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?
Moderator #1657690
Rate this post
• ▲ useful
▼ not useful
Zdenek Krejci wrote:
> Hi
> 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
> directory
> 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 
provided.

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: 
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/index_adi_arm.html 
)

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.