Closed myst729 closed 2 years ago
protect bootloader is already optional, you only need to define TINYUF2_PROTECT_BOOTLOADER=0
in your board if you don't want it. https://github.com/adafruit/tinyuf2/blob/master/ports/stm32f4/boards.h#L47
developing bootloader always need an programmer. Though self-update is possible, you can compile tinyuf2 without protect bootloader and do the upgrade.
Is your feature request related to a problem? Please describe.
Recently I flashed 0.10.2 to my STM32F401 breakout board. When I try to erase it and flash another firmware, it fails.
By checking release notes I found write protection was introduced in an early version. Following KarlK90's guide, I build a tinyuf2-unlocker uf2 file for STM32F401. When I drag the uf2 to the blackpill drive, it ejects. Then I flash my new bin file with dfu-util, it says successful (100% done). However, after a reboot the blackpill drive appears again, it doesn't unlock. Later I also tried STM32Cube and CMSIS-DAP with no luck.
I'm not familiar with rust, so I don't know whether I did anything wrong in building tinyuf2-unlocker. But it looks fine to me, no errors occur in the whole process.
According to hathach's reply, my CMSIS-DAP might need to upgrade firmware. This has to be done from the host over another downloader, but unfortunately I don't have an extra **-link.
Describe the solution you'd like
A working unlock tool for STM32F401 that doesn't require a downloader would be great.
Describe alternatives you've considered
Maybe make the protection an opt-in in future releases?
Additional context
Flashing with CMSIS-DAP: