| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		
			eoinoc
 
 
  Joined: 30 Apr 2009 Posts: 16
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				| Mplab Debug | 
			 
			
				 Posted: Tue Oct 26, 2010 8:32 am     | 
				     | 
			 
			
				
  | 
			 
			
				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
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue Oct 26, 2010 1:52 pm     | 
				     | 
			 
			
				
  | 
			 
			
				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: 1617 Location: Central Illinois, USA 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue Oct 26, 2010 3:39 pm     | 
				     | 
			 
			
				
  | 
			 
			
				 	  | 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
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Wed Oct 27, 2010 2:11 am     | 
				     | 
			 
			
				
  | 
			 
			
				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. | 
			 
		  | 
	
	
		  | 
	
	
		 |