NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Device XML files - Validation

From Texas Instruments Wiki
Jump to: navigation, search

Overview[edit]

Device xml files are setup xml files that contain device specific information. This can include router information, multiple CPUs, GEL startup files, define memory mapped registers, etc. Many target configuration ccxml files and board xml files reference device xml files. It is also an easy way to create custom target configurations by using device xml files. Users can also create their own custom device xml files.

The device xml file is parsed when a debug session is launched. If there are errors in the file, it can cause issues when starting a debug session, often popping up messages stating that an error was detected during the parsing of the device xml file. Debugging such errors can be difficult since device xml files have the potential to be very complex, and often include a variety of other related setup xml files. To assist users validate their device xml file, a device xml validation tool is available. This tool is simply a script that will parse all device xml files in a folder and report any errors detected.

Installation[edit]

  1. The device xml validation script is a tcl script. Hence a tcl installation is needed. ActiveTcl version 8.4 is recommended. ActiveTcl downloads are available at ActiveState's ActiveTcl download site. Make sure the path to 'tclsh.exe' is on the system PATH. The ActiveTcl installer should do this automatically
  2. Download the device xml validation script package
    1. CCSv4: SetupParser_2009_03_16.zip
  3. Extract the zip file (location does not matter).

Usage[edit]

The extracted folder contains various files. The user will only need to be concerned about the two batch files.

To run the main validation script:

  1. Open a command window to the location of scripts
  2. Run:
test.bat <INSTALL DIR>\ccsv4\common\targetdb

'<INSTALL DIR>\ccsv4\common\targetdb' is the default location where CCSv4 looks for setup xml files. Device xml files are located in a subfolder called 'devices'. The script automatically looks for this subfolder.

NOTE: There is an issue with the script where it does not handle spaces in the path. Wrapping the path in quotes does not resolve the issue. The workaround is to use the short name form of the path. For example, if CCSv4 is installed in 'C:\Program Files\Texas Instruments', then pass in the following path to the batch file:

test.bat C:\PROGRA~1\TEXASI~1\ccsv4\common\targetdb

This will run the validation script on every device xml file in the 'devices' folder. Any errors detected will be logged. A text file (results.txt) and html file (results.html) will be generated that highlights all detected errors. The html file can be opened in a web browser:

 

  • Severe errors are reported in RED and less severe errors are GREY
  • Auto-generated files (cache files, ccxml files and tcl test files) are located in ./test
  • The validation script is intended to test device xml files. The generated .ccxml files contain just enough data to generate the .cache file and can’t be used to launch a debug session
  • Schema failures list the line # in the .cache file. Some detective work will be needed to find the corresponding module XML file
  • Only failures are reported. A summary on the number of tests generated/run can be found in the last 4 lines of 'results.txt'

NOTE: Depending on the number device xml files and the complexity of them, parsing of all the scripts can potentially take a very long time and consume a lot of system resources (memory)

After the tests are completed, the 'clean.bat' file can be run to delete all auto-generated files with the exception of the 'results.html' file.

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Device XML files - Validation here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Device XML files - Validation here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Device XML files - Validation here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Device XML files - Validation here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Device XML files - Validation here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Device XML files - Validation here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Device XML files - Validation here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Device XML files - Validation here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Device XML files - Validation here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity