Implement bootloader #137 (#142)

* Boot: switch to DFU routines. Implements #132 part 1 of 2.

* Boot: boot to DFU shortcut, hard reset USB on each boot. Implements #132 part 2 of 2.

* Deploy scripts: fix path for deploy dfu.

* Bootloader: initial version. Target_f2: rebase, update deployment scripts.

* Bootloader: cleanup, refactor switch2 proc. Readme,wiki: document bootloader.

* Wiki: deploy symlinks as files, bootloader info.

* Target_f2: valid flash size in linker script.

* Github CI: bootloader build and artifacts.

* Bootloader: rename platforms to targets.

* Bootloader: change dfu/os colors.

* disable set -e

* lint code

* add bootloader testing page

Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
あく
2020-10-01 02:05:04 +03:00
committed by GitHub
parent 110a9efc3c
commit 805bb886c0
22 changed files with 691 additions and 16 deletions

View File

@@ -6,30 +6,31 @@ _Overview of Flipper firmware architecture:_
```
.
├── applications # Flipper applications
│   └── furi_test # Test app for checking and demonstrating FURI func
├── core # Main feature like OS, HAL (target-independed)
├── target_f1 # Target-depended code for target F1
│   ├── Drivers # STM HAL drivers
├── applications # Flipper applications
│   └── furi_test # Test app for checking and demonstrating FURI func
├── bootloader # Firmware bootloader, used for `target_f2` and newer
├── core # Main feature like OS, HAL (target-independed)
├── target_f1 # Target-depended code for target F1
│   ├── Drivers # STM HAL drivers
│   │   ├── CMSIS
│   │   └── STM32L4xx_HAL_Driver
│   │   ├── Inc
│   │   │   └── Legacy
│   │   └── Src
│   ├── Inc # Autogenerated CubeMX code and target-depended includes
│   ├── Inc # Autogenerated CubeMX code and target-depended includes
│   ├── Middlewares
│   │   ├── ST
│   │   │   └── STM32_USB_Device_Library
│   │   └── Third_Party
│   │   └── FreeRTOS
│   └── Src # Autogenerated CubeMX code and target-depended sources
├── target_lo # Target-depended code for local linux target
│   └── Src # Autogenerated CubeMX code and target-depended sources
├── target_lo # Target-depended code for local linux target
│   ├── Inc
│   └── Src
└── wiki # Documentation (wiki) generates from this files
└── wiki # Documentation (wiki) generates from this files
├── applications # info about separate features of flipper
├── fw # core, environment info about firmware
└── hw # info about hardware
├── fw # core, environment info about firmware
└── hw # info about hardware
```
# HAL
@@ -48,6 +49,21 @@ Some flipper-specific implementation of gpio/HAL:
Files location: `/app/app_hal.[ch]`
# Bootloader
For production targets('target_f2' and newer) bootloader must be flashed first.
Detailed instruction on how to compile and flash you can find in `bootloader` fodler.
Production version will have following features:
- Hardware initialization
- Firmware CRC check
- Firmware update
- Interactive UI
- Boot process LED indicators
- FS check
- Recovery mode
# OS
We use FreeRTOS 10.0.1 for sheduling. Documentation available on [freertos.org](https://www.freertos.org/a00106.html).