57/317
3 - Programming a microcontroller
ability of programs to another machine. You will have to take account of this, especially when
testing the code on your PC first as suggested above. This can in most cases solved by a dec-
laration file that is included in the project and that exists in two versions, or uses conditional
compilation, to fill the gap between two different dialects of C. This point is actually the most
tricky and that which requires most care from the programmer.
Having read these pros and cons, hopefully concluded that C is the language of choice for
today if you want to save time and keep the fruit of your efforts over several years. We have
kept the last argument for the conclusion, that will, undoubtedly, be decisive in the years to
come.
The pressure for quality products is growing more every day. In some types of application, like
medical apparatus and life-sustaining devices, equipment reliability has to be certified. More
and more products, through ISO9000 standards or the constraints of product liability must be
ready for quality assurance certification. Software quality assurance is a very difficult subject;
it is not the purpose of this book to enter this field. But one thing is sure, only properly docu-
mented and structured software is likely to meet these quality assurance requirements.
3.2.2 Tools used with C language
Just like the assembler translates mnemonic language into machine code, the C compiler is a
tool that translates a C-language source file into a relocatable object file. Here also, the appli-
cation will be divided into files, also called modules, that are compiled separately. The whole
group of object files is then linked to produce an absolute object file, the same as with assem-
bler-generated object files. Actually, there is virtually no difference between an assembler-
generated object file and one generated by a C compiler. This means that some modules may
be written in C, and some in assembler; you can select the language according to the advan-
tages and drawbacks of each language for each part of the application, as explained earlier.
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...