Proteus VSM viewer to debug MPLABX projects

Hi all, Before few months earlier I heard Microchip released a new IDE to implement firmwares for their products. That is MPLABX. MPlabX has very nice features and tools to assist while you are coding, compiling, debugging, etc... If you familiar with Netbeans, it will be the great advantage to use MPLABX. Because MPLAB X is based on the Oracle Sponsored open-source NetBeans platform. Therefore supports many third-party tools, and is compatible with many NetBeans plug-ins. So try out it your self to feel the difference from MpLab8.

If you prefer to download new version of MPLABX click here

This post is not to present features of the MPLABX. So this article will introduce the way to work MPLABX with Proteus VSM viewer for debugging purposes. MPLAB8 has its inbuilt ability to work with Proteus VSM viewer. But there are a few more steps to integrate it with the MPLABX IDE. When you are working with Proteus VSM viewer in MPLABX, you will see how much easier to debug your code.

Step 1 - The first step is to install VSM viewer in MPLABX IDE.Open Plugins window by selecting Tools->Plugins from the menu bar. Then click on Available plugins, then you will see the Proteus VSM viewer from the list under 'MPLAB DBCore' category. (If proteus vsm viewer not listed on the list just press on Reload Catalog button to reload the list).

Then click on Install to install the plugin to IDE, the install wizard will guide you to install it successfully. Also you can update or remove you existing plugins from this window.

Step 2 - Create your project from MPLABX and select Proteus VSM viewer as debugging tool when it asked.As showed in following figure.

OR you can set Proteus VSM as the debugging tool for you existing project. Just goto project Properties by right click on your project. Then click on 'Config: [default]' category. Then select Proteus VSM from the list box positioned at right side of the window as shown below.

Step 3 - Now you can code your project and compile your project in debug mode. To do that right click on your project from the Projects window then select Debug from the drop down menu. Now this will lead to create files and folder hierarchy for debugging by IDE, if your code compile successfully. (This will terminate debugging session until we still do not create a ISIS design for our project. Just don't care those!)

Step 4 - Create the design file file for your project from the Proteus ISIS and select the .cof file which is located at \dist\default\debug folder as the program file for your micocontroller(in ISIS design). Then save the design in your project folder.

Step 5 - Now we should add our design file to MPLabX project. Go to project properties window and click on Proteus VSM Viewer category under Config: [default] category then select your design file from Design File Name and press on apply (you can let other configurations as it is under default environment).

Now you can set break points in your source code and Debug your project. Then MPLabX will automatically run the ISIS design simultaneously with your code.

Oh I forgot to say, it is better to only open your ISIS design from the Proteus ISIS while you debug and enable Remote Debug Monitor from Proteus ISIS (Debug->Use Remote Debug Monitor)

Then you can open both windows simultaneously and debug you project as you can see...




12 comments:

  1. Nicely done milinda,
    Very helpful for newbies.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. but its not work in mplabx v2.05,how can i use in mplabx v2.05??

    ReplyDelete
    Replies
    1. It is working with the 2.05 also, you can follow same steps. But it has some problems with some of the microcontrollers. you can change your chip and see, if that's working, that's mean your debugger is working fine, but not with your original chip

      Delete
  4. thank you for the great tutorial, can you please explain step four as I can not find how to create the dsn file.

    ReplyDelete
  5. Stacked on step 4 - can't create the design file file for your project from the Proteus ISIS and select the .cof file. It would be highly appreciated, if more detail provided. Thank you

    ReplyDelete