joric / nrfmicro

A Pro Micro alternative for wireless keyboards
https://github.com/joric/nrfmicro/wiki
The Unlicense
1.48k stars 128 forks source link

Can ST-LINK/V2 be replaced by CMSIS-DAP? #52

Closed yejianfengblue closed 2 years ago

yejianfengblue commented 2 years ago

The doc says ST-LINK/V2 needs a CMSIS-DAP patch. And then I searched CMSIS-DAP and found CMSIS DAP/DAPLink Emulator Simulator, whose price is just $0.5 more expensive than ST-LINK/V2.

Can it be used to unlock and flash the bootloader with the same openocd commands? If yes, it's the most friendly to non-hardware developer user, because no additional firmware flash or patch is required and the price is almost the same.

unlock openocd -d2 -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "nrf52.dap apreg 1 0x04 0x01"

flash openocd -f interface/stlink.cfg -f target/nrf52.cfg -c "gdb_flash_program enable" -c "gdb_breakpoint_override hard" -c "init" -c "reset halt" -c "flash write_image erase ./bootloader.hex

joric commented 2 years ago

I don't know.