From: Antonio B. <bor...@gm...> - 2020-01-10 11:09:58
|
On Mon, Nov 4, 2019 at 8:45 PM <kri...@te...> wrote: > > Dear OpenOCD developers, > > I've bought the SWDAP probe from ARM (see https://github.com/ARMmbed/mbed-HDK-Eagle-Projects/tree/master/DAPLink/Probes/SWDAP , distributed by L-Tek). This probe works fine with OpenOCD. But when I flash the latest DAPLink firmware v0254 onto the probe (see https://github.com/ARMmbed/DAPLink), it doesn't work anymore. Even earlier DAPLink firmware versions v0253 and v0252 make OpenOCD crash. > > Please have a look at my StackOverflow question, where I explain all the details: > https://electronics.stackexchange.com/questions/465577/daplink-firmware-doesnt-operate-with-openocd > > You can also have a look at the GitHub issue on DAPLink (but the StackOverflow question goes into more details): > https://github.com/ARMmbed/DAPLink/issues/665 > > It's not sure if the problem originates from the DAPLink firmware or from OpenOCD. Hi Kristof, thanks for the SWDAP device you have shipped to me. I succeed to make it working with OpenOCD. First of all, a critical HW issue, already logged in https://github.com/ARMmbed/mbed-HDK-Eagle-Projects/issues/1 You need to replace the resistors R9, R11 and R13, otherwise the interface will not work properly, even with the original cmsis-dap FW programmed in SWDAP. Without this change I get errors even with adapter speed at 1 kHz. Then, with the HW fix, I succeed to run the interface with any FW version from v0240 to v0254 available in https://github.com/ARMmbed/DAPLink/releases I have used as target a STM32F411, and the FW I have flashed is always the one named 02XX_lpc11u35_lpc824xpresso_0x0000.bin that seams compatible with the STM32 (there is no specific one for STM32!) All these FW are either cmsis-dap V1.00 or V1.10 In the same repository there are FW that are instead cmsis-dap v2 ! But only one is available for SWDAP, 0254_lpc11u35__0x0000.bin Other interfaces support cmsis-dap v2 from earlier FW revision but I do not have them! In version 0254 there is also a FW for ST-Link HW (0254_stm32f103xb__0x0000.bin) but without the bootloader! I have recompiled it to test also this HW. It also uses cmsis-dap v2 cmsis-dap v2 is a game changer! Does not use USB HID anymore but USB bulk! The driver in OpenOCD does not support it! The cmsis-dap messages seams the same, but the protocol below is different. I have sniffed the USB communication by pyocd and quickly patched OpenOCD to behave in the same way. It works fine. I have just pushed in gerrit a test "work-in-progress" proof-of-concept. http://openocd.zylin.com/5394 It will require some additional work before being ready for merge, but it's functional. Would you mind testing it on your side? (after replacing the resistors, of course). Antonio |