aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-10-04 10:14:16 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-10-11 10:50:51 -0400
commit75fa74313c178034b80f7c1e3ad0a7b55c34a3d6 (patch)
treee161e1440dbe8de4a248a75a00457a238743c5a6 /docs
parent215b4c5a1ef9faf261fea0989051f7dc540a74df (diff)
downloadkutter-75fa74313c178034b80f7c1e3ad0a7b55c34a3d6.tar.gz
kutter-75fa74313c178034b80f7c1e3ad0a7b55c34a3d6.tar.xz
kutter-75fa74313c178034b80f7c1e3ad0a7b55c34a3d6.zip
stm32f1: Add support for building with bootloader support
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/Bootloaders.md38
1 files changed, 31 insertions, 7 deletions
diff --git a/docs/Bootloaders.md b/docs/Bootloaders.md
index 94b9b0dd..830077ef 100755
--- a/docs/Bootloaders.md
+++ b/docs/Bootloaders.md
@@ -209,11 +209,11 @@ avrdude -c stk500v2 -p atmega2560 -P /dev/ttyACM0 -u -Uflash:w:out/klipper.elf.h
STM32F103 micro-controllers (Blue Pill devices)
===============================================
-The STM32F103 devices have a ROM that can flash a bootloader via 3.3V
-serial. To access this ROM, one should connect the "boot 0" pin to
-high and "boot 1" pin to low, and then reset the device. The
-"stm32flash" package can then be used to flash the device using
-something like:
+The STM32F103 devices have a ROM that can flash a bootloader or
+application via 3.3V serial. To access this ROM, one should connect
+the "boot 0" pin to high and "boot 1" pin to low, and then reset the
+device. The "stm32flash" package can then be used to flash the device
+using something like:
```
stm32flash -w out/klipper.bin -v -g 0 /dev/ttyAMA0
```
@@ -224,8 +224,32 @@ stm32flash protocol uses a serial parity mode which the Raspberry Pi's
https://www.raspberrypi.org/documentation/configuration/uart.md for
details on enabling the full uart on the Raspberry Pi GPIO pins.
-This document does not describe the method to flash an application via
-an STM32F103 bootloader.
+After flashing, set both "boot 0" and "boot 1" back to low so that
+future resets boot from flash.
+
+## STM32F103 with stm32duino bootloader ##
+
+The "stm32duino" project has a USB capable bootloader - see:
+https://github.com/rogerclarkmelbourne/STM32duino-bootloader
+
+This bootloader can be flashed via 3.3V serial with something like:
+```
+wget 'https://github.com/rogerclarkmelbourne/STM32duino-bootloader/raw/master/binaries/generic_boot20_pc13.bin'
+stm32flash -w generic_boot20_pc13.bin -v -g 0 /dev/ttyAMA0
+```
+
+This bootloader uses 8KiB of flash space (the application must be
+compiled with a start address of 8KiB). Flash an application with
+something like:
+```
+dfu-util -d 1eaf:0003 -a 2 -R -D out/klipper.bin
+```
+
+The bootloader typically runs for only a short period after boot. It
+may be necessary to time the above command so that it runs while the
+bootloader is still active (the bootloader will flash a board led
+while it is running). Alternatively, set the "boot 0" pin to low and
+"boot 1" pin to high to stay in the bootloader after a reset.
LPC176x micro-controllers (Smoothieboards)
==========================================