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

General library

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



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

General library
PostPosted: Tue May 05, 2009 5:21 pm     Reply with quote

In time, my programming "library" is growing. I was wodering if it would be good idea, to put all "general" functions (not dependant of HW) to one place.

The dilema I face are const types. Are they put into the PIC memory only as need to have basis or are they all put into the hex. I would think that it is first option, that is in use.
I was looking at LST files, but I did not find even the used const type there.
Anybody know this answer?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue May 05, 2009 5:42 pm     Reply with quote

To see the 'const' array data in your .LST file, comment out the #nolist
statement in your PIC's .h file. The re-compile. Example:
Quote:

//////// Standard Header file for the PIC16F877 device /////
#device PIC16F877
//#nolist


Also, see these rules of how or whether const array data appears in
the .LST file:
http://www.ccsinfo.com/forum/viewtopic.php?t=38006&start=1
ckielstra



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

View user's profile Send private message

PostPosted: Tue May 05, 2009 5:48 pm     Reply with quote

Or have a look at the symbol file (*.sym).
A variable not present in this file means it takes no memory.
bungee-



Joined: 27 Jun 2007
Posts: 206

View user's profile Send private message

PostPosted: Wed May 06, 2009 12:11 am     Reply with quote

Commenting out the #nolist directive didn't do the trick. I can see the constant in the listing as C directive, but no asm beside that.

Sym shows only one constant of two in my program and the shown is used. So my assumption was correct. Constant is put in the binary file on need to have basis.

Thank you for help. Cool
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed May 06, 2009 2:37 am     Reply with quote

ROM constants have the start address of their associated function listed in the ROM Allocation section of the *.sym file. But there's no respective symbol in the asm listing.

No functions and table data are generated for unreferenced constants.
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