Arm Virtual Hardware  Version 2.1.0
AVH FVP Infrastructure
 
Loading...
Searching...
No Matches
Use with Keil µVision

This section explains how Arm Fixed Virtual Platforms (FVP) can be used with Keil µVision tools for developing and debugging embedded applications on a local computer.

Tools Installation

  • Download and Install Keil MDK µVision v5.40 on your Windows PC, if not present yet.
  • Ensure that a user-based license is activated either for the MDK-Community (evaluation and non-commercial use) or MDK-Professional (commercial use) editions. This is required for running AVH FVP models.
  • [Optional] Enable Telnet Client on Windows 10. This will allow to observe UART output from the AVH device during debug.
    • Open Start > Settings.
    • In the search box, type Turn Windows features on or off and click on the suggested item. The Windows Features dialog opens.
    • Select the Telnet Client check box and click OK. The installation might take several minutes to complete.

Project Configuration

Two important configuration areas need special attention in µVision projects for Arm FVPs:

  • Target selection in the project. This is required for new projects or when changing the target device in an existing project.
  • Run and debug configuration in the project. This step is typically needed for setting up any project, but with reference AVH examples brief verification of the default settings can be sufficient.

Target selection

Device support for AVH FVP targets is implemented with the same CMSIS principles as used for real hardware devices. CMSIS-based projects for AVH FVPs lists the device family packs and BSP packs required for use with AVH FVPs.

When opening an existing project you will be asked if any missing packs required by the project shall be installed. If you agree to that, also the necessary pack with device definition for the target device used in the project will be automatically installed.

When creating a new project or when changing the target in an existing project you need to select an FVP target as follows:

  • Install the CMSIS pack with target device definition, if not present yet:
    • Start Pack Installer utility.
    • In Devices tab expand ARM section and select the target Cortex-M core.
    • In the Packs tab under Device Specific category select the target CMSIS pack that implements the required device according to the table in CMSIS-based projects for AVH FVPs.
    • Press Install or Update button in the Action field to get the latest version installed. For example for Arm Cortex-M4:
    • Observe the button status changed to Up to date and return to the project in µVision.
  • Select AVH device as the target in your project:
    • In the project open Options for target... dialog and select Device tab.
    • In the list of device vendors expand ARM group.
    • Expand the group of your target Cortex-M core.
    • In the list select the target device according to the table in CMSIS-based projects for AVH FVPs and press OK.
      For example for Arm Cortex-M4:

Run and debug configuration

Configure execution and debug of an µVision project on an AVH FVP model using the steps explained in the Debug Driver Coviguration for AVH FVP targets.

  • In the Debug tab, in the Initilization File field, use the ... button to provide a path to a file that assigns CORE_CLK to the same value as specified for the core_clk.mul parameter in the model configuration file. This ensures that the timing for µVision displays is correctly calculated in synch with the simulation. Edit button can be used to view and modify the file in the µVision editor. Figure below shows the example configuration and content of the files used, mdk_fvp_config.txt and mdk_fvp_init.ini:

Program Build and Debug

Project build and debug on an AVH FVP target can be done in the similar way as any other Keil µVision project:

  • Press Rebuild button in µVision toolbar (or use F7 hotkey).
  • Start the debug session from µVision toolbar (or with Ctrl-F5). The model executable window should pop up (with C:\WINDOWS\system32\cmd.exe) but it will stay empty during the session. Also see []()
  • If enabled in Run and debug configuration, a Telnet client will start. Program output should be expected there.
  • Debug the project as usual with available µVision functionality. Refer to Application Debug on AVH FVPs for additional details and references.

Using csolution projects

Projects in universal csolution format can be open in Keil MDK µVision for debugging. See notes about "Open Project..." item in the Project Menu and Commands.

You can also export the µVision project go to the csolution format by choosing menu Project - Export and select Save project to csolution format.