Jump to content
  • 0

ChipKIT PGM and max32


alexteran

Question

Hi, I want to program my Max32 board using the ChipKIT PGM. I'm using MPLAB X IDE v5.10. I have already created a project for the PIC32MX795F512L, I chose the XC32 compiler toolchain and the correct hardware tool (the one under Licensed Debugger) chipKitProgrammer but every time I try to download my program to me uC I got te next mesages:

 

Connecting to Licensed Debugger...

Currently loaded firmware on Licensed Debugger
Firmware Suite Version.....01.54.00
Firmware type..............PIC32MX

<prod>chipKitProgrammer by <man>Digilent
Target voltage detected
Unable to connect to the target device.
Failed to get Device ID

 

What I'm doing wrong?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hi @alexteran,

I have some older versions of the software (MPLAB X 3.60, XC32 1.43) but I was able to successfully load some simple code to the Max32 successfully with a chipKIT PGM. It sounds like you are doing all of the right things, but to make sure we are on the same page, this is what I did:

  • Create a new MPLAB X project targeting a PIC32MX795F512L device in the PIC32 family
  • During the new project creation Licensed Debugger under Other Tools (I selected the PGM debugger later on)
  • Choose my XC32 compiler
  • Made a fresh C main file
  • Populated it with the strictly unprofessional code I have later on in this post)
  • Right clicked the project name and choose Customize in the Set Configuration option to then specifically choose the licensed debugger for the chipKIT PGM (naturally having the PGM attached to both the PC and the Max32 at this point)
  • Clicked the Build Project button
  • Clicked the Make and Program Device button

It then when through a number of downloads, but then successfully programmed the board so that the state of digital pin 77 (labeled as such on the silk screen) controlled the state of LED5. I presume you have the arrow on the PGM pointing towards pin 1 on the ICSP header? Otherwise, the only other thing I can think of is that you may need to apply external power to the Max32 for it to successfully program.

Do my steps sound like what you did?

Thanks,
JColvin

Here's the output I received and the code I used:

Spoiler

Output:


*****************************************************

Connecting to Licensed Debugger...

Currently loaded firmware on Licensed Debugger
Firmware Suite Version.....01.47.12 *
Firmware type..............PIC32MZ

<prod>chipKITProgrammer 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 = 54300053

Device Erased...

Programming...

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x7ff
boot config memory
Programming/Verify complete

 

and super simple code


/* 
 * File:   UserControlledLED.c
 * Author: jcolvin
 *
 * Created on November 13, 2018, 12:23 PM
 */

#include <stdio.h>
#include <stdlib.h>
#include <p32xxxx.h>

/*
 * 
 */
int main(int argc, char** argv) {

    int i = 0;
    
    //set LED 5 to be an output
    TRISCbits.TRISC1 = 0;
    
    while(1){
        //Read the logic level of Digilent pin (silkscreen) 77
        //and set the LED 5 to that value
        LATCbits.LATC1 = PORTDbits.RD7;
        
      //super lazy and unprofessional delay  
      for(i = 0; i<10000; i++);
    }
    return (EXIT_SUCCESS);
}

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...