Created Tue, 20 Sep 2011 14:42:01 +0000 by caroper
Tue, 20 Sep 2011 14:42:01 +0000
Not sure if this is the correct place but it is IDE related.
I found an excellent article (and unfortunately did not save, bookmark or download it - any one have the link?) about using MPLabsIDE and the PICKIT3 to source level debug code generated by the MPIDE.
The process involved Building the Sketch in with MPIDE, burning a DEBUG version of the Bootloader Via MPLABS and then importing the .elf file and running the debugger. (The process was far more involved, but that is the gist of it).
My question, is rather than use both platforms and have to manually move files between the two would it not be feasible to bypass the MPIDE by incorporating the MPIDE Tool-chain into MPLABS to appear as a choice in the Project build wizard?
I am aware that this is counter to the original concept of a board with bootloader that eliminates the need for a programmer, but many of the people here seam to have hardware programmers and use the CHIPKIT board in place of Starterkit's for prototyping.
Has anyone attempted to use the tool-chain such that they can retain comparability with core Ardino Sketches, but use MPLABS IDE in place of MPIDE and the PICKIT / ICD3 as the programmer debugger?
If so, detailed instructions along the lines of the above mentioned article would be cherished, but even a gentile nudge in the right direction would be appreciated.
Cheers Chris
Tue, 20 Sep 2011 20:13:24 +0000
Thanks, I am the one who wrote that document. As I was developing the Ethernet and USB stacks it was imparitive that I be able to debug my sketches. The document is a little out of date because of compiler option changes used in MPIDE, but fundametally the process still works. Unfortunately, because of optimizations, variables are rarely visible anymore and because debug information is not fully supported by the C++ compiler only global variables are visible from .cpp code. However breakpoints and single stepping works. I got really handy at looking at the register and memory windows.
There was no attempt on my part for any other development process because I was specificly building chipKIT Libraries. If I wanted full debugging I just used MPLAB. A lot of my code was built with a C file that mimiced the sketch and I just built the whole thing in MPLAB, used a PICkit3 and did my debugging. Whatever worked.
The document can be found on the wiki page:
http://www.chipkit.org/repository/Debugging%20chipKIT%20with%20MPLAB%20IDE.pdf
Tue, 20 Sep 2011 20:27:48 +0000
Thanks Keith,
I have an UNO board arriving (Should have been last week) that I need to migrate a system too. The prototype/proof of concept was developed on Arduino but the target hardware is a custom PIC32 Board. As there were delays in production of the target board a decision was made to go with the ChipKit Uno as an interim measure (the MAX was not available in sufficient quantity). I only have a week or so to port it and then 50 units will be shipped. I think the information in that document is going to save me many sleepless nights in the next couple of weeks :)
Cheers Chris
Sat, 01 Oct 2011 20:50:22 +0000
Hi Keith,
The document seams to have been withdrawn:
The document can be found on the wiki page: http://www.chipkit.org/repository/Debugging%20chipKIT%20with%20MPLAB%20IDE.pdf
Did you take it down or has it just relocated? This link and the one in the WIKI are both defunct.
Sun, 02 Oct 2011 16:31:34 +0000
Please find attached the file Debugging chipKIT with MPLAB IDE.pdf downloaded from Google caches and zipped for convenience ;)
This document has been removed from the wiki. So you use it [color=#FF0000]at your own risk[/color].
Sun, 02 Oct 2011 16:41:13 +0000
Please find attached the file Debugging chipKIT with MPLAB IDE.pdf downloaded from Google caches and zipped for convenience ;)
Thanks Avenue,
I am still interested to know why it was withdrawn, just in case it was found to be incorrect or cause problems with later releases. I did notice a few discrepancy's in the make files etc. but decided to push ahead.
Cheers Chris
Sat, 08 Oct 2011 12:14:22 +0000
Sorry,
I have been out of town for a week.
I am not sure why or who pulled this off; there is absolutely no reason to pull this off of wiki. The document is as accurate as it can be. It is awkward, but is way better than not being able to debug.
I will try and figure out why this was pulled.
Sat, 08 Oct 2011 13:44:54 +0000
Thanks Kieth,
I am trying to debug, actually rewrite would be more accurate, some code that uses Free() and, mallac() so being able to examine actual memory locations is priceless.
Cheers Chris
Mon, 10 Oct 2011 21:43:45 +0000
Just a hint for you... in MPLAB if you click the red B on the menu bar you will find the list of breakpoints currently set; and the ability to add a new breakpoint. One option for adding is for a "data" or "memory" breakpoint. With this breakpoint you can have the debugger break when a memory location is read or written to, or both. This is very handy when attempting to find "who wrote to this bogus address". Put a data breakpoint on the address and it will stop on the line of code accessing that memory address.
Wed, 12 Oct 2011 03:55:56 +0000
Hi Keith, The document seams to have been withdrawn: Did you take it down or has it just relocated? This link and the one in the WIKI are both defunct.
The link is no longer broken. The document was accidentally removed but we got it back up there. Sorry for the inconvenience.