Getting Started with DS-5 Development Studio
This tutorial takes you through the process of downloading and installing the evaluation version of Arm DS-5 Development Studio. It then guides you through creating a simple bare-metal "Hello World" application and finally running it on a debug configuration for a Cortex-A9 Fixed Virtual Platform (FVP) provided with DS- 5.
Getting Started with DS-5 Development Studio
This tutorial takes you through the process of downloading and installing the evaluation version of Arm DS-5 Development Studio. It then guides you through creating a bare-metal "Hello World
" application and finally running it on a debug configuration for a Cortex-A9 Fixed Virtual Platform (FVP) provided with DS- 5.
Downloading and Installing DS-5
DS-5 is available for both Windows and Linux hosts. See DS-5 System Requirements for a list of supported hosts.
Download the appropriate DS-5 installer for your host (either Windows or Linux).
Extract the files from the downloaded .zip file and run setup.exe. Then follow the simple on-screen installation instructions.
Note: During installation, you might receive warnings such as "Windows can't verify the publisher of this driver software" you can safely ignore these warnings and continue with the installation.
When installed, on Windows 10 platforms you can find DS-5 under Start menu > Arm DS-5 <version>
Starting DS-5 and Setting up your Workspace
- To start DS-5, from your desktop menu, select Eclipse for DS-5.
- In the Workspace Launcher dialog, accept the default workspace, or click Browse and select a folder. For example,
C:\DS-5_Workspace
.
3. Select Use this as the default and do not ask again option and click OK
4. If you are using DS-5 for the first time, then the No License Found dialog is displayed.
5. Click Open License Manager to use the License Manager to add a license.
Obtaining a License
After installing DS-5, you have to obtain a license to use it. For this tutorial, we are going to use a 30-day evaluation license that allows you to use DS-5 Ultimate Edition for 30 days without any restrictions.
Note: You need to be connected to the internet and have an Arm developer (Silver) account to obtain a DS-5 evaluation license.
- In the No Licenses Found dialog, click Open License Manager.
- In the Arm License Manager dialog, click Add License.
- In the Add License dialog, select Generate a 30-day evaluation license for DS-5 Ultimate Edition option and click Next.
- In the Choose network interface dialog, select a network interface.
Note: Arm recommends selecting a physical network interface. If a virtual interface is selected, the license stops working if the MAC address of the interface is changed.
- In the Developer account details dialog, enter your Arm developer (Silver) account details. If you do not have an account, create one.
- Click Finish.
When the license is successfully registered, the 30-day evaluation license and the toolkit that is available to you are visible in the Arm License Manager.
- Close the Arm License Manager and in the Confirm Restart Eclipse dialog, click Restart Eclipse. This restarts Eclipse and brings up the DS-5 Welcome Page.
- Either close the Welcome page, or click Go to workbench to view the full DS-5 IDE.
You are now ready to use DS-5.
Creating a simple Hello World C program for a bare-metal target
After installing DS-5 and obtaining a license, this tutorial then takes you through creating, configuring, and building a simple bare-metal program.
To run your application when it is built, this tutorial then takes you through the steps of configuring a debug connection to a system model implemented in software. These models are called Fixed Virtual Platforms (FVP) and some are provided with DS-5. This tutorial uses the VE_Cortex_A9x1
FVP model which is based on the Cortex-A9 processor.
Creating a New C Project
- From the DS-5 main menu, select File > New > C Project to display the C Project dialog.
- In the C Project dialog:
- In Project name field, enter HelloWorld as the name of your project.
- Under Project type, select Executable > Hello World ANSI C Project.
- Under Toolchains, select Arm Compiler 6.
- Click Finish to create a C project called Hello World.
You can view the project in the Project Explorer view.
Specifying a RAM Base Address
To load and execute the application on the target, before compiling the application, we need to tell the linker the target RAM base address. This ensures that the application is built correctly for the particular target.
The VE global model memory map contains the memory address details required for the VE FVP model used in this tutorial.
We can see that the memory address range for VE FVP models (4GB DRAM (in 32-bit address space)) is between 0x80000000
and 0xFFFFFFFF
. This gives us the RAM base address as 0x80000000
.
- In Project Explorer, right-click the project and select Properties.
- In the Properties dialog:
- Browse to C/C++ Build > Settings.
- Under the Tool Settings tab, browse to All Tools Settings > Target, and from the Target CPU drop down select
Cortex-A9
. - Under the Tool Settings tab, browse to All Tools Settings > Target, and from the Target FPU drop down select
No FPU
. - Under the Tool Settings tab, browse to Arm Linker 6 > Image Layout.
- In the RO base address (--ro_base) field, enter
0x80000000
.
- Click OK to close the dialog and apply the changes.
Building the Project
In the Project Explorer view, right-click on the Hello World project and select Build Project.
You can view the output image HelloWorld.axf
in the Debug folder under the HelloWorld project.
The .axf
file contains both the object code and debug symbols that enable the debugger to perform source-level debugging.
Debug the application on a Fixed Virtual Platform (FVP)
When you have created the project and built the code, launch the debugger to run the application on one of the Fixed Virtual Platforms (FVP) provided with DS-5.
For this tutorial, we use a Cortex-A9 Fixed Virtual Platform (FVP) which is provided with DS-5.
Create a DS-5 Debug Configuration and Connecting to an FVP
- From the DS-5 main menu, select Run > Debug Configurations...
- In the Debug Configurations dialog:
- Select DS-5 Debugger.
- Click the New launch configuration button.
This creates a new DS-5 debug configuration and displays the various tabs required to specify settings for loading your application on the target.
- In the Debug Configurations dialog:
- Give a name to the debug configuration. For example,
HelloWorld_FVP
. - In the Connection tab, under Select Target, browse and select Arm FVP (Installed with DS-5) > VE_Cortex_A9x1 > Bare Metal Debug > Debug Cortex-A9.
- Select the Files tab, and under Target Configuration in the Application on host to download field, click Workspace.
The Workspace contains the
HelloWorld.axf
application file you created when you built the Hello World project.Note: Ensure that the Load symbols option is selected.
- Select
HelloWorld.axf
. - Select the Debugger tab, and ensure the Debug from symbol option is selected and set to
main
. - Click Debug to load the application on the target, and load the debug information into the debugger.
- In the Confirm Perspective Switch dialog that appears, click Yes.
DS-5 connects to the model and displays the connection status in the Debug Control view.
The application is loaded on the target, and has stopped at the
main()
function, ready to run. - Click
to continue running the application.
You can view the application output in the Target Console view.
Other views display information relevant to the debug connection
- Commands view displays messages output by the debugger. Also use this view to enter DS-5 commands.
- C/C++ Editor view shows the active C, C++, or Makefile. The view is updated as you edit these files.
- Disassembly view shows the loaded program in memory as assembler instructions at addresses.
Indicates the location in the code where your program is stopped. In this case, it is at the
main()
function. - Memory view shows how the code is represented in the target memory.
For example, to view how the string
Hello World
from the application is represented in memory:- Open the Memory view.
- In the Address field, enter 0x80000000 and press Enter on your keyboard. The view displays contents of the target's memory.
- Select and highlight the words
Hello World
.
In the above example, the Memory view displays the hexadecimal values for the code, and also the ASCII character equivalent of the memory values which enable you to drill down into the details of the code.
- Commands view displays messages output by the debugger. Also use this view to enter DS-5 commands.
- Give a name to the debug configuration. For example,
Step Through the Application
Use the controls provided in the Debug Control view to step through the application.
- Click to continue executing code.
- Click to interrupt or pause executing code.
- Click to step through the code.
- Click to step over source line.
- Click to step out.
- This is a toggle. Select this if you want the above controls to step through instructions.
Disconnect from the Debug Connection
To disconnect from a debug connection, you can:
- Right-click the connection and select Disconnect from Target,
- or select the connection and in the Debug Control view toolbar click
,
- or double-click on the selected connection.