I'm having troubles when MPLab shows me error within a macros (with assembly language). It gives the line number of where macros is defined. That's not very helpful if the macros is working fine, but the parameters passed are wrong. Is there a way to trace the macros back? (by "trace" I don't mean "runtime debug trace")
P.S. Note that this is not a question if macros should or should not be used.
For example let's have this macro (defined in an include file macro.inc):
loadWreg macro x movlw x endm
Then use in in 3 .asm files more than 10 times. One usage is wrong:
loadWreg 0xFFFF ; 16 bit value can't be loaded in WREG
Microchip shows the error in macro.inc on line with
movlw x. How do I know where I passed wrong parameter to the macro?