User manual
Project creation and build UM0036
88/385 Doc ID 7705 Rev 11
4.6 Customizing build settings for ST Assembler/Linker toolset
The ST Assembler/Linker toolset builds your application from source code that is written in
Assembler language. Building requires the following steps:
● Assembler: Translates assembler source code into objects and generates listings with
relative addresses.
● Linker: Links objects from the source code and any included objects from libraries in a
.cod file.
● OBSEND: Translates the .cod file into the final executable format, which you specify.
● Abslist: Generates listings with absolute addresses from listings with relative
addresses, the executable file and the map file.
Ordering source files before assembly
The ST Assembler Linker is sensitive to the ordering of files during assembly. For example,
a source file that defines a label must be assembled before other source files that use this
label.
To protect the order of the source files for assembly you should:
1. Add the source files to your project (Project > Insert Files Into Project)
2. Right-click on the project in the Workspace window and disable the Add Sorted
Elements option in the project contextual menu.
3. Drag and drop the source files into the correct order. The first file to be assembled in at
the top, the last is at the bottom.
4. Right-click on the project in the Workspace window and reactivate the Add Sorted
Elements option in the project contextual menu.
Once the Add Sorted Elements option is reactivated, you can not drag and drop the files into
a new, non-alphabetic order. You can, however move the files individually to different folders
in the Workspace window.
Provided ASM include files for ST Assembler/Linker
STVD comes with a complete set of include files (*.inc and *.asm) that define the
registers and vectors for all the supported microcontrollers. They are intended to save you
the time that you might spend writing these files yourself.
Caution: The ASM include files provided with STVD are not the same as those provided for the ST7
library. ST7 library users should use the C header and/or ASM include files specific to that
library.
These files are installed with the ST Assembler-Linker toolset. For standard installations
these files are located at:
C:\Program Files\STMicroelectronics\st_toolset\asm\include\
You can use these files from their installed location. However, if you intend change these
files to meet the requirements for your application, you should copy the files for your target
microcontroller to your project’s working directory and make amendments to the copied files.
Project settings for ST Assembler/Linker
The Project Settings window allows you to configure settings for these steps. This window
contains five tabs that are common to all the toolsets (General, MCU selection, Debug, Pre-