15.3.3 About project_types.xml

The project_types.xml file defines the project types supported for the platform. Debug operations and activities, which refer to the other files in the platform directory, are defined for each project type.

The following code is part of the project_types.xml file for the Keil MCBSTM32E platform.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Copyright (C) 2009-2013 ARM Limited. All rights reserved.-->
<platform_data xmlns="http://www.arm.com/project_type" xmlns:peripheral="http://com.arm.targetconfigurationeditor" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="HARDWARE" xsi:schemaLocation="http://www.arm.com/project_type ../../../Schemas/platform_data-1.xsd">
  <project_type type="BARE_METAL">
   <name language="en">Bare Metal Debug</name>
   <description language="en">This allows a bare-metal debug connection.</description>
   <execution_environment id="BARE_METAL">
    <name language="en">Bare Metal Debug</name>
    <description language="en">This allows a bare-metal debug connection.</description>
    <param default="CDB://mcbstm32e.rvc" id="config_file" type="string" visible="false"/>
    <param default="CDB://mcbstm32e.py" id="dtsl_config_script" type="string" 
    <xi:include href="../../../Include/hardware_address.xml"/>
    <activity id="ICE_DEBUG" type="Debug">
     <name language="en">Debug Cortex-M3</name>
     <xi:include href="../../../Include/ulinkpro_activity_description.xml"/>
     <xi:include href="../../../Include/ulinkpro_connection_type.xml"/>
     <core connection_id="Cortex-M3" core_ref="Cortex-M3" soc="st/stm32f103xx"/>
     <param default="DebugOnly" id="dtsl_config" type="string" visible="false"/>
     <xi:include href="../../../Include/ulinkpro_browse_script.xml"/>
     <xi:include href="../../../Include/ulinkpro_setup_script.xml"/>
    <activity id="ICE_DEBUG" type="Debug">
     <name language="en">Debug Cortex-M3</name>
     <xi:include href="../../../Include/dstream_activity_description_bm.xml"/>
     <xi:include href="../../../Include/dstream_connection_type.xml"/>
     <core connection_id="Cortex-M3" core_ref="Cortex-M3" soc="st/stm32f103xx"/>
     <param default="DSTREAMDebugAndTrace" id="dtsl_config" type="string" visible="false"/>
     <param default="options.traceBuffer.traceCaptureDevice" id="dtsl_tracecapture_option" 
              type="string" visible="false"/>
     <param default="ITM" id="eventviewer_tracesource" type="string" visible="false"/>

The XML file declares a BARE_METAL project type. BARE_METAL is a term which describes a system not running an OS, where the debug connection takes full control of the core. The file declares an execution environment within the project type, and declares debug activities within that execution environment. The code here shows only one debug activity, but each execution environment can declare several debug activities. The debug activity shown here is a debug and trace session using a DSTREAM target connection.

When DS-5 displays the debug session launcher dialog, it scans the entire configdb and builds a list of supported manufacturers and boards, and the supported project types and debug activities, and lets the user choose which one they want to use. In the following example, the user is assumed to have chosen the highlighted debug activity. When DS-5 Debugger launches the debug session, it creates a DTSL configuration and passes it the {config_file, dtsl_config_script, dtsl_config} property set. These parameters are used as follows:

This value is passed to the RDDI-DEBUG connection DLL or so (DS-5 uses RDDI-DEBUG as its target connection interface, and RDDI-DEBUG needs this file to tell it which devices are in the target system).
This value tells DTSL which Jython script to use to create the DTSL configuration used by the debugger.
The DTSL Jython script can contain several system configurations, defined by Jython class names which in turn are derived from the DTSLv1 object. This value tells DTSL which class to create. The MCBSTM32E Jython script contains two such classes, one for a debug and trace configuration and one for a debug-only configuration. The class name used for the highlighted example is DSTREAMDebugAndTrace, so in this example a Jython class named DSTREAMDebugAndTrace must exist in the dtsl_config_script.

Some of these entries have a file location prefix of CDB://. This indicates that the location is within the platform directory in the configuration database.

DTSL creates an instance of the referenced Jython class, which causes the def __init__(self, root) constructor to be run. After this constructor is run, the debugger expects to find a DTSL Device object whose name is the same as the name given in the core setting in the debug activity. In this example, therefore, the debugger expects to find a DTSL object named “Cortex-M3”, and it directs all debug operation requests to this object.

Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.