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.

MCU-PLUS-SDK-AM243X: M4 gcc compiler

Part Number: MCU-PLUS-SDK-AM243X

Tool/software:

Hi,

we are using the gcc compiler for the cortex m4 and have encountered a problem. I hope you can help here. The following function is missing:" _set_interrupt_priority()". Is this defined in the TI compiler? Could you send us the implementation of the function?

Regards,

Matthias

  • Hi Matthias

    Looks like we missed addressing this thread, I am forwarding this to our compiler team to see if they can clarify what is available on TI compiler side. Any reason why you are using gcc? I assume your application does not need safety , where using this TI CLANG compiler with Compliance Support Package etc, would've been better?

    https://software-dl.ti.com/codegen/docs/tiarmclang/compiler_tools_user_guide/additional_material.html

  • The TI Arm compiler (not tiarmclang) supports an intrinsic named _set_interrupt_priority.  If you are porting code that was built with this compiler, then you would see ...

    The following function is missing:" _set_interrupt_priority()"

    The tiarmclang compiler supplies a header file named ti_compatibility.h which eases porting code from the TI Arm compiler to tiarmclang.  Inside that file there is this code ...

    /******************************************************************************/
    /* Set the interrupt priority                                                 */
    /******************************************************************************/
    #if __ARM_ARCH_PROFILE == 'M' && (__ARM_ARCH == 6 || __ARM_ARCH == 7)
    static __inline__ uint32_t __attribute__((always_inline))
    _set_interrupt_priority(uint32_t x)
    {
        uint32_t res = 0;
        __asm volatile ("MRS %0, BASEPRI" : "=r" (res) : : );
        __asm volatile ("MSR BASEPRI, %0" : : "r" (x) : );
        return res;
    }
    #endif
    

    Please understand this code has only been tested with tiarmclang.  To make it work with the gcc Arm compiler probably requires some changes.

    Thanks and regards,

    -George