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 100%?

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



Joined: 11 Jun 2006
Posts: 4

View user's profile Send private message

ROM 100%?
PostPosted: Sun May 06, 2007 2:42 pm     Reply with quote

Hi,

I have a project using the 18F25J10, seperated into individual .c and .h modules that I'm trying to compile. It originally started out for the 18F2525 as a single .c file, which I had no problems with.

Since moving to the new processor and individual .c/.h files, I can compile it, but the compiler dialog shows "ROM 100%". The 18F2525 source compiled to about 5k (max 48k), so I know the memory isn't full.

I'm using PCWH v4.033.


Has anyone else seen this before?


Thanks,

Neil
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun May 06, 2007 3:08 pm     Reply with quote

I made a test program that uses about 5KB of Flash and it reports the correct the correct ROM usage percentage at the top of the .LST file:
Code:

CCS PCH C Compiler, Version 4.033, xxxxx       06-May-07 14:05

               Filename: PCH_Test.lst

               ROM used: 5098 bytes (16%)
                         Largest free fragment is 27662
               RAM used: 18 (2%) at main() level
                         71 (7%) worst case
               Stack:    3 locations


Here's the test program:
Code:

#include <18F25J10.h>
#fuses HS
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

#include <math.h>

//=================================
void main()
{
float a;
float b;
float result;

a = 123.456789;
b = 456.789012;

result = a + b;
result = a - b;
result = a * b;
result = a / b;

result = floor(a);
result = pow(a, b);

//result = cos(a);
//result = asin(a);
//result = atan(a);
//result = atan2(a, b);

//result = log(a);

//result = sqrt(a);

//printf("%f ", result);

while(1);
}
Neil_J



Joined: 11 Jun 2006
Posts: 4

View user's profile Send private message

PostPosted: Sun May 06, 2007 3:50 pm     Reply with quote

Quote:
I made a test program that uses about 5KB of Flash and it reports the correct the correct ROM usage percentage at the top of the .LST file:


PCM programmer, Do you know of a good example of compiling/linking projects in V4? I've seen your post on how to do it with V3 (i.e. with no linker), but I'd like to use the linker.

Some questions the CCS documentation doesn't address:

  • Do you still #include the .c files?
  • Do you have to #include the processor directives in each module? If so, which one, the .c or the .h?
  • Within a module, do you have to #include .h files of neighboring modules if you want to access variables or functions from them?


Thanks again,

Neil
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun May 06, 2007 4:02 pm     Reply with quote

I don't want to do that. There are other regulars on here who are
testing the new features in version 4. I will defer to them.
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