cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
saini
Adventurer
Adventurer
1,831 Views
Registered: ‎02-12-2020

Cortex-A53 #0 (target 9) Stopped at 0x0 (Cannot resume. Cannot read 'pc'. Cannot read 'r0'. Instruction transfer timeout)

Jump to solution

Hi Everyone,

First of all, After a quick google, I came know this question has been asked about 3 times and I tried every solution provided in those questions. 

I am using vivado and vitis 2019.2. If I try to program my fpga I got this error: Cortex-A53 #0 (target 9) Stopped at 0x0 (Cannot resume. Cannot read 'pc'. Cannot read 'r0'. Instruction transfer timeout). 

Log files can be found in attachments.

How can I resolve this issue?

Any help would be appreciated.

With Regards,

Saini

0 Kudos
1 Solution

Accepted Solutions
stephenm
Moderator
Moderator
1,636 Views
Registered: ‎09-12-2007

Clue 1: The debugger couldn't execute the code from 0x0 (your DDR)

Clue 2: Everything worked when you used another memory

Clue 3: Engineers put more effort into layout than config settings

 

View solution in original post

0 Kudos
13 Replies
saini
Adventurer
Adventurer
1,765 Views
Registered: ‎02-12-2020

Hi all,

If followed these steps :

xsct% INFO: [Hsi 55-2053] elapsed time for repository (C:/Xilinx/Vitis/2019.2/data\embeddedsw) loading 3 seconds
connect
attempting to launch hw_server

****** Xilinx hw_server v2019.2
  **** Build date : Nov  6 2019 at 22:12:23
    ** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

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



****** Xilinx hw_server v2019.2

  **** Build date : Nov  6 2019 at 22:12:23

    ** 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



tcfchan#1
xsct% targets
  1  whole scan chain (board power off)
xsct% targets
  2  PS TAP
     3  PMU
     4  PL
  6  PSU
     7  RPU (Reset)
        8  Cortex-R5 #0 (RPU Reset)
        9  Cortex-R5 #1 (RPU Reset)
    10  APU (L2 Cache Reset)
       11  Cortex-A53 #0 (APU Reset)
       12  Cortex-A53 #1 (APU Reset)
       13  Cortex-A53 #2 (APU Reset)
       14  Cortex-A53 #3 (APU Reset)
xsct% source C:/Xilinx/Vitis/2019.2/scripts/vitis/util/zynqmp_utils.tcl
xsct% targets -set 5
xsct% Code 16 Time 1585397294047 Format {Invalid context}

targets -set 6
xsct% rst -system
xsct% after 3000
xsct% target -set 4
xsct% fpga -file C:/Test_fd/SF/HDMI_frm_bffr/HDMI_frame_buffer_wrapper.bit

initializing
  0%    0MB   0.0MB/s  ??:?? ETA
  5%    1MB   2.2MB/s  ??:?? ETA
 10%    1MB   1.9MB/s  ??:?? ETA
 14%    2MB   1.8MB/s  ??:?? ETA
 19%    3MB   1.7MB/s  ??:?? ETA
 24%    4MB   1.8MB/s  ??:?? ETA
 29%    5MB   1.7MB/s  00:07 ETA
 34%    6MB   1.7MB/s  00:07 ETA
 38%    7MB   1.7MB/s  00:06 ETA
 43%    8MB   1.7MB/s  00:06 ETA
 48%    8MB   1.7MB/s  00:05 ETA
 53%    9MB   1.7MB/s  00:05 ETA
 58%   10MB   1.7MB/s  00:04 ETA
 62%   11MB   1.7MB/s  00:04 ETA
 66%   12MB   1.7MB/s  00:03 ETA
 72%   13MB   1.7MB/s  00:03 ETA
 76%   14MB   1.7MB/s  00:02 ETA
 81%   15MB   1.7MB/s  00:02 ETA
 86%   15MB   1.7MB/s  00:01 ETA
 91%   16MB   1.7MB/s  00:00 ETA
 96%   17MB   1.7MB/s  00:00 ETA
100%   18MB   1.7MB/s  00:11    
xsct% target -set 10
xsct% source C:/Test_fd/SF/HDMI_frm_bffr/ws/hdmi/hw/psu_init.tcl
xsct% psu_init
xsct% after 1000
xsct% psu_ps_pl_isolation_removal
xsct% after 1000
xsct% psu_ps_pl_reset_config
xsct% catch {psu_protection}
0
xsct% target -set 11
xsct% rst -processor
xsct% Info: Cortex-A53 #0 (target 11) Stopped at 0xffff0000 (Reset Catch)
xsct% dow C:/Test_fd/SF/HDMI_frm_bffr/ws/lucky/Debug/l.elf

Downloading Program -- C:/Test_fd/SF/HDMI_frm_bffr/ws/lucky/Debug/l.elf
	section, .text: 0x00000000 - 0x00001523
	section, .init: 0x00001540 - 0x00001573
	section, .fini: 0x00001580 - 0x000015b3
	section, .note.gnu.build-id: 0x000015b4 - 0x000015d7
	section, .rodata: 0x000015d8 - 0x00001677
	section, .rodata1: 0x00001678 - 0x0000167f
	section, .sdata2: 0x00001680 - 0x0000167f
	section, .sbss2: 0x00001680 - 0x0000167f
	section, .data: 0x00001680 - 0x00001e37
	section, .data1: 0x00001e38 - 0x00001e3f
	section, .ctors: 0x00001e40 - 0x00001e3f
	section, .dtors: 0x00001e40 - 0x00001e3f
	section, .eh_frame: 0x00001e40 - 0x00001e43
	section, .mmu_tbl0: 0x00002000 - 0x0000200f
	section, .mmu_tbl1: 0x00003000 - 0x00004fff
	section, .mmu_tbl2: 0x00005000 - 0x00008fff
	section, .preinit_array: 0x00009000 - 0x00008fff
	section, .init_array: 0x00009000 - 0x00009007
	section, .fini_array: 0x00009008 - 0x00009047
	section, .sdata: 0x00009048 - 0x0000907f
	section, .sbss: 0x00009080 - 0x0000907f
	section, .tdata: 0x00009080 - 0x0000907f
	section, .tbss: 0x00009080 - 0x0000907f
	section, .bss: 0x00009080 - 0x000090bf
	section, .heap: 0x000090c0 - 0x0000b0bf
	section, .stack: 0x0000b0c0 - 0x0000e0bf

  0%    0MB   0.0MB/s  ??:?? ETA
100%    0MB   0.1MB/s  00:00    

Setting PC to Program Start Address 0x00000000
Successfully downloaded C:/Test_fd/SF/HDMI_frm_bffr/ws/lucky/Debug/.elf
xsct% con
Info: Cortex-A53 #0 (target 11) Running

It succeed, but using this I cannot see Hello world in serial window.

But if directly program it using Run as --> Launch on hardware. then I am getting the same error.

I am not getting further with this error. Please help.

Any ideas?

With regards,

Saini

0 Kudos
stephenm
Moderator
Moderator
1,725 Views
Registered: ‎09-12-2007

The problem is the code you are trying to execute on the cortex a53 is at address 0x0:

xsct% Info: Cortex-A53 #0 (target 9) Stopped at 0xfffd4300 (Breakpoint)
xsct% Info: Cortex-A53 #0 (target 9) Running
xsct%
Downloading Program -- C:/Test_fd/SF/HDMI_frm_bffr/ws/hdmi_app/Debug/hdmi_app.elf
section, .text: 0x00000000 - 0x0000f493
section, .init: 0x0000f4c0 - 0x0000f4f3
section, .fini: 0x0000f500 - 0x0000f533

 

The debugger will read the address to be executed from the ELF and set the PC accordingly.

Is this correct? Have you an AXI BRAM controller in the PL at 0x0? If not, then change the linker 

address to fix this (DDR or OCM), and try again

0 Kudos
saini
Adventurer
Adventurer
1,709 Views
Registered: ‎02-12-2020

Hi @stephenm ,

Thank you for your guidance.

Is this correct? Have you an AXI BRAM controller in the PL at 0x0?

No, I am not using AXI BRAM controller.

If not, then change the linker address to fix this (DDR or OCM), and try again.

Yes, I checked then I find out that DDR was at 0x0 location. But even after changing it I am not able to run it and getting the same error.

Please see the screen shot of my address additor. 

 

address.PNG

Is still something is wrong? But now nothing is at 0x0 address.

With Regards,

Saini

0 Kudos
stephenm
Moderator
Moderator
1,700 Views
Registered: ‎09-12-2007

Can you change the linker to OCM and try again?

 

If this works, can you try a DDR test?

0 Kudos
saini
Adventurer
Adventurer
1,688 Views
Registered: ‎02-12-2020

Hi @stephenm ,

I tried by changing the OCM/DDR in linker script with some random values: ...............{vitis_ws}/{app_name}/src/lscript.ld

But the result is same.

Original: 

MEMORY
{
   psu_ddr_0_MEM_0 : ORIGIN = 0x0, LENGTH = 0x7FF00000
   psu_ddr_1_MEM_0 : ORIGIN = 0x800000000, LENGTH = 0x80000000
   psu_ocm_ram_0_MEM_0 : ORIGIN = 0xFFFC0000, LENGTH = 0x40000
   psu_qspi_linear_0_MEM_0 : ORIGIN = 0xC0000000, LENGTH = 0x20000000
}

Whatever value I change in origin of psu_ddr_0_MEM_0 or psu_ocm_ram_0_MEM_0, but the result is still the same.

Do you know What could I be doing wrong?

With regards,

Saini

0 Kudos
stephenm
Moderator
Moderator
1,683 Views
Registered: ‎09-12-2007

I mean place all the sections into the OCM in your linker

0 Kudos
saini
Adventurer
Adventurer
1,660 Views
Registered: ‎02-12-2020

Hi @stephenm ,

It worked with changing linker to OCM. As you mentioned before, I have also did one memory test and the result of it can be found below:

memorytest.PNG

Do I always need to run this way by using ocm instead of ddr? What if I want to use ddr?

With Regards,

Saini

0 Kudos
stephenm
Moderator
Moderator
1,653 Views
Registered: ‎09-12-2007

I suspect that there is an issue with your DDR config settings

0 Kudos
saini
Adventurer
Adventurer
1,643 Views
Registered: ‎02-12-2020

Hi @stephenm ,

Thank you for your help. Yes, there was some issues with DDR config settings and now its working.

If you have some time, could you please explain your thought process how you narrowed down this error to DDR config settings?

It will also beneficial for beginner like me.

With Regards,

Saini

0 Kudos
stephenm
Moderator
Moderator
1,637 Views
Registered: ‎09-12-2007

Clue 1: The debugger couldn't execute the code from 0x0 (your DDR)

Clue 2: Everything worked when you used another memory

Clue 3: Engineers put more effort into layout than config settings

 

View solution in original post

0 Kudos
stephenm
Moderator
Moderator
1,635 Views
Registered: ‎09-12-2007

 Also, can you mark this as solved?

0 Kudos
geck4031
Visitor
Visitor
1,403 Views
Registered: ‎05-12-2020

Hi,

as Saini I am also stuck while trying the simple HelloWorld application.
As you suggested I replaced all sections into the OCM in my linker.

But still I get the same error message.
Here the XSCT terminal:

initializing
0% 0MB 0.0MB/s ??:?? ETA
19% 1MB 2.1MB/s ??:?? ETA
35% 1MB 1.9MB/s ??:?? ETA
51% 2MB 1.8MB/s ??:?? ETA
66% 3MB 1.7MB/s ??:?? ETA
85% 4MB 1.7MB/s ??:?? ETA
100% 5MB 1.7MB/s 00:03
Info: Cortex-A53 #0 (target 10) Running
xsct%
Downloading Program -- D:/Mercury_XU5_PE1_CG_EG/Mercury_XU5_PE1/HelloWorld2/Debug/HelloWorld2.elf
section, .text: 0xfffc0000 - 0xfffc1523
section, .init: 0xfffc1540 - 0xfffc1573
section, .fini: 0xfffc1580 - 0xfffc15b3
section, .note.gnu.build-id: 0xfffc15b4 - 0xfffc15d7
section, .rodata: 0xfffc15d8 - 0xfffc1677
section, .rodata1: 0xfffc1678 - 0xfffc167f
section, .sdata2: 0xfffc1680 - 0xfffc167f
section, .sbss2: 0xfffc1680 - 0xfffc167f
section, .data: 0xfffc1680 - 0xfffc1e37
section, .data1: 0xfffc1e38 - 0xfffc1e3f
section, .ctors: 0xfffc1e40 - 0xfffc1e3f
section, .dtors: 0xfffc1e40 - 0xfffc1e3f
section, .eh_frame: 0xfffc1e40 - 0xfffc1e43
section, .mmu_tbl0: 0xfffc2000 - 0xfffc200f
section, .mmu_tbl1: 0xfffc3000 - 0xfffc4fff
section, .mmu_tbl2: 0xfffc5000 - 0xfffc8fff
section, .preinit_array: 0xfffc9000 - 0xfffc8fff
section, .init_array: 0xfffc9000 - 0xfffc9007
section, .fini_array: 0xfffc9008 - 0xfffc9047
section, .sdata: 0xfffc9048 - 0xfffc907f
section, .sbss: 0xfffc9080 - 0xfffc907f
section, .tdata: 0xfffc9080 - 0xfffc907f
section, .tbss: 0xfffc9080 - 0xfffc907f
section, .bss: 0xfffc9080 - 0xfffc90bf
section, .heap: 0xfffc90c0 - 0xfffe20bf
section, .stack: 0xfffe20c0 - 0xffffc0bf

0% 0MB 0.0MB/s ??:?? ETA
100% 0MB 0.2MB/s 00:00

Setting PC to Program Start Address 0xfffc0000
Successfully downloaded D:/Mercury_XU5_PE1_CG_EG/Mercury_XU5_PE1/HelloWorld2/Debug/HelloWorld2.elf
Info: Cortex-A53 #0 (target 10) Stopped at 0xffff0000 (Reset Catch)
Info: Cortex-A53 #0 (target 10) Running
xsct% Info: Cortex-A53 #0 (target 10) Stopped at 0x0 (Cannot resume. Cannot read 'pc'. Cannot read 'r0'. Instruction transfer timeout)
xsct% Info: Cortex-A53 #0 (target 10) Running
Info: Cortex-A53 #0 (target 10) Stopped at 0x0 (Cannot resume. Cannot read 'pc'. Cannot read 'r0'. Instruction transfer timeout)
xsct%

0 Kudos
leeu
Newbie
Newbie
797 Views
Registered: ‎12-28-2020

I have the same problem.

if I do not use FSBL, it can work.

When I use FSBL in debug configuration, it cann't debug.

the logs have three error:

1. WARN   : Exit breakpoint of FSBL (XFsbl_Exit) is not hit within allocated wait time of '60' seconds

2. Cannot resume. Cannot read 'pc'. Cannot read 'r0'. Instruction transfer timeout

3. Memory write error at 0x0. Instruction transfer timeout

0 Kudos