HT-PIC compiler

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
 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



Re: HT-PIC compiler

Quoted text here. Click to load it

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


Re: HT-PIC compiler
Quoted text here. Click to load it

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.

Re: HT-PIC compiler

 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


Quoted text here. Click to load it
"not
Quoted text here. Click to load it
code it
kwords,



Re: HT-PIC compiler

Quoted text here. Click to load it

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 ->
--

Site Timeline