Searching \ for '[PIC] Re: bank allocation problem' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/memory.htm?key=bank
Search entire site for: 'Re: bank allocation problem'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Re: bank allocation problem'
2009\06\01@132401 by M.L.

flavicon
face
Marcelo, use the [PIC] subject tag if you want people to read your posts.
--
Martin K.


On Mon, Jun 1, 2009 at 8:29 AM, Marcelo Rodrigues <spam_OUTmsrmailTakeThisOuTspamgmail.com> wrote:

{Quote hidden}

> -

2009\06\01@135405 by Isaac Marino Bavaresco

flavicon
face
M.L. escreveu:
{Quote hidden}

Usually the compiler needs a few bytes of RAM for its own use (eg.:
interrupt state save, intermediate calculation results, etc).
Perhaps the compiler detects the lack of memory before it optimized and
removed its own unused internal variables.

It would be better if you leave some free memory in bank0, because the
common bank resides in the  last 16 bytes of every bank and it is a more
versatile memory.
Some compilers may not work unless there is some free memory in the
access bank.

Regards,

Isaac

__________________________________________________
Faça ligações para outros computadores com o novo Yahoo! Messenger
http://br.beta.messenger.yahoo.com/

2009\06\01@141454 by Tamas Rudnai

face picon face
Marcelo,

How is your linker script looks like? That should tell you pretty much
everything what Isaac mentioned.

Tamas



On Mon, Jun 1, 2009 at 6:54 PM, Isaac Marino Bavaresco <
isaacbavarescospamKILLspamyahoo.com.br> wrote:

{Quote hidden}

>

2009\06\01@152457 by Jan-Erik Soderholm

face picon face
> On Mon, Jun 1, 2009 at 8:29 AM, Marcelo Rodrigues <EraseMEmsrmailspam_OUTspamTakeThisOuTgmail.com> wrote:
>
>> Hi all,
>>
>> I'm working with the PIC16F916, and according to the Datasheet (page 25)
>> it has the following memory banks:
>> Bank 0 = 96 bytes
>> Bank 1 = 80 bytes
>> Bank 2 = 80 bytes
>> Bank 3 = 96 bytes

Hm, I'm not sure you can use the last 16 bytes of Bank0
that way. It depends on how your tool does the allocation.
Those 16 bytes are part of the "share bank" or "unbanked
memory".

>>
>> I've written a small program only with 4 arrays to fill the banks, but
>> the compiler return an error:
>>
>> bank0 unsigned char volatile static var00[96];
>> bank1 unsigned char volatile static var01[80];
>> bank2 unsigned char volatile static var02[80];
>> bank3 unsigned char volatile static var03[96];

Do you realy need those arrays ?
Or is this some kind of "test" of the compiler ?

>>
>> Error [1250] double.c; 55. could not find space (96 bytes) for variable
>> _main_var03
>>
>> However, if i set the bank 3 only with 80 bytes, it compiles succesfull
>> and says that I have 16 bytes free:

I had expected that to be Bank0, but again, do you
realy *need* those arrays ?


More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...