OCRAM target memory fault

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

OCRAM target memory fault

1,558 次查看
Tao2022
Contributor III

We have a customized LS1043a board, being having problem debug "Hello world" project on it with CodeWarrior (connected via CW Tap). To narrow out the incorrect DDR initialization possibility, I modified LCF (  aarch64elf.x) to make the code to be downloaded to OCRAM to run(following NXP Document AN5346.pdf), but it still complains "target memory fault.....".

I wonder there is something there to stop the elf to be debugged by CodeWarrior, doesn't matter where the elf is downloaded. Have being hanging here for a week, Please, anyone have any suggestion will be deeply appreciated.

Here is my GDB traces (with errors in red font):

315,856 2-list-thread-groups
315,856 3-gdb-version
315,856 2^done,groups=[{id="i1",type="process"}]
315,856 (gdb)
315,857 ~"GNU gdb (GDB) 7.11.1.0.05c0cb6-b200311 (NXP Semiconductors)\n"
315,857 ~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
315,857 ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is fre\
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt\
ed by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
315,857 ~"This GDB was configured as \"--host=x86_64-linux-gnu --target=aarch64-fsl-linux\".\nType \\
"show configuration\" for configuration details."
315,857 ~"\nFor bug reporting instructions, please see:\n"
315,857 ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
315,857 ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/soft\
ware/gdb/documentation/>.\n"
315,857 ~"For help, type \"help\".\n"
315,857 ~"Type \"apropos word\" to search for commands related to \"word\".\n"
315,857 3^done
315,857 (gdb)
315,858 4-environment-cd /home/tao/eclipse-workspace2/Hello2
315,858 4^done
315,858 (gdb)
315,858 5-gdb-set breakpoint pending on
315,858 5^done
315,858 (gdb)
315,858 6-enable-pretty-printing
315,858 6^done
315,858 (gdb)
315,858 7-gdb-set python print-stack none
315,858 7^done
315,859 (gdb)
315,859 8-gdb-set print object on
315,859 8^done
315,859 (gdb)
315,859 9-gdb-set print sevenbit-strings on
315,859 9^done
315,859 (gdb)
315,859 10-gdb-set charset ISO-8859-1
315,859 10^done
315,859 (gdb)
315,859 11-gdb-set dprintf-style gdb
315,859 11^done
315,859 (gdb)
315,860 12source /home/tao/Freescale/CW4NET_v2020.06/CW_ARMv8/eclipse/../ARMv8/gdb/bin/.gdbinit
315,860 &"source /home/tao/Freescale/CW4NET_v2020.06/CW_ARMv8/eclipse/../ARMv8/gdb/bin/.gdbinit\n"
315,909 =cmd-param-changed,param="pagination",value="off"
315,909 =cmd-param-changed,param="logging file",value="/dev/null"
315,909 =cmd-param-changed,param="logging redirect",value="on"
315,916 =cmd-param-changed,param="logging redirect",value="off"
315,936 12^done
315,936 (gdb)
315,936 13-gdb-set auto-solib-add on
315,936 13^done
315,936 (gdb)
315,938 14symbol-file /home/tao/eclipse-workspace2/Hello2/Debug/Hello2.elf

315,938 &"symbol-file /home/tao/eclipse-workspace2/Hello2/Debug/Hello2.elf\n"
315,939 ~"Reading symbols from /home/tao/eclipse-workspace2/Hello2/Debug/Hello2.elf..."
315,940 ~"done.\n"
315,940 14^done
315,940 (gdb)
315,940 &"\n"
315,940 ^done
315,940 (gdb)
315,949 15-interpreter-exec console "cd /home/tao/Freescale/CW4NET_v2020.06/CW_ARMv8/ARMv8"
315,950 16-interpreter-exec console "dir \"/home/tao/Freescale/CW4NET_v2020.06/CW_ARMv8/ARMv8/gdb_ex\
tensions\""
315,950 17-interpreter-exec console "source -s register_cw_extensions.py"
315,950 18-interpreter-exec console "cw-launch --config \"/home/tao/eclipse-workspace2/.metadata/.pl\
ugins/com.freescale.debug.tcc/.local_tcc/RX14xx.tcc\" --properties \"/tmp/parameters5479143072964425\
662.json\" --ccs-address auto --dont-start-gta"
315,950 ~"Working directory /home/tao/Freescale/CW4NET_v2020.06/CW_ARMv8/ARMv8.\n"
315,950 15^done
315,950 (gdb)
315,950 ~"Source directories searched: /home/tao/Freescale/CW4NET_v2020.06/CW_ARMv8/ARMv8/gdb_extens\
ions:$cdir:$cwd\n"
315,950 16^done
315,950 (gdb)
315,967 17^done
315,967 (gdb)
315,974 =cmd-param-changed,param="remotetimeout",value="10"
315,977 ~"Configuring the debug probe\n"
315,977 ~"Connecting to LS1043A\n"
315,977 =cmd-param-changed,param="remotetimeout",value="100"
318,029 @" connected successfully\n"
318,029 ~"Execute target initialization...\n"
321,646 ~"The target is assumed to be little endian\n"
321,646 =cmd-param-changed,param="endian",value="little"
321,646 ~"Set executable \"/home/tao/eclipse-workspace2/Hello2/Debug/Hello2.elf\"\n"
321,646 ~"Attaching to LS1043A\n"
321,666 =thread-group-started,id="i1",pid="1"
321,666 =thread-created,id="1",group-id="i1"
321,673 19-list-thread-groups
321,727 ~"\nProgram"
321,727 ~" received signal SIGINT, Interrupt.\n"
321,727 ~"[Switching to Thread 1]\n"
321,727 ~"0x0000000000000000 in ?? ()\n"
321,727 *stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={add\
r="0x0000000000000000",func="??",args=[]},thread-id="1",stopped-threads="all",core="0"
321,778 18^done
321,778 (gdb)
321,778 19^done,groups=[{id="i1",type="process",pid="1",executable="/home/tao/eclipse-workspace2/Hel\
lo2/Debug/Hello2.elf",cores=["0"]}]
321,778 (gdb)
321,778 20load /home/tao/eclipse-workspace2/Hello2/Debug/Hello2.elf

321,778 &"load /home/tao/eclipse-workspace2/Hello2/Debug/Hello2.elf \n"
321,778 ~"Loading section .vectors, size 0x888 lma 0x10000000\n"
321,780 21-list-thread-groups i1
321,891 20+download,{section=".vectors",section-size="2184",total-size="81044"}
321,892 20+download,{section=".vectors",section-sent="2184",section-size="2184",total-sent="2184",to\
tal-size="81044"}
321,892 ~"Loading section .text, size 0x1e3c lma 0x10000900\n"
322,088 20+download,{section=".text",section-size="7740",total-size="81044"}
322,268 ~"Loading section .jumpstart, size 0xc lma 0x1000273c\n"
322,281 20+download,{section=".jumpstart",section-size="12",total-size="81044"}
322,282 ~"Loading section .rodata, size 0x8 lma 0x10002748\n"
322,293 20+download,{section=".rodata",section-size="8",total-size="81044"}
322,294 ~"Loading section .eh_frame, size 0x4 lma 0x10002750\n"
322,305 20+download,{section=".eh_frame",section-size="4",total-size="81044"}
322,305 ~"Loading section .data, size 0x57a0 lma 0x10014000\n"
322,503 20+download,{section=".data",section-size="22432",total-size="81044"}
322,503 20+download,{section=".data",section-sent="4096",section-size="22432",total-sent="14044",tot\
al-size="81044"}
323,101 20+download,{section=".data",section-sent="16384",section-size="22432",total-sent="26332",to\
tal-size="81044"}
323,400 ~"Start address 0x10000e00, load size 32380\n"
323,402 ~"Transfer rate: 19 KB/sec, 2698 bytes/write.\n"
323,420 20^done
323,420 (gdb)
323,420 &"\n"
323,420 ^done
323,420 (gdb)
323,420 21^done,threads=[{id="1",target-id="Thread 1",frame={level="0",addr="0x0000000010000e00",fun\
c="__start",args=[],file="../src/start.S",fullname="/home/tao/eclipse-workspace2/Hello2/src/start.S"\
,line="113"},state="stopped",core="0"}]
323,420 (gdb)
323,421 22-interpreter-exec console "exec-file \"/home/tao/eclipse-workspace2/Hello2/Debug/Hello2.el\
f\""
323,422 23-interpreter-exec console compare-sections
323,422 ~"A program is being debugged already.\nAre you sure you want to change the file? "
323,422 ~"(y or n) [answered Y; input not from terminal]\n"
323,422 24-stack-info-depth --thread 1 11
323,473 22^done
323,473 (gdb)
323,474 25-gdb-show --thread-group i1 language
323,517 &"target memory fault, section .vectors, range 0x10000000 -- 0x10000888\n"
323,518 23^error,msg="target memory fault, section .vectors, range 0x10000000 -- 0x10000888"
323,518 (gdb)
323,518 24^done,depth="1"
323,519 (gdb)
323,519 25^done,value="auto"
323,519 (gdb)
323,520 26-gdb-set --thread-group i1 language c
323,521 ~"Warning: the current language does not match this frame.\n"
323,521 26^done
323,521 (gdb)
323,522 27-interpreter-exec --thread-group i1 console "p/x (char)-1"
323,523 ~"$1 = 0xff\n"
323,523 27^done
323,523 (gdb)
323,524 28-data-evaluate-expression --thread-group i1 "sizeof (void*)"
323,525 28^done,value="8"
323,525 (gdb)
323,526 29-gdb-set --thread-group i1 language auto
323,526 29^done
323,526 (gdb)
323,527 30-interpreter-exec --thread-group i1 console "show endian"
323,527 ~"The target is assumed to be little endian\n"
323,527 30^done
323,528 (gdb)
323,546 31-break-insert -f /home/tao/eclipse-workspace2/Hello2/src/main.c:59
323,546 32-break-insert -f /home/tao/eclipse-workspace2/Hello2/src/main.c:60
323,551 31^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000010000d28"\
,func="main",file="../src/main.c",fullname="/home/tao/eclipse-workspace2/Hello2/src/main.c",line="59\
",thread-groups=["i1"],times="0",original-location="/home/tao/eclipse-workspace2/Hello2/src/main.c:5\
9"}
323,552 (gdb)
323,557 32^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0x0000000010000d2c"\
,func="main",file="../src/main.c",fullname="/home/tao/eclipse-workspace2/Hello2/src/main.c",line="60\
",thread-groups=["i1"],times="0",original-location="/home/tao/eclipse-workspace2/Hello2/src/main.c:6\
0"}
323,557 (gdb)
323,558 33-break-insert -t main

323,564 33^done,bkpt={number="3",type="breakpoint",disp="del",enabled="y",addr="0x0000000010000d28",\
func="main",file="../src/main.c",fullname="/home/tao/eclipse-workspace2/Hello2/src/main.c",line="59"\
,thread-groups=["i1"],times="0",original-location="main"}
323,564 (gdb)
323,564 &"\n"
323,564 ^done
323,564 (gdb)
323,564 34-exec-continue

323,564 34^running
323,564 *running,thread-id="all"
323,564 (gdb)
323,594 &"Warning:\n"
323,594 &"Cannot insert breakpoint 1.\n"
323,594 &"Cannot access memory at address 0x10000d28\n"
323,594 &"Cannot insert breakpoint 2.\n"
323,594 &"Cannot access memory at address 0x10000d2c\n"
323,594 &"\n"
323,594 34^error,msg="Command aborted."
323,594 &"\n"
324,078 35-thread-select 1
324,079 36-trace-status
324,080 37-thread-select 1
428,152 ^done
428,152 35^done,new-thread-id="1",frame={level="0",addr="0x0000000010000e00",func="__start",args=[],\
file="../src/start.S",fullname="/home/tao/eclipse-workspace2/Hello2/src/start.S",line="113"}
428,152 38-thread-select 1
428,152 36^done,supported="0"
428,152 37^done,new-thread-id="1",frame={level="0",addr="0x0000000010000e00",func="__start",args=[],\
file="../src/start.S",fullname="/home/tao/eclipse-workspace2/Hello2/src/start.S",line="113"}
428,153 &"Quit\n"
428,154 38^done,new-thread-id="1",frame={level="0",addr="0x0000000010000e00",func="__start",args=[],\
file="../src/start.S",fullname="/home/tao/eclipse-workspace2/Hello2/src/start.S",line="113"}
428,154 (gdb)
431,789 39-interpreter-exec --thread-group i1 console kill
431,789 &"Quit\n"
431,789 ~"Kill the program being debugged? (y or n) [answered Y; input not from terminal]\n"
431,804 =thread-exited,id="1",group-id="i1"
431,804 =thread-group-exited,id="i1"
431,804 39^done
431,804 (gdb)
431,807 40-data-evaluate-expression $_exitcode
431,808 40^done,value="void"
431,808 (gdb)
431,819 41-trace-status
431,820 41^done,supported="0"
431,820 (gdb)
432,306 42-gdb-exit
432,307 42^exit

 

0 项奖励
回复
2 回复数

1,529 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to "9.2 Connection diagnostics" section in C:\Freescale\CW4NET_v2020.06\CW_ARMv8\ARMv8\Help\PDF\ARMv8_Targeting_Manual.pdf to perform diagnostics task on your custom board.

In this diagnostics task, "Test OCRAM memory access" action is performed.

0 项奖励
回复

1,518 次查看
Tao2022
Contributor III

Hi, Yiping, thanks for replying my post. I went through the connection diagnose, it shows  "Test OCRAM memory access" successfully tested address 0x10000000.

Tao2022_0-1659621271825.png

 

0 项奖励
回复