EasyManua.ls Logo

ST ST7 - Debugging in C

ST ST7
317 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
58/317
3 - Programming a microcontroller
03-comp
3.2.3 Debugging in C
Debuggingin C is done the same way as explainedfor assembly language. However, thesim-
ulator and debugger screens designed for high-level languages canalso 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
thesourcecode.
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

Table of Contents

Related product manuals