Getting started

jools
Posts: 11
Joined: Sun Apr 12, 2015 5:53 am

Getting started

Post by jools » Sat May 27, 2017 6:01 am

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.

lstandage
Posts: 17
Joined: Fri Sep 06, 2013 6:03 pm

Re: Getting started

Post by lstandage » Sat May 27, 2017 8:48 am

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.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Getting started

Post by majenko » Sat May 27, 2017 11:19 am

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.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

jools
Posts: 11
Joined: Sun Apr 12, 2015 5:53 am

Re: Getting started

Post by jools » Sat May 27, 2017 1:34 pm

"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...

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Getting started

Post by majenko » Sat May 27, 2017 2:11 pm

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...
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Getting started

Post by majenko » Sat May 27, 2017 2:19 pm

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:

Code: Select all

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...

Code: Select all

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:

Code: Select all

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:

Code: Select all

$ 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
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

jools
Posts: 11
Joined: Sun Apr 12, 2015 5:53 am

Re: Getting started

Post by jools » Sat May 27, 2017 2:27 pm

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.

jools
Posts: 11
Joined: Sun Apr 12, 2015 5:53 am

Re: Getting started

Post by jools » Sat May 27, 2017 2:43 pm

Sorry, I should add, it's tests ok on the first upload, it's every attempted upload after that which fails.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Getting started

Post by majenko » Sat May 27, 2017 3:02 pm

Do you have a jumper on JP11?
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

jools
Posts: 11
Joined: Sun Apr 12, 2015 5:53 am

Re: Getting started

Post by jools » Sat May 27, 2017 10:06 pm

That fixed it. Thanks man.

Post Reply