ST7MDT5-EMU2B Emulator User Manual
3.5
3 - STVD7
Toolchains and application files
A quick summary of development toolchains and application file types supported by STVD7 will help you in setting up your workspace.
Three different development toolchains are currently supported by the STVD7.
Each type of toolchain has its own application file types, project environment and building tools (i.e. linkers and convertors):
• The ST7 macroassembler toolchain from STMicroelectronics, which generates either
.s19
or
.hex
application files with various intermediate files, such as
.map
or
.lst
files.
• The Hiware C or Assembler toolchain, which generates
.abs
application files with various intermediate files, such as
.o
or
.dbg
files.
• The Cosmic C or Assembler toolchain which generates
.elf
application files with various intermediate files, such as
.o
or
.st7
files.
When you set up a workspace, you will need to define the following project settings:
• The toolchain to be used—Hiware, Cosmic or ST7 macroassembler.
• The executable application file (
*.abs
,
*.elf
,
*.s19
or
*.hex
depending on toolchain—refer to Table 2 on page 25).
• The maker program for the toolchain. The maker program can be a part of the toolchain software (such as Hiware’s
maker.exe
) or you can choose to use a generic maker such as
Nmake.exe
or
Gmake.exe
(which is provided with the STVD7).
• The maker batch file (
*.mak
or
*.bat
). This is a file which you create for each application which spawns the compilation and/or link step each time you wish to build or rebuild. In it, you define the conditions for recompiling, relinking or both.
Default
*.mak
or
*.bat
files are often included with the toolchains—for example, maker.mak is included with the Hiware toolchain and simply recompiles your application if it detects that the file has been saved since the start of your debugging session. The STVD7 software includes sample
*.mak
and/or
*.bat
files for each toolchain—these are listed in Table 1 .
23/65
3 - STVD7 ST7MDT5-EMU2B Emulator User Manual
Table 1: Sample files included with STVD7
Toolchain
ST Macro assembler
Cosmic
Hiware
Sample Workspace (with default path
Sample Make and/or Batch files (with default path
1
)
Description of
Make/Batch File
.../realtim/realtim.wsp .../realtim/tim_rtc.bat
Batch file that forces a recompile of application file.
.../spim11/spim11.wsp
.../spim11/spim11.bat
Batch file that forces a recompile of application file.
.../c/cosmic/sample.wsp .../c/cosmic/sample.mak
Recompiles only if the application file has been resaved.
.../c/cosmic/sample.bat
Forces a recompile of application file.
.../c/hiware/build.mak
Recompiles only if the application file has been resaved.
.../c/hiware/sample.wsp
.../c/hiware/rebuild.mak
Forces a recompile of application file.
1) The full default path is:
C:/Program Files/Stm/st7toolchain/stvd7/hds/sample/...
3.5.1 About application files
The user should verify that the options to include debug information were active during creation of the project files.
Table 2
on page 25 summarizes the way each toolchain functions and lists the different file types (source files, intermediate files and application files) used and produced by the toolchain. The application file
types and intermediate file types necessary to exploit fully the STVD7 capabilities are listed.
24/65
ST7MDT5-EMU2B Emulator User Manual 3 - STVD7
Table 2: Toolchain steps and their output files
Toolchain: ST Macroassembler Hiware Cosmic
Compile or Assemble Step:
Source File
Types
.asm
Required
Options asm -li macrost7.asm
Resulting File
Types
.obj, .lst
Linker Step:
Required
Options lyn macrost7.obj, macrost7 asm macrost7.asm -sym -fi=macrost7.map
Resulting File
Types
.map, .lst
Converter
Step:
obsend macrost7, f, macrost7.s19, srec or obsend macrost7, f, macrost7.hex, intel
Resulting
Application
File:
.s19 or .hex
Necessary
Intermediate
Files:
.map, .lst
.c, .asm
.c, .s
<NONE>
.o, .dbg
<NONE>
.abs
not applicable
.abs
.o, .dbg
+debug
.o
<NONE>
.st7
cvdwarf
.elf
<NONE>
Note:
The application file(s), source files and any necessary intermediate files (these are listed above and contain debug information necessary to the STVD) should be located in the same project directory. You do this when you define your workspace.
It is always preferable to have access to all of the files generated by the development toolchain. However, you can load
*.s19
or
*.hex
binary files directly and have limited debugging capabilities (refer to Section 3.8
on page 30).
25/65