From 2326640cd70e89227c0d6ca63793f8b1ebe37141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 11 Apr 2016 23:06:19 +0200 Subject: [PATCH] remove STM32duino-bootloader from README --- README.md | 50 +++++++------------------------------------------- 1 file changed, 7 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 40aba9f..7900bfc 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,6 @@ The underlying template also supports following board: **Which board is used is defined in the Makefile**. This is required: - for the linker script to know the memory layout (flash and RAM) -- to flash the corresponding bootloader - map the user LEDs and buttons provided on the board code @@ -72,10 +71,8 @@ dependencies ------------ The source code uses the [libopencm3](http://libopencm3.org/) library. -It also uses the [STM32duino-bootloader](https://github.com/rogerclarkmelbourne/STM32duino-bootloader) for easier DFU flashing. - -Both projects are already git submodules. -To initialize and get them you just need to run once: `git submodule init` and `git submodule update`. +The projects is already a git submodules. +To initialize and it you just need to run once: `git submodule init` and `git submodule update`. firmware -------- @@ -90,52 +87,19 @@ To generate doxygen documentation run `make doc`. flash ----- -The `Makefile` offers two ways of flashing the firmware on the board: -- over the SWD port (Serial Wire Debug) -- using the USB DFU interface (Device Firmware Upgrade) - -The default mechanism `make flash` uses DFU. - -### SWD - -To flash over SWD you need an SWD adapter. +The firmware will be flashed using SWD (Serial Wire Debug). +For that you need an SWD adapter. The `Makefile` uses a ST-Link V2, along with the OpenOCD software. - -The main firmware will be placed after the bootloader. -Thus you first need to flash the bootloader, else the main firmware will not be started. -To flash the bootloader run `make bootloader`. - -SWD is nice because it will always works, even if USB is buggy or the code on the board is stuck. -It also does not require to press on any reset button. - -To flash using SWD run `make flash-swd` +To flash using SWD run `make flash` SWD also allows to debug the code running on the micro-controller using GDB. To start the debugging session run `make debug`. -### DFU - - -To flash using DFU you just need to connect the USB port. -When booting the micro-controller will start the STM32duino-bootloader bootloader. -This configures the USB to accept firmware updates. -After a short timeout (<1s) it will start the main firmware. - -The main firmware will not be started if the bootloader is missing. -You only have to flash the bootloader once, using the SWD method. -To flash the bootloader run `make bootloader`. - -To then flash using DFU run `make flash-dfu` or simply `make flash`. -This will try to reset the board to start the bootloader. -Else you will need to reset the board manually using the reset button. +USB +--- The firmware also offer serial communication over USB using the CDC ACM device class. -Since the micro-controller first starts the bootloader, it is recognised a DFU device. -To provide the CDC ACM interface the host needs to re-enumerate the USB device. -For this a USB disconnect is simulated by pulling USB D+ low for a short time (in software or using a dedicated circuit). -Then the host will re-enumerate the USB device and see the CDC ACM interface. You can also reset the board by setting the serial width to 5 bits. -This allows to restart the bootloader and flash new firmware using DFU. To reset the board run `make reset`. This only works if the USB CDC ACM is running correctly and the micro-controller isn't stuck.