View previous topic :: View next topic |
Author |
Message |
mabedin000
Joined: 23 Aug 2023 Posts: 15
|
Error 71...OUT of ROM, A segment or the program is too large |
Posted: Thu Aug 24, 2023 10:03 am |
|
|
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
|
|
Posted: Thu Aug 24, 2023 11:21 am |
|
|
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
|
|
Posted: Thu Aug 24, 2023 11:35 am |
|
|
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
|
|
Posted: Thu Aug 24, 2023 2:07 pm |
|
|
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
|
|
Posted: Fri Aug 25, 2023 5:56 am |
|
|
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
|
|
Posted: Fri Aug 25, 2023 8:25 am |
|
|
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
|
|
Posted: Fri Aug 25, 2023 8:31 am |
|
|
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
|
|
Posted: Fri Aug 25, 2023 8:37 am |
|
|
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
|
|
Posted: Fri Aug 25, 2023 8:55 am |
|
|
From the hex file, no. The listing file (*.lst) would show which compiler version was used. |
|
|
mabedin000
Joined: 23 Aug 2023 Posts: 15
|
|
Posted: Fri Aug 25, 2023 9:00 am |
|
|
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
|
|
Posted: Fri Aug 25, 2023 9:02 am |
|
|
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..... |
|
|
|