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.

ASM error with TI compiler

The following code in the csl_a15.c (from k2e PDK) file generates an error

void CSL_a15VectorBaseAddrSet(uint32_t addr)
{
    asm("mcr p15, #0, %[value], c12, c0, 0" ::[value] "r" (addr));
}

Got the following error
#18 expected a ")"    csl_a15.c    /interrupt_timer_CSL    line 821    C/C++ Problem

i haven't changed the file content and while looking at the forum posts regarding this i found a compiler issue of some sort but didn't get some concrete answers.

my compiler is TI V5.2.5

any workaround?

  • Seems you are building the ARM CP15 code using TI ARM compiler but you should use Linaro Compiler.

    I have used your code in one of TI's ARM Linaro based example and able to build it.

    Linaro toolchain location in CCS.

    C:\ti\ccsv6\tools\compiler\gcc-arm-none-eabi-4_9-2015q3

    I have used the below ARM example from Processor SDK package.

    C:\ti\pdk_k2hk_4_0_2\packages\MyExampleProjects\I2C_BasicExample_K2H_armExampleProject

    You can use this example for your K2E platform.

    C:\ti\pdk_k2e_4_0_2\packages\MyExampleProjects\I2C_BasicExample_K2E_armExampleProject