Created Sat, 27 May 2017 05:01:50 +0000 by jools
Sat, 27 May 2017 05:01:50 +0000
I apologize if this question seems a little basic, but I have a ChipKit Cerebot MX7 ck that I got around 2 years ago. I used it last with MPLABX, and if I remember right had used MP IPE to reprogram the bootloader. I now want to use it with chipKit core and the Arduino IDE, but I keep getting the Target Not Found error when I try to upload any sketches. I think I need to put the original bootloader back on, but when I try to do it using MP IPE it just gets stuck on "Programming Download". I've looked everywhere online for some kind of tutorial or instructions, but everything I've found is either out of date or extremely vague. Can anybody help me out in getting this thing set up? Thanks.
Sat, 27 May 2017 07:48:52 +0000
I've seen this for some computers and MPIPE, and the built-in debugger. It has been a fairly constant problem with these programmers.
The firmware updates, but then something happens when the debugger disconnects the USB and starts up again. Then either there utility times out, or it hangs, as in your case.
Try closing the utility, starting it up again, and connect again. If the debugger is making progress, you should see it update the bootloader, then the RS, and then the AP. After that, it should be fine.
I will caveat that, though, because I have a chipKIT pro MX 4 that will not update for anything. It just alternates between the bootloader and the AP.
Sat, 27 May 2017 10:19:08 +0000
MPIDE can't reprogram the bootloader. You need to use either MPLAB-X or the MPLAB IPE to install the bootloader HEX file for your board.
The bootloader HEX can be downloaded from Digilent if you don't already have it.
Sat, 27 May 2017 12:34:05 +0000
"MPIDE can't reprogram the bootloader. You need to use either MPLAB-X or the MPLAB IPE to install the bootloader HEX file for your board."
It actually MP IPE 'm using...
Sat, 27 May 2017 13:11:47 +0000
Ah, mis-reading. I have never seen it called MPIPE before - and since we used to have MPIDE as our IDE that is what I read.
Let me just dig out my MX7...
Sat, 27 May 2017 13:19:13 +0000
Ok, so I connect up using the DBG interface (and the power set to DBG), load IPE, select the PIC32MX795F512L as the device, and PKOB as the tool.
Press connect, and after a while:
2017-05-27 14:13:10 +0100 - Completed loading IPE.
*****************************************************
Connecting to Licensed Debugger...
Currently loaded firmware on Licensed Debugger
Firmware Suite Version.....01.27.15 *
Firmware type..............PIC32MX
<prod>chipKIT Pro MX7 by <man>Digilent
Now Downloading new Firmware for target device: PIC32MX795F512L
Downloading bootloader
Bootloader download complete
Programming download...
Downloading RS...
RS download complete
Programming download...
Downloading AP...
AP download complete
Programming download...
Currently loaded firmware on Licensed Debugger
Firmware Suite Version.....01.48.17
Firmware type..............PIC32MX
Target voltage detected
Target device PIC32MX795F512L found.
Device ID Revision = 44300053
It did sit for a while on "Programming download..." but just have patience and it should carry on.
Now load the HEX file...
2017-05-27 14:15:42 +0100 - Loading hex file. Please wait...
Loading code from /home/matt/Downloads/chipKIT_Bootloader_MX7ck.hex...
2017-05-27 14:15:43 +0100 - Hex file loaded successfully.
And hit Program:
2017-05-27 14:16:06 +0100 - Programming...
Device Erased...
Programming...
The following memory area(s) will be programmed:
boot config memory
configuration memory
Programming/Verify complete
2017-05-27 14:16:10 +0100 - Programming complete
Pass Count: 5
LD1 is now blinking. Reconnect to UART (changing the power jumper to suit) and test it:
$ pic32prog -d /dev/ttyUSB0
Programmer for Microchip PIC32 microcontrollers, Version 2.0.223
Copyright: (C) 2011-2015 Serge Vakulenko
Adapter: STK500v2 Bootloader
Program area: 1d000000-1d1fffff
Processor: Bootloader (id DEAFB00B)
Flash memory: 2048 kbytes
Boot memory: 80 kbytes
Sat, 27 May 2017 13:27:03 +0000
Thanks majenko. Ok so I think I figured out the IPE issue, I had it set to PIC32MX775F512L instead of PIC32MX795F512L (whoops...), and it's now taking the bootloader (I got the current .hex file from the Digilent Resource page). I'm still having an issue in that the Arduino IDE is still giving me the Target Not Found error. I have switched the MicroUSB cable to the UART port on the board, and set the jumper at J3 accordingly, have selected Cerebot MX7cK as the board in the IDE, and have AVRISP mkll selected as the programmer. I used this board when I got it with no issues, I don't remember it being this quirky. And the lack of resources available is definitely disappointing.
Sat, 27 May 2017 13:43:58 +0000
Sorry, I should add, it's tests ok on the first upload, it's every attempted upload after that which fails.
Sat, 27 May 2017 14:02:00 +0000
Do you have a jumper on JP11?
Sat, 27 May 2017 21:06:50 +0000
That fixed it. Thanks man.
Sat, 27 May 2017 21:30:41 +0000
Without that jumper the DTR signal doesn't get through to reset the board and enter the bootloader. The first time around you're permanently in the bootloader since there is no sketch loaded, but once there is you need to reboot to get the bootloader to run.
It can be useful to disable though sometimes, so the board doesn't reset every time you open the serial port. Hence the jumper on JP11.