NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » asm macro error
February 12, 2010 by lcruz007 |
Hi, I wrote a program that should create an square wave using an assembly macro (just to see how it worked), using the asm keyword in C. I am using 64 "NOPs" at 16MHz. It works just fine, but if I call several times the same macro I get the following error: /tmp/ccQo9mux.o: In function What does this mean? This is the code I am using:
//Delay macro definitions... asm(".MACRO Delay4" ".rept 64" "NOP" ".endr" ".ENDM"); asm(".MACRO Delay8" ".rept 128" "NOP" ".endr" ".ENDM"); asm(".MACRO Delay16" ".rept 256" "NOP" ".endr" ".ENDM"); This code works just fine, but if I call the macro more times, I get that error. I am not using jmp or rjmp to go back to the macro, I just call it. Thank you |
---|---|
March 05, 2010 by BobaMosfet |
You are getting this because you are using a macro, not a function. BM |
Please log in to post a reply.
Did you know that a piezoelectric buzzer can be used in reverse as a microphone? Learn more...
|