Break the 256 words limit of strings?
Hi guys!
I need a little help.
I creating a double termometer on a pic 16F88 with 20x4 LCD 44780 compatible.
The problem is the size of strings.
MPLABX log is:
Psect Usage Map:
Psect | Contents | Memory Range | Size
------------|--------------------------------|---------------|--------------
reset_vec | Reset vector | 0000h - 0002h | 3 words
intentry | Interrupt context entry code | 0004h - 000Ah | 7 words
end_init | Initialization code | 000Bh - 000Ch | 2 words
_main_text | | 001Ah - 0199h | 384 words
cinit | Initialization code | 019Ah - 01AAh | 17 words
text30 | Program and library code | 01ABh - 07B2h | 1544 words
text1 | Program and library code | 07B3h - 07F3h | 65 words
text45 | Program and library code | 091Eh - 0921h | 4 words
text43 | Program and library code | 0922h - 0926h | 5 words
clrtext | Memory clearing code | 0927h - 092Eh | 8 words
text44 | Program and library code | 092Fh - 0943h | 21 words
text3 | Program and library code | 0944h - 095Ah | 23 words
text20 | Program and library code | 095Bh - 0986h | 44 words
text53 | Program and library code | 0987h - 09B3h | 45 words
text5 | Program and library code | 09B4h - 0A28h | 117 words
text18 | Program and library code | 0A29h - 0AA3h | 123 words
text7 | Program and library code | 0AA4h - 0C42h | 415 words
text21 | Program and library code | 0C43h - 0EFFh | 701 words
| | |
strings | Strings and constant data | 0800h - 08FFh | 256 words
Full capacity | | |
swtext1 | | 000Dh - 0018h | 12 words
swtext2 | | 07F4h - 07FFh | 12 words
------------|--------------------------------|---------------|--------------
cstackCOMM | Stack in common memory | 0072h - 0075h | 4 bytes
bssCOMMON | RAM variables in common memory | 0076h - 0078h | 3 bytes
bitbssCOMM | Bit variables in common memory | 0079h - 0079h | 1 byte
| | |
cstackBANK | | 0026h - 0027h | 2 bytes
cstackBANK | | 002Eh - 005Eh | 49 bytes
bssBANK0hl | | 005Fh - 0060h | 2 bytes
cstackBANK | | 0064h - 0067h | 4 bytes
nvBANK0hll | | 0068h - 0068h | 1 byte
cstackBANK | | 006Ah - 006Fh | 6 bytes
| | |
bssBANK1 | BSS variables in bank 1 | 00A0h - 00E2h | 67 bytes
| | |
abs_s1 | Absolute RAM variables | 0022h - 0025h | 4 bytes
abs_s1 | Absolute RAM variables | 002Ah - 002Dh | 4 bytes
abs_s1 | Absolute RAM variables | 0062h - 0063h | 2 bytes
abs_s1 | Absolute RAM variables | 0069h - 0069h | 1 byte
abs_s1 | Absolute RAM variables | 0071h - 0071h | 1 byte
abs_s1 | Absolute RAM variables | 007Eh - 007Fh | 2 bytes
------------|--------------------------------|---------------|--------------
eeprom_dat | User-programmed EEPROM data | 0000h - 0007h | 8 bytes
------------|--------------------------------|---------------|--------------
config | | 2007h - 2008h | 2 words
------------|--------------------------------|---------------|--------------
idloc | User-programmed ID locations | 2000h - 2003h | 4 bytes
------------|--------------------------------|---------------|--------------
.
At this point, all OK because strings is <=256words
I need to write more strings but not be able because the error:
:0: error: (1347) can't find 0x101 words (0x101 withtotal) for psect "strings" in class "STRING" (largest unused contiguous range 0x100)(908) exit status = 1
The question is.
Exist any form to shift code to another memory position or better, any form to break the 256 limit?
I already set "PRO" mode, "space favour" and "24 bit for float and long" but problem persist.
I not use a var like "strings[256]={...}"
The strings is a "dispersed style" on the main code.
Like "ERROR " in the next fragment of my code:
if (MAX6675_Status_bit[SENS1].TC_Open) {
buffer_ptr[0] = buffer[0];
strcpy(buffer_ptr[0], "ERROR ");
}
if (MAX6675_Status_bit[SENS2].TC_Open) {
buffer_ptr[1] = buffer[1];
strcpy(buffer_ptr[1], "ERROR ");
}
I have 16F88 with 288 (0x120) positions of free program memory but if a write only 1 string character on main rutine, the compiler fails.
Thx in advance!