Hi,
I am writing software in C for a PIC16f877 with the Hi-Tech PICC compiler. The code utilizes mainly global variables including several global int arrays (8ints wide). As I expanded the program to include more variables I recieved errors such as:
"(491) can't find 0x6 words for psect "rdata_0" in segment "BANK0" "
when I take away several of my globals then this error goes away and the project builds properly.
I belive this is from bank0 running out of memory space, and this is the bank where PICC compiler stores the global variables. I should have 4 banks on the 16f877 and there should be plenty more memory available for storage becaues it is not an incredibly complex program.
does anyone know the best way to overcome this issue so that I can still add additional global arrays and expand the software. I was thinking that if I could store the globals in a different bank then the issue could resolve itself. However I am writing in C language so i dont know how to control where a variable is stored so that it can be easily accessed as global. Is there a good way to do this? Can tell the software to store some globals on other banks, and how do i know what adresses are appropriate to allocate.
Thanks very much for your help.
AweLucid
I am writing software in C for a PIC16f877 with the Hi-Tech PICC compiler. The code utilizes mainly global variables including several global int arrays (8ints wide). As I expanded the program to include more variables I recieved errors such as:
"(491) can't find 0x6 words for psect "rdata_0" in segment "BANK0" "
when I take away several of my globals then this error goes away and the project builds properly.
I belive this is from bank0 running out of memory space, and this is the bank where PICC compiler stores the global variables. I should have 4 banks on the 16f877 and there should be plenty more memory available for storage becaues it is not an incredibly complex program.
does anyone know the best way to overcome this issue so that I can still add additional global arrays and expand the software. I was thinking that if I could store the globals in a different bank then the issue could resolve itself. However I am writing in C language so i dont know how to control where a variable is stored so that it can be easily accessed as global. Is there a good way to do this? Can tell the software to store some globals on other banks, and how do i know what adresses are appropriate to allocate.
Thanks very much for your help.
AweLucid