Last minute desperate plea for simple advice: how do you step through the code on the pic? I've just been using the simulator until now...

Views: 329

Reply to This

Replies to This Discussion

 lol i never even knew there was a simulator / that it was possible to step thru code

I would comment out one line and see what happened. Then put it back and comment out the next line. Repeat

 I've been doing that. (: I was hoping to be able to check the contents of individual registers at different points in time.

If anyone wants to know how to use the simulator - change the hardware tool to simulator under project properties, then use the debug main project button on the main bar (near the compile main project button) to step through it on the simulator.

 

 if you can use the debug mode in mplabx, then i think it has a function of stepping through code. I know some people's debug mode work. But mine won't so I can't tell.

 F7-single step . F5-goto Stop (that you placed for a specific line just as the verilog stuff last year)

you onlly have one breakpoint, you can place it at any line and run to it, or you can use no breakpoints and right click and press run to line... you can see registers and eeprom memory from the windows menue in mplabx, and you should know the rest as it is identical to the simulator... just remember you can't use those 3 pins that are used for programming...

and if you go to windows->pic mem you should see file register, click tat will give you a window to look at regs

^i did like 5 braekpoints(that's what its called lol)?

When I try, it says 'Launching Could not connect to tool hardware: PICkit2PlatformTool, com.microchip.mplab.mdbcore.pickit2.PICkit2DbgToolManager
The debugger could not be started. Terminating debug session.
User program finished'

I did this Build the code for debugging
Program for debugging
Run debugger window (or something like that)
It works fine for me that way

I had simililar problems when i load to board (something like could not connect to tool hardware blahblah), all i did was restart the computer/mplab ->asked emami he told me sometimes mplab forgot the tool it's connected to lolz

RSS

© 2017   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service