I have recently bought ICD3 since I think that being able to debug a microcontroller program requires that we be able to see what is happening inside it. I really want to learn this stuff :)

I have a version 5 CCS C Compiler. I used this compiler before at the university as well. The problem is that the CCS C Compiler is neither able to program the PIC18F Microcontroller via ICD3 nor does it execute the debug function. Is ICD3 even supported by CCS C Compiler? Note that I am able to program my microcontroller via the Microchip "Integrated programming environment" but not via CCS C Compiler.

When it comes to programming the microcontroller, ICD3 is not even in the list in the CCS C Compiler GUI. So I use the Microchip software to program the microcontroller. Now when I click on debug in the CCS C Compiler, it says "Select JRE directory". I am not sure what JRE is. Once I select any directory, I get an error message saying "Target could not be detected".

There are then 2 options, either click on "run diagnostics" or click on "ok". If I click on "run diagnostics" the next error message says "The application was unable to start correctly (0x0000142). Click OK to close the application".

Does this mean that I should now abandon the CCS C Compiler and move to MPLAB?

  • 1
    \$\begingroup\$ JRE is the "Java Runtime Environment" - point it to your Java installation folder. \$\endgroup\$
    – Majenko
    Commented Mar 24, 2015 at 22:48
  • \$\begingroup\$ I have located java on my machine at C:\Program Files (x86)\Java\jre1.8.0_40. I have directed CCS C Compiler to this location when it asks for JRE directory. Now, every time I click on debug, it simple says "Target could not be detected" with the same two buttons for "run diagnostics" and "ok". \$\endgroup\$
    – quantum231
    Commented Mar 24, 2015 at 22:59

1 Answer 1


It looks as if you need to download a software interface module from CCS.


Copy begins:

How can I use MPLAB® ICD 2, MPLAB ® ICD 3 and MPLAB® Real Ice™ with CCS Compiler?


How MPLAB® ICD 2, MPLAB® ICD 3 and MPLAB® REAL ICE™ works with our Compiler: Microchip's MPLAB® ICD 2, MPLAB® ICD 3 and MPLAB® REAL ICE™ can now be integrated with the CCS IDE Compiler. In the past, our IDE Compilers (PCW, PCWH, PCWHD and PCDIDE) only supported the ICD-U40 or ICD-S40 in-circuit debugger/programmer, but now users can seamlessly utilize the CCS windows environment with the MPLAB® ICD 2, MPLAB® ICD 3 and MPLAB® REAL ICE™. All CCS Command-Line Compilers (PCB, PCM, PCH and PCD) can already be integrated with MPLAB® ICD 2, MPLAB® ICD 3 and MPLAB® REAL ICE™.

CCS IDE Compiler and MPLAB® ICD 2, MPLAB® ICD 3 or MPLAB® REAL ICE™ Integration:

You will need version 4.064 or higher of the CCS IDE Compiler (PCW, PCWH, PCDIDE or PCWHD) You will also need to download the MPLAB® ICD 2, MPLAB® ICD 3 and MPLAB® REAL ICE™ interface module from the CCS Downloads Page. Note: If you do not have MPLAB® already installed, you will need to so by visiting www.microchip.com. The debug environment is built-in to the C Aware Real-Time Debugger, once the hardware is connected to your PC and select the programmer/debugger you would like to use from the "Debug Configure" option on the IDE menu tab.

End of copy.

  • \$\begingroup\$ I have already downloaded the "MPLAB® ICD2, MPLAB® ICD3, MPLAB® PICkit3 & MPLAB® REAL ICE™ Interface" plug-in \$\endgroup\$
    – quantum231
    Commented Mar 24, 2015 at 23:37
  • \$\begingroup\$ My only other suggestion is to visit the CCS website and ask for help there. From what I've been told, they are quick to respond. You could also visit their forums and ask for help there if you can't wait for CCS business hours. \$\endgroup\$ Commented Mar 25, 2015 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.