PDA

View Full Version : MPLAB/PBP Simulator



MOUNTAIN747
- 26th March 2014, 18:16
16F886, PBP2.60, MPLAB/PBP, Simulator

Greetings,

I am working on my first attempt at Modbus CRC16. I’ve decided to write the routine in ASM following a Modbus document on the calculation. SO it doesn’t look too bad for a starting point and now I would like to use MPLAB Simulator to find my faults.
The Simulator starts OK and I’m using the “Step Into” button to single step the program. Everything looks correct until I leave the PBP portion of the program which declares the variables and equates values then I hit the ASM routine and all progress stops. No matter what I do the simulator jumps completely over the ASM section as if I had used the “Step Over” button. Break points do not work as expected either.
Is this because I’m using MPLAB to compile PBP? Once upon a time I was much more efficient with the simulator but I stopped using ASM as primary code fifteen years ago. Is the failure my misunderstanding of the mix of PBP and ASM or is this a dead end when using MPLAB and PBP?

Anyone know what the problem is?

Wayne

Darrel Taylor
- 26th March 2014, 20:10
Go to the build options and uncheck Source-Level Debug.

You should then see the -k- command line option in the global settings edit box.

-k# is for debugging at the PBP level.
-k- debugs at the assembly level.

-k invokes the Linker, don't ever do that.

MOUNTAIN747
- 26th March 2014, 21:20
thanks Darrel, that did the trick!

Wayne