I wanted to implement few hardware accessing ISRs in assembly for which I need to include the TI's example provided common header files. When I try to assemble a small file "ramIsr,asm" I get a long list of errors, objecting to the redefinition unsigned to Uint16 and so on for long/int/float/.. and also the hardware register structure definitions.
I am attaching the file code and capture from the assembly error messages from message window (complier version and options flags are also in it).
What am I missing? Any help will be appreciated.
Thanks
Sayee
; start of file ramISR.asm
.cdecls C,LIST,"DSP28x_Project.h"
.cdecls C,LIST,"DSP2803x_Device.h"
.sect "ramfuncs"
.def _AdcIsr1
_AdcIsr1:
MOVW DP,#AdcRegs.ADCINTFLGCLR
MOV @AdcRegs.ADCINTFLGCLR,#0x01 ; Clear ADCInt1 flag
MOVW DP,#_PieCtrlRegs.PIEACK ; Acknowledge PIE ADC-interrupt Group 1
MOV @_PieCtrlRegs.PIEACK,#0x01
IRET
.end
; end of file ramISR.asm
Assembly error window capture (too long...errors of the same type for all structures... so truncated!)
[ramISR.asm] "C:\Program Files\Texas Instruments\C2000 Code Generation Tools 5.2.9\bin\cl2000" -g -q -pdr -fr"C:/tidcs/c28/DSP2803x/v124/DSP2803x_examples/ups3-3/Debug" -fs"C:/tidcs/c28/DSP2803x/v124/DSP2803x_examples/ups3-3/Debug" -i"../../DSP2803x_common/include" -i"./include" -i"../../DSP2803x_headers/include" -i"C:/TI/TI_F28xxx_SysSW/~SupportFiles/DSP2803x_headers" -d"_DEBUG" -d"LARGE_MODEL" -ml -mt -v28 -@"Debug.lkf" "ramISR.asm"
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 174: [E0300]
Structure tag can't be global
ADCCTL1_BITS .struct 0,1 ; struct size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 190: [E0300]
Union tag can't be global
ADCCTL1_REG .union 0,1 ; union size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 195: [E0300]
Structure tag can't be global
ADCCTL2_BITS .struct 0,1 ; struct size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 202: [E0300]
Union tag can't be global
ADCCTL2_REG .union 0,1 ; union size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 207: [E0300]
Structure tag can't be global
ADCINT_BITS .struct 0,1 ; struct size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 221: [E0300]
Union tag can't be global
ADCINT_REG .union 0,1 ; union size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 226: [E0300]
Structure tag can't be global
INTSEL1N2_BITS .struct 0,1 ; struct size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 238: [E0300]
Union tag can't be global
INTSEL1N2_REG .union 0,1 ; union size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 243: [E0300]
Structure tag can't be global
INTSEL3N4_BITS .struct 0,1 ; struct size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 255: [E0300]
Union tag can't be global
INTSEL3N4_REG .union 0,1 ; union size=(1 bytes|16 bits), alignment=1
"C:\DOCUME~1\user\LOCALS~1\Temp\037168", ERROR! at line 260: [E0300]
Structure tag can't be global
INTSEL5N6_BITS .struct 0,1 ; struct size=(1 bytes|16 bits), alignment=1