This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
looking for tips on programming in C for embedded systems
- From: psheer at icon dot co dot za
- To: ecos-discuss at sourceware dot cygnus dot com
- Cc: psheer at icon dot co dot za
- Date: Thu, 20 Dec 2001 13:27:43 Africa/Johannesburg
- Subject: [ECOS] looking for tips on programming in C for embedded systems
Hi there
Is there a good article anywhere on tips for programming on
eCos (and low-memory/MIPS-scarce systems in general) ?
I have been coding in C for years, but I found one
new thing already while working with eCos: don't -
int foo ()
{
char data[1024];
...
}
- rather -
int foo ()
{
char *data;
data = malloc (1024);
if (!data)
....
....
free (data);
}
- the latter doesn't eat precious stack space.
What I am looking for is the definitive top 20 tips
of this sort. Perhaps we could start a tip list?
best
-paul
---------------------------------------------
This message was sent using World Mail.
http://www.worldonline.co.za