Part Number:TMS320F28069
Tool/software: TI C/C++ Compiler
I am facing an interesting issue with the TI compiler.
My code (a communication hub) compiles fine with O3 but not with O4. The issue seems to be related to the SPI and Gpio header files provided by TI.
How should this issue be avoided/solved?
Please see below:
<Linking>
error: symbol "memset" redeclared with incompatible type:
"int [ExplSign]()"
in "../SOURCE/inc/DpDiag.c" at line 132 and:
"void *(void *, int, unsigned long)"
in
"C:/Users/212419857/Desktop/RR_StringMaster/RR_StringMaster/SOURCE/inc/strin
g_master.h" at line 149)
error: symbol "GpioDataRegs" redeclared with incompatible type:
"volatile struct GPIO_DATA_REGS
_GPADAT off: 0 (union GPADAT_REG)
_GPASET off: 32 (union GPADAT_REG)
_GPACLEAR off: 64 (union GPADAT_REG)
_GPATOGGLE off: 96 (union GPADAT_REG)
_GPBDAT off:128 (union GPBDAT_REG)
_GPBSET off:160 (union GPBDAT_REG)
_GPBCLEAR off:192 (union GPBDAT_REG)
_GPBTOGGLE off:224 (union GPBDAT_REG)
_rsvd1 off:256 (Uint16[8])
_AIODAT off:384 (union AIODAT_REG)
_AIOSET off:416 (union AIODAT_REG)
_AIOCLEAR off:448 (union AIODAT_REG)
_AIOTOGGLE off:480 (union AIODAT_REG)"
in
"C:\Users\212419857\Desktop\RR_StringMaster\RR_StringMaster\device\inc\F2806
x_Gpio.h" at line 333 and:
"volatile struct GPIO_DATA_REGS
_GPADAT off: 0 (union GPADAT_REG)
_GPASET off: 32 (union GPADAT_REG)
_GPACLEAR off: 64 (union GPADAT_REG)
_GPATOGGLE off: 96 (union GPADAT_REG)
_GPBDAT off:128 (union GPBDAT_REG)
_GPBSET off:160 (union GPBDAT_REG)
_GPBCLEAR off:192 (union GPBDAT_REG)
_GPBTOGGLE off:224 (union GPBDAT_REG)
_rsvd1 off:256 (Uint16[8])
_AIODAT off:384 (union AIODAT_REG)
_AIOSET off:416 (union AIODAT_REG)
_AIOCLEAR off:448 (union AIODAT_REG)
_AIOTOGGLE off:480 (union AIODAT_REG)"
in
"C:\Users\212419857\Desktop\RR_StringMaster\RR_StringMaster\device\inc\F2806
x_Gpio.h" at line 333)
error: symbol "SpiaRegs" redeclared with incompatible type:
"volatile struct SPI_REGS
_SPICCR off: 0 (union SPICCR_REG)
_SPICTL off: 16 (union SPICTL_REG)
_SPISTS off: 32 (union SPISTS_REG)
_rsvd1 off: 48 (Uint16)
_SPIBRR off: 64 (Uint16)
_rsvd2 off: 80 (Uint16)
_SPIRXEMU off: 96 (Uint16)
_SPIRXBUF off:112 (Uint16)
_SPITXBUF off:128 (Uint16)
_SPIDAT off:144 (Uint16)
_SPIFFTX off:160 (union SPIFFTX_REG)
_SPIFFRX off:176 (union SPIFFRX_REG)
_SPIFFCT off:192 (union SPIFFCT_REG)
_rsvd3 off:208 (Uint16[2])
_SPIPRI off:240 (union SPIPRI_REG)"
in
"C:\Users\212419857\Desktop\RR_StringMaster\RR_StringMaster\device\inc\F2806
x_Spi.h" at line 144 and:
"volatile struct SPI_REGS
_SPICCR off: 0 (union SPICCR_REG)
_SPICTL off: 16 (union SPICTL_REG)
_SPISTS off: 32 (union SPISTS_REG)
_rsvd1 off: 48 (Uint16)
_SPIBRR off: 64 (Uint16)
_rsvd2 off: 80 (Uint16)
_SPIRXEMU off: 96 (Uint16)
_SPIRXBUF off:112 (Uint16)
_SPITXBUF off:128 (Uint16)
_SPIDAT off:144 (Uint16)
_SPIFFTX off:160 (union SPIFFTX_REG)
_SPIFFRX off:176 (union SPIFFRX_REG)
_SPIFFCT off:192 (union SPIFFCT_REG)
_rsvd3 off:208 (Uint16[2])
_SPIPRI off:240 (union SPIPRI_REG)"
in
"C:\Users\212419857\Desktop\RR_StringMaster\RR_StringMaster\device\inc\F2806
x_Spi.h" at line 144)
>> Compilation failure
>> Compilation failure