58/317
3 - Programming a microcontroller
03-comp
3.2.3 Debugging in C
Debugging in C is done the same way as explained for assembly language. However, the sim-
ulator and debugger screens designed for high-level languages can also show the progress of
the execution directly in the C-language source text, while another window shows the corre-
sponding assembly language statements. A cursor in each window keep the correspondence
between both.
Another powerful feature offered by high-level language debuggers is the capability of dis-
playing the data of selected variables according to their type, even for complex types like
structures, arrays, strings, etc. This dramatically improves the productivity of the debugging
phase, in the same proportion as choosing a high-level language does, in terms of shrinking
the source code.
Thus the advantage of high-level languages is twofold: it reduces both the programming time
and the debugging time. This is an invaluable benefit, as the resource that is probably the
scarcest nowadays is time, even more than money. However, you are advised to check
whether of the programming tools you selected fully support C language from one end to the
other; just to mention a few essentials:
A text-editor that provides features that are useful in C language, like auto-indenting,
bracketed block selection, syntax highlighting, and so on;
A compiler, an assembler and a linker that are really suited to working with the selected
microcontroller, offering flexible addressable space allocation, efficient access to the ports,
File.c
C source file
C
compiler
File.obj
Relocatable object file
File.asm
Assembler source file
(on some
compilers)
C compiler invocation
Содержание 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 ...