2.3 Configuring a connection to a bare-metal hardware target

To configure a connection to a bare-metal hardware target, create a debug configuration in DS-5 Debugger with the appropriate settings. Then, connect to your hardware target using JTAG or Serial Wire Debug (SWD) using DSTREAM or a similar debug hardware adapter. To connect to a bare-metal model target, use the same procedure and use the appropriate model settings.

Prerequisites

  • Ensure that your target is powered on and is working. See the documentation supplied with the target for more information.
  • Ensure that the debug hardware adapter connecting your target with your workstation is powered on and working.
  • If using DSTREAM, ensure that your target is connected correctly to the DSTREAM unit. If the target is connected and powered, the TARGET LED illuminates green, and the appropriate VTREF LED on the DSTREAM probe illuminates.

Procedure

  1. From the main menu, select Window > Open Perspective > DS-5 Debug.
  2. From the main menu, select Run > Debug Configurations to open the Debug Configuration dialog.
  3. In the configuration tree, select DS-5 Debugger and then click Create a new configuration New to create a new configuration.
  4. Enter a suitable name for the new configuration, in the Name field. For example, My_BareMetal_Configuration.
  5. Use the Connection tab to specify the target and connection settings:
    1. In the Select target area of the dialog, browse and select the platform you require. For example, to connect to the CoreTile Express A9x4 (V2P-CA9) running on the Versatile Express motherboard, browse and select ARM Development Boards > Versatile Express A9x4 > Bare Metal Debug > Debug Cortex-A9x4 SMP.

      Note

      If you cannot find the platform you want to connect to, then you must first import your platform configuration using the Platform Configuration Editor.
    2. Select your debug hardware unit in the Target Connection list. For example, DSTREAM.
    3. If you need to, Edit the Debug and Trace Services Layer (DTSL) settings in the DTSL Configuration Editor to configure additional debug and trace settings for your target.
    4. In the Connections area, enter the Connection name or IP address of your debug hardware adapter. If your connection is local, click Browse and select the connection using the Connection Browser.
      Figure 2-1 MyBareMetalConfig - Connection tab
      MyBareMetalConfig - Connection tab

  6. Use the Files tab to specify your application and additional resources to download to the target:
    1. If you want to load your application on the target at connection time, in the Target Configuration area, specify your application in the Application on host to download field.
    2. If you want to debug your application at source level, select Load symbols.
    3. If you want to load additional resources, for example, additional symbols or peripheral description files from a directory, use the Files area to add them. Click Add resource to add resources, click Remove resources to remove resources.
      Figure 2-2 MyBareMetalConfig - Files tab
      MyBareMetalConfig - Files tab

  7. Use the Debugger tab to configure debugger settings.
    1. In the Run control area:
      • Specify if you want to Connect only to the target or Debug from entry point. If you want to start debugging from a specific symbol, select Debug from symbol.
      • If you need to run target or debugger initialization scripts, select the relevant options and specify the script paths.
      • If you need to specify debugger commands at debugger start up, select Execute debugger commands options and specify the commands.
    2. The debugger uses the Eclipse workspace as the default working directory on the host. If you want to change the default location, deselect the Use default option under Host working directory and specify the location you want.
    3. In the Paths area, specify any directories on the host to search for files of your application using the Source search directory field.
    4. If you need to use additional resources, click Add resource to add resources, click Remove resources to remove resources.
      Figure 2-3 MyBareMetalConfig - Debugger tab
      MyBareMetalConfig - Debugger tab

  8. If required, use the Arguments tab to to enter arguments that are passed, using semihosting, to the main() function of the application when the debug session starts.
  9. If required, use the Environment tab to create and configure environment variables to pass into the launch configuration when it is executed.
  10. Click Apply to save the configuration settings.
  11. Click Debug to connect to the target and start the debugging session.
The DS-5 Debug perspective starts up presenting the relevant views and editors.
For specific help in a selected view, press F1 on your keyboard and use the dynamic help.
Related tasks
2.5 Configuring a connection to a Fixed Virtual Platform (FVP) model for Linux application debug
2.6 Configuring a connection to a Linux application using gdbserver
2.7 Configuring a connection to a Linux kernel
2.10 Configuring an Events view connection to a bare-metal target
Related reference
Chapter 10 Platform Configuration
11.38 Debug Configurations - Connection tab
11.39 Debug Configurations - Files tab
11.40 Debug Configurations - Debugger tab
11.41 Debug Configurations - OS Awareness tab
11.42 Debug Configurations - Arguments tab
11.43 Debug Configurations - Environment tab
Non-ConfidentialPDF file icon PDF versionARM DUI0446W
Copyright © 2010-2015 ARM. All rights reserved.