chipKIT® Development Platform

Inspired by Arduino™

HEX file from MPLAB with AVRDUDE (bootloader)

Created Wed, 12 Oct 2011 22:55:45 +0000 by cholin


Wed, 12 Oct 2011 22:55:45 +0000

I've been trying to compile a project for the Uno32 board in MPLAB but haven't been very successful. Here's what I've been doing:

I added the linker script (hardware\pic32\cores\pic32\chipKIT-UNO32-application-32MX320F128L.ld) to MPLAB. Compiled okay (release, debug, anything).

Tried loading it onto the board with this command: C:\Users\Colin\Desktop\mpide-0022-windows-20110822\hardware\tools\avr>"bin/avrdu de" -c stk500v2 -p pic32-360 -P COM3 -U flash:w:lcdtest.hex -C "avrdude.conf" -v

And I get the error: avrdude: ERROR: address 0x1fc03000 out of range at line 8196 of lcdtest.hex

I've tried clicking "dont link startup code" in MPLAB because I saw a post on here about it. Didn't work. The code is small enough to fit on the chip... I just don't get it!

I know some other people have succeeded, and I've looked at the CPUstick skeleton files but still can't quite comprehend what's going wrong. I can successfully use AVRDUDE to upload the CPUstick hex file, which leads me to believe I'm generating my hex wrong...

Do I need some magical makefile here? Everything seems like it would be fine as default settings.

Any help would be incredibly appreciated!


Thu, 13 Oct 2011 17:25:31 +0000

Did you see this:

Did you accidentally include config bits in your program?

Can you show your HEX file in the range 0x1fc03000?

The config bits are usually at 1FC02FFx, so that looks close...

-- Rich


Thu, 13 Oct 2011 19:06:50 +0000


Thank you so much. It was something you said via email that helped me the most. As it turns out, there's nothing to it... as long as you're using MPLAB X. In MPLAB 8.43 or whatever, it doesn't generate a valid hex. In MPLAB X, it does. How bout that.

Thank you.