The exclusive control checking tool checks whether there is any function that accesses global variables (except static variables) outside the exclusive control period. In other words, it is a tool used to check whether any function is directly accessing global variables (except static variables) without using the exclusive control mechanism.
This function does not check whether there is a problem with the exclusive control mechanism (mechanism to prohibit variables from being accessed by other functions during the exclusive control period). |
Open the Solution List panel and then click the [GO] button of Exclusive control checking tool. The Functions and Variables Access Table panel will open.
The preparations that have to be made before checking of exclusive control starts are explained below.
Click on the toolbar on the Functions and Variables Access Table panel to configure cross reference information on which variables were accessed by the functions.
When building completes successfully, an orthogonal table of the functions accessing global variables (except static variables) is generated.
Select the variables to be checked from the orthogonal table. More than one variable can be selected.
"R" is displayed if the function has read a value from the variable and "W" is displayed if the function has written a value to the variable. The number in parentheses indicates from how many locations the variable was accessed.
On the Functions and Variables Access Table panel, click the [Check exclusion-control-missing...] button on the toolbar. The Exclusive Control Checking Tool dialog box will open.
Checking is carried out by executing the user program and recording and analyzing information on accesses to variables. Therefore, where to stop checking needs to be specified. An address or symbol can be set.
Set the functions (control starting function and control ending function) for controlling accesses to variables. The control starting function is used to disable accesses to variables and the control ending function is used to enable accesses to variables.
Click the [Start Checking] button.
Information on accesses to variables is obtained by embedding a software trace instruction in the program and analyzing how the embedded software trace instruction was executed. Therefore, information on accesses to variables that was acquired with a software trace instruction embedded in the program sometimes does not match access information that was acquired without a software trace instruction embedded in the program, in relation to the timing of program execution. If you wish to make access information match, leave [Hold the build options for software trace (DBTAG) ON after checking] selected.
After checking has completed, locations where exclusive control did not work have been detected are shown in error color on the Functions and Variables Access Table panel. The relevant location can be opened in an editor by double-clicking or pressing the [Enter] key at that location and the erroneous code can be found immediately.
The -Xcref option of the compiler and the -list -show option of the linker are automatically added (does not affect the load module generated as a result of building) when the exclusive control checking tool is used. |
Since the specified variables are handled as if they were volatile-declared, the optimization result may differ. |
The DBTAG instruction to be embedded is equivalent to a NOP instruction. Though the memory and register values do not change, there is the slightest difference in the timing related to program execution. |