Giter VIP home page Giter VIP logo

wuxx / nanodap Goto Github PK

View Code? Open in Web Editor NEW
1.1K 27.0 275.0 44.27 MB

建议大家star此仓库,仓库会持续更新。由于部分淘宝卖家“借鉴”实验室出品的nanoDAP详情描述和资料,请大家认准实验室官方链接

Home Page: https://item.taobao.com/item.htm?spm=a230r.1.14.4.529c6b1b6CaR5Q&id=586425846353&ns=1&abbucket=6#detail

License: Apache License 2.0

Makefile 0.01% C 96.17% Assembly 1.76% HTML 0.03% Batchfile 0.05% Shell 0.04% Perl 0.01% Python 1.62% Haskell 0.01% Tcl 0.30%

nanodap's Introduction

nanodap's People

Contributors

wh201906 avatar wuxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanodap's Issues

OpenOCD Config file

Hi,
Just got my hands over a nanodap and was wondering which is the compatible OpenOCD configuration file I have to use with it.
Thanks :)

期待离线下载功能!

既然都实现了拖拽下载hex/bin的功能,那么稍微改改加个按钮做个离线下载功能应该也可以的!

SWD multidrop support?

Hello!

I first would like to say that I appreciate this debugger very much. As far as my research goes, it is the only DAP debugger with JTAG and SWD support that runs on STM32F103 MCU, which is very handy (it is a very common MCU).
With the arrival of RP2040, the SWD support of the current nanoDAP is not up to date - RP2040 uses multidrop SWD. I know that the DAPLink mBed repo has an updated version of the firmware for STM32F103 - but then it does not support JTAG.

Would it be possible to add SWD multidrop support to the current nanoDAP? or, on the other hand, add JTAG to the newer DAP firmware, so we get the best of both worlds (JTAG support and multidrop SWD support, so ESP32, RP2040 and other targets can all be debugged by a single debugger, on STM32F103)?

Thank you for the attention!

支不支持用nanoDAP JTAG调试VisionFive开发板?

您好老师:@wuxx, 我从资料上理解到可以用nanoDAP JTAG调试RISC-V SOC,我的开发板是VisionFive开发板(https://github.com/starfive-tech/VisionFive),但我之前没用过JTAG,所以需要弄明白搞确切!!!
https://forum.rvspace.org/t/connecting-to-visionfive-s-jtag-port-a-short-guide/514
上面是请教过的内容,还有这一篇关于VisionFive开发板的JTAG详情的文章(https://dram.page/p/visionfive-jtag-1/)!!!

想请老师给我些用nanoDAP JTAG调试RISC-V SOC的指导!!!如果适用VisionFive开发板购买哪款nanoDAP JTAG更合适???

移植到其他mcu

我能不能把你编译好的固件直接刷写进兼容stm32的mcu上?比如gd32 hk32 apm32等,同为f103cbt6
还是需要自行编译?
(最近stm32涨价太多了,实在买不起

烧录 STM32F401 失败

不慎刷入一个带写保护的 tinyuf2 固件,按照对方建议要烧录其他固件只能用下载器。手头只有一个 CMSIS-DAP / nanoDap 2.2,烧录失败,看这条评论说是下载器的问题 adafruit/tinyuf2#189 (comment)

请问是需要升级下载器固件吗?

Why try to read an output pin?

Hi wu,

I am not sure if it is an issue but it seems really strange.

JTAG TDI has been configured as an out put pin through pin_out_init().
At the same time there is another function PIN_TDI_IN() that tries to read this pin.

PIN_TDI_IN() is only called by DAP_SWJ_Pins() to check if the electrical level of TDI is changed.
So my question is that do you have any idea of this contradictory opeation -- try to read an output pin.

Thanks in adavnce!

无法给探索者F4下载程序

有一个问题,这个下载器无法给原子探索者F4的开发板下载程序,芯片倒是可以间歇性的识别出来一下,但是下载程序肯定出错。

我给同一个下载器烧了jlink-OB固件就可以正常用,但是用DAP就不行,不知道这个问题是什么原因。

Linux中使用openocd/cmsis-dap返回错误

你好,使用Linux的openocd 0.11.0-rc2链接cmsis-dap的interface,返回
Open On-Chip Debugger 0.11.0-rc2
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Warn : Using CMSIS-DAPv2 interface 1 with wrong class 10 subclass 0 or protocol 0
Info : Using CMSIS-DAPv2 interface with VID:PID=0xc251:0xf001, serial=0001A0000001
Warn : could not claim interface: Resource busy
Error: error writing data: Input/Output Error
Error: CMSIS-DAP command CMD_INFO failed.

试着刷了2.3最新的固件,结果还是一样,
有没有什么建议

Windows7 下无法识别问题

win7 上插入DAPLink 后 有时会出现安装驱动程序 但经常显示无法识别设备

驱动问题显示为 该设备已被禁用,原因是,设备的固件没有提供必需的资源.(代码29)

后面查了一下 有人也遇到这个问题

起始原因是要是一开始就让usb四根线同时和电脑相连 但是此时DAPLink还没启动完成 win7上电脑也就认为硬件没有准备好资源 造成无法识别

他的解决方法是先把DAPLink的一部分插入usb口 也就是让 usb的两个电源线先上电 等DAPLink启动完成后 再插入剩下的部分接触两根数据线让电脑和DAPLink交互数据识别硬件资源

实际上也能观察到 dapLink的usb接口处 边缘的两个触点是稍微长一点的 是可以做到让这两点先接触 再插入剩余部分让中间两点后接触的

  • 先一点点插入DAPLink 做到让DAPLink上灯亮 但是不能让电脑识别
  • 等几秒插入剩下部分
Hi, I encounter the same issue. It seems the DAPLink power up time is too long. so when win7 tries to comunicate with it, the DAPLink is still in initialization, and so will not response. Then when its actually ready, win7 already terminates the connection.

Currently the only workaround i use is to plug the DAP link partially (to make sure its properly powered first) then fully push it to USB port to start conection.

PS : I also Tried in Mac and this issue did not exist. Seems like the driver in windows need some modification or the hardware need to be fixed.

Hope it helps.

不识别芯片怎么回事啊

我用的103cb开发板,刷的固件,想测试一下能不能用。
MWN@7ZH @2 _FYUE8C@%9K9
这俩100r 的电阻没接 (swclk dio)直接接的目标板。

R9 R1 也没接。

98QF69CFSXC(3CWKNWWRKN6

keil中能识别 daplink ,刷的是2.3的这俩固件测试都不行。
83`D5%BS$TA2C06DYBR3CUF

under reset 和 norml 都不行
LQFTF1}IOHFNYEE3$T $42R

无法安装应用firmware

你好,想请教一下,我使用STM32F103RBT6下载了boot loader文件后,重新给设备上电,并没有把RST与GND短接,然后识别出来一个U盘(MAINTENANCE),然后我把调试器的应用升级代码放在里面,是个bin文件,名字我随意取的,设备没有反应,我把调试器重新插拔,他还是跳出来U盘(MAINTENANCE),keil里也没有DAPLINK设备,想问下,如何把升级文件安装到下载调试器中,

Keil 无法识别 CMSIS-DAP

你好,感谢你开源如此实用的项目。

我按照 V2.3 的原理图打样并焊接成功。

烧写 v2.3a 固件的 stm32f103xb_bl 和 stm32f103xb_stm32f103rb_if_bulk 之后。

已经成功识别到 COM 口和虚拟 U 盘了。

但是 Keil 无法识别到 CMSIS-DAP 。

请问这个问题要怎么解决?

NXP MCUXpresso IDE 无法连接

使用NXP MCUXpresso IDE 的 LinkServer连接RT1064板子时,IDE报错:

D4PP7%3(32RVXPZYC3TE9@9

详细信息:

Error in final launch sequence:

Failed to execute MI command:
-target-select extended-remote localhost:10989
Error message from debugger back end:
Remote communication error. Target disconnected.: (undocumented errno 10061).
Failed to execute MI command:
-target-select extended-remote localhost:10989
Error message from debugger back end:
Remote communication error. Target disconnected.: (undocumented errno 10061).

关于SWD访问FLASH

我仔细阅读了ADI v5。想请教一下关于擦除和写入Flash这部分的内容,是如何通过SWD做到的呢?换言之,SWD通过操作哪些寄存器可以做到对FLASH的访问呢?

Ubuntu烧写时 /stm32f4x.cfg:45: Error: target requires -dap parameter instead of -chain-position!

终端:openocd -f /usr/share/openocd/scripts/interface/cmsis-dap.cfg -f /usr/share/openocd/scripts/target/stm32f4x.cfg -c init -c halt -c "flash write_image erase /home/howie/32_prj/p-centerborad/build/P-centerborad.bin 0x08000000" -c reset -c shutdown
Open On-Chip Debugger 0.12.0+dev-00271-g2c57d11c7-dirty (2023-07-19-20:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter driver' not 'interface'
Info : auto-selecting first available session transport "swd". To override use 'transport select '.
_/usr/share/openocd/scripts/target/stm32f4x.cfg:45: Error: target requires -dap parameter instead of -chain-position!
in procedure 'script'_
at file "embedded:startup.tcl", line 28
at file "/usr/share/openocd/scripts/target/stm32f4x.cfg", line 45
make: *** [Makefile:201:download] 错误 1

对应的
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0

如何启用Trace功能

在MDK中的配置中,使能CMSIS DAP下的Trace功能,在基本的SWD连接之外,再将TDO口与目标板的SWO口连接,启动调试。IDE下方状态栏显示“Trace: No Synchronization”。目标板上用代码调用ITM_SendChar也没有任何输出。
用JLink则Trace和ITM输出都正常。

STM32CubeIDE 调试配置

参考了一下 屋脊雀工作室 写的教程或者这里
试了一下但是有问题不成功 关键在于openocd配置文件有问题
试着改了一下openocd的配置文件 确实是能和stm32CudeIDE 调试了
但是感觉反应特别慢 具体表现在单步调试点半天才到下一步
但是在keil4里使用CMSIS调试反应却很快
想知道是什么原因造成stm32CubeIDE里调试反应慢?

附配置文件 daplink-stm32f4.cfg
板子主频设成8000kHz也就是8MHz 按官方说4MHz就够了

# This is an genericBoard board with a single STM32F429BITx chip
#
# Generated by STM32CubeIDE
# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)

source [find interface/cmsis-dap.cfg] 

# set WORKAREASIZE 0x8000

# transport select "swd"

# set CHIPNAME STM32F429BITx
# set BOARDNAME genericBoard

# Enable debug when in low power modes
# set ENABLE_LOW_POWER 1

# Stop Watchdog counters when halt
# set STOP_WATCHDOG 1

# STlink Debug clock frequency
set CLOCK_FREQ 8000

# use hardware reset, connect under reset
# connect_assert_srst needed if low power mode application running (WFI...)
# reset_config srst_only srst_nogate connect_assert_srst
# set CONNECT_UNDER_RESET 1

# BCTM CPU variables

source [find target/stm32f4x.cfg]

以及启动GDB调试服务器的脚本 debug.bat
先运行这个再在stm32CubeIDE里启动调试

@REM stm32CubeIDE openocd读取配置文件的路径
@SET CONF_PATH=C:\ST\STM32CubeIDE_1.0.2\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.debug_1.0.2.201907120816\resources\openocd\st_scripts

@REM stm32CubeIDE openocd 执行文件路径
@SET OPENOCD_PATH=D:\ST\STM32CubeIDE_1.0.2\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.openocd.win32_1.0.0.201904181610\tools\bin

REM 脚本当前路径
@SET ORIGIN_PATH=%CD%

@REM openocd配置文件名
@SET CFG_NAME="daplink-stm32f4.cfg"

@REM openocd加载 cmsis-dap配置 和 stm32f4 配置
@rem "%OPENOCD_PATH%\openocd.exe" -f "%CONF_PATH%\interface\cmsis-dap.cfg"  -f "%CONF_PATH%\target\stm32f4x.cfg"

@REM 替换配置文件夹路径下配置文件
@xcopy /s/Y "%ORIGIN_PATH%\%CFG_NAME%" "%CONF_PATH%\%CFG_NAME%"

@REM 切换到stm32Cube IDE openocd读取配置文件的路径
@cd /d "%CONF_PATH%"

@REM 后台启动opnocd服务
START  "openocd" "%OPENOCD_PATH%\openocd.exe" -f "%CONF_PATH%\daplink-stm32f4.cfg"

@REM 切回原始路径
@cd /d "%ORIGIN_PATH%"

MDK编译后丢失很多文件

您好,MDK编译后丢失很多文件,按照您的提示安装了MDK5.15,CMSIS.5.4.0,造成这个原因主要是您建立这个文件的时候有太多文件的依赖关系在您的电脑其他文件里,导致您把这个项目打包上来时丢了依赖的文件,然后我很难找您的文件,您看下能否把依赖的文件也包含进来,这样移植性就很高了,谢谢。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.