Detailed description: i had this structure defined in my spi.c
[CODE]
struct {
AT91S_SPI *spi;
}PRIVATE;
[/CODE]
AT91S_SPI is defined in AT91SAM7X256.h and included in the source only once.
When compiling, i get the following error:
[ERROR]
leonardo@g-deon:~/think/kortex/examples/arm/spi$ make -B at91sam7x-ek --quiet
build/adl/ROOT_spi__default_spi.c:10: error: redefinition of ‘struct
ROOT_spi__ROOT_spi__AT91S_SPI’
make[1]: *** [build/obj_arm7tdmi/ROOT_spi__default_spi__base.o] Erreur 1
make: *** [ROOT(at91sam7x-ek,arm).elf] Erreur 2
[/ERROR]
the structure AT91S_SPI is redefined in the following files
[LIST]
build/adl/ROOT_spi__default_spi.c
build/adl/ROOT_spi__default_prvTypes.h
[/LIST]
when changing the first structure and setting the data to global, solves the
problem:
[CODE]
//struct {
AT91S_SPI *PRIVATE_spi;
//}PRIVATE;
[/CODE]