bsp_user
Occasional Contributor
3 years agoarria v ds-5 arm compiler inline assembly
Hi,
I try to read the cntfreq register in arria V evaluation board , ds-5 arm compiler 5.
I use the following line:
__asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (val)));
compilation f...
- 3 years ago
Hi,
compiler v7 can have the single line syntax like below-
__asm("[;]");
__asm{[;]}
for reading CNTFREQ, assign global variable with volatile.
And try to run again,
volatile unsigned int freq=0;
void printReg()
{
__asm
{
mrc p15, 0, freq, c14, c0, 0
}
printf("freq=0x%X", freq);
}
let me know if you have any query on this.
Regards
Jeetesh