Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Differences between C compilers

2005-08-18 by Russell Shaw

> Russell wrote:
> 
> The last time i used CV couple of years ago, it couldn't do functions
> stored as pointers in structs, or even cope with enums and structs
> declared inside functions. Has it been fixed yet?

 > stevech wrote:
 > I think it has pointers to pointers now.
 > But I submit that some of the more esoteric parts of C and all of C++ are
 > inappropriate for humble embedded processors. I try to write code that is
 > blatantly obvious to any reader a year or two from now.

I've used structs full of pointers to do oop and task context switching
on a mega16, that also did a heap of floating point calcs, real-time
dsp filtering, and using my own malloc functions that guarantee no
memory leaks. When i've finished the latest round of hacking on the pc,
i'll get back to avrs.

Any code can be blatantly obvious, just that it might not be to newBs.

 > Maybe a big fat mega128 with external RAM, but at what point are you using
 > an AVR when you should be on an ARM?

Only when you run out of addressing range, need specialized onboard
peripherals, need an external memory bus, or need to run prewritten
things such as linux.

If you write most of the software yourself and partition things needing
10kHz interrupts into dedicated hardware where it belongs, there's not
much you can't do in an avr. It needs a decent compiler such as gcc
and not some toy that can't handle valid C code.

 > For me, ease of use and the tiny memory model were important. I crammed an
 > amazing amount of functionality into a 2313 chip with CV. Not even close to
 > fitting when I tried with GCC.

Gui configurators only make it easy for high-school newBs, but usually get
in the way of anything more than quick and dirty superficial work.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.