调试器无法下载程序、无法调试、无法切换启动核心

Home 论坛 开发和更新问题 调试器无法下载程序、无法调试、无法切换启动核心

该话题包含 13 个回复,有 3 个参与人,并且由 Howard Howard2 周, 3 天 前 最后一次更新。

正在查看 5 帖子:1-5 (共 14 个帖子)
  • 作者
    帖子
  • #1455
    day_day
    day_day
    参与者

    问题:调试器无法下载程序、无法调试、无法切换启动核心

    Problem: The debugger can’t not download the program, Debug, or change the start-up core

    (一)初步怀疑问题症结

    Sec.1 Guess the reason in now step

    参考第三节,执行openocd命令时,出现的错误提示,提示openocd.cfg文件找不大奥。

    Refer for the Sec.3, when I implement the command “openocd”, there is something wrong exist, it refer that the file “openocd.cfg” is no where to found.

    (二)目前为止的操作

    Sec.2 operate i make so far

    1、参考“织女星开发板调试器升级为jlink固件”,使用LPCScrypt2.1.0842\scripts\program_JLINK.cmd对固件进行升级。

    Refer to “织女星开发板调试器升级为Jlink固件”, I update the firework with program_JLINK.cmd.

    2、使用UsbDriverTool.exe,把J-Link driver变成J-Link driver (WinUSB)

    Use UsbDriverTool.exe, and change the “J-Link driver” into “J-Link driver (WinUSB)”

    3、使用openocd.exe输入openocd命令,显示错误如第三节1、所示。该环境根据《手把手教你搭建织女星开发板RISC-V开发环境》搭建,源文件下载于上述帖子的百度云。在出现问题后,我在官方给出的地址(一个链接到github的地址下载了最新的Toolchain_Windows.zip),但依然出现上述问题。

    Toolchain_Windows.zip的github地址:Toolchain_Windows.zip

    Usb the openocd.exe to implement the command “openocd”, and the error display as Sec.3-1. the environment is develop according to “<u>手把手教你搭建织女星开发板RISC-V开发环境</u>”, the source file is download from baiduyun. After Come across the problem, i try to usb the file download from github to take place (i download the Toolchain_Windows.zip frome github), but it is not usb.

    4、此外,通过openocd -f rv32m1_ri5cy.cfg命令连接芯片,准备修改启动核心时;或者通过搭建好的eclipse环境下载程序时,都出现错误。如第三节2、所示。

    Beside, both connect the chip with command “openocd -f rv32m1_ri5cy.cfg” (ready to change the start-up core”, or download the program with eclipse environment, something wrong still exist, and i place it in Sec.3-2.

    5、我使用的是win7 64位系统。我怀疑过是系统支持问题,因此换为同事win8 64位系统再次尝试,但依然无果。

    I use win7 64, and also try in win8 64 of my workmate, but nothing different.

    (三)错误提示

    Sec.3 error display

    1、

    F:\study\VEGA_Board\IDE\eclipse\GNU MCU Eclipse\openocd\bin>openocd
    Open On-Chip Debugger 0.10.0+dev-00433-g849f49ca (2019-01-04-07:48)
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    embedded:startup.tcl:60: Error: Can’t find openocd.cfg
    in procedure ‘script’
    at file “embedded:startup.tcl”, line 60
    Info : Listening on port 6666 for tcl connections
    Info : Listening on port 4444 for telnet connections
    Error: Debug Adapter has to be specified, see “interface” command
    embedded:startup.tcl:60: Error:
    in procedure ‘script’
    at file “embedded:startup.tcl”, line 60

    2、

    F:\study\VEGA_Board\IDE\eclipse\GNU MCU Eclipse\Boot_Config>openocd -f rv32m1_ri
    5cy.cfg
    Open On-Chip Debugger 0.10.0+dev-00433-g849f49ca (2019-01-04-07:48)
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    adapter speed: 1000 kHz
    srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
    Info : mohor tap selected
    Info : adv debug unit selected
    Info : Option 1 is passed to adv debug unit
    Info : core 0 selected
    Info : add flash_bank rv32m1 rv32m1.flash0
    Info : add flash_bank rv32m1 rv32m1.flash1
    Info : J-Link LPCXpresso V2 compiled Sep 23 2016 12:14:15
    Info : Hardware version: 1.00
    Info : VTarget = 3.300 V
    Info : clock speed 1000 kHz
    Error: JTAG scan chain interrogation failed: all ones
    Error: Check JTAG interface, timings, target power, etc.
    Error: Trying to use configured scan chain anyway…
    Error: rv32m1.cpu: IR capture error; saw 0x0f not 0x01
    Warn : Bypassing JTAG setup events due to errors

    Warn : Bypassing JTAG setup events due to errors
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Error: Couldn’t read the CPU state
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 1 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 2 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 3 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 4 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 5 of 5
    Error: Could not re-establish communication with target
    Error: Error while calling rv32m1_is_cpu_running
    Polling target rv32m1.cpu failed, trying to reexamine
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Error: Couldn’t read the CPU state
    Examination failed, GDB will be halted. Polling again in 100ms
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 1 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 2 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 3 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 4 of 5
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Warn : Debug IF CPU control reg read failure.
    Warn : Resetting JTAG TAP state and reconnectiong to debug IF.
    Info : adv debug unit is configured with option ADBG_USE_HISPEED
    Warn : …attempt 5 of 5
    Error: Could not re-establish communication with target
    Error: Error while calling rv32m1_is_cpu_running
    Polling target rv32m1.cpu failed, trying to reexamine
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Warn : CRC ERROR! Computed 0x00000000, read CRC 0xffffffff
    Error: Burst read failed
    Error: Couldn’t read the CPU state
    Examination failed, GDB will be halted. Polling again in 300ms

    #1465
    Howard
    Howard
    参与者

    第一个问题是openocd命令要带配置文件作为参数。默认是openocd.cfg,所以得到你所见的错误。

    第二个问题可能是你飞线焊接造成信号干扰比较大,尝试修改JTAG的时钟为100kHz或者更小试试。用文本编辑器打开rv32m1_ri5cy.cfg,可以修改JTAG时钟。还有可能是看看你的JTAG信号到ARM核的Jumper有没有断开。

    #1467
    day_day
    day_day
    参与者

    开发板到手后没有进行过任何焊接改装,排针也没有焊接。

    修改jtab时钟是第二行吗?
    adapter_khz 100

    如果是的话,那依然无法工作,哪怕我从1000修改到100,到10,甚至到1都无法工作。

    J5、J6、J8、J9、J10的跳冒都短接好了。

    会不会是芯片虚焊的问题呢?

    #1468
    day_day
    day_day
    参与者

    我明白了,原来是还要额外飞线啊

    怎样才能不需要j-link调试器来调试织女星开发板

    飞线之后,改成100k确实能用了。

    不过飞线很不方便啊,我的驱动板无法直接插在arduino接口上边运行边调试。而且还是1.27的线,还好之前弄NXP一款开发板时用过这种线。

    #1470
    Howard
    Howard
    参与者

    道路千万条,文档最重要。拿到板子不要急于把程序跑起来。大部分文档都是中文的,全部看完也就个把小时。

正在查看 5 帖子:1-5 (共 14 个帖子)

抱歉,回复话题必需登录。