This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error for a reentrant function when generate assembler source file option is active

Hi,
I've used the following code for onecyle delays :

	#pragma asm
	nop;//;simple delay
	#pragma endasm

So in the options tab of the file that contains the function I checked "generate assembler source file" & "Assemble source file".
Till now I've no problem (no error)
In the same file I've another function that is called from main & isr so a warnig is generated.
To avoid this I made the function reentrant & configured the reentrant stack -including STARTUP.A51 & modifiying it as follows:
;  Stack Space for reentrant functions in the LARGE model.
XBPSTACK        EQU     1;0       ; set to 1 if large reentrant is used.
XBPSTACKTOP     EQU     300h;0FFFFH+1; set top of stack to highest location+1.

that results in: error A45: UNDEFINED SYMBOL (PASS-2)
it mentions to the following code in the .src file that the compiler has generated
	LCALL	?C0023

What's wrong ?!!
Thanks for your attention in advance

0