I'm trying to define a macro that will insert a number of no-op instructions based on the number entered in the macro. When I try and compile I get the following error:
"F2837xD_SysCtrl.asm", ERROR! at EOF: [E0300] The following symbols are undefined:
x
Here is the code:
#define NOP_N(x) asm(" RPT #(x) || NOP")
....
NOP_N(20);
I realize there are other solutions, but why does the compiler not treat the assembly instruction with an input the same way it does for C code? Is there some syntax I'm missing here, or is it simply that the compiler doesn't support this type of functionality?
Compiler Version: ti-cgt-c2000_18.12.3.LTS