RISC-V MCU中文社区

【求助】 求助 调试器连不上目标板

发表于 开源蜂鸟E203 2024-10-14 13:53:52
10
1123
0

在linux使用HUMMINGGBIRD Debugger Kit V2 连接目标板上e203提示出错如下:
(hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# make upload SOC=hbirdv2 BOARD=ddr200t CORE=e203 DOWNLOAD=ilm
Download and run helloworld.elf
riscv64-unknown-elf-gdb helloworld.elf -ex “set remotetimeout 240” \
-ex “target remote | openocd -c \”gdb_port pipe; log_output openocd.log\” -f ../../../SoC/hbirdv2/Board/ddr200t/openocd_hbirdv2.cfg” \
—batch -ex “monitor reset halt” -ex “load” -ex “monitor resume” -ex “quit”
Open On-Chip Debugger 0.11.0+dev-02400-g1dac85c02 (2024-06-26-07:32)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Remote communication error. Target disconnected.: Connection reset by peer.
“monitor” command not supported by this target.
You can’t do that when your target is `exec’
“monitor” command not supported by this target
找不到目标板上的器件,底层跟踪如下各管脚时序如下:
图片alt
请问一下大神们,正确的时序应是怎么样的?忘指导一下,不甚感激!
各管脚时序图

喜欢0
用户评论 (10)
  • 陈周鹏

    2024-10-15 09:35:54 陈周鹏 1#

    dongyong

    是的 是这个问题 探测flash失败了. Nuclei SPI controller version 0x00000000, all 0


    那你手动改下这个配置文件 openocd -c "gdb_port 3333" -f ../../../SoC/hbirdv2/Board/ddr200t/openocd_hbirdv2.cfg


    找到下面flash的地方 注释掉试试



    if { [ info exists NOFLASH ] } {

        puts "No flash bank is set"

    } else {

        set _FLASHNAME $_CHIPNAME.flash

        if { $BDTYPE eq "rvstar" } {

            flash bank $_FLASHNAME gd32vf103 0x08000000 0 0 0 $_TARGETHARTNAME

        } else {

            flash bank $_FLASHNAME nuspi 0x20000000 0 0 0 $_TARGETHARTNAME

        }

    }

    谢谢 dongyong

    HummingBird SDK Build Time: Sep 27 2024, 06:44:17
    Download Mode: FLASHXIP
    CPU Frequency 16055664 Hz
    MISA: 0x40001105
    MISA: RV32IMAC
    0: c Hello World From RISC-V Processor!
    1: c Hello World From RISC-V Processor!
    2: c Hello World From RISC-V Processor!
    3: c Hello World From RISC-V Processor!
    4: c Hello World From RISC-V Processor!
    5: c Hello World From RISC-V Processor!
    6: c Hello World From RISC-V Processor!
    7: c Hello World From RISC-V Processor!
    8: c Hello World From RISC-V Processor!
    9: c Hello World From RISC-V Processor!
    10: c Hello World From RISC-V Processor!
    11: c Hello World From RISC-V Processor!
    12: c Hello World From RISC-V Processor!
    13: c Hello World From RISC-V Processor!
    14: c Hello World From RISC-V Processor!
    15: c Hello World From RISC-V Processor!
    16: c Hello World From RISC-V Processor!
    17: c Hello World From RISC-V Processor!
    18: c Hello World From RISC-V Processor!
    19: c Hello World From RISC-V Processor!
    串口接收打印正确了!


  • 陈周鹏

    2024-10-14 17:25:51 陈周鹏 2#

    dongyong

    是的 是这个问题 探测flash失败了. Nuclei SPI controller version 0x00000000, all 0


    那你手动改下这个配置文件 openocd -c "gdb_port 3333" -f ../../../SoC/hbirdv2/Board/ddr200t/openocd_hbirdv2.cfg


    找到下面flash的地方 注释掉试试



    if { [ info exists NOFLASH ] } {

        puts "No flash bank is set"

    } else {

        set _FLASHNAME $_CHIPNAME.flash

        if { $BDTYPE eq "rvstar" } {

            flash bank $_FLASHNAME gd32vf103 0x08000000 0 0 0 $_TARGETHARTNAME

        } else {

            flash bank $_FLASHNAME nuspi 0x20000000 0 0 0 $_TARGETHARTNAME

        }

    }

    修改出现如下内容

    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# make SOC=hbirdv2 BOARD=ddr200t CORE=e203 DOWNLOAD=ilm run_openocd

    Start openocd server

    openocd -c "gdb_port 3333" -f ../../../SoC/hbirdv2/Board/ddr200t/openocd_hbirdv2.cfg

    Open On-Chip Debugger 0.11.0+dev-02400-g1dac85c02 (2024-06-26-07:32)

    Licensed under GNU GPL v2

    For bug reports, read

     http://openocd.org/doc/doxygen/bugs.html

    DEPRECATED! use 'adapter speed' not 'adapter_khz'

    DEPRECATED! use 'adapter driver' not 'interface'

    DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'

    DEPRECATED! use 'ftdi oscan1_mode' not 'ftdi_oscan1_mode'

    DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    Info : Using libusb driver

    Info : clock speed 1000 kHz

    Info : JTAG tap: riscv.cpu tap/device found: 0x1e200a6d (mfg: 0x536 (Nuclei System Technology Co Ltd), part: 0xe200, ver: 0x1)

    Info : Examined RISCV core; XLEN=32, misa=0x40001105

    [riscv.cpu] Target successfully examined.

    Info : starting gdb server for riscv.cpu on 3333

    Info : Listening on port 3333 for gdb connections

    Info : [riscv.cpu] Found 0 triggers

    Info : Listening on port 6666 for tcl connections

    Info : Listening on port 4444 for telnet connections

    Error: TDO seems to be stuck high.

    Error: TDO seems to be stuck high.

    Error: TDO seems to be stuck high.

    Error: TDO seems to be stuck high.

    Error: TDO seems to be stuck high.


  • dongyong

    2024-10-14 17:09:25 dongyong 3#

    陈周鹏

    因为我板上没有SPI FLASH,会是这个问题吗?其他也没什么好改的。

    是的 是这个问题 探测flash失败了. Nuclei SPI controller version 0x00000000, all 0


    那你手动改下这个配置文件 openocd -c "gdb_port 3333" -f ../../../SoC/hbirdv2/Board/ddr200t/openocd_hbirdv2.cfg


    找到下面flash的地方 注释掉试试



    if { [ info exists NOFLASH ] } {

        puts "No flash bank is set"

    } else {

        set _FLASHNAME $_CHIPNAME.flash

        if { $BDTYPE eq "rvstar" } {

            flash bank $_FLASHNAME gd32vf103 0x08000000 0 0 0 $_TARGETHARTNAME

        } else {

            flash bank $_FLASHNAME nuspi 0x20000000 0 0 0 $_TARGETHARTNAME

        }

    }

  • 陈周鹏

    2024-10-14 16:49:23 陈周鹏 4#

    dongyong

    Error: timeout


    Error: auto_probe failed


    这里看起来你rtl有问题,是不是改动了什么

    因为我板上没有SPI FLASH,会是这个问题吗?其他也没什么好改的。

  • dongyong

    2024-10-14 16:33:43 dongyong 5#

    陈周鹏

    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# make SOC=hbirdv2 BOARD=ddr200t CORE=e203 DOWNLOAD=ilm run_openocd

    Start openocd server

    openocd -c "gdb_port 3333" -f ../../../SoC/hbirdv2/Board/ddr200t/openocd_hbirdv2.cfg

    Open On-Chip Debugger 0.11.0+dev-02400-g1dac85c02 (2024-06-26-07:32)

    Licensed under GNU GPL v2

    For bug reports, read

     http://openocd.org/doc/doxygen/bugs.html

    DEPRECATED! use 'adapter speed' not 'adapter_khz'

    DEPRECATED! use 'adapter driver' not 'interface'

    DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'

    DEPRECATED! use 'ftdi oscan1_mode' not 'ftdi_oscan1_mode'

    DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    Info : Using libusb driver

    Info : clock speed 1000 kHz

    Info : JTAG tap: riscv.cpu tap/device found: 0x1e200a6d (mfg: 0x536 (Nuclei System Technology Co Ltd), part: 0xe200, ver: 0x1)

    Info : [riscv.cpu] Found 0 triggers

    Info : Examined RISCV core; XLEN=32, misa=0x40001105

    [riscv.cpu] Target successfully examined.

    Info : starting gdb server for riscv.cpu on 3333

    Info : Listening on port 3333 for gdb connections

    Info : Valid NUSPI on device Nuclei SoC SPI Flash at address 0x20000000 with spictrl regbase at 0x10014000

    Info : Nuclei SPI controller version 0x00000000

    Error: timeout

    Error: auto_probe failed

    make: *** [../../../Build/Makefile.rules:110: run_openocd] Error 1

    是这个错误,超时!

    Error: timeout


    Error: auto_probe failed


    这里看起来你rtl有问题,是不是改动了什么

  • 陈周鹏

    2024-10-14 15:02:54 陈周鹏 6#

    dongyong

    make SOC=hbirdv2 BOARD=ddr200t CORE=e203 DOWNLOAD=ilm run_openocd  先看看openocd的打印输出

    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# make SOC=hbirdv2 BOARD=ddr200t CORE=e203 DOWNLOAD=ilm run_openocd

    Start openocd server

    openocd -c "gdb_port 3333" -f ../../../SoC/hbirdv2/Board/ddr200t/openocd_hbirdv2.cfg

    Open On-Chip Debugger 0.11.0+dev-02400-g1dac85c02 (2024-06-26-07:32)

    Licensed under GNU GPL v2

    For bug reports, read

     http://openocd.org/doc/doxygen/bugs.html

    DEPRECATED! use 'adapter speed' not 'adapter_khz'

    DEPRECATED! use 'adapter driver' not 'interface'

    DEPRECATED! use 'ftdi vid_pid' not 'ftdi_vid_pid'

    DEPRECATED! use 'ftdi oscan1_mode' not 'ftdi_oscan1_mode'

    DEPRECATED! use 'ftdi layout_init' not 'ftdi_layout_init'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    DEPRECATED! use 'ftdi layout_signal' not 'ftdi_layout_signal'

    Info : Using libusb driver

    Info : clock speed 1000 kHz

    Info : JTAG tap: riscv.cpu tap/device found: 0x1e200a6d (mfg: 0x536 (Nuclei System Technology Co Ltd), part: 0xe200, ver: 0x1)

    Info : [riscv.cpu] Found 0 triggers

    Info : Examined RISCV core; XLEN=32, misa=0x40001105

    [riscv.cpu] Target successfully examined.

    Info : starting gdb server for riscv.cpu on 3333

    Info : Listening on port 3333 for gdb connections

    Info : Valid NUSPI on device Nuclei SoC SPI Flash at address 0x20000000 with spictrl regbase at 0x10014000

    Info : Nuclei SPI controller version 0x00000000

    Error: timeout

    Error: auto_probe failed

    make: *** [../../../Build/Makefile.rules:110: run_openocd] Error 1

    是这个错误,超时!

  • dongyong

    2024-10-14 14:59:29 dongyong 7#

    陈周鹏

    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# make run_ocd

    make: *** No rule to make target 'run_ocd'. Stop.

    这个好像是不能运行,驱动应是安装了

    Bus 001 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC

    串口也可以用的。

    sudo vi /etc/udev/rules.d/99-openocd.rules
    // Use vi command to edit the file, and add the following lines
    SUBSYSTEM=="usb", ATTR{idVendor}=="0403",
    ATTR{idProduct}=="6010", MODE="664", GROUP="plugdev"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403",
    ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev"
    这个文件也创建了
    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# groups
    
    root plugdev
    这个也是正确的,
    接线应是正确的,底层跟踪TCK,TDO,TDI,TMS波形也有!

    make SOC=hbirdv2 BOARD=ddr200t CORE=e203 DOWNLOAD=ilm run_openocd  先看看openocd的打印输出

  • dongyong

    2024-10-14 14:53:45 dongyong 8#

    陈周鹏

    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# make run_ocd

    make: *** No rule to make target 'run_ocd'. Stop.

    这个好像是不能运行,驱动应是安装了

    Bus 001 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC

    串口也可以用的。

    sudo vi /etc/udev/rules.d/99-openocd.rules
    // Use vi command to edit the file, and add the following lines
    SUBSYSTEM=="usb", ATTR{idVendor}=="0403",
    ATTR{idProduct}=="6010", MODE="664", GROUP="plugdev"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403",
    ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev"
    这个文件也创建了
    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# groups
    
    root plugdev
    这个也是正确的,
    接线应是正确的,底层跟踪TCK,TDO,TDI,TMS波形也有!

    写错了。 是 make run_openocd

  • 陈周鹏

    2024-10-14 14:28:14 陈周鹏 9#

    dongyong

    make run_ocd 看看log 有无报错,设备管理器确认下是不是没有装驱动 或者接线

    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# make run_ocd

    make: *** No rule to make target 'run_ocd'. Stop.

    这个好像是不能运行,驱动应是安装了

    Bus 001 Device 002: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC

    串口也可以用的。

    sudo vi /etc/udev/rules.d/99-openocd.rules
    // Use vi command to edit the file, and add the following lines
    SUBSYSTEM=="usb", ATTR{idVendor}=="0403",
    ATTR{idProduct}=="6010", MODE="664", GROUP="plugdev"
    SUBSYSTEM=="tty", ATTRS{idVendor}=="0403",
    ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev"
    这个文件也创建了
    (hbirdenv) root@linuxczp:/home/nuclei-hbird/hbird-sdk/application/baremetal/helloworld# groups
    
    root plugdev
    这个也是正确的,
    接线应是正确的,底层跟踪TCK,TDO,TDI,TMS波形也有!

  • dongyong

    2024-10-14 14:14:09 dongyong 10#

    make run_ocd 看看log 有无报错,设备管理器确认下是不是没有装驱动 或者接线

陈周鹏

陈周鹏 实名认证

FPGA

积分
问答
粉丝
关注
  • RV-STAR 开发板
  • RISC-V处理器设计系列课程
  • 培养RISC-V大学土壤 共建RISC-V教育生态
RV-STAR 开发板