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 support@ccsinfo.com

Not enough ram ".sym file shows fragment"

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







Not enough ram ".sym file shows fragment"
PostPosted: Mon Nov 26, 2007 2:18 pm     Reply with quote

When i compile my program I get the not enough ram error (PCH ver4). I am using PIC18F8722. I look at .sym file and notice that ram allocation is not continuous. Allocation goes to 35A and stops then picks back up at F71. A large chunk of ram not used. Why is this happening?

Thanks
John
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Nov 26, 2007 2:39 pm     Reply with quote

The 18F8722 has 3932 bytes of RAM, in hex notation that's 0xF5C.

The Special Function Registers (SFR) are mapped into the same address space as RAM. SFR memory in the PIC18F8722 starts at 0xF60 and ends at 0xFFF.

The symbols you see allocated at 0xF71 and higher are SFR's.

Normally you only get a symbol file when compilation succeeded without errors. Are you sure you are looking at the symbol file for your most recent program? Haven't you added a new large array to your program?

What is your exact compiler version? It looks something like 4.062 and can be found on top of the list file (*.lst).
Johnjc
Guest







PostPosted: Mon Nov 26, 2007 3:05 pm     Reply with quote

Version 4.042. The compiler creates the .sym file each time I compile. I have a data array signed long data[1024]. That should take 2048 bytes (compiler manual says long default size is 2 bytes). The amount of ram from address 35A to F71 is 3095 bytes, this is enough for the data array. I am not sure why the rest of the ram is not being mapped?

Thanks for the help!
Ttelmah
Guest







PostPosted: Mon Nov 26, 2007 3:51 pm     Reply with quote

Are you sure somebody hasn't been fiddling in device editor, and that you have the device selected correctly? Have just tried with 4.042, and it happily accepted a 1024 entry 'long' array fine.
Double check in device selector, that it shows 3800+ bytes of RAM, and that in device editor, all but the last column is ticked in the memory available selector.

Best Wishes
Johnjc
Guest







PostPosted: Tue Nov 27, 2007 6:10 am     Reply with quote

Thanks for the info. I am not using mplab. I am compiling from the command line. Since I have the #include <18F8722.h> shouldn't the memory be set correctly for full usage?

Thanks
Johnjc
Guest







PostPosted: Tue Nov 27, 2007 6:43 am     Reply with quote

Removing the directive #device icd=true allows the program to compile properly. Not sure why compiling for icd debugging causes memory usage to be reduced?
Ken Johnson



Joined: 23 Mar 2006
Posts: 197
Location: Lewisburg, WV

View user's profile Send private message

PostPosted: Tue Nov 27, 2007 8:01 am     Reply with quote

ICD debugging needs a little memory also

Ken
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