|Subject:||RE: [avr-gcc-list] Growing .data section when compiling with GCC 4.0instead of GCC 3.4.3|
|Date:||Wed, 27 Apr 2005 21:02:42 -0700|
So – if you are into efficient code/RAM use – and fewer arcane macros – a compiler which “understands” inherently the Harvard architecture of dual-address spaces is a good idea.
There are 3 or so such C compilers for the AVRs which are but one of many Harvard architecture micro’s.
GCC is free and good for many things. But it is not the ideal solution for all situations. IMO.
[mailto:address@hidden On Behalf Of address@hidden
Not a bug. But worthy of consideration.
Flash/RAM situation is the same as with other constant data.
gcc does not understanding different address spaces and is thus not able to inherrently change addressing modes.
The workaround being llok at is the assocaited with the ability of compiler back end to recognise in all affected RTL instructions (lots) if the operands are uniquely constant (ie FLASH) and then use the right instructions (lpm etc). Currently this is a challenge and not fully resolved.
However, this case maybe easier as the jump table should only be relevant to one RTL instruction, and as far as I can see ALWAYS constant (flash). So it may well be possible to change code to always use flash based table (lpm etc) and get rid of RAM impact. (with the neccessary changes to the location of table)
Switch to Netscape Internet Service.
|[Prev in Thread]||Current Thread||[Next in Thread]|