Hi all,
I'm doing some improvements to an old firmware developed with gcc tools for ARM7 device TMS470R1VF338. I've to work now with TI toolchain and unfortunately I've to rewrite some assembly lines, the code is inside this asm calls and it's below:
asm ("poll_rx:\n\tmrc p14,0,r1,c0,c0\n\ttst r1,#1\n\tbeq poll_rx\n\tmrc p14,0,%0,c1,c0\n\t"
:"=r" (read));
asm("poll_tx:\n\tmrc p14,0,r1,c0,c0\n\ttst r1,#2\n\tbne poll_tx\n\tmcr p14,0,%0,c1,c0\n\t"
:
:"r" (write_data));
the compiler answer is: "../src/FlashPrg.c", line 399: error: expected a ")", which make me think about a syntax problem. What more worries me is that if I try to symplify the call above as:
asm("MRC p2,5,R3,c5,c6");
the compiler answer is:
[E0002]
Illegal mnemonic specified
MRC p2,5,R3,c5,c6
Why doesn't it understand this mnemonic? Shouldn't it be specified in ARM architecture? To my knowledge if a mnemonic is specified by ARM, whatever compiler must understand it.
Thank you,
Samuele