RISC-V MCU中文社区

【分享】 SDK命令行upload或者debug失败常见解决方案

发表于 GD32VF103 MCU 2021-08-24 09:24:44
0
3173
0

在使用Nuclei SDK或者HBird SDK进行下载(upload)或者调试(debug)的时候有可能会遇到类似下面这种输出:


Remote communication error.  Target disconnected.: Success.
"monitor" command not supported by this target.
You can't do that when your target is `exec'
"monitor" command not supported by this target.


这种一般情况下是由于调试器没有真实连接到处理器上,通过将运行的命令从(upload/debug)换成run_openocd即可查看当前调试器连接情况,

只有运行make SOC=change_to_your_selected_soc run_openocd后看到类似如下输出,才证明调试器连接成功,确认连接成功后,ctrl-c结束当前任务。


Info : JTAG tap: riscv.cpu tap/device found: 0x16000a6d (mfg: 0x536 (Nuclei System Technology Co Ltd), part: 0x6000, ver: 0x1)
Info : clock speed 1000 kHz
Info : datacount=4 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=64, misa=0x800000000014112d
Info : starting gdb server for riscv.cpu on 12346
Info : Listening on port 12346 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
Info : Found flash device 'gd gd25q32c' (ID 0x001640c8)
cleared protection for sectors 0 through 63 on flash bank 0


上面输出中第1,2,3,4,5,10行均是关键信息,只是可能连接的CORE不一样输出显示不一样。请注意确认。


如果上面openocd没有连上CORE,请检查对应调试器连接情况,FPGA CORE的烧写情况,FPGA MCU Flash是否存在对XIP QSPI进行操作的程序导致flash无法正常识别。

由于Nuclei SDK和HBird SDK基本采用相同的编译系统的工具链,问题基本也可以类似解决,请参见 https://doc.nucleisys.com/nuclei_sdk/faq.html

了解更多nuclei-sdk相关的常见问题,如果发现nuclei-sdk的bug也请给本项目发issue https://github.com/Nuclei-Software/nuclei-sdk/issues  

喜欢0
用户评论
華仔

華仔 实名认证

懒的都不写签名

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