View previous topic :: View next topic |
Author |
Message |
blak3r
Joined: 11 Jan 2004 Posts: 45
|
REFERENCE: How to program using the CCS ICD via cmd line |
Posted: Tue Mar 28, 2006 1:35 am |
|
|
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
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 |
Posted: Tue Mar 28, 2006 10:23 am |
|
|
blak3r wrote: |
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
|
|
Posted: Tue Mar 28, 2006 1:02 pm |
|
|
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 |
|
|
|