237/317
8 - C Language and the C Compiler
The name of the absolute object file is X10MIT.ABS.
In the list of the object files to be linked,
START07.O
is a predefined file supplied with the
package;
ANSI.LIB
is the library of C functions from which the linker will extract the required
functions, and only those that are used in the program.
The sections corresponding to the various peripherals, RAM, stack and ROM are defined as
their position in memory, and whether they can be read or written. The attribute
NO_INIT
, not
used here, prevents the corresponding section from being erased when the program starts, as
are all the variables according to the standard definitionof the C language. This is useful either
to save time, or to protect the memory contents in case they had been preserved by a battery,
for example, between two sessions.
The list of the segments that will be accommodated in each section is given next. If a segment
or a group of segments is bigger than the size of the section it is meant to fit in, an error mes-
sage is generated and the absolute file is not produced.
The size of the stack comes next.
The last item is the list of the vectors. E ach vector address has a corresponding interrupt
cause, and any interrupts that are enabled must be vectored to the corresponding service rou-
tine. Unused vectors are connected here to a special function for safety.
The linker, in addition to the absolute object file, produces a map file that gives the addresses
of all the segments, variables, and other information useful for debugging.
8.6 USING THE EPROM BURNER
The output of the linker is a
.abs
file. This format is not suitable for programming the built-in
EPROM of the microcontroller. This is the purpose of the EPROM Burner.
The HIWARE Burner is intended for third-party EPROM Programmers, and thus cannot drive
the STMicroelectronics EPROM Programmer Board. We must use the EPROMer software as
described in Chapter 7. However, this programming software needs an input file in ASCII-Hex
(
.s19)
format. When the STMicroelectronics programming tools are used, the program OB-
SEND is used to convert the absolute file (
.cod
) into the required ASCII-Hex file.
When the HIW ARE tool chain is used, the HIWARE Burner is used instead. This program can
translate the absolute file into an ASCII-Hex file.
To perform the translation, just type the file name in the Input File box (the Select button allows
you to browse the disk), select the File destination, and type the file name in the next box. The
format is Motorola S, the data bus width is 1 byte (the ST7 is an 8-bit core). To start the con-
version, press the button 1st Byte. The resulting file is created in the same directory as the
input file.
Содержание 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 ...