STM32 HID Bootloader - Sumup

Bootloader for STM32F103 and STM32F4xx micro-controllers
No special driver is required. Support for Windows, Linux and Mac Operating System
User avatar
mack
Posts: 37
Joined: Fri Mar 08, 2019 7:59 pm
Location: Australia
OS: Windows 10
IDE: Arduino 188
Core: Roger (BluePill),StevStrong (F407 Black)
Board: BluePill,F407 Black

Re: STM32 HID Bootloader - Sumup

Post by mack » Mon May 06, 2019 12:08 pm

Ok, SteveStrong core does work but differs from Rogers core in that you have to move Boot1 to 1 to do the upload.
Thanks Vassillis and Steve

User avatar
Vassilis
Posts: 174
Joined: Wed Feb 27, 2019 5:09 pm
Answers: 2
Location: Thessaloniki, Greece
OS: Linux, Win10, MacOS
IDE: Arduino 1.8.9
Core: Roger, STM official
Board: Bluepill, Maple mini, STM32F4xx
Contact:

Re: STM32 HID Bootloader - Sumup

Post by Vassilis » Fri Jun 14, 2019 4:48 pm

Arduino_Core_STM32 now supports STM32 HID Bootloader
https://github.com/stm32duino/Arduino_C ... 2/pull/540.
-Vassilis Serasidis

User avatar
zoomx
Posts: 52
Joined: Tue Mar 05, 2019 8:10 am
Location: Mt Etna - Italy
OS: Windows 7 & 10
IDE: 1.8.8
Core: Roger & STM official
Board: Bluepill, Maple mini

Re: STM32 HID Bootloader - Sumup

Post by zoomx » Mon Jun 17, 2019 10:10 am

Great job!

User avatar
Vassilis
Posts: 174
Joined: Wed Feb 27, 2019 5:09 pm
Answers: 2
Location: Thessaloniki, Greece
OS: Linux, Win10, MacOS
IDE: Arduino 1.8.9
Core: Roger, STM official
Board: Bluepill, Maple mini, STM32F4xx
Contact:

Re: STM32 HID Bootloader - Sumup

Post by Vassilis » Mon Jun 17, 2019 3:35 pm

Thanks !
-Vassilis Serasidis

Andy2No
Posts: 27
Joined: Wed Aug 21, 2019 1:59 pm
IDE: Arduino 1.8.9 & 1.8.3
Core: STM official, MightyCore

Re: STM32 HID Bootloader - Sumup

Post by Andy2No » Sun Aug 25, 2019 4:49 am

Can this be used on a Maple Mini clone, instead of the Maple DFU Bootloader?

If so, does that make it possible to upload a sketch without having to press the Reset button at the right time?

User avatar
Vassilis
Posts: 174
Joined: Wed Feb 27, 2019 5:09 pm
Answers: 2
Location: Thessaloniki, Greece
OS: Linux, Win10, MacOS
IDE: Arduino 1.8.9
Core: Roger, STM official
Board: Bluepill, Maple mini, STM32F4xx
Contact:

Re: STM32 HID Bootloader - Sumup

Post by Vassilis » Sun Aug 25, 2019 3:01 pm

Andy2No wrote:
Sun Aug 25, 2019 4:49 am
Can this be used on a Maple Mini clone, instead of the Maple DFU Bootloader?
Yes
Andy2No wrote:
Sun Aug 25, 2019 4:49 am
If so, does that make it possible to upload a sketch without having to press the Reset button at the right time?
Correct
-Vassilis Serasidis

Andy2No
Posts: 27
Joined: Wed Aug 21, 2019 1:59 pm
IDE: Arduino 1.8.9 & 1.8.3
Core: STM official, MightyCore

Re: STM32 HID Bootloader - Sumup

Post by Andy2No » Sun Aug 25, 2019 7:26 pm

Excellent. Thanks, Vassilis. I'll have a go at that shortly.

Andy2No
Posts: 27
Joined: Wed Aug 21, 2019 1:59 pm
IDE: Arduino 1.8.9 & 1.8.3
Core: STM official, MightyCore

Re: STM32 HID Bootloader - Sumup

Post by Andy2No » Mon Aug 26, 2019 7:45 am

No luck so far...

I apparently flashed my Maple Mini successfully, using a USB keyring style ST-Link clone - and verified it, but now the LED doens't come on when I plug it in, and I just get this, when I try to upload a sketch:

> Trying to open the [COM18]...
> Unable to open the [COM18]
> Searching for [1209:BEBA] device...
##########
Error - [1209:BEBA] device is not found :(> Searching for [COM18] ...
> Finish
the selected serial port > Finish
does not exist or your board is not connected

I'll probably try putting one of the original bootloaders back on, just for the experience, then maybe come back to it.

Ah! In checking the filename of the bootloader I flashed, which was hid_generic_pc13.bin, I now see there's also one called hid_maple_mini.bin... I'll try that then :)

The instructions refer to the other one, but I guess it's meant for a Blue Pill, after all.

Andy2No
Posts: 27
Joined: Wed Aug 21, 2019 1:59 pm
IDE: Arduino 1.8.9 & 1.8.3
Core: STM official, MightyCore

Re: STM32 HID Bootloader - Sumup

Post by Andy2No » Mon Aug 26, 2019 8:01 am

Yep. That one worked.

Windows detected it and installed a driver, this time. The sketch loaded, the LED came back on, and a virtual serial port appeared for it, which I was able to use with the serial monitor window, once I'd selected the port manually.

Once the wires for the ST-Link clone are connected, with a wire from 5V on the ST-Link to Vin on the Maple Mini clone, it's as easy as using the ST-Link software with a Discovery or Nucleo, and very quick.

FWIW, these are the pages I referred to:

https://github.com/Serasidis/STM32_HID_ ... /README.md

https://github.com/rogerclarkmelbourne/ ... onnections

https://os.mbed.com/users/hudakz/code/M ... /shortlog/

- not everthing on the mbed page is directly relevant, but there's a good pinout diagram of the Maple Mini, a nice clear presentaion of the ST-Link hook up connections, and if you get really stuck, the bits about changing fuses / code protection settings, might prove useful.

User avatar
Vassilis
Posts: 174
Joined: Wed Feb 27, 2019 5:09 pm
Answers: 2
Location: Thessaloniki, Greece
OS: Linux, Win10, MacOS
IDE: Arduino 1.8.9
Core: Roger, STM official
Board: Bluepill, Maple mini, STM32F4xx
Contact:

Re: STM32 HID Bootloader - Sumup

Post by Vassilis » Mon Aug 26, 2019 11:06 am

Nice !

The next version of HID Bootloader that is almost ready will only have one bin file for all F103 cards. The number and polarity of the LED, DISC pins are set by using a Java program I wrote. By default, the LEDs and DISC pins are not set (not used).

More specific, the .bin file is patched before you burn the MCU, according to the board you use.

A typical patch example is:
java pinConfig hid_bl.bin led1=pb1 disc=~pb9 in case you use Maple Mini board
-Vassilis Serasidis

Post Reply