Hello! I'm trying to use assembler insertion with ESP32 specific instruction - "wait". But when I compile it, Arduino IDE cannot recognize this instruction, it writes:
"Error: unknown opcode or format name 'wait'"
The same happens with instruction "wake".
But when I try to compile assembler insertion with standard GNU instruction "mov", it is compiled without errors.
But I need instruction "wait". How to force Arduino IDE to recognize and compile this instruction and at whole all ESP32 specific instructions?
Which ESP32 CPU are you using, and what are you looking at as a reference for the assembly language?
AFAICT, neither the Tensilica nor RISC-V cpu cores have a "WAIT" instruction. (Tensilica has WAITI, RISC-V has WFI)
And I've never heard of a WAKE instruction on any CPU (waking up is usually caused by some hardware event.) (Hmm. I guess some dual-core systems might have the ability for one core to wake the other.)
Ah. Those are instructions for the ULP co-processor.
29.4 Instruction Set
The ULP co-processor provides the following instructions:
• Perform arithmetic and logic operations - ALU
• Load and store data - LD, ST, REG_RD and REG_WR • Jump to a certain address - JUMP
• Manage program execution - WAIT/HALT
• Control sleep period of ULP co-processor - SLEEP