CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Programming Failure PICKit 4 / CCS IDE / CCS Load

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Backfire



Joined: 12 Oct 2020
Posts: 44

View user's profile Send private message

Programming Failure PICKit 4 / CCS IDE / CCS Load
PostPosted: Mon May 17, 2021 6:22 am     Reply with quote

Hi All,
I'm hoping someone can point out a solution to my issue.

I have a custom PCB, hosting a PIC18F25K20, I have successfully programmed this device, on this board using the CCS IDE (CCS Load) and a PICKit 4.

I have now moved my development board to my office, and have installed a fresh copy of CCS IDE, MPLAB-X, the required 32 bit Java RTE, and the 'MPLAB-X' Plugin as prompted by the CCS IDE.

I am now having issues with programming failing. I was hoping someone could point out, if I've made a simple configuration error; as I'm hoping to avoid lugging this board back and forth to home!

The only 'blank' field in my IDE Options > Paths Dialogue is the "MPLAB PLug-In File", all others have self-populated (I assume correctly) after installing the tools as they were requested.

The CCS Load application seems to see the PICKit 4, but simply errors with "programming failed".

Thanks in advance for any help you can offer!
Backfire



Joined: 12 Oct 2020
Posts: 44

View user's profile Send private message

PostPosted: Mon May 17, 2021 6:25 am     Reply with quote

The message log shows:
Code:

13:23:34  Assigning chip: PIC18F25K20
13:23:34  Loaded: PIC18F25K20
13:23:34  Target Vdd = 5.00
13:23:34  Target Vdd = 5.00
13:23:34  Write FILE -> CHIP
13:23:34  ΓΏ
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Mon May 17, 2021 7:23 am     Reply with quote

Have you actually gone into MPLAB-X, and activated the CCS stuff in here?.
If I remember correctly, the programming using this, uses the driver stuff
that is part of MPLAB-X, so it has to actually be setup inside MPLAB-X before
it will work.
Backfire



Joined: 12 Oct 2020
Posts: 44

View user's profile Send private message

PostPosted: Mon May 17, 2021 7:35 am     Reply with quote

Hi Mr. T,
I believe I have activated the CCS toolchains correctly in MPLAB-X. MPLAB-X can certainly see the device on the board...:

Code:

Connecting to MPLAB PICkit 4...

Currently loaded versions:
Application version............00.06.56
Boot version...................01.00.00
Script version.................00.04.07
Script build number............59586f4647
Tool pack version .............1.4.911
Target voltage detected
Target device PIC18F25K20 found.
Device Revision Id  = 0x1c


Trouble is, I'm trying to use the CCS IDE (And CCS Load as the programmer tool) for this project, as I've a known functional project in this IDE.
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Mon May 17, 2021 8:04 am     Reply with quote

OK.
Have you tried pointing the path to the plugin?. It's normally a directory in
the compiler directory, called 'mplab_ide\modules'. It's a .jar file there.
I suspect you will probably find the best thing to do is talk to CCS. It
sounds as if it should work, and looks as if it is finding things, but then
hiccups when it actually comes to transferring the file.
Backfire



Joined: 12 Oct 2020
Posts: 44

View user's profile Send private message

PostPosted: Mon May 17, 2021 8:12 am     Reply with quote

Hi there,
I do have a .jar file at that location ([...]/PICC/mplab_ide), but attempting to set the path for "MPLAB Plug-Ins" to be this through the IDE config dialogue seems to make no difference, in 'Applying' the changes, the line just blanks out again.

I'll email support and see what they say, many thanks.

Regards,
Josh.
asmallri



Joined: 12 Aug 2004
Posts: 1630
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: Programming Failure PICKit 4 / CCS IDE / CCS Load
PostPosted: Tue May 18, 2021 9:47 pm     Reply with quote

Backfire wrote:
Hi All,
I'm hoping someone can point out a solution to my issue....

Thanks in advance for any help you can offer!


Try programming the PIC directly from MPLAB-X IPE. If this does not work then you may have a hardware issue not a SW issue.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Backfire



Joined: 12 Oct 2020
Posts: 44

View user's profile Send private message

PostPosted: Thu May 20, 2021 6:41 am     Reply with quote

Hi there,
apologies for not getting back sooner. I have successfully read the memory of the PIC on the PCB using MPLAB-X, so I think the issue is still likely to be a software one.

The IPE from Microchip seems to now be bundled with the install of MPLAB-X, and no longer available as a stand-alone application, which I know it was previously; which is both strange and annoying!

Kind regards,
Josh.
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Thu May 20, 2021 6:49 am     Reply with quote

No.
The point is that actually programming is a very different operation to
just 'reading' the chip. Programming means the code has to read a file, and
raise the voltage to put the chip into programming mode. Reading that chip
can be done with only low voltage operations. It is possible that
there is a problem when actually programming, so it is well worth making
sure that this is actually working.
Standard thing with any 'debugging' operation it to rule out everything
that you can. I'd 'guess' it will work, but it worth checking.
Backfire



Joined: 12 Oct 2020
Posts: 44

View user's profile Send private message

PostPosted: Thu May 20, 2021 7:06 am     Reply with quote

I'm away from the PC for the rest of today, but I guess on Friday I'll uninstall and reinstall MPLAB-X with the IPE and see if a programming operation works.

I'll let you know how it goes.

Kind regards,
Josh.
asmallri



Joined: 12 Aug 2004
Posts: 1630
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu May 20, 2021 7:07 am     Reply with quote

Backfire wrote:
Hi there,
apologies for not getting back sooner. I have successfully read the memory of the PIC on the PCB using MPLAB-X, so I think the issue is still likely to be a software one.

The IPE from Microchip seems to now be bundled with the install of MPLAB-X, and no longer available as a stand-alone application, which I know it was previously; which is both strange and annoying!

Kind regards,
Josh.


So if you have MPLAB-X I assume this means you also now have IPE. Now take the hex file you compiled with CCS, load it into IPE, and program the PIC. If this all works then you have ruled out the hardware issue.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19219

View user's profile Send private message

PostPosted: Thu May 20, 2021 7:51 am     Reply with quote

There is also one other possibility. Permissions.
The act of writing the file to the chip, requires that the code at this point
can actually read the file. So something silly like the program not actually
having read permission could cause this to fail. I remember there was some
issue that you had to run CCSLoad with administrator permissions to
make everything work. So might be worth right clicking the IDE shortcut,
and selecting 'run as administrator' and seeing it this makes it work.
Backfire



Joined: 12 Oct 2020
Posts: 44

View user's profile Send private message

PostPosted: Fri May 21, 2021 7:42 am     Reply with quote

So...
I have performed a full, fresh re-install of MPLAB-X (having deleted persistant directories and user configuration information) with the 'Install IPE' option also selected. The removal of all versions of Java, and the re-install of a CCS provided Java version.

CCSLoad still fails to program the device.

Microchip IPE can program / read AND verify chip contents without issue, so sadly looks like this is a CCSLoad issue.

...edit / addendum...

This is the case when "Running as Administrator"
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group