CLA code using a variable named "t" and EABI generates assembler error

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-13606
    • Hide
      C2000_18.1.0.LTS
      C2000_22.6.0.LTS
      C2000_21.6.0.LTS
      C2000_18.12.0.LTS
      Show
      C2000_18.1.0.LTS C2000_22.6.0.LTS C2000_21.6.0.LTS C2000_18.12.0.LTS
    • Hide
      C2000_25.3.0.LTS*
      C2000_21.6.2.LTS*
      C2000_22.6.4.LTS*
      Show
      C2000_25.3.0.LTS* C2000_21.6.2.LTS* C2000_22.6.4.LTS*
    • default
    • Hide
      Rename variable t to some other name.
      Show
      Rename variable t to some other name.

      When CLA code has a variable named "t" and compiled with --abi=eabi, the assembler generates below errors.

      The actual bug is that the CLA compiler is not emitting the vertical escape bars around variable names in assembly. EABI requires these vertical escape bars to distinguish variable names from assembler keywords. In this case the variable t is the same name as the register T.

      The attached CLA file has these lines ...

      extern float t;
      __interrupt void Cla1Task3 ( void )
      {
          t = 1.0f;
      }
      

      Build it ...

      % cl2000 -@options.txt --src_interlist file.cla
      "file.asm", ERROR!   at line 61: [E0003] 16-bit register address not valid.
                      MMOV32    @t,MR0                ; [CPU_FPU] |4|
      
      "file.asm", ERROR!   at line 61: [E0003] Illegal register addressing operand
                      MMOV32    @t,MR0                ; [CPU_FPU] |4|
      
      "file.asm", ERROR!   at line 61: [E0004] Illegal operand combination
                      MMOV32    @t,MR0                ; [CPU_FPU] |4|
      
      3 Assembly Errors, No Assembly Warnings
      
      Errors in Source - Assembler Aborted
      
      >> Compilation failure
      

      Rename the variable t to something else like temp, and it builds clean.

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-5182 - CLA code using a variable named "t"...
                SYNCHRONIZED
                • Last Sync Date: