C or C++?

Jim Kuzdrall gnhlug at intrel.com
Fri May 27 11:52:00 EDT 2005


Greetings All,

    A military client arbitrarily added 2 contract requirements which I 
have the opportunity to change.  I need some advice from your 
collective experience to make certain I don't regret my choice a year 
from now.

    The stipulations were: 1) use Linux; 2) use C++.

    The system is an embedded 32-bit DSP-type microcontroller (of my 
choice) with about 1 megabyte of code.  It is battery operated and uses 
prioritized, real-time interrupts to meet response time criteria.  The 
software functions are "modular" and well defined.

    -no operator/user will input data to the processor; all inputs come 
from hardware.
    -the range of inputs is known (i.e. 256, 4096, 65536) so exhaustive 
testing is feasible. 
    -the software will rarely be revised; any change requires field 
testing for re-qualification which costs about $1.5M.
    -no Ethernet or networking (except via a radio network which is 
separate layer beyond this).
    -no disks or file storage facility.
    -one serial port for diagnostics and up-loading the flash memory.
    -few if any Standard Library functions are needed.

    It is nice to see their heart in in the right place with Linux, but 
I see no reason for any operating system, so I am comfortable with 
eliminating that.

    C++ versus C is my quandary.  Can anyone give me good reasons for 
choosing one over the other in this case.  Opinions are welcome, but I 
must have a list of reasons ready if my choice is questioned.

Jim



More information about the gnhlug-discuss mailing list