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

Mplab Debug

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



Joined: 30 Apr 2009
Posts: 16

View user's profile Send private message

Mplab Debug
PostPosted: Tue Oct 26, 2010 8:32 am     Reply with quote

Hi guys,

I have a few questions about using Mplab for debug.
My setup is Mplab 8.56 and CCS4.088 and ICD3.

I use Mplab IDE and CCS compiler to compile. My PIC is 24HJ32GP302.

If I set a breakpoint inside in main and try to put watches on values, the watch window constantly says RESERVED MEMORY even though the variables I am trying to watch are in main.
Also when I breakpoint and look at locals I have problems, I appear to be able to view int8s and floats correctly but I can't read back int16 values or arrays.
They just come up with a random value and stay there or again RESERVED MEMORY.

Any ideas on what's going on? I constantly find myself having to use an external LCD and printfs to view RAM for debug.

I also had this problem with the PICKIT2 in debug.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 26, 2010 1:52 pm     Reply with quote

This is really a question for the Microchip forum.
You can search their archives with Google. Use this search string:
Quote:

site:microchip.com/forums "RESERVED MEMORY" debug OR debugging OR debugger
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Oct 26, 2010 3:39 pm     Reply with quote

PCM programmer wrote:
This is really a question for the Microchip forum.
You can search their archives with Google. Use this search string:
Quote:

site:microchip.com/forums "RESERVED MEMORY" debug OR debugging OR debugger


I'm not so sure. Sometimes the compiler settings for CCS can make/break the debug features of MPLAB.

I think I had an issue with structures that ended up being a CCS problem in how it generates the files that MPLAB uses... but that was long ago.

Microchip might be a good place, but if you can give us a sample file that demonstrates the problem, we can look and help you decide which place to start.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
eoinoc



Joined: 30 Apr 2009
Posts: 16

View user's profile Send private message

PostPosted: Wed Oct 27, 2010 2:11 am     Reply with quote

I solved the problem, went into build configuration and ticked a box under options which compiles for debug.

I think another fix is to place a large dummy array in RAM at the top of main, this pushes your program variables to a safe readable location.
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