Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11449

Use of _disable_interrupts intrinsic causes compiler to emit call to function _get_CPSR, which does not exist

    XMLWordPrintable

Details

    • Bug
    • Status: Declined
    • Not Prioritized
    • Resolution: Won't Fix
    • Code Generation Tools
    • CODEGEN-11433
    • Show
      https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/Arm-based-microcontrollers---internal/f/1042/t/1263171
    • ARMCLANG_2.1.3.LTS
    • default
    • Hide
       _get_CPSR exists in ti_compatibility.h, but ti_compatibility.h was meant to ensure backward compatibility source code ported to tiarmclang with targets supported by the TI Arm proprietary compiler (armcl), which doesn't include Cortex-M33.

      Separate issue filed to address lack of documentation on enabling/disabling interrupts on Arm targets.
      Show
       _get_CPSR exists in ti_compatibility.h, but ti_compatibility.h was meant to ensure backward compatibility source code ported to tiarmclang with targets supported by the TI Arm proprietary compiler (armcl), which doesn't include Cortex-M33. Separate issue filed to address lack of documentation on enabling/disabling interrupts on Arm targets.

    Description

      The attached file.c has these line ...

      #include <ti_compatibility.h>
      
      void fxn()
      {
          _disable_interrupts();
      }
      

      Build it ...

      $ tiarmclang @options.txt -S file.c
      

      Inspect the resulting assembly file ...

      $ findstr _get_CPSR file.S
              bl      _get_CPSR
              .asciz  "_get_CPSR"                     @ string offset=203
      

      The function _get_CPSR is not defined in the compiler RTS library, or anywhere else. This results in an error when linking.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: