[U-Boot-Users] mistake

Hi people!
I work with based on AT91RM9200 board. At compilation gcc2.95.3 there is a mistake
arm-elf-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0x21f00000 -I/home/ask/distr/u-boot-1.1.3/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/lib/gcc-lib/arm-elf/2.95.3/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -Wall -Wstrict-prototypes -c -o cfi_flash.o cfi_flash.c In file included from cfi_flash.c:48: /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:52: parse error before `1' /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:52: warning: no semicolon at end of struct or union /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:54: parse error before `}' /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:58: field `insn' has incomplete type
Problem in the next line in file "processor.h":
union debug_insn { u32 arm; // ERROR HERE u16 thumb; };
How to solve a problem? Thank P.S. host OS - ASPLinux 9.2
Alexandr

In message 1974836040.20051129130018@alpha.tula.net you wrote:
I work with based on AT91RM9200 board. At compilation gcc2.95.3 there is a mistake
...
/home/ask/distr/u-boot-1.1.3/include/asm/processor.h:52: parse error before `1' /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:52: warning: no semicolon at end of struct or union /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:54: parse error before `}' /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:58: field `insn' has incomplete type
...
u32 arm; // ERROR HERE
...
How to solve a problem?
Use a working toolchain. Yours is broken, as it seems to define "arm" as something else. But "arm" is not a reserved identifier or anything like that.
Best regards,
Wolfgang Denk

Alexandr Kuleschov kuleschov@alpha.tula.net schrieb am Dienstag, 29. November 2005 um 11:00 +0100:
I work with based on AT91RM9200 board. At compilation gcc2.95.3 there is a mistake from cfi_flash.c:48: /home/ask/distr/u-boot-1.1.3/include/asm/processor.h:52: parse error before `1'
Problem in the next line in file "processor.h":
union debug_insn { u32 arm; // ERROR HERE u16 thumb; };
Hi,
your tool-chain is broken; your compiler defines the macro "arm" (with the value "1"). IIRC this was standard behaviour by gcc 2.95.3, so you need a different version.
How to solve a problem?
Choose one (best solution first): 1. upgrade to a more recent tool-chain (2.95.3 is very old) 2. place the line "#undef arm" just before "union debug_insn" 3. change the offending line in processor.h (change "arm" to "gogetanewcompiler" or something like that; debug_insn is not used by U-Boot).
2 and 3 are kludges and should only be temporary solutions.
Cheers Anders
participants (3)
-
Alexandr Kuleschov
-
Anders Larsen
-
Wolfgang Denk