Re: [PIC] Learning C

"Harold Hallikainen" <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.pic
Message-ID <[email protected]>

On Tue, November 19, 2024 1:02 pm, Isaac Marino Bavaresco wrote:

>
> I'm not sure if in this aspect the PIC24Hs are the same as the dsPICs,
> but the dsPICs have stack overflow checking implemented in hardware
> (there is a stack limit register).
>
> If I remember it correctly, dsPICs and PIC24Hs are one of the rare
> architectures that the stack grows upwards (towards larger addresses).
>

I may have not remembered which projects I did that on. It may have been
the PIC32 instead of the PIC24H (which is a project I started 15 years ago
and am still maintaining). If the PIC24H stack grows up, then it was
probably the PIC32 I did this with. As I recall, the heap grows up, and
the stack grows down. I just wanted to avoid a collison.


> If you take the address of a variable, that will force the compiler to
> allocate it in memory.
>

Good point!

Harold
https://w6iwi.org


-- 
Not sent from an iPhone.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.