This guide is intended to assist in setting up a development environment that will allow PIC32 projects to be downloaded and modified with a minimal amount of reconfiguration.
Go to http://ww1.microchip.com/downloads/mplab/X/index.html.
View the installation video for an overview of the installation.
Install the Java 1.6 if necessary. Note that the MPLAB X IDE does not run with Java 1.7 at this time. The video mentions “beta” software – v1.00 of the IDE is now released.
Select MPLAB IDE X v1.00, MPLAB X IDE Release Notes/User Guide, and MPLAB C32 Lite Compiler for PIC32 MCUs.
Click Download and install. It's normal to have two or more downloads in progress concurrently. The release notes may be extracted to any convenient location. Select the Lite Compiler in the C32 installation setup.
Start MPLAB X IDE. Under Tools-> Options-> Embedded select C32(v2.02) as the default tool chain. Under the Generic Settings tab set the default project directory. For this document the default is C:\Users\Owner\MPLABXProjects. It's fine to use a sudirectory under Documents if preferred.
Go to http://www.microchip.com/mal.
Download Microchip Application Libraries v2011-12-05 Windows or the Linux or Mac versions as needed.
Keep the default installation directory and select all components for the installation.
Locate the Project File and Source Files line for the Midi75Encoder and click the download link.
Extract the files to C:\Users\Owner\MPLABXProjects.
Open the Midi75Encoder project in the IDE. Right click the project name and select Properties.
Under conf:[default] verify that the device is PIC32MX795F512L and that the selected tool chain is C32(v2.02).
Under pic32-gcc modify the search paths to match the location of the include files from the Microchip Application Libraries install. The files may me left in the default location. In my example I copied the Microchip directory to the project directory.
The procs.def file in the project directory is required. It should be present so the linker will “find it” but is not included as a source file in the project. The info in procs.def helps the linker locate code so that it does not step on the bootloader.
When progamming for the bootloader it is normal to comment out the #pragma config statements so that the PIC's configuration is controlled by the bootloader application.
Bootloaders are a cost-saving convenience for the DIY programmer. It is certainly possible to accidentally overwrite the bootloader application by mistake. In this event it's necessary to acquire (borrow?) a dedicated programmer and reprogram the factory bootloader app.
Check the official UBW32 site for additional info: http://www.schmalzhaus.com/UBW32/
John Kinkennon
February 17, 2012