RISC-V MCU中文社区

【求助】 为什么jtag调试器调试一直报错,无法实现烧写

发表于 开源蜂鸟E203 2023-03-30 16:51:49
11
3083
1

使用了自己的FPGA开发板,通过普通的IO实现jtag调试器连接,FPGA顶层的引脚如下图所示
图片alt
图片alt
其中qspi引脚用的是FPGA固化程序用的flash
图片alt
图片alt
而下载器则是通过淘宝上购买的一个sispeed USB转JTAG+UART的下载器
图片alt
然后在nuclei studio上选择的是sdk-hbird_sdk @0.1.3
图片alt
图片alt
在点击debug图片alt按钮时总是会有各种报错,总是不能成功,试了无数次后只成功过一次半,其他均失败。而且每次报错信息还不一样
下面是各种报错信息
图片alt图片alt
图片alt![图片alt]
下面两张图是成功的那次的报错信息,是经过无数debug,然后某次串口突然停止输出了(平时一般一直输出0),然后按下mcu复位按键,就实现了下载成功,但也只成功过这一次
(/uploadfile/editor/0/3/3743.png)图片alt图片alt
图片alt
另外通过debug,在烧写FPGA程序时候,观察一下信号,inspect_pc一直处于0和2,然后nuclei studio下载后指令变化了,FPGA上观察到的指令值对比了一下.verilog文件的指令值是一样的,说明还是有程序写进去了,但是还是一直报错,串口也无法输出打印的信息
图片alt
图片alt
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 : libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Info : no device found, trying D2xx driver
Info : D2xx device count: 2
Info : Connecting to “(null)” using D2xx mode…
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
halted at 0x0 due to debug interrupt
Info : Valid NUSPI on device Nuclei SoC SPI Flash at address 0x20000000 with spictrl regbase at 0x10014000
Info : Nuclei SPI controller version 0x00000000
Warn : Got exception 0x1000000 when writing t0
Error: nuspi_write_reg() error writing 0x0 to 0x10014048
Info : Found flash device ‘micron n25q128’ (ID 0x0018ba20)
cleared protection for sectors 0 through 255 on flash bank 0

Started by GNU MCU Eclipse
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting ‘gdb’ connection on tcp/3333
Warn : Prefer GDB command “target extended-remote :3333” instead of “target remote :3333”
Info : JTAG tap: riscv.cpu tap/device found: 0x1e200a6d (mfg: 0x536 (Nuclei System Technology Co Ltd), part: 0xe200, ver: 0x1)
halted at 0x0 due to debug interrupt
Info : Retrying memory write starting from 0x80000cc0 with more delays
halted at 0x80000280 due to debug interrupt
Warn : Got exception 0x10 when reading mstatus
Error: Failed to read mstatus register.
Info : dropped ‘gdb’ connection

喜欢1
用户评论 (11)
  • 风序

    2023-04-21 18:25:23 风序 1#

    seele

    请问有群号吗,我现在有一块黑板子,也是差不多的问题,想加进来问一问

    +1,同样的问题

  • seele

    2023-04-16 18:41:50 seele 2#

    cyl0411

    听说发不了评论了,从群里来吃瓜

    请问有群号吗,我现在有一块黑板子,也是差不多的问题,想加进来问一问

  • hust彦

    2023-04-06 17:56:24 hust彦 3#

    胡灿

    换202212版试试看,08版的OpenOCD对蜂鸟的支持有点小问题

    也试过了,202212版本,还是一样报错,串口没有正常输出,一直低电平。


    Open On-Chip Debugger 0.11.0+dev-02420-g1d0387cb1 (2022-08-25-03:00)

    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 : libusb_open() failed with LIBUSB_ERROR_NOT_FOUND

    Info : no device found, trying D2xx driver

    Info : D2xx device count: 2

    Info : Connecting to "(null)" using D2xx mode...

    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)

    Error: Failed to discover xlen; word0=0x1, word1=0x1f4d493, exception=0xffffffff

    Error: Debug RAM 0x0: 0x00000001

    Error: Debug RAM 0x1: 0x01f4d493

    Error: Debug RAM 0x2: 0x40902023

    Error: Debug RAM 0x3: 0x01f4d493

    Error: Debug RAM 0x4: 0x00000000

    Error: Debug RAM 0x5: 0x3f00006f

    Error: Debug RAM 0x6: 0xffffffff

    Error: Debug RAM 0x7: 0x00000000

    Error: Debug RAM 0x8: 0x00000000

    Error: Debug RAM 0x9: 0x00000000

    Error: Debug RAM 0xa: 0x00000000

    Error: Debug RAM 0xb: 0x00000000

    Error: Debug RAM 0xc: 0x00000000

    Error: Debug RAM 0xd: 0x00000000

    Error: Debug RAM 0xe: 0x00000000

    Error: Debug RAM 0xf: 0x00000000

    Warn : target riscv.cpu examination failed

    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 conne

  • cyl0411

    2023-04-04 00:03:40 cyl0411 4#

    听说发不了评论了,从群里来吃瓜

  • kem-lb

    2023-04-03 16:50:37 kem-lb 5#


  • kem-lb

    2023-04-03 16:50:20 kem-lb 6#

    胡灿

    换202212版试试看,08版的OpenOCD对蜂鸟的支持有点小问题

    12版的还是有问题

  • 胡灿

    2023-04-03 12:41:15 胡灿 7#

    hust彦

    NucleiStudio_IDE_202208-win64

    换202212版试试看,08版的OpenOCD对蜂鸟的支持有点小问题

  • hust彦

    2023-04-03 12:36:30 hust彦 8#

    胡灿

    使用的Nuclei Studio是哪个版本的呢

    NucleiStudio_IDE_202208-win64

  • hust彦

    2023-04-03 12:35:48 hust彦 9#

    开发板型号是FII-PRX100,使用的是 Xilinx 公司的 ARTIX-7 系列芯片,型号为 XC7A100T-2FGG676I


  • 胡灿

    2023-04-03 12:11:00 胡灿 10#

    使用的Nuclei Studio是哪个版本的呢

  • kem-lb

    2023-04-03 11:51:10 kem-lb 11#

    开发板型号是什么呢

hust彦

hust彦 实名认证

???

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