HT-PIC compiler

Hi,

I'm using the HT-PIC compiler (for the PIC16 family) and encountered a "not enough memory for code psect" linker error. If I remove some bit of code it will compile/link fine. The odd thing is that my code has about 3.5 kwords, far less than my target's total memory. (16F877, 8kwords mem) Any hints?

Thanks,

Henrique Kawakami

Reply to
Henrique Kawakami
Loading thread data ...

I think the lite/free version is limited to only 2048 instructions but you'll need to verify it with their webpage.

Reply to
Amused

Hi.

The trouble must be connected with the memory banking of PICs. Try to reduce the size of your largest functions by dividing to several smaller. Don't forget to watch the stack size.

One time I had a problem when used PIC14000. When my program became only a bit smaller than the memory size of this chip, compiler said the thing a sort of "Project is 7K more than the memory size". My decision was to create the dummy function:

void dummy(void) {

}

and to call it from one or two places of the program. These places was found experimentally.

Regards.

Reply to
Peter K.

I already splitted the largest funcions, but it doesn't seem to make a difference. I will now try your "dummy function" thing..

Thanks for the help!

Henrique Kawakami

"not

code it

kwords,

Reply to
Henrique Kawakami

"Henrique Kawakami" wrote in news:bidjfc$633$ snipped-for-privacy@aracaju.ic.unicamp.br:

Remember any const or initialized data values also go into the image thus increasing the amount of "code" size. E.g.

const int foo; 'foo' probably takes up sizeof (int) in FLASH int bar = 12; '12' does take up at least one byte in FLASH

--
- Mark ->
--
Reply to
Mark A. Odell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.