2.7.1 Configuring a connection to an external Fixed Virtual Platform (FVP) for bare-metal application debug

You can use DS-5 to connect to an external Fixed Virtual Platform (FVP) model for bare-metal debugging.

This topic explains how to:

Tip:

  • Configuring a connection to a built-in FVP model follows a similar sequence of steps. DS-5 launches built-in FVPs automatically when you start up a debug connection.
  • FVPs installed with your edition of DS-5 are listed under the ARM FVP (Installed with DS-5) tree. To see which FVPs are available with your license, compare DS-5 editions.

Prerequisites

  • The FVP model that you are connecting to must be available in the DS-5 configuration database so you can select it in the Debug Configurations dialog. If the FVP model is not available, you must first import it.
  • To load and execute the application on your FVP model using DS-5, your application must first be built with the appropriate compiler and linker options so that it can run on your model. To locate the options and parameters required to build your application, check the documentation for your compiler and linker.
  • You must have the appropriate licenses installed to run your FVP model from the command line.

Procedure

  1. Create a debug configuration to connect to the Base_AEMv8A_AEMv8A FVP model:
    1. From the main menu, select Run > Debug Configurations....
    2. In the configuration tree, select DS-5 Debugger and then click Create a new configuration New to create a configuration.
    3. In the Name field, enter a suitable name for the new configuration, for example, My_BareMetal_Model_Configuration.
    4. In the Connection tab, in the Select target panel, browse and select ARM FVP > Base_AEMv8A_AEMv8A > Bare Metal Debug > Debug ARMAEMv8-A-MP_0.
      Figure 2-7 Debug Configurations - ARM FVP - Base_AEMv8A_AEMv8A
      Debug Configurations - ARM FVP - Base_AEMv8A_AEMv8A


    5. In the Files tab, in Target Configuration > Application on host to download, specify the application that you want to load on the model.
    6. In the Debugger tab, specify the actions that you want the debugger to perform after connecting to the target.
    7. If required, click the OS Awareness tab to select the appropriate operating system awareness when the debug session starts.
    8. If required, click the Arguments tab to enter arguments that are passed to the application when the debug session starts.
    9. If required, click the Environment tab to create and configure the target environment variables that are passed to the application when the debug session starts.
    10. Click Apply and then Close to save the configuration settings and close the Debug Configurations dialog.
      You have now created a debug configuration to connect to to the Base_AEMv8A_AEMv8A target. You can view the debug configuration in the Debug Control view.

      The next step is to start up the Base_AEMv8A_AEMv8A model with the appropriate settings so that DS-5 can connect to it when you start your debugging session.

  2. Open a terminal window and navigate to the installation directory of the Base_AEMv8A_AEMv8A model.
  3. Start up the Base_AEMv8A_AEMv8A separately with the appropriate options and parameters.

    For example, to run the FVP_Base_AEMv8A-AEMv8A.exe FVP model on Windows platforms, at the command prompt enter:

    FVP_Base_AEMv8A-AEMv8A.exe -S -C cluster0.NUM_CORES=0x1 -C bp.secure_memory=false -C cache_state_modelled=0

    • FVP_Base_AEMv8A-AEMv8A.exe - The executable for the FVP model on Windows platforms.
    • -S or --cadi-server - Starts the CADI server so that DS-5 Debugger can connect to the FVP model.
    • -C or --parameter - Sets the parameter you want to use when running the FVP model.
    • cluster0.NUM_CORES=0x1 - Specifies the number of cores to activate on the cluster in this instance.
    • bp.secure_memory=false - Sets the security state for memory access. In this example, memory access is disabled.
    • cache_state_modelled=0 - Sets the core cache state. In this example, it is disabled.

    The required parameters and options depend on your individual requirements. Check the documentation for your FVP to locate the appropriate parameters.

    You can find the options and parameters that are used in this example in the Fixed Virtual Platforms FVP Reference Guide. You can also enter --list-params after the FVP executable name to print available platform parameters.

    The FVP is now running in the background awaiting incoming CADI connection requests from DS-5 debugger.
  4. In the Debug Control view, double-click the debug configuration that you created.

    Debugging requires the DS-5 Debug perspective. If the Confirm Perspective Switch dialog box opens, click Yes to switch perspective. When connected and the DS-5 Debug perspective opens, you are presented with all the relevant views and editors.

    This starts the debug connection, loads the application on the model, and loads the debug information into the debugger.

    Figure 2-8 My_BareMetal_Model_Configuration - Debug Control view
    My_BareMetal_Model_Configuration - Debug Control view


    Click Continue running application to continue running your application.

Non-ConfidentialPDF file icon PDF versionARM 100953_0527_00_en
Copyright © 2010–2017 ARM Limited or its affiliates. All rights reserved.