From 19d50763277be32179f7b4bd629b21befdb994fa Mon Sep 17 00:00:00 2001 From: Nengzhuo Cai Date: Sun, 6 Mar 2022 21:42:03 -0500 Subject: [PATCH] Update readme --- README.md | 120 +++++------------------------------------------------- 1 file changed, 10 insertions(+), 110 deletions(-) diff --git a/README.md b/README.md index 5f0a4a86f..167c53229 100644 --- a/README.md +++ b/README.md @@ -1,119 +1,19 @@ -# TinyUF2 Bootloader +# Matrix Bootloader -[![Build Status](https://github.com/adafruit/tinyuf2/workflows/Build/badge.svg)](https://github.com/adafruit/tinyuf2/actions)[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) +This repo is a fork of [TinyUF2](https://github.com/adafruit/tinyuf2) for 203 System Mystrix Devices -This repo is cross-platform UF2 Bootloader projects for MCUs based on [TinyUSB](https://github.com/hathach/tinyusb) +Compared to the origonal bootloader, this fork added proper multi RGB pixel support, fastboot, device specific animations, and some Mystrix specific functions. -``` -. -├── apps # Useful applications such as self-update, erase firmware -├── lib # Sources from 3rd party such as tinyusb, mcu drivers ... -├── ports # Port/family specific sources -│ ├── espressif -│ │ └── boards/ # Board specific sources -│ │ └── Makefile # Makefile for this port -│ └── mimxrt10xx -├── src # Cross-platform bootloader sources files -``` -## Features +## Build for Mystrix: -Supported features are + > run the export bat come with esp-idf first -- Double tap to enter DFU, reboot to DFU and quick reboot from application -- DFU with MassStorage (MSC) -- Self update with uf2 file -- Indicator: LED, RGB, TFT -- Debug log with uart/swd + cd ports\espressif + make BOARD=mystrix build -Not all features are implemented for all MCUs, following is supported MCUs and its feature +## Flash + > Mystrix has to be in boot mode (boot pin shorted to ground) and connected to PC via ttl-usb convertpr -| MCU | MSC | Double Reset | Self-update | Write Protection | Neopixel | TFT | -| :---------- | :--: | :----------: | :---------: | :--------------: | :------: | :--: | -| ESP32 S2/S3 | ✔ | Need RC | ✔ | | ✔ | ✔ | -| K32L2 | ✔ | ✔ | | | | | -| LPC55 | ✔ | ✔ | | | ✔ | | -| iMXRT | ✔ | ✔ | ✔ | | ✔ | | -| STM32F3 | ✔ | ✔ | ✔ | ✔ | ✔ | | -| STM32F4 | ✔ | ✔ | ✔ | ✔ | ✔ | | -## Build and Flash - -Following is generic compiling information. Each port may require extra set-up and slight different process e.g esp32s2 require setup IDF. - -### Clone - -Clone this repo with its submodule - -``` -$ git clone git@github.com:adafruit/tinyuf2.git tinyuf2 -$ cd tinyuf2 -$ git submodule update --init -``` - -### Compile - -To build this for a specific board, we need to change current directory to its port folder - -``` -$ cd ports/stm32f4 -``` - -Firstly we need to get all submodule dependency for our board using `tools/get_deps.py` script with either family input or using --board option. You only need to do this once for each family - -``` -python tools/get_deps.py stm32f4 -python tools/get_deps.py --board feather_stm32f405_express -``` - -Then compile with `all` target: - -``` -make BOARD=feather_stm32f405_express all -``` - -### Flash - -`flash` target will use the default on-board debugger (jlink/cmsisdap/stlink/dfu) to flash the binary, please install those support software in advance. Some board use bootloader/DFU via serial which is required to pass to make command - -``` -$ make BOARD=feather_stm32f405_express flash -``` - -If you use an external debugger, there is `flash-jlink`, `flash-stlink`, `flash-pyocd` which are mostly like to work out of the box for most of the supported board. - -### Debug - -To compile for debugging add `DEBUG=1`, this will mostly change the compiler optimization - -``` -$ make BOARD=feather_stm32f405_express DEBUG=1 all -``` - -#### Log - -Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional `LOG=`. -- **LOG=1** will print message from bootloader and error if any from TinyUSB stack. -- **LOG=2** and **LOG=3** will print more information with TinyUSB stack events - -``` -$ make BOARD=feather_stm32f405_express LOG=1 all -``` - -#### Logger - -By default log message is printed via on-board UART which is slow and take lots of CPU time comparing to USB speed. If your board support on-board/external debugger, it would be more efficient to use it for logging. There are 2 protocols: - -- `LOGGER=rtt`: use [Segger RTT protocol](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/) - - Cons: requires jlink as the debugger. - - Pros: work with most if not all MCUs - - Software viewer is JLink RTT Viewer/Client/Logger which is bundled with JLink driver package. -- `LOGGER=swo`: Use dedicated SWO pin of ARM Cortex SWD debug header. - - Cons: only work with ARM Cortex MCUs minus M0 - - Pros: should be compatible with more debugger that support SWO. - - Software viewer should be provided along with your debugger driver. - -``` -$ make BOARD=feather_stm32f405_express LOG=2 LOGGER=rtt all -$ make BOARD=feather_stm32f405_express LOG=2 LOGGER=swo all -``` + make BOARD=mystrix build flash