This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]