We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
i want to add the nop instruction in DS-5, but i don't know how?
i has ever use CCS and i know insert the "asm(" NOP");" which can execute the nop instruction.
what can i insert for nop instruction?
Hello zenonxiu
Could you please help @cloud with his question?
Thank you.
With the ARM Compiler (shipped with DS-5) you can use NOP as an assembler instruction and in the compiler as an intrinsic __nop().
For example:
volatile int x;
int z;
int read_variable(int y)
{
int i;
int a = 0;
__nop();
a = x;
return z + y;
}
This is discussed in the DS-5 docs - shipped with the tools and online here:http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.ds5/index.html Just search for NOP!
Note that NOP is ok for introducing padding into code for alignment purposes, but it's not guaranteed to generate any delay. Hope that helps.
I used the " __nop()" refer to your provide,but failed again.
It is the error message:
“APP/app.c:486:11: error: implicit declaration of function '__nop' [-Werror=implicit-function-declaration]”
The compilation is passed if i use "__asm__("NOP");" instead of "__nop;'".