Turning STM32 bluepilot into a debugger (daplink)


In order to tune an arm M0 kernel board, the official demo board is used. The daplink debugger is integrated on the board.

In order to make it easy to use, I cut off the target board from the daplink, and then connected the daplink with the target board with DuPont cable. However, Keil could not find the MCU, no matter how he tried, Keil could find the daplink, and it was OK to test the MCU. Later, I connected the daplink with other MCU, and determined that the daplink was broken.

Although I have a j-link on hand, I have tried it. Unfortunately, this j-link does not support this MCU. If you don’t start debugging, you can’t continue to struggle, and what you did before is in vain.

Later, I thought that someone transplanted daplink to STM32. I have several STM32 boards of different models in my hand, so I can try to make a DAP link myself.

Then find a daplink firmware of stm32f103c8 on GitHub, as follows:


GitHub address is:https://github.com/RadioOperator/STM32F103C8T6_CMSIS-DAP_SWO, which contains the firmware compiled as follows:


There are three kinds of board firmware: bluepilot and stlink_ V2a, stlink-v2b, of which bluepeel is sold on a certain treasure, many of which are also very cheap. A board of stm32f103c8 is as follows:


It happens that I also have this board. I used st link to burn an unremap firmware for this board. There are also instructions in the warehouse. The IO port I used for burning this firmware is as follows:


The corresponding pins are:

PB6 -->  reSET
PB7 --> SWO

After connecting to the computer, Keil can find daplink and MCU, as follows:


We can go on and on.