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 CCS Technical Support

REFERENCE: How to program using the CCS ICD via cmd line

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
blak3r



Joined: 11 Jan 2004
Posts: 45

View user's profile Send private message Visit poster's website

REFERENCE: How to program using the CCS ICD via cmd line
PostPosted: Tue Mar 28, 2006 1:35 am     Reply with quote

This topic has been brought up before but i just learned something that i didn't find explained anywhere on the forums.

From the command line (start->run->cmd), you can invoke the icd by typing the following command

>icd -T<path\to\your\hexfile.hex>

I had tried this before but the ICD interface never closed after it was finished loading the software. It turns out that if you put a space after the -T it doesn't close the ICD program but without a space it does.

So, for example:
>icd -TmyHexfile.hex
will program, then exit and the program will start on the pic

BUT!
>icd -T myHexfile.hex
will program, then stay open and you have to click the "Run Program" button to have it start!


Troubleshooting:
1) If you get an error stating that it can't find icd.exe then you need to add it to your PATH environment variable... In WinXP go to Control Panel -> System -> Advanced Tab -> Environmen Variables (button) -> then append the path (most likely C:\Program Files\PICC\). Restart computer if that doesn't fix it or try opening a new cmd window.

How to activate from VB
Add the following line of code:
Shell ("C:\Program Files\picc\Icd.exe -TC:\Tfilename.HEX")

Question Question
Does anyone know if there is a way to specify a post build step in MPLAB. I'd like some type of hook into MPLAB so i can have my code get automatically loaded on each compile.
_________________
"Everything should be made as simple as possible, but not one bit simpler" -- Albert Einstein

http://www.blakerobertson.com
KamPutty
Guest







Re: REFERENCE: How to program using the CCS ICD via cmd line
PostPosted: Tue Mar 28, 2006 10:23 am     Reply with quote

blak3r wrote:

Question Question
Does anyone know if there is a way to specify a post build step in MPLAB. I'd like some type of hook into MPLAB so i can have my code get automatically loaded on each compile.


I recall when I used MPLab+CCS+PicDem2, I added a key using Configure-->Settings-->Hot Keys and assigned a key to compile/program.

~Kam (^8*
blak3r



Joined: 11 Jan 2004
Posts: 45

View user's profile Send private message Visit poster's website

PostPosted: Tue Mar 28, 2006 1:02 pm     Reply with quote

I see how you can define hot keys to the preexisting mplab commands. But, i don't see anyway to add a custom command which would execute the command line icd.exe.

I briefly looked through the files in the MPLAB directory and didn't see any ascii config files which could be editted to modify what commands are executed by MPLAB either.
_________________
"Everything should be made as simple as possible, but not one bit simpler" -- Albert Einstein

http://www.blakerobertson.com
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go 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