STM32 Programming Method Support? (SWD/DFU)

Hi all,
I am looking to design my own board for support with mBed. I think I have narrowed down which series of processors I’d like to use, something STM32 that is already supported. I am wondering which programming methods for STM32 are supported by mBed Studio.

Ideally, I’d like to use the DFU support primarily for programming but adding a ST Link SWD header is no big deal.

hi @richardmartino

Have you seen the Bluepill board?
It’s a good example of how to connect a board to an external debugger (in this case the STLink probe).
Then you can use Mbed Studio to program the board and later debug.

In addition to SWD, I’d also recommend having a serial interface accessible to run automated tests

Hello Richard,

Once a binary has been built with the Mbed Studio you can use any of the following methods to program your STM custom board:

  • The Drag&Drop method - In the file manager, drag the bin file over the Mbed storage device and drop it. This method requires an ST-LINK/V2-1 programmer and the target board shall be equipped with an SWD or JTAG interface connector with the following pins: GND, SWCLK, SWDIO, nRST (optional).

  • Using the STM32 ST-LINK utility. Similar to the previous method, an ST-LINK/V2-1 programmer is needed and the board shall be equipped with an SWD or JTAG interface connector.

  • Utilizing the STM32 USART system memory bootloader built into each STM32 uController chip during manufacturing. The Flasher-STM32 utility can be used in this case. The target board shall be equipped with a UART connector (but other serial interfaces like CAN, USB, I2C, SPI, etc. can be used as well) and the BOOT0,BOOT1 pins shall be available too. For more info read this document and/or visit this site.

You can get a bit more details also by visiting STM32F103C8T6_Hello.

Best regards,

Zoltan