it is possible to tell Gcc to use a tiny memory model (for RAM) with the "not-so-well-equiped" AVRs?
You don't have to.
The addressing modes for most AVR's are the same and the compiler does
a great job optimizing you code.
However for the tiny ones with no RAM based stack you can't use C at all.
These PIC killers are intended for asm programming (only?)
I guess he was asking for a memory model where pointers are only 8
bits long (sufficient for AT90S2313, AT90S2333, AT90S2343, AT90S4433,
ATIO86RF401, ATtiny22, ATtiny26). I don't think this is supported by
Joerg, you are correct (as always).
I was blinded by all those different addressing modes you get on a
'51 CPU compiler.
I still however think using C for the tinies is like running Paris-Dakar with
a tricycle. A lot of pain in the a..
Well, if you have a project with low memory requirements, but flash tightness....
There is really space for optimation, as a 16 bit address is not easyliy calculated in the AVR ass... (lots of code wasted, if you assume that the hibyte of the address must be alway zero, ant therefore there's no need to calc 16bit wid)
Maybe a tiny memory model would be a nice feature for the gcc-avr wishlist?
BTW: I simulated this in AVRWin: You have to set the hi address to zero., or the cpu will not serve as you expect)
>I still however think using C for the tinies is like running Paris-Dakar with
>a tricycle. A lot of pain in the a..
© 2020 Microchip Technology Inc.