• As for SWD - there are official docs from ARM but recently I found very nice document that describes SWD a bit better and there is even example source code for all needed bits
    Google for "AN11553 Serial Wire Debug (SWD) programming specification" currently it is here
    https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/lpc/55224/1/SWD%20Programming%20AN11553.pdf

    as for the CMSIS-DAP binary not working, that is strange, should work in all STM32F103 based dongles that come with STM32 STLINK V2 firmware (= must have same compatible pinout). I flashed it to many such clones and so far it always worked, maybe you are not erasing flash before flashing the binary? Not sure what DAPlink is but other USB dongles from aliexpress that already come with some CMSIS-DAP firmware may have different pinout.

    the swd.js I have there is not latest version, it is a bit slow and experimental, I have other version with more code moved to native Inline C code but that needs modified Inline C compiler to recompile from source so I did not publish it there but it is here https://gist.github.com/fanoush/4a5dcf777503461297cedf7e21e3c6b3 I tried to call JS GPIO Pin functions from native code to have platform independent way to do GPIO (so that same Inline C binary blob would run on nrf52 and STM32). But maybe the JIT is now good enough to replace it.

About

Avatar for fanoush @fanoush started