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

Out of rom error on 16f877a

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



Joined: 02 Sep 2005
Posts: 49
Location: Nottingham, UK

View user's profile Send private message

Out of rom error on 16f877a
PostPosted: Thu Oct 13, 2005 3:07 am     Reply with quote

Any suggestions? I'm using 88% of rom on my 16f877a project. If I add just one more call to a function i get an "out of rom error" I've seen this mentioned before on the forum. I added #seperate before the function and its prototype as was suggested but now get an error message "invalid pre-processor directive memcpy" I'm moving up to a 18f452 with more memory, hopefully this will cure the problem but it may not... Anyone know a quick fix? I have a lot of fairly large functions and the main is fairly big. Most of my functions are called only once at the moment, so are probably inline, if I start calling them more than once and are placed seperate could this cause further stack/memory problems? Confused

Code:

 main
  Seg 01000-017FF, 0406 left, need 072F
   0000
  Seg 01800-01FFF, 0800 left, need 0889
   0000
  Seg 00000-00003, 0000 left, need 0889
   0000
  Seg 00004-007FF, 000A left, need 0889
   0000
  Seg 00800-00FFF, 0036 left, need 0889
   0000
  Seg 01000-017FF, 0406 left, need 0889
   0000

*** Error 71 "C:\Program Files\PICC\TIM1.c" Line 1333(0,1): Out of ROM, A segment or the program is too large   delay_ms
Halting build on first failure as requested.
BUILD FAILED: Thu Oct 13 09:42:59 2005


_________________
Tim
Foppie



Joined: 16 Sep 2005
Posts: 138
Location: The Netherlands

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Thu Oct 13, 2005 3:15 am     Reply with quote

this link might help
TIMT



Joined: 02 Sep 2005
Posts: 49
Location: Nottingham, UK

View user's profile Send private message

out of rom error
PostPosted: Thu Oct 13, 2005 3:35 am     Reply with quote

Thanks for your reply, I am using a lot of short seperate printf("ABC"). I think this may the best place to start economising. After that, I think it's probably best to move up to a 18f452. Do you think using a 18f452 will cure the problem or will I have code which will not fit into one segment?
Thanks again for your help.
_________________
Tim
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