Created Mon, 24 Jul 2017 20:26:17 +0000 by george4657
Mon, 24 Jul 2017 20:26:17 +0000
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
Tue, 25 Jul 2017 09:09:05 +0000
"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.
Tue, 25 Jul 2017 09:11:29 +0000
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