Ted Tedson
Ted Tedson

Reputation: 316

Cannot debug in MPLab when hex file is imported

I am writing my code in MikroC PRO for PIC v6.0.0 and i want to debug it using PICKit3 and MPLab. I am trying both with MPLab v8.92 and MPLabX v2.05. When i load the debugger in v8.92 and pres the RUN button the progress bar starts moving but nothing happens.

MPLab debug

MPLab showed a message stating that the project is out of date and should be build, but i clicked NO. After that i got to this point. There are no source files in this project, there is only the project file. I am just using the MPLab's programmer and i am importing the hex file, generated by MikroC.

How can i bring the PICKit3 properly into debug mode and watch some variables?

Upvotes: 0

Views: 1303

Answers (1)

malaugh
malaugh

Reputation: 157

You cannot debug a hex file. A hex file contains the bytes that are programmed into memory to run the program. To debug you need and elf file, this file has debug information that cross references memory addresses with source file line numbers and the locations in memory of the variables.

Upvotes: 1

Related Questions