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

CCS used in MPLAB and REAL ICE ?

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



Joined: 03 Dec 2013
Posts: 215

View user's profile Send private message

CCS used in MPLAB and REAL ICE ?
PostPosted: Mon Oct 05, 2015 9:36 pm     Reply with quote

Has anyone used the MicroChip REAL ICE with MPLAB and does it allow CCS
generated code to be debugged ?

I've been told that the REAL ICE does manage to switch PIC24 oscillators in debug mode.
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Tue Oct 06, 2015 2:44 am     Reply with quote

You can use CCS with any debugger that runs in MPLAB.

Now MPLAB has two completely different 'meanings'. The 'older' MPLAB (up to 8.92), and then MPLAB-X. This latter version, is unfortunately _very_ poor indeed. It is a pain to use, very difficult to get working, and generally unreliable. The older MPLAX 8.92, is quite a reasonable environment, but is no longer being updated for newer chips.

There are two fundamentally different ways you can work with either environment. You can add the plug-in for CCS support (on the later MPLAB, you have to follow quite a careful 'sequence' to get this to work properly), and then work completely in MPLAB, just using CCS as the compiler. Alternatively you can just compile outside, and load the .cof file. On the older MPLAB, this is easy, and works well, giving you the CCS 'environment' when typing etc., but then debugging in MPLAB. On the later MPLAB, this approach is not so easy, so you have to take more time and actually setup MPLAB to use CCS as the compiler. If you have to go this way, be prepared for just how bad the MPLAB-X environment is.
How Microchip are not losing sales at a huge rate to other chip alternatives, given just how poor their current environment is, I'll never understand....

I don't think I have ever managed to fully debug something successfully in MPLAB-X. I have just occasionally used the older MPLAB, quite well, but in general I have to repeat the comments from others, that it's far better to just use something like a serial port, or a pin as a digital 'pip' marker, and debug using real code in the real board.

I recently spent a few days getting a bulk MSD device working on the PIC. Given that the problems were all timing related, and of course any delay to stop and use a debugger would affect this, I don't think I could have debugged it yet, using a debugger. Instead I used a fast logic analyser, with the ability to watch USB transactions, added a fast single byte output using the hardware SPI, to flag 'where' in the code the chip was, without pausing (remember you just have to load the output register, and the hardware then sends the byte without costing any time), so I could synchronise what was happening on the USB, versus what the PIC was doing. After a very short while it became plain that the problems were being caused by the delays in re-loading the data buffer using the supplied CCS 'single buffer' drivers. Wrote ping pong drivers for endpoint1, and immediately fixed the problem.
If I'd been using a debugger, I would still be stuck....
soonc



Joined: 03 Dec 2013
Posts: 215

View user's profile Send private message

Thanks for yor insight
PostPosted: Tue Oct 06, 2015 8:27 am     Reply with quote

Ttelmah wrote:
You can use CCS with any debugger that runs in MPLAB.

Now MPLAB has two completely different 'meanings'. The 'older' MPLAB (up to 8.92), and then MPLAB-X. This latter version, is unfortunately _very_ poor indeed. It is a pain to use, very difficult to get working, and generally unreliable. The older MPLAX 8.92, is quite a reasonable environment, but is no longer being updated for newer chips.

There are two fundamentally different ways you can work with either environment. You can add the plug-in for CCS support (on the later MPLAB, you have to follow quite a careful 'sequence' to get this to work properly), and then work completely in MPLAB, just using CCS as the compiler. Alternatively you can just compile outside, and load the .cof file. On the older MPLAB, this is easy, and works well, giving you the CCS 'environment' when typing etc., but then debugging in MPLAB. On the later MPLAB, this approach is not so easy, so you have to take more time and actually setup MPLAB to use CCS as the compiler. If you have to go this way, be prepared for just how bad the MPLAB-X environment is.
How Microchip are not losing sales at a huge rate to other chip alternatives, given just how poor their current environment is, I'll never understand....

I don't think I have ever managed to fully debug something successfully in MPLAB-X. I have just occasionally used the older MPLAB, quite well, but in general I have to repeat the comments from others, that it's far better to just use something like a serial port, or a pin as a digital 'pip' marker, and debug using real code in the real board.

I recently spent a few days getting a bulk MSD device working on the PIC. Given that the problems were all timing related, and of course any delay to stop and use a debugger would affect this, I don't think I could have debugged it yet, using a debugger. Instead I used a fast logic analyser, with the ability to watch USB transactions, added a fast single byte output using the hardware SPI, to flag 'where' in the code the chip was, without pausing (remember you just have to load the output register, and the hardware then sends the byte without costing any time), so I could synchronise what was happening on the USB, versus what the PIC was doing. After a very short while it became plain that the problems were being caused by the delays in re-loading the data buffer using the supplied CCS 'single buffer' drivers. Wrote ping pong drivers for endpoint1, and immediately fixed the problem.
If I'd been using a debugger, I would still be stuck....


Great info. on the MPLAB and the options for using it with CCS.

My end goal is NOT to do critical timing debugging, just debugging code that is running at the slower speed and switching in real time to fast clock and then back to slower clock needs to work flawlessly its a big issue with my application.

I've posted about the issue I have with clock switching and the PIC24. I was also told that the Real Ice handles the problem.
But I did not get enough info. Such as does that mean I have t also use a PIM in which case going Real Ice seems drastic as I'll have to make a new PCB and provide a header to the PIM.

A question does anyone have a ICD-3 and is using a PIC24FJxxxx part, and does it do clock switching in debug mode ?

Thanks again for you insight.
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