This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280037C-Q1: CLA assembler problem

Part Number: TMS320F280037C-Q1
Other Parts Discussed in Thread: C2000WARE

Dear Expert,

I have previously developed an application on the F280049 that has CLA assembler processing. I tried to transfer the application to the new F280037, but run into problems in the assembler. The F280049 application was developed based on the C2000Ware example project cla_ex2_adc_fir32 that has a CLA assembler routine, with no problems. Therefore I tried to use a corresponding F28003x example, but the C2000Ware only has a C language example for the CLA. Therefore I tried two approaches:
- 1. changed all the headers and I/O driver routines in the the F280049 CLA asm example to the corresponding F28003x definitions. Still kept the original C2000Ware .asm routine just for testing.
- 2. Added to the a F29003x C language example my .asm routine.
Both times no success. The error messages are below. Some of them seem to suggest that the assembler deviates to the C compiler, too, so I thought that the .cdecls directive was somehow leaking, but when I removed it and used just some dummy code, the errors still remained. Both processors have the same CLA 2nd generation HW, so this is quite strange. Do you have any model CLA asm projects for theF28003x?

The C2000Ware is the version 4.03.00.00, the C compiler 22.6.0.LTS, and the Code Composer is version 12.

>> Compilation failure
subdir_rules.mk:16: recipe for target 'cla_ex2_fir32.obj' failed
"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", WARNING! at line 402: [E0004] Cannot redefine existing opcode 'EALLOW' with .define. Assembler ignoring .define.
.define "__eallow()",EALLOW

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", WARNING! at line 403: [E0004] Cannot redefine existing opcode 'EDIS' with .define. Assembler ignoring .define.
.define "__edis()",EDIS

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22219: [E0800] Instructions not permitted in structure/union definitions
AR0 .bits 1 ; bit field, 1 bits, 0 bit offset

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22220: [E0800] Instructions not permitted in structure/union definitions
AR1 .bits 1 ; bit field, 1 bits, 1 bit offset

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22221: [E0800] Instructions not permitted in structure/union definitions
AR2 .bits 1 ; bit field, 1 bits, 2 bit offset

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22222: [E0800] Instructions not permitted in structure/union definitions
AR3 .bits 1 ; bit field, 1 bits, 3 bit offset

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22223: [E0800] Instructions not permitted in structure/union definitions
AR4 .bits 1 ; bit field, 1 bits, 4 bit offset

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22224: [E0800] Instructions not permitted in structure/union definitions
AR5 .bits 1 ; bit field, 1 bits, 5 bit offset

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22225: [E0800] Instructions not permitted in structure/union definitions
AR6 .bits 1 ; bit field, 1 bits, 6 bit offset

"C:\Users\JOUKOV~1\AppData\Local\Temp\{CAD5C508-E1CB-4D55-9F36-3D7D4BE23EA8}", ERROR! at line 22226: [E0800] Instructions not permitted in structure/union definitions
AR7 .bits 1 ; bit field, 1 bits, 7 bit offset


Errors in Source - Assembler Aborted
gmake: *** [cla_ex2_fir32.obj] Error 1

  • Hi,

    Just wanted to check if you are able to build CLA example for F28003x device?

    C:/ti/c2000/C2000Ware_4_03_00_00/driverlib/f28003x/examples/cla

    Regards, Santosh

  • Hi,
    Yes, when using the example that does not have CLA assembler code, only C code. The problem that I describe is related to a case where I have my own CLA asm code that worked for F280049, but not for F280037 ( as you can see, the 2000Ware does not have an CLA asm example for it, only for other F28x versions, so I cannot verify if  the assembler works for that processor at all ). As we know, C compiler does not make very efficient code for the CLA, so it is crucial to be able to use hand optimized assembler. If you can provide any working dummy skeleton  project that has a CLA asm subsection, it solves the problem. Please try!
    Best regards,
    Jouko
  • Hello,

    Some more information on the problem: It really seems to come from an error in some of the f28003x device related header files that the .cdecls directive is interpreting. This is because the error appears only after I include  f28x_project.h in the header file which the .cdecls in the assembler file is using. That header in turn is including a ton of other headers, so for me it is very tedious to try to find out where the bug is. Have you been able to generate the same error messages?

    Meanwhile, I think it is best for me to continue code development in the f28004x environment before this problem is fixed.

    Best,

    Jouko

  • Hi,

    Eventually I did not have patience to wait for this problem to be fixed, so I traced the bug down to the MCAN structure bit definitions in the C2000Ware device support header file. Because I do not use that interface I just deleted those headers and the driver definitions in my code. So now the compiler goes through. However, I do not check the "This resolved my issue", because obviously TI has to fix the bugs for those that use the MCAN interface.