Documentation for list_interrupt.pl |
list_interrupt.pl
Prints out the list of functions that use the interrupt keyword in a BIOS application.
A sample output might be: -
=============================================================
Interrupt keyword detector utility
=============================================================
Scanning foo.out
List of functions that uses the interrupt keyword:
Function: foo
File: foo.c
Line: 30
Function: foo1
File: foo1.c
Line: 9
list_interrupt <filename.xml>
Example (from a DOS prompt): -
[>] <ccstudiodir>\dosrun.bat
[>] ofd6x -xg -o=app.xml app.out
[>] perl list_interrupt.pl app.xml
... OR ...
[>] ofdXX -xg <out file> | perl list_interrupt.pl
-h : show usage
--cg_xml_version : Print out the versio of the cg_xml package in use
The script will only work on executable files built with code generation tools >= v5.1.6 for c6000, v3.2.3 for C55, v4.1.1 for C54, v4.1.2 for C2000
The script could take awhile to run depending on the size of the binary. It takes time to process the xml output from the ofd utility, which typically can get as large as tens of megabytes.
The script prints out the list of functions that use the interrupt keyword in a given application. C functions that use HWI_enter/HWI_exit macro pairs or that are plugged into the HWI dispatcher should not use the interrupt keyword, hence this script helps track down the culprits. Moreover, CLK functions should similarly not use the interrupt keyword. See the DSP/BIOS user guide's chapter on hardware interrupts and the HWI module documentation in the DSP/BIOS API guide for more details.
For execution on Unix, the first line must be modified to point to the directory where Perl is installed.
This script was written using Perl version 5.8.3. It may not work with earlier revisions of Perl.
Recent releases of OFD support options for filtering the XML output down to what is strictly of interest. The best options to use in combination with this script are:
-xg --xml_indent=0 --obj_display=none --dwarf_display=none,dinfo
Filtering the XML in this way reduces the amount of data processed by this script, thus making it run faster.
Documentation for list_interrupt.pl |