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

Error 71...OUT of ROM, A segment or the program is too large

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



Joined: 23 Aug 2023
Posts: 15

View user's profile Send private message

Error 71...OUT of ROM, A segment or the program is too large
PostPosted: Thu Aug 24, 2023 10:03 am     Reply with quote

Using CCS 5.015 for PIC18f25k22

One of the prototype is too large to fit into the segments of the ROM.


Error 71...OUT of ROM, A segment or the program is too large[prototype name]
Seg 00096-03FFE, 0034 left, need 00060
Seg 00000-00002, 0000 left, need 00060
Seg 00004-00006, 0004 left, need 00060
Seg 00008-00094, 0000 left, need 00060

1 Error, 0 warnings

Build Failed

Can anyone help me to solve this problem?

I used #separate function but it generated another problem which I can not solve either. Please if anyone has any idea how to solve this particular issue. Thank You
temtronic



Joined: 01 Jul 2010
Posts: 9232
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Aug 24, 2023 11:21 am     Reply with quote

Normally you breakdown a large function into 2 or more smaller 'sub functions', but it appears you have almost no codespace left !
That PIC does have 64K ,so you must have a HUGE program ?
Curious as to what it's supposed to do ?
mabedin000



Joined: 23 Aug 2023
Posts: 15

View user's profile Send private message

PostPosted: Thu Aug 24, 2023 11:35 am     Reply with quote

Yeah it is huge but I need to make it work and get rid of these memory issue. Do you recommend any other PIC which has more space within? or any way I can work with the same PIC.
temtronic



Joined: 01 Jul 2010
Posts: 9232
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Aug 24, 2023 2:07 pm     Reply with quote

Simply use Microchip's parametric search webpage and see which have all the features/peripherals you need to use.
there are lots with 128K EEPROM, but only you know about UARTS,TIMERS, pkg type ,etc.
You'll also have to confirm your compiler version CAN program the new PIC !

Curious ,as I've never run out of codespace.
benoitstjean



Joined: 30 Oct 2007
Posts: 566
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Fri Aug 25, 2023 5:56 am     Reply with quote

Or do like I was told many years ago: go with the biggest device you can then scale down if you need to. You'd be surprised. If you're just playing around and trying stuff, you can get a kick-a$$ PIC24 device for 10$ USD so just go with that.

I started-off years ago with the PIC24HJ128 then wanted to add options so I switched-over to the PIC24HJ256 after getting the same error as you: OUT OF ROM.

As time went-by, I again faced the OUT OF ROM and did have more ideas for my product so I upgraded to the PIC24EP512GP806 and believe it or not, I'm at 93% ROM and around 60% RAM. I would add more code if I had more space but I can't.

Just my two cents worth...

Ben
mabedin000



Joined: 23 Aug 2023
Posts: 15

View user's profile Send private message

PostPosted: Fri Aug 25, 2023 8:25 am     Reply with quote

This program was written for PIC18F25K22 and still works when I upload HEX fie of the program to the chip.

I just opened the source code on CCS to modify some part of the code and it shows OUT of ROM even without adding anything in it, I am not sure why though. It should be fine since I did not add anything to the code. I just opened the source file and rebuild. Why it is showing OUT of ROM?
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Fri Aug 25, 2023 8:31 am     Reply with quote

It was most likely originally compiled with a different version of the compiler that used less space. Updates can sometimes add additional code to protect against problems or bugs. Updates can sometimes make routines more efficient. The original version may have been newer or older.
mabedin000



Joined: 23 Aug 2023
Posts: 15

View user's profile Send private message

PostPosted: Fri Aug 25, 2023 8:37 am     Reply with quote

Is there any way to know what version of compiler was used to program this by looking at the code? unfortunately, I don't have access or contact t to the vendors who wrote it for us. more importantly, they are out of business now.

The code was written on 06/26/2012, I am not sure what version of CCS was used at that time or before.
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Fri Aug 25, 2023 8:55 am     Reply with quote

From the hex file, no. The listing file (*.lst) would show which compiler version was used.
mabedin000



Joined: 23 Aug 2023
Posts: 15

View user's profile Send private message

PostPosted: Fri Aug 25, 2023 9:00 am     Reply with quote

I do not have .lst file. I only have 2 header files and a source C file. I am struggling a lot.
temtronic



Joined: 01 Jul 2010
Posts: 9232
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Aug 25, 2023 9:02 am     Reply with quote

sigh, now the problem is he recompiled, so the original listing will have been deleted.
Now IF he has backups of all the original files, then THAT listing will have the compiler version in it.....
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