Page 1 of 3

STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 1:54 am
by TheKikGen
Hi all.

Just to inform you that I just published the code for my TKG-HID-Bootloader and its companion CLI tool TKG-Flash.

https://github.com/TheKikGen/stm32-tkg-hid-bootloader

This is a HID (Human Interface Device) driverless booloader for the STM32F10x family line, including the famous Bluepill. It was largely inspired from the STM32_HID_Bootloader of Vassilis Serasidis (respect to him !), but this project is not really a fork anymore due to a lot of enhancements, code optimizations and bug corrections.

EDIT : I need also to mention here Michel Stempin (squonk42) for his work on the HID bootloader !

The bootloder supports transparently low-medium and high density devices without recompilation (HD devices support is not working properly with the STM32_HID_Bootloader). As its parent project, tkg-hid-bootloader doesn't use any ST libraries, but only CMSIS from the ST SDK. So, the bootloader size is under 2 Kbytes, allowing more space for user programs (user flash memory starts at 0x08000800).

The TKG-FLASH CLI has many new features, like dump, simulation mode, progression bar, etc... and compatibilty with the STM32DUINO platform, and original HID-FLASH CLI is preserved.

Be free to test it with your own projects ;) !

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 4:23 am
by feluga
+1
Thanks for sharing!
Very nice! Congratulations!

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 5:09 am
by fpiSTM
Nice! ;)

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 7:51 am
by stevestrong
+1
I see that bootloaders are very popular nowadays :D
I assume you will port it to F3 and F4 soon. ;)

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 9:52 am
by stas2z
Most f4's have internal system dfu bl, so its not necessary unless you need some specific functions for your own project

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 10:48 am
by stevestrong
Yes, I need to upload over USB without setting jumpers and pressing buttons.
And is practical, unless the core supports direct jump to ROM bootloader via USB serial trigger.

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 11:10 am
by stas2z
Im sure, implementing cdc triggered jump to sysbl for yours or roger's core which supports limited amount of mcus will not be difficult, at least its easier than writing your own bl. For hal based core its wip and im using it for several months already.

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 12:57 pm
by stevestrong
Nice.
But that needs, again, a special driver to be installed on the host system right? Otherwise you cannot use DFUse or dfu-util or cubeprog.
The HID or CDC bootloaders do not require any special driver. ;)

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 3:57 pm
by stas2z
stevestrong wrote: Thu Apr 30, 2020 12:57 pm Nice.
But that needs, again, a special driver to be installed on the host system right? Otherwise you cannot use DFUse or dfu-util or cubeprog.
The HID or CDC bootloaders do not require any special driver. ;)
Sure, and we already discussed it)
1. it's needed only once to install a driver, and also, you need a driver anyway, to initially flash your bootloader, for usbttl device via system serial bootloader, or for system dfu bootloader or for stlink dongle, no matter, all these ways require drivers
2nd, it's a Windows only stuff, so i personally don't care ;)

Re: STM32F10x light HID driverless bootloader supporting HD devices

Posted: Thu Apr 30, 2020 4:58 pm
by fpiSTM
stas2z wrote: Thu Apr 30, 2020 3:57 pm Sure, and we already discussed it)
1. it's needed only once to install a driver, and also, you need a driver anyway, to initially flash your bootloader, for usbttl device via system serial bootloader, or for system dfu bootloader or for stlink dongle, no matter, all these ways require drivers
2nd, it's a Windows only stuff, so i personally don't care ;)
+1 :mrgreen: