182/317
6 - STMicroelectronics Programming Tools
To assemble all the source files, open all of them, and on each, perform the assembly in turn.
When all the source files are assembled, it is time to build the result files.
To do this, press the hammer button. This starts the batch file described above. A DOS box
then opens, and the linker is started. S ince the output is not captured for this command (it
cannot be captured because it is a batch file), we have to monitor what is going on on the
screen. If the linking finishes with the mention “no error”, press the space bar and the process
resumes with the assembly of all the source files. Here again, errors may be displayed on the
screen. Take note of them if any, and when the process is finished, close the DOS box. Then
make the appropriate changes.
Most of the errors detected at link time are one of the following:
An external label is used in a source file, that is not defined anywhere or is not public;
An external label is used with short addressing mode, and it happens not to be defined in
page zero.
It is sometimes not easy to see that a label is defined somewhere as a word, and used some-
where else as a byte. When talking about labels, do not confuse a byte label with the label of
a
DC.B
pseudo-op that defines a byte variable: the variable is a byte, but its address is a word.
Carefully read the text about byte and word labels in the chapter that discusses the assembler.
Caution:
If the debugger is open and the corresponding project is loaded, the map file is
locked out. It is then impossible to perform the link. So when you are debugging, if you find an
error and want to recompile the project, do not forget to first close it from within the debugger
before attempting to rebuild it. Now that our program is completely assembled and linked, we
can test it. This is the subject of the next chapter.
Содержание 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 ...