at least I'm trying to find that out. The clones from aliexpress are supposed to be only able to program st chips. But I want to use it to program some SAMD-21 chips. Never done that as well. So this is a link drop first. Figuring it out for MAC OS.
install open-OCD via homebrew
for unlocking the stm for new firmware go here
install new firmware called cmsis-dap
get this file
install with this line
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg -c "init" -c "halt" \ -c "flash write_image ./CMSIS-DAP-STLINK21.hex" -c "shutdown"
doing this to flash arturos latest keyboard firmware, had to install arm gcc first. Brew doesn't work as it's not trusted. Downloading here helped.