Quantcast
Channel: Where has half of my RAM gone to?
Browsing latest articles
Browse All 40 View Live

Where has half of my RAM gone to? (ErolC)

Hi All, I'm currently using the PIC18F14K22. I'm using MPLAB V2.15 with C18 V3.43 compiler toolchain. I noticed that 52% of my 512 bytes of ram has been used with very little code. I removed everything...

View Article



Re: Where has half of my RAM gone to? (Antipodean)

Your compiler has reserved some stack area for saving return addresses when calling routines and passing parameters to those routines.  

View Article

Image may be NSFW.
Clik here to view.

Re: Where has half of my RAM gone to? (DarioG)

Yeah, Stack " /> 256 bytes usually.You could trim it in the Linker file...

View Article

Re: Where has half of my RAM gone to? (Jim Nickerson)

Using XC8 1.32 in free mode with a default new project it says 31 bytes used. It will not let me attach a screenshot.Edit: I edit the post and in IE I can now attach the screenshot, but I can not click...

View Article

Image may be NSFW.
Clik here to view.

Re: Where has half of my RAM gone to? (DarioG)

So, XC will cheat about the Stack? " />

View Article


Re: Where has half of my RAM gone to? (Jim Nickerson)

Dario,From the looks of the map file C18 seems to use up a lot of ram with the sfr's ?edit: No per jtemples, below

View Article

Re: Where has half of my RAM gone to? (jtemples)

XC8 automatically allocates the required amount of stack space; there is no wasted RAM like C18. From the looks of the map file C18 seems to use up a lot of ram with the sfr's It doesn't include SFRs...

View Article

Re: Where has half of my RAM gone to? (NorthGuy)

XC8 probably doesn't have a stack. If they did, why would they forbid recursion?

View Article


Re: Where has half of my RAM gone to? (jtemples)

XC8 has a "compiled stack."

View Article


Re: Where has half of my RAM gone to? (NorthGuy)

jtemplesXC8 has a "compiled stack."In this "compiled stack", does each function have a static memory area for all the parameters and local variables?

View Article

Re: Where has half of my RAM gone to? (cobusve)

Under XC8 Global options in the option category "Stack Options" you can choose to have a compiled stack, a software stack (which is re-entrant) or a hybrid of the two.

View Article

Re: Where has half of my RAM gone to? (cobusve)

In this "compiled stack", does each function have a static memory area for all the parameters and local variables?To this question it depends which option you chose for XC8 to use. If you picked...

View Article

Image may be NSFW.
Clik here to view.

Re: Where has half of my RAM gone to? (DarioG)

Thanks for the replies " /> yeah, something had to be in there!I also did not know about the switch that lets us choose...

View Article


Re: Where has half of my RAM gone to? (NKurzman)

NorthGuyjtemplesXC8 has a "compiled stack."In this "compiled stack", does each function have a static memory area for all the parameters and local variables?Sort of.  The call tree is calculated by the...

View Article

Re: Where has half of my RAM gone to? (NorthGuy)

NKurzmanNorthGuyjtemplesXC8 has a "compiled stack."In this "compiled stack", does each function have a static memory area for all the parameters and local variables?Sort of.  The call tree is...

View Article


Re: Where has half of my RAM gone to? (ric)

NorthGuy...What if you have a call chain a->b, and then, during the execution of b, an interrupt happens, and interrupt handler calls a. Apparently, if a is not re-entrant, this will mess everything...

View Article

Re: Where has half of my RAM gone to? (DarioG)

Nice one!!But I guess I agree with NorthGuy...

View Article


Re: Where has half of my RAM gone to? (NKurzman)

Yes it is a lot of work for the large CPU in the PC.It is a lot of work for Australian programmers.It limits reentrancy.It allows a weak CPU to run C at reasonable speed.the Keil 8052 use the same...

View Article

Re: Where has half of my RAM gone to? (NorthGuy)

Quite interesting that they added new instructions to support normal stack which could be used very effectively in PIC16F (with less success in PIC18F because they remove direct access to 0x00-0x59...

View Article

Re: Where has half of my RAM gone to? (NKurzman)

At the Time Hi-Tech and Microchip where different Companies.Apparently Hi-Tech did not find the Enhanced instruction set as useful as Microchip had hoped. They do take advantage of some of the 16F1 new...

View Article
Browsing latest articles
Browse All 40 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>