chipKIT® Development Platform

Inspired by Arduino™

More verbose output in MPIDE

Created Tue, 25 Sep 2012 22:57:32 +0000 by strim


strim

Tue, 25 Sep 2012 22:57:32 +0000

Hello.

Is there a way to turn on more verbose output in MPIDE? I'd like to see what commands are executed to build the sketch and upload it to the board.

Also, is there a way to see "all" code that is compiled for a given sketch? Not only usual setup() and loop() part?

I'm trying to understand how PIC32 works. The fact that low-level details are hidden so well in MPIDE makes it difficult.


WestfW

Tue, 25 Sep 2012 23:23:09 +0000

  1. hold SHIFT while clicking the Verify or Upload buttons. You can also set "build.verbose=true" and "upload.verbose=true" in your mpide/prefernces.txt file

  2. The verbose output will include filenames of all the code compiled. The source is off in the distribution directory, so once you know where that is, you can examine it with any normal editor. In mpide there may be PIC32-specific parts as well as standard arduino code.

  3. If you include the mpide tools directory(s) in your path, you should get access to a bunch of additional tools (pic32-objdump, for instance) that are useful for examining the binaries produced by the compile process. The .hex and/or .elf files should also be readable by other Microchip tools (MPIDE, etc.) IIRC, I was successful in running mpide code in the MPIDE simulator...


strim

Tue, 25 Sep 2012 23:36:49 +0000

  1. hold SHIFT while clicking the Verify or Upload buttons. You can also set "build.verbose=true" and "upload.verbose=true" in your mpide/prefernces.txt file

Thank you! That did the trick.

  1. The verbose output will include filenames of all the code compiled. The source is off in the distribution directory, so once you know where that is, you can examine it with any normal editor. In mpide there may be PIC32-specific parts as well as standard arduino code.

Aha, I've got these files thanks to previous step. There's quite a lot of code compiled even for a simplest sketch (like blink).


WestfW

Wed, 26 Sep 2012 17:11:27 +0000

There's quite a lot of code compiled

Yes. Thus far, the Arduino IDE doesn't include any dependency facility, so ALL of the "core libraries" are compiled for each sketch, whether they are needed or not (so the Serial code is compiled even for Blink, for example.) Eventually, this will result in scaling problems, as the "core" gets bigger and slower to compile. For now, it's not much of an issue.


strim

Wed, 26 Sep 2012 17:33:15 +0000

Indeed, that's not an issue if you look from typical Arduino user perspective. But for a person that wants to dig deeper it's (a bit of) an obstacle.

I'm trying to figure out what happens on the low level. I suspect that execution starts from _reset in cpp-startup.S file, where a lot of magic happens, then goes to main() in main.cpp?