remove STM32duino-bootloader from README

This commit is contained in:
King Kévin 2016-04-11 23:06:19 +02:00
parent c526463e0a
commit 2326640cd7
1 changed files with 7 additions and 43 deletions

View File

@ -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.