From 44567879f668ec414a445b8fbbe50806ff6b6b10 Mon Sep 17 00:00:00 2001 From: alstoepp <103357086+alstoepp@users.noreply.github.com> Date: Wed, 13 Apr 2022 17:22:04 +0200 Subject: [PATCH] stm32: Add STM32F072 16KiB bootloader option (#5404) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexander Stöpperger --- docs/Bootloaders.md | 22 ++++++++++++++++++++++ src/stm32/Kconfig | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/Bootloaders.md b/docs/Bootloaders.md index 03ef4969..884cfbfd 100644 --- a/docs/Bootloaders.md +++ b/docs/Bootloaders.md @@ -385,6 +385,28 @@ not available, so it may be done by setting pin PA2 low if you flashed the SKR Mini E3's "PIN" document. There is a ground pin next to PA2 which you can use to pull PA2 low. +### STM32F103/STM32F072 with MSC bootloader + +The [MSC bootloader](https://github.com/Telekatz/MSC-stm32f103-bootloader) is a driverless bootloader capable of flashing over USB. + +It is possible to flash the bootloader via 3.3v serial using stm32flash as noted +in the stm32duino section above, substituting the file name for the desired +MSC bootloader binary (ie: MSCboot-Bluepill.bin for the blue pill). + +For STM32F072 boards it is also possible to flash the bootloader over USB (via DFU) +with something like: + +``` + dfu-util -d 0483:df11 -a 0 -R -D MSCboot-STM32F072.bin -s0x08000000:leave +``` + +This bootloader uses 8KiB or 16KiB of flash space, see description of the bootloader +(the application must be compiled with with the corresponding starting address). + +The bootloader can be activated by pressing the reset button of the board twice. +As soon as the bootloader is activated, the board appears as a USB flash drive +onto which the klipper.bin file can be copied. + ## STM32F4 micro-controllers (SKR Pro 1.1) STM32F4 microcontrollers come equipped with a built-in system bootloader diff --git a/src/stm32/Kconfig b/src/stm32/Kconfig index a60f0f5c..c6df46b3 100644 --- a/src/stm32/Kconfig +++ b/src/stm32/Kconfig @@ -201,7 +201,7 @@ choice config STM32_FLASH_START_800 bool "2KiB bootloader (HID Bootloader)" if MACH_STM32F103 config STM32_FLASH_START_4000 - bool "16KiB bootloader (HID Bootloader)" if MACH_STM32F207 || MACH_STM32F401 || MACH_STM32F4x5 || MACH_STM32F103 + bool "16KiB bootloader (HID Bootloader)" if MACH_STM32F207 || MACH_STM32F401 || MACH_STM32F4x5 || MACH_STM32F103 || MACH_STM32F072 config STM32_FLASH_START_20000 bool "128KiB bootloader (SKR SE BX v2.0)" if MACH_STM32H743