DAPLink mode allows a Binho Nova to be utilized as a programmer / debugger for ARM microcontrollers. By entering DAPLink mode, the Nova will enumerate as a CMSIS-DAP interface that can be discovered by OpenOCD, pyOCD, and even your favorite IDEs. As such, the Nova becomes a robust device which bridges the gap between expensive & powerful debuggers such as Segger J-Link devices and cheap bare board tools or illegal knock-off devices.
Binho Nova's DAPLink mode supports the SWD interface (SWDIO, SWCLK, and RESET signals) as well as a UART bridge to a virtual COM port (using the same TX, RX signals as in normal Nova operation).
DAPLink is an open-source software project that is developed and maintained by ARM that enables programming and debugging of ARM Cortex CPUs. Please check out the official DAPLink website for more specific details:
You can put your Nova into DAPLink mode using our python library CLI with the following command:
This will then download our DAPLink-capable firmware to the device. Note that the device cannot be used as a host adapter while in DAPLink mode. (One of the big limitations is that the pins for the SWD interface are the same as other protocols). Note that you can confirm that your device is in DAPLink mode by using the
binho info command:
PS C:\Users\Jonathan> binho infoFound a Binho Nova [in DAPLink Mode]Port: COM3Device ID: 0X1C4780B050515950362E3120FF141C2ANote: This device is in DAPlink Mode! It can be returned to host adapter (normal) modeby issuing 'binho daplink -q' command.
The pinout of the wire harness for Nova when in DAPLink mode is as shown in the table below:
UART RX (same as normal mode)
UART TX (same as normal mode)
It's only necessary to connect the SWDIO and SWCLK signals to the target MCU, most can be reset without the reset signal through various commands. At Binho, we've tested this on ARM-M0 devices from Atmel, Nordic Semiconductor, and Nuvoton.
These common tools have no problem discovering the device and using it as if it were a 'CMSIS-DAP' device (the predecessor of the DAPLink project).
You can verify it's working with pyOCD by sending the '
pyocd list' command:
PS C:\Users\Jonathan> pyocd list# Probe Unique ID----------------------------------------------------------0 Binho CMSIS-DAP 1C4780B050515950362E3120FF141C2A
You can verify it's working with OpenOCD with this command:
openocd.exe -f interface/binho-nova.cfg
PS C:\Program Files\openocd-0.10.0\bin-x64> .\openocd.exe -f interface/binho-nova.cfgOpen On-Chip Debugger 0.10.0Licensed under GNU GPL v2For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmladapter speed: 500 kHzInfo : CMSIS-DAP: SWD SupportedInfo : CMSIS-DAP: JTAG SupportedInfo : CMSIS-DAP: Interface Initialised (SWD)Info : CMSIS-DAP: FW Version = 1.10Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1Info : CMSIS-DAP: Interface readyInfo : clock speed 500 kHzError: BUG: current_target out of bounds
Two quick notes:
1) You'll need to add the binho-nova.cfg file to the scripts/interfaces directory of your OpenOCD installation. The file can be downloaded here:
2) The last line 'Error' is what will be displayed if the MCU isn't connected or powered on. When an MCU is connected, it will display some information about the target MCU instead of the error message.
Hey! Wouldn't it be great if I could simply issue a single command line statement to flash a .hex or .bin file to my microcontroller? We put together a demo script that uses our Python library + the pyOCD scripting interface to show how that can be done.
It's implemented in python library as the
binho flasher command, and takes a few parameters. You can see the various arguments by passing the -h / --help flag to the command to display them on the console:
binho flasher -h
Or you can just take a look at the code for the script in our repository.
Seeed produced a great guide demonstrating how to use a DAPLink device with OpenOCD, Eclipse, Keil, and IAR Embedded Workbench. The configuration for Nova DAPLink mode should be extremely similar to their guide: Debug and Flash Example for IDEs [Seeed]
When you're finished using the device in DAPLink mode, issue the following command to return Binho Nova back to normal operation:
binho daplink -q
You can verify that your device is back in normal mode using the
binho info command, just as we did above:
PS C:\Users\Jonathan> binho infoFound a Binho NovaPort: COM3Device ID: 0X1C4780B050515950362E3120FF141C2AFirmware Version: 0.2.5 [Up To Date]
If you've made it this far, please reach out and let us know your thoughts about this feature. We'd love to hear from you!