|
|
View previous topic :: View next topic |
Author |
Message |
starfire151
Joined: 01 Apr 2007 Posts: 195
|
PIC16LF1825 exceeding ROM limits at around 57% usage |
Posted: Thu Dec 12, 2019 9:53 am |
|
|
Apologies if this has been asked/answered before but I'm running into a strange situation when compiling a program for a PIC16LF1825 target.
I'm using PCWHD V5.071 on a Windows 10 platform.
I have incrementally compiled my program when adding features. The latest compilation stated 17% RAM and 57% ROM. When I added one more line of printf() statements and recompiled, the compiler stated I exceeded the ROM limit with the following error messages:
*** Error 71 "audio_round_node_v1_0.c" Line 496(1,2): Out of ROM, A segment or the program is too large main
Seg 0004D-007FF, 0001 left, need 0075C
Seg 00800-00FFF, 0598 left, need 0075C
Seg 01000-017FF, 0800 left, need 00806
Seg 01800-01FFF, 0800 left, need 00806
Seg 00000-00002, 0000 left, need 00806 Reserved
Seg 00003-00003, 0001 left, need 00806
Seg 00004-0004C, 0000 left, need 00806 Reserved
Seg 0004D-007FF, 0001 left, need 00806
Seg 00800-00FFF, 0598 left, need 00806
1 Errors, 0 Warnings.
Build Failed.
What can I do to get rid of this error?
Thanks. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: PIC16LF1825 exceeding ROM limits at around 57% usage |
Posted: Thu Dec 12, 2019 11:30 am |
|
|
The error report shows you have two large functions, one 0x75C in length
and the other is 0x806. The page size on your PIC is 0x800.
Page 0 is mostly used, but page 1 is mostly free and pages 2 & 3 are
completely free. So you have enough room, you just need to give the
compiler some smaller functions to work with, so it can fit them into the
available free areas.
Break up your main() into two or more smaller functions that you call.
Break up the other large function too.
If you're using floating point, consider reducing it or doing it with integers. |
|
|
starfire151
Joined: 01 Apr 2007 Posts: 195
|
|
Posted: Thu Dec 12, 2019 12:39 pm |
|
|
Thanks very much for your reply.
I'll try that out. |
|
|
|
|
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
|