cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
blynskey_thinci
Observer
Observer
1,056 Views
Registered: ‎07-25-2018

Petalinux: running the petalinux-boot command, with a JTAG chain of 2 MPSoCs

Hi,

 

I'm using a custom board with a JTAG chain as follows: TDI -> xczu3 -> xczu4 -> TDO

 

I have a build of Petalinux which I want to run on the xczu4. I need to specify this in my 'petalinux-boot' command (error message below). I don't know how to specify the correct MPSoC. When I run xsdb/connect/jtag targets, I see:

xsdb% connect
tcfchan#0
xsdb% Info: Cortex-A53 #1 (target 10) Stopped at 0xfffea110 (Reset Catch)
xsdb% jtag targets -v
1 Platform Cable USB II 000015de812e01
2 xczu3 (idcode 14710093 irlen 12 fpga)
3 arm_dap (idcode 5ba00477 irlen 4)
4 dummy_dap (irlen 4 inactive)
5 xczu4 (idcode 04721093 irlen 12 fpga)
6 arm_dap (idcode 5ba00477 irlen 4)
7 dummy_dap (irlen 4 inactive)
xsdb%

 

So how should I modify my 'petalinux-boot' command?

 

Best regards,

 

 - Brendan

 

 

 

$ petalinux-boot --jtag --kernel --fpga --v
INFO: sourcing build tools
INFO: Use bitstream: "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.bit.
INFO: Please use --fpga --bitstream <BITSTREAM> to specify a bitstream if you want to use other bitstream.
XSDB Script:
INFO: Launching XSDB for file download and boot.
INFO: This may take a few minutes, depending on the size of your image.

connect
puts stderr "INFO: Configuring the FPGA..."
puts stderr "INFO: Downloading bitstream: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.bit to the target."
fpga "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.bit"
targets -set -nocase -filter {name =~ "*PSU*"}
mask_write 0xFFCA0038 0x1C0 0x1C0
targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"}

catch {stop}; after 1000
puts stderr "INFO: Downloading ELF file: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/pmufw.elf to the target."
dow "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/pmufw.elf"
after 2000
con
targets -set -nocase -filter {name =~ "*APU*"}
mwr 0xffff0000 0x14000000
mask_write 0xFD1A0104 0x501 0x0
targets -set -nocase -filter {name =~ "*A53*#0"}

source /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/project-spec/hw-description/psu_init.tcl
puts stderr "INFO: Downloading ELF file: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/zynqmp_fsbl.elf to the target."
dow "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/zynqmp_fsbl.elf"
after 2000
con
after 4000; stop; catch {stop}; psu_ps_pl_isolation_removal; psu_ps_pl_reset_config
targets -set -nocase -filter {name =~ "*A53*#0"}
puts stderr "INFO: Loading image: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/Image at 0x00080000"
dow -data "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/Image" 0x00080000
after 2000
targets -set -nocase -filter {name =~ "*A53*#0"}
puts stderr "INFO: Loading image: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.dtb at 0x1407f000"
dow -data "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.dtb" 0x1407f000
after 2000
targets -set -nocase -filter {name =~ "*A53*#0"}
puts stderr "INFO: Downloading ELF file: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/build/misc/linux-boot/linux-boot.elf to the target."
dow "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/build/misc/linux-boot/linux-boot.elf"
after 2000
targets -set -nocase -filter {name =~ "*A53*#0"}
puts stderr "INFO: Downloading ELF file: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/bl31.elf to the target."
dow "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/bl31.elf"
after 2000
con
exit
rlwrap: warning: your $TERM is 'xterm-256color' but rlwrap couldn't find it in the terminfo database. Expect some problems.: Inappropriate ioctl for device
attempting to launch hw_server

****** Xilinx hw_server v2019.1
**** Build date : May 11 2019 at 11:28:07
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121

INFO: Configuring the FPGA...
INFO: Downloading bitstream: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.bit to the target.

Multiple FPGA devices found, please use targets command to select one of: 1, 11
invoked from within
"::tcf::eval -progress ::xsdb::print_progress {::tcf::cache_enter tcfchan#0 {tcf_cache_eval {process_tcf_actions_cache_client ::tcfclient#0::arg}}}"
(procedure "::tcf::cache_eval_with_progress" line 2)
invoked from within
"::tcf::cache_eval_with_progress [dict get $arg chan] [list process_tcf_actions_cache_client $argvar] $progress"
(procedure "process_tcf_actions" line 1)
invoked from within
"process_tcf_actions $arg ::xsdb::print_progress"
(procedure "fpga" line 430)
invoked from within
"fpga "/home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.bit""
(file "/tmp/tmp.Updl4VZbom" line 5)

0 Kudos
Reply
6 Replies
blynskey_thinci
Observer
Observer
1,044 Views
Registered: ‎07-25-2018

In case it helps, here's the output from the xsdb 'targets' command:

 

 

targets
xsdb% 1 PS TAP
2 PMU
3 PL
4 PSU
5 RPU (Reset)
6 Cortex-R5 #0 (No Power)
7 Cortex-R5 #1 (No Power)
8 APU
9 Cortex-A53 #0 (Running)
10 Cortex-A53 #1 (Reset Catch, EL3(S)/A64)
11 PS TAP
12 PMU
13 PL
14 PSU
15 RPU (Reset)
16 Cortex-R5 #0 (RPU Reset)
17 Cortex-R5 #1 (RPU Reset)
18 APU (L2 Cache Reset)
19 Cortex-A53 #0 (APU Reset)
20 Cortex-A53 #1 (APU Reset)
21 Cortex-A53 #2 (APU Reset)
22 Cortex-A53 #3 (APU Reset)
xsdb%

0 Kudos
Reply
blynskey_thinci
Observer
Observer
990 Views
Registered: ‎07-25-2018

Could someone from Xilinx comment on this, please?

0 Kudos
Reply
blynskey_thinci
Observer
Observer
947 Views
Registered: ‎07-25-2018

Any help at all from Xilinx on this would be appreciated.

 

If you don't know, please say so, so I can move on.

 

Best regards,

 

 - Brendan

 

 

0 Kudos
Reply
aravindb
Moderator
Moderator
905 Views
Registered: ‎02-07-2018

HI @blynskey_thinci 

Please follow below steps for JTAG boot:

1. Open SDK & go to xilinx option tap & run the lauch shell

2. C:\vivado>xsdb

****** Xilinx System Debugger (XSDB) v2018.2
**** Build date : Jun 14 2018-20:42:53
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.



xsdb% connect
attempting to launch hw_server

****** Xilinx hw_server v2018.2
**** Build date : Jun 14 2018-20:42:52
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

 

****** Xilinx hw_server v2018.2

**** Build date : Jun 14 2018-20:42:52

** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

 

INFO: hw_server application started

INFO: Use Ctrl-C to exit hw_server application

 


INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121

 

tcfchan#0
xsdb% targets
1 PS TAP
2 PMU
3 PL
4 PSU
5 RPU (Reset)
6 Cortex-R5 #0 (RPU Reset)
7 Cortex-R5 #1 (RPU Reset)
8 APU (L2 Cache Reset)
9 Cortex-A53 #0 (APU Reset)
10 Cortex-A53 #1 (APU Reset)
11 Cortex-A53 #2 (APU Reset)
12 Cortex-A53 #3 (APU Reset)
xsdb% targets -set -filter {name =~ "PSU"}
xsdb% mwr 0xffca0038 0x1FF
xsdb% tagets
invalid command name "tagets"
xsdb% targets
1 PS TAP
2 PMU
13 MicroBlaze PMU (Sleeping. No clock)
3 PL
4* PSU
5 RPU (Reset)
6 Cortex-R5 #0 (RPU Reset)
7 Cortex-R5 #1 (RPU Reset)
8 APU (L2 Cache Reset)
9 Cortex-A53 #0 (APU Reset)
10 Cortex-A53 #1 (APU Reset)
11 Cortex-A53 #2 (APU Reset)
12 Cortex-A53 #3 (APU Reset)
xsdb% targets -set -filter {name =~ "MicroBlaze PMU"}
xsdb% dow {C:\Users\aravindb\Desktop\images\2018.2_prebuilt\pmufw.elf}
Downloading Program -- C:/Users/aravindb/Desktop/images/2018.2_prebuilt/pmufw.elf
section, .vectors.reset: 0xffdc0000 - 0xffdc0007
section, .vectors.sw_exception: 0xffdc0008 - 0xffdc000f
section, .vectors.interrupt: 0xffdc0010 - 0xffdc0017
section, .vectors.hw_exception: 0xffdc0020 - 0xffdc0027
section, .text: 0xffdc0050 - 0xffdce183
section, .rodata: 0xffdce184 - 0xffdcf456
section, .data: 0xffdcf458 - 0xffdd2797
section, .sdata2: 0xffdd2798 - 0xffdd2797
section, .sdata: 0xffdd2798 - 0xffdd2797
section, .sbss: 0xffdd2798 - 0xffdd2797
section, .bss: 0xffdd27a0 - 0xffdd6cff
section, .srdata: 0xffdd6d00 - 0xffdd79e3
section, .stack: 0xffdd79e4 - 0xffdd89e7
section, .xpbr_serv_ext_tbl: 0xffddf6e0 - 0xffddfadf
100% 0MB 0.2MB/s 00:00
Setting PC to Program Start Address 0xffdc8c68
Successfully downloaded C:/Users/aravindb/Desktop/images/2018.2_prebuilt/pmufw.elf
xsdb% Info: MicroBlaze PMU (target 13) Stopped at 0xffd02f24 (Stop)
xsdb% con
Info: MicroBlaze PMU (target 13) Running (Sleeping. No clock)
xsdb% targets -set -filter {name =~ "Cortex-A53 #0"}
xsdb% rst -processor
Info: Cortex-A53 #0 (target 9) Stopped at 0xffff0000 (Reset Catch)
xsdb% dow {C:\Users\aravindb\Desktop\images\2018.2_prebuilt\zynqmp_fsbl.elf}
Downloading Program -- C:/Users/aravindb/Desktop/images/2018.2_prebuilt/zynqmp_fsbl.elf
section, .text: 0xfffc0000 - 0xfffcfaef
section, .init: 0xfffcfb00 - 0xfffcfb33
section, .fini: 0xfffcfb40 - 0xfffcfb73
section, .note.gnu.build-id: 0xfffcfb74 - 0xfffcfb97
section, .rodata: 0xfffcfbc0 - 0xfffd002f
section, .sys_cfg_data: 0xfffd0040 - 0xfffd0827
section, .eh_frame: 0xfffd0828 - 0xfffd082b
section, .mmu_tbl0: 0xfffd1000 - 0xfffd100f
section, .mmu_tbl1: 0xfffd2000 - 0xfffd3fff
section, .mmu_tbl2: 0xfffd4000 - 0xfffd7fff
section, .data: 0xfffd8000 - 0xfffd92df
section, .init_array: 0xfffd92e0 - 0xfffd92e7
section, .fini_array: 0xfffd92e8 - 0xfffd92ef
section, .sbss: 0xfffd92f0 - 0xfffd92ff
section, .bss: 0xfffd9300 - 0xfffdb37f
section, .heap: 0xfffdb380 - 0xfffdb77f
section, .stack: 0xfffdb780 - 0xfffdd77f
section, .dup_data: 0xfffdd780 - 0xfffdea5f
section, .handoff_params: 0xfffe9e00 - 0xfffe9e87
section, .bitstream_buffer: 0xffff0040 - 0xfffffc3f
100% 0MB 0.1MB/s 00:00
Setting PC to Program Start Address 0xfffc0000
Successfully downloaded C:/Users/aravindb/Desktop/images/2018.2_prebuilt/zynqmp_fsbl.elf
xsdb% con
Info: Cortex-A53 #0 (target 9) Running
xsdb% after 500
xsdb% stop
Info: Cortex-A53 #0 (target 9) Stopped at 0xfffcd194 (External Debug Request)
xsdb% dow {C:\Users\aravindb\Desktop\images\2018.2_prebuilt\u-boot.elf}
Downloading Program -- C:/Users/aravindb/Desktop/images/2018.2_prebuilt/u-boot.elf
section, .data: 0x10080000 - 0x1014caff
100% 0MB 0.1MB/s 00:06
Setting PC to Program Start Address 0x10080000
Successfully downloaded C:/Users/aravindb/Desktop/images/2018.2_prebuilt/u-boot.elf
xsdb% after 500
xsdb% dow {C:\Users\aravindb\Desktop\images\2018.2_prebuilt\bl31.elf}
Downloading Program -- C:/Users/aravindb/Desktop/images/2018.2_prebuilt/bl31.elf
section, .text: 0xfffea000 - 0xffff1fff
section, .rodata: 0xffff2000 - 0xffff2fff
section, .data: 0xffff3000 - 0xffff67cf
section, stacks: 0xffff6800 - 0xffff78ff
section, .bss: 0xffff7900 - 0xffff8613
section, xlat_table: 0xffff9000 - 0xffffdfff
section, coherent_ram: 0xffffe000 - 0xffffefff
100% 0MB 0.1MB/s 00:00
Setting PC to Program Start Address 0xfffea000
Successfully downloaded C:/Users/aravindb/Desktop/images/2018.2_prebuilt/bl31.elf
xsdb% after 500
xsdb% con
Info: Cortex-A53 #0 (target 9) Running
xsdb% targets -set -nocase -filter {name =~ "*PL*"}
xsdb% after 500
xsdb% fpga {C:\Users\aravindb\Desktop\images\2018.2_prebuilt\system.bit}
100% 25MB 1.7MB/s 00:15
xsdb% after 500
xsdb% targets -set -filter {name =~ "Cortex-A53 #0"}
xsdb% stop
Info: Cortex-A53 #0 (target 9) Stopped at 0x7fe17d44 (External Debug Request)
xsdb% ta
1 PS TAP
2 PMU
13 MicroBlaze PMU (Sleeping. No clock)
3 PL
4 PSU
5 RPU
6 Cortex-R5 #0 (Halted)
7 Cortex-R5 #1 (Lock Step Mode)
8 APU
9* Cortex-A53 #0 (External Debug Request, EL2(NS)/A64)
10 Cortex-A53 #1 (Power On Reset)
11 Cortex-A53 #2 (Power On Reset)
12 Cortex-A53 #3 (Power On Reset)
xsdb% dow -data {C:\Users\aravindb\Desktop\images\2018.2_prebuilt\image.ub} 0x10000000
100% 46MB 0.1MB/s 06:22 A
Successfully downloaded C:/Users/aravindb/Desktop/images/2018.2_prebuilt/image.ub
xsdb% con
Info: Cortex-A53 #0 (target 9) Running
xsdb%
xsdb% disconnect
xsdb% Info: tcfchan#0 closed


3. in u-boot console , please run the below commad

bootm 0x10000000

 

Note: You can also use the petalinux-boot command inorder to boot the boatd if it is connected through JTAG using below command.

petalinux-boot --jtag --v --kernel

 

Thanks & regards

Aravind

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
Reply
blynskey_thinci
Observer
Observer
891 Views
Registered: ‎07-25-2018

Aravind,

Thanks for the help.

I would like to use the petalinux-boot command to boot over JTAG. When I try it and hw_server is invoked, I hit an error where I'm asked to specify which of the MPSoC devices in the chain to use (the error message below is taken from my original post).

How do I modify the petalinux-boot command to choose a single device, from a JTAG chain of 2 devices?

Best regards,

 - Brendan

 

...

attempting to launch hw_server

****** Xilinx hw_server v2019.1
**** Build date : May 11 2019 at 11:28:07
** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

INFO: hw_server application started
INFO: Use Ctrl-C to exit hw_server application

INFO: To connect to this hw_server instance use url: TCP:127.0.0.1:3121

INFO: Configuring the FPGA...
INFO: Downloading bitstream: /home/brendan/SoM1600p_proto/U2/petalinux_2019_1_allif/images/linux/system.bit to the target.

Multiple FPGA devices found, please use targets command to select one of: 1, 11
invoked from within
"::tcf::eval -progress ::xsdb::print_progress {::tcf::cache_enter tcfchan#0 {tcf_cache_eval {process_tcf_actions_cache_client ::tcfclient#0::arg}}}"
(procedure "::tcf::cache_eval_with_progress" line 2)
invoked from within

...

0 Kudos
Reply
blynskey_thinci
Observer
Observer
841 Views
Registered: ‎07-25-2018

In the same HW system (two MPSoCs in the JTAG chain), I've found that SDK cannot program the 2nd MPSoC, when I try to debug  a bare-metal application.

 

I have to use Vivado HW MAnager to program the FPGA, but then when I return to SDK to run a Debug session, it's not clear that the correct MPSoC is targeted. I see no activity on the MIO pins.

 

 - Brendan

0 Kudos
Reply