chipKIT® Development Platform

Inspired by Arduino™

Problem with bootloader and mplabx

Created Thu, 20 Nov 2014 13:24:38 +0000 by sergio.g


Thu, 20 Nov 2014 13:24:38 +0000

Hi, i have a Max32 board and i develop Fw with XC32.
i have done all operation requested for programming chipKIt max32 from MPLABX ide but i cannot program the board. in file .hex generated by xc32 there are some line with address (starting at fisical address 1fc000480) that belong at bootloader , avrdude give an error and stops. Someone have suggestion for me? let me know if i have to post ather information. Thanks Sergio


Thu, 20 Nov 2014 14:06:08 +0000

In order to use the bootloader with your own program in MPLAB-X you have to use the correct linker scripts. These are located in the hardware/pic32/cores/pic32 folder in MPIDE, and you need the one for the PIC32MX795F512L chip, and also the "common" one.

There are some special variables and things that need to be defined in order for the linking to work - especially one which sets the MPIDE version (I forget what it is off hand. I think it's defined in wiring.c).


Thu, 20 Nov 2014 15:00:53 +0000

hi, yes i pick the correct file .ld and also the common one modified like requested by the document at but it does'nt work. The map file generated report correct addresses for load in memory (kernel 1 and kernel 2) but examinating file .hex i find five entry at address belonging at boot address. i will send the first row of my file .hex thanks. sergio


Fri, 21 Nov 2014 09:55:24 +0000


I'm having pretty much the same results on the ChipKIT Max32 after following said how to to the letter. OS is Linux Mint/Ubuntu. The Arduino based environment (Mpide) works fine. Just trying to get the Mplab XC32 environment working. Line 15 of the fail text doc shows the "User defined post-build step" I'm calling.

I've attached what avrdude spits out as well as the compiled hex file and source main.c It's just a simple toggled blink on port D pins as a sanity check.

If this should be in a new post please moderate/let me know.



Fri, 21 Nov 2014 18:53:02 +0000

i think ive found the issue / solution cant test as im on the road - excuse the poor formatting (tablet 4am)!

as I doubt i will buy a pickit3 can someone confirm doing this will not brick the digilent bootloader?


Data conflict at address 0x1FC00480 (XC32 v1.3x Migration issue)

When combining two projects such as a bootloader project and an application project, you may see an error indicating overlap around address 0x1FC00480 (e.g. data conflict at address 1FC0048Ch).

This conflict may be due to the new default exception handling introduced in XC32 v1.30. This release introduced a default debug exception handler when building for release mode.

To resolve this issue, add this statement to your application linker script: SECTIONS { /DISCARD/ : { *(._debug_exception) } }

This statement will discard the default handler from your application project, leaving only the bootloader's copy of the handler.