User manual

UM0036 ST Assembler/Linker build tutorial
Doc ID 7705 Rev 11 371/385
The application source contains a routine under the #ifdef DEBUG_IT (lines 153-155 of
tim_rtc.asm). When activated, this routine generates an output signal on the pin PFDR
whenever a timer interrupt occurs. To activate this routine we will use the define option to
assign a value other than zero to DEBUG_IT (When DEBUG_IT is zero the routine is
ignored).
To do this:
1. Select the ST7 ASM tab.
2. Type DEBUG_IT 1 in the Defines field.
Figure 302. Define a value (-d)
RESULT:
When we build the application, the instruction INC PFDR, which is assembled if DEBUG_IT
is a value other than zero, will be included in the final application. When we run the
application during a debug session the application will generate a signal on the PFDR pin
each time a timer interrupt occurs (every 100ms).
Changing settings for a specific file
In addition to applying settings at the project level, you can also specify settings for a file. As
describe in an earlier step, we included the tim_rtc.bat as a reference for understanding
STVD’s Project Settings interface. However, we do not want to include this file in the build
of our application. In this step we will exclude this file from the build, by applying a file level
setting via the Project Settings window.