Xuan Hu

Results 12 comments of Xuan Hu

Thank you for your bug report, we are handling this.

dmode在非debug模式不可写,保证了不接外部调试器的时候trigger都不会进入debug模式。hart处在debug模式必须有外部调试器配合。在m态通过指令写tdata1.dmode=1,再把hart交给外部调试器,在没有外部调试器的时候hart会表现为卡死。这样,任何m态程序都有主动让hart卡死的能力。 通过trigger进入Debug模式正确的用法是, 1. 连接外部调试器,让hart通过debug中断进入debug模式; 2. 设置trigger并把dmode置1; 3. 触发trigger并在debug模式响应。 [TRANSLATION] dmode is not writable in non-debug mode, which ensures that trigger will never go into debug mode without an external debugger....

把sysbus改成progbuf试试,sysbus读写有点问题 [TRANSLATION] Try changing sysbus to progbuf. There is something wrong with reading and writing sysbus

另外,请用reset halt代替halt,这样可以让核心停在第一条指令执行之前 [TRANSLATION] Also, replace halt with reset halt, which stops the core before the first instruction is executed

附上我们使用的openocd.cfg ```cfg adapter speed 10000 adapter driver remote_bitbang remote_bitbang host localhost remote_bitbang port 23334 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen 5 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME riscv...

我们最近有同事走了一遍流程,没遇到问题。openocd没有特殊的配置,用的是 [riscv-openocd](https://github.com/riscv/riscv-openocd) 你可以忽略读0x0这个地址的报错,继续往后调试,因为这可能是riscv-openocd或者riscv-gdb抽风,正常情况下不会有读这个地址的需求。 在openocd的启动命令里指定debug_level=3可以输出更详细的log,从log里你应该可以观察到gdb发出了扫描寄存器的请求,耐心等待扫描完pc和32个通用寄存器后,gdb就可以工作了。 [TRANSLATION] One of our colleagues recently went through the process and had no problems. openocd has no special configuration; it uses [riscv-openocd](https://github.com/riscv/riscv-openocd) You can ignore the...

> 方便的话可以看看你们 gdb 端的情况吗,我每次都是打完一个断点,然后运行命令 c 就卡死了。 ```gdb $ riscv64-unknown-elf-gdb ../nexus-am/apps/jtag_debug/build/jtag_debug-riscv64-xs-flash.elf GNU gdb (GDB) 10.1 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This...

> > 我们最近有同事走了一遍流程,没遇到问题。openocd没有特殊的配置,用的是 [riscv-openocd](https://github.com/riscv/riscv-openocd) > > 你可以忽略读0x0这个地址的报错,继续往后调试,因为这可能是riscv-openocd或者riscv-gdb抽风,正常情况下不会有读这个地址的需求。 > > 在openocd的启动命令里指定debug_level=3可以输出更详细的log,从log里你应该可以观察到gdb发出了扫描寄存器的请求,耐心等待扫描完pc和32个通用寄存器后,gdb就可以工作了。 > > 读寄存器的过程 > > ``` > > Debug: 1188 38712 riscv-013.c:4066 riscv013_get_register(): [riscv.cpu] reading register zero > > Debug:...

> 方便的话可以看看你们 gdb 端的情况吗,我每次都是打完一个断点,然后运行命令 c 就卡死了。 请用`info b`检查断点的类型,看看是硬件断点还是软件断点的问题 [TRANSLATION] Check the type of breakpoint with info b to see if it is a hardware or software breakpoint problem

> 你好,我调试是使用emu dump 波形命令,没有波形生成。命令如下: build/emu --flash jtag_debug -i anything --no-diff --enable-jtag -b 0 -e 150000 --max-cycles=150000 --force-dump-result --dump-wave --wave-path ../1.vcd 你好,麻烦在编译的时候加上`EMU_TRACE=1` 比如 ```bash make emu -j64 EMU_THREADS=16 EMU_TRACE=1 ```