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

"ROM Used" in .LST strange result ?

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



Joined: 12 Sep 2003
Posts: 32
Location: France (Paris)

View user's profile Send private message

"ROM Used" in .LST strange result ?
PostPosted: Tue Jan 27, 2004 10:22 am     Reply with quote

Hello,
Using CCS v3.184

I have compiled my program for a PIC18F6520 (ROM 32K bytes)
here is the .LST file header :
ROM used: 30818 (96%)
Largest free fragment is 1118
RAM used: 1572 (77%) at main() level
1654 (81%) worst case
Stack: 18 worst case (15 in main + 3 for interrupts)

Now I compile it for a PIC18F6720 (ROM 128K bytes, that means 4 times more)
ROM used: 30926 (12%)
Largest free fragment is 0
RAM used: 1571 (41%) at main() level
1653 (43%) worst case
Stack: 18 worst case (15 in main + 3 for interrupts)

1) Why there is 12% and not 24% of ROM used because there are 4 times more ROM.

2) Why Largest free fragment is 0

Thank you
Franck
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 27, 2004 12:01 pm     Reply with quote

I don't have that exact version. I tested the following program
with PCH vs. 3.173 and 3.178, and when I compiled it for each
PIC chip, it gave a ROM usage in the .LST file, of 4x more for
the 18F6520. So it works OK with those versions.

Is it possible that there could be an error in the DEVICES.DAT file ?
Do you have PCWH ? If so, you can use the Device Editor
to see if there is a problem with the specified ROM size.
See this link for a screen shot of the Device Editor (click on the image).
http://www.ccsinfo.com/pcwide.shtml#device

//#include <18F6720.H> // 24 % (ROM used = 30818)
#include <18F6520.H> // 94% (ROM used = 30818)

#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)

void main()
{
float a, b, c;

// Copy the following line, so there are 303 lines
// like this. Then compile. Rom usage will be 30818.
a = b * c + 123.456 / 345.678 % 789.123;

while(1);
}
franckcl



Joined: 12 Sep 2003
Posts: 32
Location: France (Paris)

View user's profile Send private message

PostPosted: Wed Jan 28, 2004 2:34 am     Reply with quote

I have found where is the problem !!!

In your source, just after "#include <18F6720.h>" try to add this line :
#device ICD=TRUE

and see the difference of the "ROM USED" !!!!!!!!

Franck
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