|
|
View previous topic :: View next topic |
Author |
Message |
nehallove
Joined: 16 Jan 2008 Posts: 61
|
Don't understand the Error Message |
Posted: Thu May 02, 2013 5:34 pm |
|
|
Code: | >>> Warning 203 "main.c" Line 346(1,1): Condition always TRUE
>>> Warning 205 "main.c" Line 352(1,1): Unsigned variable is never less than zero
>>> Warning 204 "main.c" Line 353(1,1): Condition always FALSE
>>> Warning 203 "main.c" Line 449(1,1): Condition always TRUE
>>> Warning 203 "main.c" Line 537(1,1): Condition always TRUE
>>> Warning 202 "C:\Users\nehal\Desktop\svn\ENG_REPOSITORY\Trunks\PX\new_ptbt_pic\main.h" Line 98(3,18): Variable never used: UART_DATAPACKET
>>> Warning 202 "C:\Users\nehal\Desktop\svn\ENG_REPOSITORY\Trunks\PX\new_ptbt_pic\data_interpreter.h" Line 119(11,12): Variable never used: i
>>> Warning 202 "C:\Users\nehal\Desktop\svn\ENG_REPOSITORY\Trunks\PX\new_ptbt_pic\data_interpreter.h" Line 162(10,17): Variable never used: version
>>> Warning 202 "main.c" Line 37(15,24): Variable never used: i2c_state
>>> Warning 202 "main.c" Line 443(4,16): Variable never used: packetformat
>>> Warning 202 "main.c" Line 599(18,25): Variable never used: command
*** Error 71 "main.c" Line 623(2,3): Out of ROM, A segment or the program is too large cmd_interpreter_i2c
|
Code: | Seg 00800-00FFF, 0610 left, need 00972
Seg 01000-017FF, 0800 left, need 00972
Seg 01800-01FFF, 0800 left, need 00972
Seg 00000-00002, 0000 left, need 00972
Seg 00003-00003, 0001 left, need 00972
Seg 00004-0001D, 0000 left, need 00972
Seg 0001E-007FF, 01E2 left, need 00972
1 Errors, 11 Warnings.
Build Failed. |
I am trying to compile the code and above message shows up. What I don't understand is
Code: |
Seg 00800-00FFF, 0610 left, need 00972
Seg 01000-017FF, 0800 left, need 00972
Seg 01800-01FFF, 0800 left, need 00972
Seg 00000-00002, 0000 left, need 00972
Seg 00003-00003, 0001 left, need 00972
Seg 00004-0001D, 0000 left, need 00972
Seg 0001E-007FF, 01E2 left, need 00972 |
what does left means? Does it mean that space is 610 but need 972 size? Does it mean that code to be written is 972 in size but there is no segment in memory which accept that ?
Any help would be greatly appreciated. _________________ nehal |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu May 02, 2013 5:58 pm |
|
|
Quote: | Does it mean that space is 610 but need 972 size? |
Yes, it means the space available in that segment is 610 words, but
your function requires 972 words.
The solution is to break up your large function into two or more smaller
functions. Then the compiler can fit them into the available space. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9229 Location: Greensville,Ontario
|
|
Posted: Thu May 02, 2013 7:08 pm |
|
|
Another possible option is to use a similar PIC but with more memory.
You don't say which PIC you've chosen,but there is always a 'bigger,better' one coming out tomorrow !! Usually for less money too. |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Fri May 03, 2013 10:43 am |
|
|
One thing that causes Out of Rom errors is if you have too much code in one function, including main(). The PIC's memory space is like a book. You have several pages in the book but your code(function) has to fit on each page and cannot carry over to the next page. Try breaking your program into smaller functions that can be called individually and have the same effect.
Ronald |
|
|
|
|
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
|