clpru label issue


i’m trying to write a delay function with the asm in my clpru program.
I add the following text:

void loop5(void) { __asm__ __volatile__ ( " LDI32 r10, 5000 \n" " DELAY: SUB r10, r10, 1 \n" " QBNE DELAY, r10, 0 \n" ); }

but I get an error:

“/tmp/06461GwSmDv”, ERROR! at line 1225: [E0003] Invalid instruction

What does it mean? Should I add any definition of the label DELAY?

What compiler are you using? TI’s PRU-C-compiler does not support inline-assembler, so the whole thingy will nto work for you.

I use clpru and it compiles inline asm quite good.

I took some examples from here:

and it works.

I meant that the inline asm works. But the problem with the asm labels still presents.

It turned out that the label should go without space before the label name.