This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM clang compiler errors out as - error: unknown register name 'cp15:0:c9:c12:0'

I am trying to migrate my source code compilation from armcc compiler v5.06 to armclang v6. And I see armclang errors out saying it can not recognize cp15 registers. It looks like there might be a change in armcc vs clang as how to declare the registers. However, I could not find anything on the migration docs or in compiler doc.

Here is the code snippet -

void reset_clock_count(void)
{
    register uint32_t reg_cp15_pmcr __asm("cp15:0:c9:c12:0");
    reg_cp15_pmcr |=  RESET_CYCLE_COUNTER;
}

And error snippet -

error: unknown register name 'cp15:0:c9:c12:0' in asm
    register uint32_t reg_cp15_pmcr __asm("cp15:0:c9:c12:0");
                                          ^

I see same errors for other places for similarly declared register. Any pointer on what might have gone wrong will be helpful.

Parents Reply Children