chipKIT® Development Platform

Inspired by Arduino™

Debugging chipKIT Sketches with MPLAB-X IDE

Created Sat, 06 Jul 2013 19:52:01 +0000 by KeithV


KeithV

Sat, 06 Jul 2013 19:52:01 +0000

Hi,

As we are all painfully aware, debugging with Serial.print() is extremely limited and frustrating. In the past I have posted topics on how to source level debug using MPLABv8. At best those techniques have been involved and complicated. Many of you have asked if we can debug MPIDE sketches in MPLAB-X, and historically this has been even more complicated to get to work.

Over the last year Microchip and the MPLAB-X team has made substantial improvements to MPLAB-X and the chipKIT compiler that enables us to debug chipKIT sketches with ease. I have been working with them and we are just now rolling out a solution where we no longer need special linker scripts, pseudo board entries in MPIDE, or (highly) convoluted procedures to debug. With the recent updates to MPLAB-X and the chipKIT compiler it is possible to import your sketch into MPLAB-X where you have full source level debugging as well as the ability to edit your sketches and libraries using the MPLAB-X editor. You can even do primary source development in MPLAB-X. And, for the MX3-7s, when you are done debugging it is trivial to restore the chipKIT bootloader.

I will be presenting a class at the 2013 Microchip Master’s conference on how to do this. The class runs for 1.75 hours and it should be an easy class with plenty of time for questions. We are running 2 classes, 8am on Thursday and 8am on Friday mornings. The Microchip Master’s runs from Aug 21st-24th and my presentation is class ADA17007 “Debugging chipKIT Sketches with MPLAB-X IDE”. You can get more information about the Microchip Master’s at https://secure.microchip.com/usmasters/Home.aspx.

We are driving to get all of the material together for the conference and all needed components will be available for immediate download at that time. As of right now I am still composing X projects needed to support the process. After I meet my requirements (deadlines) for the conference I plan to create a debugging topic on the chipKIT.net site for public consumption.

Having worked with Microchip on this, I can say this represents a high commitment to chipKIT from Microchip and in particular the MPLAB-X team. They have been very responsive to the idiosyncrasies of our rather peculiar IDE (MPIDE).


acoulson

Mon, 12 Aug 2013 20:23:50 +0000

Wow, what a coincidence - this is exactly what I've been thinking about and digging into the last couple of days! Can't make it to this conference, but I did see at the end of the data sheet for the chipKIT PGM (http://www.digilentinc.com/Data/Products/chipKIT%20PGM/chipKIT%20Programmer_rm.pdf) that there is supposed to be a doc that discusses this. That statement seems outdated in that it points to the old wiki, but it did lead me to find this post. Does such a document exist? Will any materials from your presentation be made available here?

Debugging via Serial.println() is, as you describe, freaking killing me!

Thanks, Andy


acoulson

Mon, 12 Aug 2013 20:29:19 +0000

Ahh - just found the answer to my own question, I think....found the post on "A new and easier way to debug chipKIT sketches in MPLAB" ([url]http://www.chipkit.org/forum/viewtopic.php?f=19&t=473[/url]).

Thx, Andy


KeithV

Fri, 16 Aug 2013 22:12:57 +0000

FYI, I just got approval from Microchip to post my lecture slides after the conference. The newest technique is way easier and better than the instructions you just picked up (which probably won't work well with X they work with MPLABv8).

I am sorry you can't make the conference as it is really good, but I understand it is both a financial and time commitment that isn't an option for everyone. However, this debugging capability opens up the hardware for both MPIDE development as well as direct MPLAB-X development allowing us the advantages of the complete development environment of X and the low hardware cost of chipKIT. For those who want to program a sketch directly from X, this technique effectively gives you that. (you will still need MPIDE to build with the chipKIT toolset and build rules).

Come back here the last week in August and I will make sure the lecture slides are posted.


KeithV

Mon, 26 Aug 2013 23:38:14 +0000

I have put the lecture slides up at:

http://www.chipkit.org/forum/viewtopic.php?f=19&t=2520