Hi @sinanakman,
Thank you for your response. Below are the steps I am using to communicate JLink Plus with i.MX8MQ via OpenOCD:
- sudo openocd -f interface/jlink.cfg -f board/nxp_mcimx8m-evk.cfg [cloned and compiled openocd]
- . environment-setup-aarch64-poky-linux [toolchain setup for target]
Start GDB Client
- aarch64-poky-linux-gdb vmlinux
- set directories linux-imx
- target extended-remote localhost:3333
After this JTAG is connected and i.MX8MQ system halts with GDB logs : "0x000000000091577c in ?? ()". After this, if I provide continue command using gdb, the i.MX8MQ system resumes from halt state.
Now, in order to set any breakpoint, I again kept the system into a halt state and provided the "b cpu_suspend" command in gdb. It is able to set the breakpoint with gdb logs "Breakpoint 1 at 0xffff80001009d270: file /usr/src/kernel/arch/arm64/kernel/suspend.c, line 87". However, I am not able to resume the system from halt state if I provide any breakpoints. While giving "continue" command after setting breakpoints:
GDB Error:
Cannot insert breakpoint 1.
Cannot access memory at address 0xffff80001009d270
OpenOCD Error:
Debug: 9657 26077 gdb_server.c:3272 gdb_input_inner(): received packet: 'mffff80001009d270,4'
Debug: 9658 26077 gdb_server.c:1463 gdb_read_memory_packet(): addr: 0xffff80001009d270, len: 0x00000004
Debug: 9659 26077 target.c:2431 target_read_buffer(): reading buffer of 4 byte at 0xffff80001009d270
Debug: 9696 26079 aarch64.c:2062 aarch64_read_cpu_memory(): Reading CPU memory address 0xffff80001009d270 size 4 count 1
Error: 9859 26090 aarch64.c:2132 aarch64_read_cpu_memory(): abort occurred - dscr = 0x03007f53
Debug: 9986 26095 armv8_dpm.c:1345 armv8_dpm_handle_exception(): Exception taken to EL 3, DLR=0x0000000000919800 DSPSR=0x600002cc
Debug: 9987 26095 armv8_dpm.c:560 armv8_dpm_modeswitch(): restoring mode, cpsr = 0x600002cc
I believe there is some problem with accessing the memory. Also, below is the hwstatus of i.MX8MQ.
(gdb) monitor jlink hwstatus
VTarget = 3.328 V
TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 1 TRST = 1
Can you please suggest what could be the issue here? Any approaches will be appreciated.
Regards,
Kunal