EasyManua.ls Logo

ST ST7 - Building a Demonstration Program; Purpose of the Demonstration Program; Inventory of the Program Files

ST ST7
317 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
170/317
6 - STMicroelectronics Programming Tools
This means that you must edit your Autoexec.bat file and do the changes required. They are
necessary for running the tools. This can be done using either WinEdit or Notepad. The
changes performed will only be taken into account after the computer has been rebooted.
6.4 BUILDING A DEMONSTRATION PROGRAM
To illustrate both the assembly language and the assembly procedures, we have written a
small project for you. It is available in the directory
\ST7\WORK\CATERPIL ofthe accompanying
software. This directory and its contents should be copied to the hard disk of your work station.
We assume that it will be copied to directory
C:\ST7\WORK\CATERPIL. This directory is men-
tioned in the configuration file. If you want to use another directory, you must modify the
PROJECT.WPJ file accordingly.
6.4.1 Purpose of the demonstration program
The program drives a setof eight LEDs connected to port A of a ST72251. When the program
runs, all of the LEDs but one are lit at the same time, and the unlit position changes twice per
second to the LED connected to the nextmost significant bit of port A. When the LED con-
nected to bit 7of port A is off, the next LED off will be that connected to bit 0 of port A, and the
cycle resumes. The 500 ms delay is done using a loop of instructions that is tuned to last for
exactly 500 ms, taking into account the cycle time of each instruction with an 8 MHz crystal.
6.4.2 Inventory of the program files
The program includes the following input files:
The PROJECT.WPJ project file that contains the settings and the tool references for the
project, and the
GDB7XXX.INI file that configures the debugger.
The main source file, MAIN.ASM that contains most of the code, and the timer source file,
TIMER500.ASM that contains only the timing routine.
The REG72251.ASM, file that contains the definitions of all the peripheral registers and the
REGISTER.INC, file that contains the external references to the definitions of all the
peripheral registers made in the previous file.
The MAP72251.ASM, file that contains the description of the available memory and its type
(RAM, ROM).
The CATERPIL.BAT file that drives the global building of the project, by starting the assembly,
link, hex file generation and back annotation process.
All these files constitute the source files, in the widest sense, of the project.
At this point, we suggest you open all these files with WinEdit, and see what they contain.
Some remarks about the files.

Table of Contents

Related product manuals