Openocd Usage and its Debug
a) Hardware connection between STlink and STM32
i. For STlink/V2, there are 10 pins, SWCLK, SWDIO(SWIO), RST, SWIM. Ther other are 3.3v or 5v or GND
ii. For STM32, the pins used for simulating includeJTCK, JTMS, JNRST, NRST, JTDI, JTDO.
iii. Usually, we just use the JTCK, JTMS(JTDIO) ,3.3v, GND to connect to the STLink/V2 and JTAG. JTCK to SWCLK, JTMS (JTDIO) toSWD (SWDIO).
b) Make usb rule file
i. To let the Ubuntu to recognize the STlink,RS232, JTAG device and make them usable, we need to add a .rules file to /etc/udev/rules.d/this directory. We can make a file called OLIMEX_ARM-USB-OCD-H.rules orstlink-v2.rules.
The contentshould be like this:
For JTAG:
SUBSYSTEMS=="usb",ATTRS{idVendor}=="15ba",ATTRS{idProduct}=="002b",MODE="0666"
For stlink-v2:
SUBSYSTEMS==&#