This article describes specifics for the Blue Pill (STM32Duino) board based on a ST STM32F103 or CKS CS32F103. The Blue Pill board is a Arduino nano like board, named Blue Pill. Older versions of the Blue Pill board featured a ST STM32F103 as target MCU while the latest version of the board is shipped with a CKS CS32F103 (CS32F103CB) instead. The board does not come with an standard debug connector but with 4 pins which can be used to connect an J-Link to the MCU.
- All current J-Link models. In case of doubt, please check Overview about which models / revisions support RISC-V
- Embedded Studio Version 4.30c or later
- J-Link software V6.61a or later
Preparing for J-Link
The Blue Pill board does not come with a standard debug connector but populates the debug JTAG signals on a 4 header that can be found on the opposite of the USB interface. Therefore, it can be manually wired in case J-Link shall be connected to it.
The following guide will describe how the Blue Pill can be connected to your J-Link.
- Now connect the board with e.g. jumperwires to your J-Link probe.
- The following table shows how the Signals should be connected on both the board and J-Link side.
|J-Link 20 pin debug interface||Pin on eval board pads|
|Pin 4 (GND)||GND|
|Pin 9 (TCK)||SWCLK|
|Pin 7 (TMS)||SWIO|
|Pin 1 (VTref)||3V3|
The resulting connection will then look like this:
- Power the board via the USB port.
- Verify the Connection with e.g. J-Link Commander. The output should look as follows:
Debugging in SEGGER Embedded Studio
Example projects for SEGGER Embedded Studio
The following example project was created with the SEGGER Embedded Studio project wizard and runs out-of-the-box on the Blue Pill (CS32F103 MCU) board. It is a simple Hello World sample and can be downloaded here: