OpenArbor Target Connections
Overview
This describes the proposed requirements and design for implementing a more centralized way of defining a connection to a target board from within OpenArbor. This applies to DDC-I Standalone and HeartOS projects only. Deos projects use the Target Manager. I looked at the Deos Target Manager as a starting point, but it seems way more in-depth and hooked into the RSE "way" of doing things that I thought it would be too difficult to simplify it for this. If anyone has another idea here, please speak up.
Currently, both the Run and Debug launch configurations contain a Communication tab where the connection information for the target is specified. The first issue is that the information is often duplicated in both places. Secondly, because the connection information is bound to the launch configurations, any other menu action that would need to use that information has to somehow be added to these launch configurations which is problematic.
For example, in order to support ABC for HeartOS, the Clear and Gather Hitmap functionality requires target connection information be passed on to MLD to clear/generate a hitmap properly. This proposal will hopefully reduce duplication of the connection information and make it available for other menu actions to utilize in a very user-friendly way.
New View
New DDC-I View: DDC-I Target Connections
The Window | Show View | Other | DDC-I Views tree will contain a new view entry "DDC-I Target Connections"
Initially, the list will be be empty (or possible contain only an available simulator connection). The "New" action will be available from a pop-up menu on the empty list.
The "New" Action will require the selection of (1) connection name (2) project type (3) target (4) com with (5) device (if applicable). Then the communication widgets for that "communication configuration" will be displayed for the user to edit and save their "target connection" by the specified (1) connection name.
The DDC-I Target Connections view will contain a list of defined target connection names. Each target connection will be defined by specifying the widgets that now reside on the Run/Debug configuration Communication tab (and possibly the contents of the Startup tab). The target connection will have a "Name" that will be used to refer to the connection.
The following actions will be available for each defined target configuration
- New
- Edit
- Delete
Double-clicking a target connection in the view's list will edit the selected target connection. A Target Connection can only be deleted if it is not being "used" by any Run or Debug Configurations.
A default target connection will be defined to contain the currently defined default communication options that already appear on the Debug/Run Configuration's Communications tab. The default target connection will be named "<target> Simulator". It will appear in the view's list and cannot be deleted/edited.
New Dialog
New / Edit Target Connection Dialog:
This dialog will contain a textbox to define the name of the connection, as well as all the appropriate communication options that are currently available on the Run/Debug Configuration Communications tab.
The defined target connections will be stored in a file called ".targets" by default.
DDC-I Preferences Page
A new preference will be available for configuration on the DDC-I Preference page to specify the location/name of the target connections file.
DDC-I Target Connections File:
C:\OpenArbor\.targets <--- default location & name
Target Connection File (.targets)
The structure of the target connection file used to store the defined target connections will be in the same format as used for the .options file.
[connection name] PROPERTY=<property value> PROPERTY=<property value> PROPERTY=<property value> PROPERTY=<property value> [connection name] PROPERTY=<property value> PROPERTY=<property value>
So, for example, an 80x86 debug monitor connection called "My80x86Connection" might look like this:
[My80x86Connection] CONFIG_TYPE=NonVxWorksConfigType TARGET=80x86 COMMUNICATE_WITH=Debug Monitor TARGET_LINE=com1 BAUD_RATE=115200
Run & Debug Configuration Communication Tab Updates
These two tabs will now have an additional drop-down combo box called "Target Connection:". The drop-down list will contain all the defined target connections. By default, it will display the "Default" target connection. The value for this drop-down combo will be load/stored using the persistent properties, but the communication option widget values will be loaded/stored in the .targets file.
As the "Target Connection" selection is changed, the communication widgets will be loaded from the .targets file.
New HeartOS Project ABC Actions
User scenario has four distinct steps:
- 1) Clear the hitmap
- 2) Load/Run test program <1 or more>
- 3) Gather the hitmap
- 4) Generate the report
The above scenario works great for target boards, but not at all for PSIM. For PSIM we either need a gdbserver that will "stay running" after step 1 has been done, or we need to support another user scenario:
- 1) Load /Run test program using an MLD script that
- a) Clears the hitmap
- b) Executes the test program
- c) Gathers the hitmap
- 2) Generate the report.
- Clear Hitmap...
- Gather Hitmap...
The hitmap_action.py script requires several parameters to be specified for HeartOS (using MLD):
- mode - 'mld'
- command - 'clear' or 'collect'
- Index File Path (one per project containing the instrumented source code files)
- Base Address
- Hitmap File Path (collect only)
- MLD path name
- Target Connection options
- Initialization file path
- Perl directory path
When the Clear or Gather action is specified, a dialog will be presented to allow the user to select the Target Connection to use (if there is more than one defined), the Base Address, and the Hitmap File Path (collect only).
Conversion of Existing Workspaces
The Target Connection options that are currently stored in the Run & Debug Configuration Communication tab options will have to be "converted" to a Target Connection.
For each Run or Debug configuration saved in the workspace that doesn't match the "Default" configuration, a new Target Connection will be stored as "TargetConnection<n>". After conversion, user can go back and edit or delete target connections.