UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor werr4ever
Visitor
230 Views
Registered: ‎09-24-2018

ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Hi,

I am currently having problems loading the helloworld build on SDK to the the ARM.  I used prebuilt hdf file provided by xilinx to create the bsp, fsbl, and the helloworld app. (attached are the project files).  On the hardware, I set all the switches on SW6 to the “ON” position so the system will boot on JTAG, and I connected a USB to microUSB to the to J83 on the board.  My debug configurations are as follows (See debugConfigs.png).

I get the following error when running the debugger (error.png).

Below is the output of the sdk log:

My SDK Log:

11:24:14 INFO : Connected to target on host '127.0.0.1' and port '3121'.

11:24:15 INFO : Jtag cable 'Xilinx HW-Z1-ZCU111 FT4232H 93153A' is selected.

11:24:15 INFO : 'jtag frequency' command is executed.

11:24:15 INFO : Sourcing of 'C:/Xilinx/SDK/2018.3/scripts/sdk/util/zynqmp_utils.tcl' is done.

11:24:15 INFO : Context for 'APU' is selected.

11:24:16 INFO : System reset is completed.

11:24:19 INFO : 'after 3000' command is executed.

11:24:19 INFO : Context for 'APU' is selected.

11:24:20 INFO : Cleared APU and A53 resets

11:24:20 INFO : Context for 'RPU' is selected.

11:24:20 INFO : Cleared RPU and R5 resets

11:24:20 INFO : Split mode is enabled for R5#1

11:24:20 INFO : 'targets -set -filter {jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A" && level==0} -index 0' command is executed.

11:24:40 INFO : FPGA configured successfully with bitstream "C:/Users/leee1/workspace/rfsoc_hw/zcu111_rfsoc_trd_wrapper.bit"

11:24:40 INFO : Context for 'APU' is selected.

11:24:41 INFO : Hardware design information is loaded from 'C:/Users/leee1/workspace/rfsoc_hw/system.hdf'.

11:24:41 INFO : 'configparams force-mem-access 1' command is executed.

11:24:41 INFO : Context for 'APU' is selected.

11:24:41 INFO : Sourcing of 'C:/Users/leee1/workspace/rfsoc_hw/psu_init.tcl' is done.

11:24:44 INFO : 'psu_init' command is executed.

11:24:44 INFO : Sourcing of 'C:/Xilinx/SDK/2018.3/scripts/sdk/util/fsbl.tcl' is done.

11:24:45 INFO : 'after 1000' command is executed.

11:24:45 INFO : 'psu_ps_pl_isolation_removal' command is executed.

11:24:46 INFO : 'after 1000' command is executed.

11:24:47 INFO : 'psu_ps_pl_reset_config' command is executed.

11:24:47 INFO : 'catch {psu_protection}' command is executed.

11:24:47 INFO : Context for processor 'psu_cortexr5_0' is selected.

11:24:47 ERROR       : AXI AP transaction error, DAP status 30000021

11:24:47 INFO : ----------------XSDB Script----------------

connect -url tcp:127.0.0.1:3121

source C:/Xilinx/SDK/2018.3/scripts/sdk/util/zynqmp_utils.tcl

targets -set -nocase -filter {name =~"APU*" && jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A"} -index 1

rst -system

after 3000

targets -set -nocase -filter {name =~"APU*" && jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A"} -index 1

reset_apu

targets -set -nocase -filter {name =~"RPU*" && jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A"} -index 1

clear_rpu_reset

enable_split_mode

targets -set -filter {jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A" && level==0} -index 0

fpga -file C:/Users/leee1/workspace/rfsoc_hw/zcu111_rfsoc_trd_wrapper.bit

targets -set -nocase -filter {name =~"APU*" && jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A"} -index 1

loadhw -hw C:/Users/leee1/workspace/rfsoc_hw/system.hdf -mem-ranges [list {0x80000000 0xbfffffff} {0x400000000 0x5ffffffff} {0x1000000000 0x7fffffffff}]

configparams force-mem-access 1

targets -set -nocase -filter {name =~"APU*" && jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A"} -index 1

source C:/Users/leee1/workspace/rfsoc_hw/psu_init.tcl

psu_init

source C:/Xilinx/SDK/2018.3/scripts/sdk/util/fsbl.tcl

after 1000

psu_ps_pl_isolation_removal

after 1000

psu_ps_pl_reset_config

catch {psu_protection}

targets -set -nocase -filter {name =~"*R5*0" && jtag_cable_name =~ "Xilinx HW-Z1-ZCU111 FT4232H 93153A"} -index 1

rst -processor

----------------End of Script----------------

I haven't found a lot of resources on booting a baremetal application on the ZCU111 via JTAG using the SDK.  Is this function deprecated? 

Thanks,

Edwin  

 

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
50 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Your FSBL needs to be built targeting the R5(Instructions to do this are provided in UG1209).   Then you select the R5 as a target, reset it, and dow that FSBL.   I used this tcl script to boot the FSBL on the R5

 

connect

#tcl to load FSBL instead of psu_init
#load FPGA

#fpga -f zcu111.bit

#Disable Security gates to view PMU MB target
targets -set -filter {name =~ "PSU"}
#By default, JTAGsecurity gates are enabled
#This disables security gates for DAP, PLTAP and PMU.
mwr 0xffca0038 0x1ff
after 500
#Reset R5, load and run FSBL
targets -set -filter {name =~ "Cortex-R5 #0"}
rst -processor
dow fsbl_r5/debug/fsbl_r5.elf
con
#Give FSBL time to run
after 5000
stop

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
16 Replies
Moderator
Moderator
189 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Here is a wiki page describing one method to boot over JTAG.   Can you provide your hdf and I'll try it here.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor werr4ever
Visitor
184 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

The hdf file is the prebuilt 2018.3 for the SSRIPDesign_1x1, but here is the attached hdf file

0 Kudos
Visitor werr4ever
Visitor
173 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

glena,

I was also more concern with debugging my app on the SDK than just starting the application with a tcl script on the ZCU111.  Is that option not possible?  I guess if the tcl script work, I could always attach the debugger to the process...  but that would be annoying.  Is there a option in the sdk to run that script while doing debugging on the Eclipse IDE?  

0 Kudos
Moderator
Moderator
167 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Yes there is.      To load the bitstream / fsbl / pmufw on your board, use a script.  You can find a good example in UG1137 in the section "Loading PMU Firmware in JTAG Boot mode".   Just end the script after the FSBL is loaded.

From there you can debug your applications in SDK -- just make CERTAIN that 'Run psu_init' is not selected in Debug Configurations.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor werr4ever
Visitor
157 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Apparently, running the instructions you gave me earlier gave me a compile error saying it is missing a file...

"Running Make libs in psu_pmu_0/libsrc/rfdc_v5_0/src"

"Compiling rfdc"

In file included from xrfdc.c:138:0:

xrfdc.h:213:10: fatal error: metal/sys.h: No such file or directory

#include <metal/sys.h>

^~~~~~~~~~~~~

compilation terminated.

In file included from xrfdc_g.c:37:0:

xrfdc.h:213:10: fatal error: metal/sys.h: No such file or directory

#include <metal/sys.h>

^~~~~~~~~~~~~

compilation terminated.

In file included from xrfdc_intr.c:56:0:

xrfdc.h:213:10: fatal error: metal/sys.h: No such file or directory

#include <metal/sys.h>

^~~~~~~~~~~~~

compilation terminated.

In file included from xrfdc_mixer.c:49:0:

xrfdc.h:213:10: fatal error: metal/sys.h: No such file or directory

#include <metal/sys.h>

^~~~~~~~~~~~~

compilation terminated.

In file included from xrfdc_mts.h:66:0,

from xrfdc_mts.c:59:

xrfdc.h:213:10: fatal error: metal/sys.h: No such file or directory

#include <metal/sys.h>

^~~~~~~~~~~~~

compilation terminated.

In file included from xrfdc_sinit.c:58:0:

0 Kudos
Moderator
Moderator
155 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

That error indicates that you need to add in the libmetal directory to the bsp.    Something to keep in mind, the TRD isn't really meant to be edited - it's targeted to be more of a demonstration of capabilities.   

For something to edit and add in your own secret sauce, I'd suggest working from the analyzer design in the lounge  

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor werr4ever
Visitor
143 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Hi glena,

Yeh I realized that the TRD design doesn't have a Microblaze, hence I couldn't run the tcl script you linked me to.  Is there a specific build I can run on and be successful at running the following instructions for, https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/66551810/Creating+FSBL+PMUFW+from+XSCT+for+ZCU111+and+boot+over+JTAG?

0 Kudos
Moderator
Moderator
131 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Any hdf for a ZCU111 should work with that wiki script.   I used the script I sent to you on the hdf from the TRD with no issues after adding the libmetal library to the BSPs.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor werr4ever
Visitor
114 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

I am still having trouble with the tcl script...  I am using the prebuilt trd hdf file, maybe there is an updated one I am not aware of.  Is there a way you can send me that hdf file?  

Anyway, I ran the script line by line and in board_bringup the "targets -set -nocase -filter {name =~ "PSU"}" didn't find a target after connect (See attached).  Do you having a different hardware setup than mine?  I am using the USB to JTAG port, with SW6 all "ON".  Are the names different in my device?  Does "PSU" in the script corresponds to PS TAP, and "Microblaze PMU" corresponds to PMU.

Thanks,

Edwin

xsct_error.PNG
0 Kudos
Moderator
Moderator
116 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Try this wiki page, I ran this earlier today and it worked well for me (download and extract the .zip, in xsct 'source xsct_script.tcl' then run 'board_bringup design_1_wrapper.hdf'.    Note that in  'proc board_bringup' you need to change 'dow fsbl' to 'dow zynqmp_fsbl/executable.elf'.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor werr4ever
Visitor
106 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

I ran the script and the exact same thing happen.  

The line "targets -set -nocase -filter {name =~ "PSU"}" outputs "no targets found with "name =~ "PSU".  This means I have no targets with the name "PSU".  I get the following targets:

1 PS TAP

2 PMU

3 PL

4 dummy_dap

5 xc7vx690t

6 Legacy Debug Hub

None of this has the name "PSU" on it, hence we cannot write anything on it.  This is with your hdf file as well.  Could you check if your targets are the same as mine with the following command?  If not, there is definitely something different with our configurations or how we are hooking up our ZCU111.

0 Kudos
Moderator
Moderator
97 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Are you sure you are booting in JTAG boot mode?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor werr4ever
Visitor
82 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

We do have a cable going to the USB JTAG and all the SW6 is ON.  From the documentation I have read, that means it should be booting on JTAG boot mode.  Unless there are other instructions I don't know about.  Is something not connected right (see attached)?  Are there instructions to ensure I am actually booting from JTAG? 

connectionOnJTAG.PNG
0 Kudos
Moderator
Moderator
73 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Is this a new board?   By that, I mean has it ever worked for you?   Your JTAG chain shows an XC7V device, that device is not used on the ZCU111, is it on an FMC board?

Seeing the 'dummy_dap' makes me think you are booting in QSPI boot mode with no valid image in QSPI.   The screen you showed describes the launching of hw_server which is used by the host to communicate with the target, it provides no information about the target.

Yes, all switches on SW 6 set to on is JTAG boot mode.  Anytime the boot mode is changed, the board needs to be power cycled (go through a POR cycle so the BootROM can query the boot mode settings).  

Your JTAG chain should look like this when booted from JTAG mode.zcu111_targets.JPG

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor werr4ever
Visitor
58 Views
Registered: ‎09-24-2018

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Hi glena,

It finally worked.  However, is there a way to run a application on the Arm R5_0 instead of the Cortex-A53.  

In the A53-0 the reset commands and loading the fsbl are the following.  I know inorder to download the fsbl to the R5, I will need to change "Cortex-A53 #0, to Cortex-R5 #0 on the script.  But what memory do I write to release the R5-0 reset and the bootloop.  Below are the lines to do it for the A53-0.

# write bootloop and release A53-0 reset
mwr 0xffff0000 0x14000000
mwr 0xFD1A0104 0x380E

# Download FSBL to A53 #0
targets -set -filter {name =~ "Cortex-A53 #0"}

0 Kudos
Moderator
Moderator
51 Views
Registered: ‎03-19-2014

Re: ZCU111 Eval Board: Loading Bare Metal on Arm R5: AXI AP transaction error, DAP status 30000021

Jump to solution

Your FSBL needs to be built targeting the R5(Instructions to do this are provided in UG1209).   Then you select the R5 as a target, reset it, and dow that FSBL.   I used this tcl script to boot the FSBL on the R5

 

connect

#tcl to load FSBL instead of psu_init
#load FPGA

#fpga -f zcu111.bit

#Disable Security gates to view PMU MB target
targets -set -filter {name =~ "PSU"}
#By default, JTAGsecurity gates are enabled
#This disables security gates for DAP, PLTAP and PMU.
mwr 0xffca0038 0x1ff
after 500
#Reset R5, load and run FSBL
targets -set -filter {name =~ "Cortex-R5 #0"}
rst -processor
dow fsbl_r5/debug/fsbl_r5.elf
con
#Give FSBL time to run
after 5000
stop

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------