This repository contains necessary changes to the original project to turn cheap Chinese ST-Link clone into security key that you can use for two-factor authentication. These changes will allow you to connect the user presence button to pin PB8 which may be better suited than the original pin PA5.
Original README file is located here.
Use target ST_DONGLE_PUSH_PB8
, e.g.
make TARGET=ST_DONGLE_PUSH_PB8
Some Chinese ST-Links may contain clone of the original STM32F103 microcontroller, possibly CKS32F103C8T6. This manifests during flashing with the following errors:
Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x1ba01477
This can be fixed by overriding CPU ID on OpenOCD command line:
openocd -f interface/stlink-v2.cfg -c 'set CPUTAPID 0x2ba01477' -f target/stm32f1x.cfg ...