Blackmagic for STM8S Discovery and STM32F103 Minimum System Development Board
*1: Wire JTDO/PB3 (U2/39) to USART2_RX/PA3 (U2/13) to expose SWO for Stlink on STM8S-Disco on CN5/3
Force Bootloader Entry:
STM8S Discovery: Jumper CN7/4 to CN7/3 to read PB6 low. Bluepill: Jumper Boot1 to '1' to read PB2 high.
Blue Pill Schematics 1 : Use first number!
Blue Pill Schematics 2 : Use second number!
Distinguish boards by checking the SWIM_IN connection PB9/PB10 seen on STM8S Discovery.
The board is a ST-Link V1 Board, but with access to JTAG pins accessible on CN5. This allows easy reprogramming and reuse of the JTAG header. Programmatical it seems indistinguishable from a e.g. STM32VL Discovery. So here a variant that uses CN5 for JTAG/SWD and CN7 for UART.
Force Bootloader entry is done with shorting CN7 Pin3/4 so PB6 read low while pulled up momentary by PB6. As PB6 is USBUART TX, this pin is idle high. Setting the jumper while BMP is running means shorting the GPIO with output high to ground. Do not do that for extended periods. Un- and repower soon after setting the jump. Best is to short only when unplugged.
Reuse SWIM Pins for Uart (USART1) RX: CN7 Pin2 ->SWIM_IN (PB7)/USART1_RX / SWIM_IN(PB9) TX: CN7 Pin4 -> SWIM_RST_IN(PB6)/USART1_TX
STM32F103 Minimum System Development Board (aka Blue Pill)
This board has the SWD pins of the onboard F103 accessible on one side. Reuse these pins. There are also jumpers for BOOT0 and BOOT1(PB2). Reuse Boot1 as "Force Bootloader entry" jumpered high when booting. Boot1 has 100 k Ohm between MCU and header pin and can not be used as output.
All other port pins are have header access with headers not yet soldered.
This platform can be used for any STM32F103x[8|B] board when JTAG/SWD are accessible, with the LED depending on actual board layout routed to some wrong pin and force boot not working.
Other STM32F103x[8|B] boards
If the needed JTAG connections are accessible, you can use this swlink variant. Depending on board layout, LED and force bootloader entry may be routed to wrong pins.