kekon
Full Member level 3
- Joined
- Sep 19, 2002
- Messages
- 155
- Helped
- 5
- Reputation
- 10
- Reaction score
- 3
- Trophy points
- 1,298
- Location
- Poland, Białystok
- Activity points
- 1,493
c18 large array
I use Microchip C compiler for PIC18 devices. My design consists PIC18F252 device which has about 1500 bytes of internal RAM. Despite of that I can't declare arrays larger than 256 bytes as the linker reports error that it is unable to reserve memory.
char buffer[255]; - this causes linker error
char buffer[120];- no error
It also concerns allocating data in assembly language with RES directive:
buffer RES 255 - this causes linker error as well
buffer RES 120 - no error
The same problem appears when other variables occupy more than 255 bytes of RAM. Why is this so ? Is there any solution ?
I use Microchip C compiler for PIC18 devices. My design consists PIC18F252 device which has about 1500 bytes of internal RAM. Despite of that I can't declare arrays larger than 256 bytes as the linker reports error that it is unable to reserve memory.
char buffer[255]; - this causes linker error
char buffer[120];- no error
It also concerns allocating data in assembly language with RES directive:
buffer RES 255 - this causes linker error as well
buffer RES 120 - no error
The same problem appears when other variables occupy more than 255 bytes of RAM. Why is this so ? Is there any solution ?