How to use with PlatformIO?

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
Post Reply
Kenjutsu
Posts: 7
Joined: Tue Apr 07, 2020 10:58 am

How to use with PlatformIO?

Post by Kenjutsu »

Good day

How do I use this bootloader with PlatformIO?

It works perfectly under Arduino without fail, so thank you so much for your hard work on this. Under macOS, I have found that only Serial upload worked perfectly each time. Now I can add the STM32 HID bootloader to this list ;)

TIA
Pieter

OSX: 10.13.6
Arduino IDE: 1.8.10
PlatformIO: 4.3.3

stas2z
Posts: 120
Joined: Mon Feb 24, 2020 8:17 pm
Answers: 8

Re: How to use with PlatformIO?

Post by stas2z »

With platformio you can define your own custom uploader
https://docs.platformio.org/en/latest/p ... pload-tool

Kenjutsu
Posts: 7
Joined: Tue Apr 07, 2020 10:58 am

Re: How to use with PlatformIO?

Post by Kenjutsu »

Thank you for your reply. I started working on a custom uploader, which was able to find the PB and started uploading, but the blink program never executed and the serial port was missing after the upload. I knew it had to do with some build flags, but I had no idea which ones, so I put it on ice.

By chance, I read this post stm32 shows up on dmesg but not in arduino ide #34 which lead me to Notes on using STM32F103C8T6 Blue Pill. I watched the video How to Install the STM32 USB Bootloader - Tutorial Video. Towards the end was info on how to get the HID bootloader working in PlatformIO. I modified my platformio.ini file accordingly, but the upload failed with sh: hid-flash: command not found

A quick Google led me to [sh: hid-flash: command not found] Error when using hid upload protocol with stm32 bluepill. The fix is to copy the appropriate hid-flash program to the appropriate folder. I do not have framework-arduinoststm32-maple so I downloaded and copied hid-flash from STM32_HID_Bootloader

Now, everything works fine ;) 8-)
Pieter

OSX: 10.13.6
Arduino IDE: 1.8.10
PlatformIO: 4.3.3

Post Reply

Return to “STM32 HID bootloader”