235/317
8 - C Language and the C Compiler
8.4.2 Using the Hiware assembler
The Hiware assembler is comparable to the assembler described in Chapter 6. The same
principles apply, so they will not be repeated here.
However, the syntax that Hiware uses is specific and different from that of the STMicroelec-
tronics assembler. The result is that a source text written for one assembler cannot be trans-
lated using the other assembler. The question of the incompatibility of the two development
chains has already been mentioned, so if you want to build a project that mixes C source files
and assembly source files, you must adhere to the Hiware syntax.
Of course, these differences do not apply to the coding of the instructions, that use the same
opcodes; but the pseudo-ops are different, as is the macro language.
When an assembler module is to be linked with C modules, the calling of functions to or from
the assembler module obeys precise rules that are detailed in the Hiware manual. Functions
written in assembler receive their arguments in a certain way, and return the result in a prede-
fined manner. For more details on this, refer to the Hiware manual, paragraph III.3.
8.5 USING THE LINKER
The Hiware linker offers a powerful tool that allows you to finely control the memory allocation,
module and section placement, and more. Its operation is guided by a parameter file, called
link.prm
in the examples used in this chapter. This file may be simple or complicated; it must
at least give the following information:
Name of the final object file (absolute object file)
List of the names of the object files and library files to be linked
List of the sections in memory. A section is a block of continuous addresses that is given an
attribute that can be
READ_ONLY
,
READ_WRITE
,
PAGED
, or
NO_INIT
. Each of these blocks will
receive one or several programming objects (code or data) which are themselves grouped
in segments
List of the placement of the segments in the sections. A segment is a continuous string of
bytes representing a block of code or data; this block is positioned in memory by assigning
it to an already defined section
Stack size
List of the restart and interrupt vectors, with the label to branch to when the corresponding
event occurs
Содержание 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 ...