Debug with Arm DS¶
Install Arm DS¶
Please refer to the official Arm Development Studio Page 1 for details. Here
Version: 2020.b Build: 2020110909
is used in the following example.

Download Arm FVP BaseR AEMv8-R¶
Please refer to official FVP page 2 for download instructions. Here $FVP_D
is used to indicate which directory is FVP located.
Use DS perspective¶
From menu choose Window -> Perspective -> Open Perspective -> Other...
:

In the opened window, choose Development Studio (default)
:

Create a new configuration database¶
Create a new configuration database by selecting File -> New -> Other... -> Configuration Database
:

Choose a name for the database. Here Zephyr
is used:

Click Finish
and the new configuration database can be seen in Project Explorer
:

Create a new model configuration¶
Right click Zephyr
in Project Explorer
, choose New -> Model Configuration
:

In the opened window:
Choose
Iris
forModel Interface
, thenNext >
.Choose
Launch and connect to specific model
, thenNext >
.Set
Model Path
to$FVP_D/FVP_BaseR_AEMv8R
, thenFinish
.

Then in FVP_BaseR_AEMv8R
tab, change ARMAEMv8-R_
to V8R64-Generic
,
click Save
and then click Import
:

Create a new launch configuration¶
From Project Explorer
, right click FVP_BaseR_AEMv8R
and select Debug as -> Debug configurations...
:

Select Generic Arm C/C++ Application
and click New launch configuration
button.
A new configuration named New_configuration
will be created.
In
Connection
tab:In
Select target
box, selectImported -> FVP_BaseR_AEMv8R -> Bare Metal Debug -> ARMAEMv8-R_MP_0
In
Connections
box, setModel parameters
to:-C bp.dram.enable_atomic_ops=1 -C bp.sram.enable_atomic_ops=1 -C bp.refcounter.non_arch_start_at_default=1 -C gic_distributor.GICD_CTLR-DS-1-means-secure-only=1 -C gic_distributor.has-two-security-states=0 -C bp.vis.disable_visualisation=1 -C cluster0.has_aarch64=1 -a /home/fengqi/zephyrproject/build/zephyr/zephyr.elf
These parameters are passed to
FVP_BaseR_AEMv8R
when launches. RunFVP_BaseR_AEMv8R --help
to see all command line options. RunFVP_BaseR_AEMv8R --list-params
to see all supported parameters. The filezephyr.elf
specified by-a
is the binary built from Zephyr.

In
Files
tab:In
Files
box, setLoad symbols from file
to full path ofzephyr.elf
that you built.

In
Debugger
tab:In
Run control
box, checkExecute debugger commands
and insert:add-symbol-file "/home/fengqi/zephyrproject/build/zephyr/zephyr.elf" EL1S:0
Replace
/home/fengqi/zephyrproject/build/zephyr/zephyr.elf
with your local path.In
Paths
box, setSource search directory
to the path to Zephyr source code.

After all these changes are made, click Apply
, then click Debug
. DS will
launch FVP_BaseR_AEMv8R
and connect to it. You can see a new session is
connected in Debug Control
window.
