Page 1 of 1

Using ChipKit programmer on DIY board

Posted: Mon Jul 24, 2017 9:26 pm
by george4657
I purchased a chipkit programmer when I purchased my chipkit max32 board a while back.
I have now built my own board using a pic32mx250 for an embedded project.
I was able to write a basic program and program it into the board using the programmer with Mplab X.
All was ok till I unpluged the programmer with external power left on, then the program stopped and pressing reset does not restart it.
I noticed when programming it for the first time it said it was writing a boot loader which I don't understand why.

So my questions are:
Does using the chipkit programmer with Mplab x mean it assumes I am programming a chipkit board and adds boot loader?
If I now have a boot loader on my chip how do I get it to run my program( I don't have usb connected ).

George

EDIT:
Solved problem. Bad connection on jumper wire so MCLR was powered only by programmer.
I think write to bootloader was an update to Chipkit programmer as it had not been used for a long time.

Thanks anyway.
George

Re: Using ChipKit programmer on DIY board

Posted: Tue Jul 25, 2017 10:09 am
by majenko
"writing to bootloader" doesn't mean it's actually writing a bootloader to the chip, just that it's writing to that portion of the flash memory.

The chip's flash is split into two parts - the main program flash, and the (3K) bootloader flash. The chip always boots from the bootloader flash, so something has to be there to execute. If you don't have an actual bootloader the linker places some of your program's startup code (crt0) in the bootloader area. That then executes on power up and then jumps to your code in main flash.

Re: Using ChipKit programmer on DIY board

Posted: Tue Jul 25, 2017 10:11 am
by GastonLagaffe
Salut George,

I use PicKit3 to flash the CPU. Every time I connect the programmer it downloads the latest bootloader and firmware for the PicKit3. This also happens when I change the CPU type (e.g. from 44 pins to 28).

Ciao, Mathias