No description
Find a file
Michał Moskal aa6917c4dd
Merge pull request #9 from striso/master
Several small fixes for broader hardware support
2020-01-15 17:50:32 -08:00
boards add stm32f4 discovery board (for testing/development) 2020-01-12 10:55:14 +01:00
libopencm3@364ee72d0c Switch to libopencm3 fork with webusb 2018-12-11 13:22:59 -08:00
linker Further cleanup 2019-01-24 17:55:28 +00:00
ocd Build system cleanup 2019-01-24 17:47:48 +00:00
scripts BMP support 2019-03-13 12:25:59 -07:00
tmp Deal with startup logic 2018-05-29 10:26:37 -07:00
Tools Update and Ran Astyle 2015-11-10 13:44:36 -10:00
uf2@89839723d8 update uf2 repository 2020-01-12 10:55:14 +01:00
.clang-format Format 2018-05-29 06:44:46 -07:00
.gitignore v2.3.2 2019-02-01 13:14:31 -08:00
.gitmodules Add uf2 as sub-repo 2018-12-12 23:20:03 -08:00
.travis.yml Travis: Exit early on error 2016-10-19 16:55:38 +02:00
bl.c more hasScreen checks and LED patterns 2020-01-12 10:55:14 +01:00
bl.h Check if screen available before drawing 2019-05-16 14:57:59 -07:00
Bootloader.sublime-project Fresh import of the PX4 boot loaders. 2012-08-04 14:51:25 -07:00
dmesg.c Unique serial number 2018-12-11 13:22:21 -08:00
dmesg.h Unique serial number 2018-12-11 13:22:21 -08:00
flasher.c more hasScreen checks and LED patterns 2020-01-12 10:55:14 +01:00
flashwarning.c Fix typo 2019-02-12 17:38:15 -08:00
ghostfat.c build before flash-ocd target 2020-01-12 10:55:14 +01:00
hf2.c Use bulk endpoints for HF2 (faster) 2018-12-13 20:23:27 -08:00
hw_config.h Increase bootloader delay to 3s 2019-04-15 17:56:39 -07:00
images.c Add BrainPad logo from Greg 2019-04-01 10:35:56 -07:00
LICENSE.md License cleanup 2018-05-29 10:35:52 -07:00
main_f1.c Moving to cleaner build system 2019-01-24 17:21:04 +00:00
main_f3.c Moving to cleaner build system 2019-01-24 17:21:04 +00:00
main_f4.c init BOARD_FORCE_BL pin with pullup/down 2020-01-12 10:55:14 +01:00
main_f7.c Moving to cleaner build system 2019-01-24 17:21:04 +00:00
Makefile build before flash-ocd target 2020-01-12 10:55:14 +01:00
map-file-stats.js Smaller bootloader 2018-12-11 10:02:01 -08:00
pins.h Detect lack of USB power 2019-09-25 13:58:47 +02:00
README.md Add BOOTLOADER_PROTECTION config variable 2019-01-29 11:29:50 +00:00
rules.mk Further cleanup 2019-01-24 17:55:28 +00:00
screen.c Check if screen available before drawing 2019-05-16 14:57:59 -07:00
settings.c Move settings where they belong 2019-01-24 17:57:37 +00:00
settings.h Grow the bootloader to 32k 2018-12-12 22:54:17 -08:00
support.c Smaller bootloader 2018-12-11 10:02:01 -08:00
uf2.h Add familyID checking 2018-11-30 18:55:20 -08:00
uf2cfg.h Fix colors on MVD; v2.7.5 2019-06-22 22:02:55 -07:00
uf2hid.h Return family_id in BININFO 2018-12-11 23:30:46 -08:00
usb.c Disable VBUS USB sensing 2019-03-26 15:09:58 -07:00
usb.h Rename files 2018-05-29 09:09:00 -07:00
usb_msc.c Make screen work 2018-06-04 16:14:25 -07:00
util.c add GPIO D-K 2020-01-11 15:27:15 +01:00
webusb.c Enable webusb 2018-12-11 13:23:04 -08:00
webusb.h Enable webusb 2018-12-11 13:23:04 -08:00
webusb_defs.h Copy stuff over from my dapboot fork 2018-05-29 07:56:37 -07:00
winusb.c WinUSB fixes 2019-01-03 15:48:33 +00:00
winusb.h Copy stuff over from my dapboot fork 2018-05-29 07:56:37 -07:00
winusb_defs.h Add winusb platform BOS 2019-01-03 13:33:28 +00:00

UF2 Bootloaders for STM32

This implements USB mass storage flashing using UF2 format

Build instructions

To build just run make in this folder. This will fetch git submodules if needed and build libopenocm3 (which only happens once).

The binaries will be in build/BOARDNAME. The following files will be built:

  • bootloader.elf - for use with JTAG adapters
  • bootloader.bin - for direct onboard upgrading
  • flasher.uf2 - if you already have a UF2 bootloader, you can just drop this on board and it will update the bootloader
  • flasher16.uf2 - this is similar, but if you have an older UF2 bootloader on the board, that expects the app to start at 16k (0x08004000)

Adding board

Start from f401 (for 64 pin package) or f401c (for 48 pin package) generic board. Copy the folder and modify board.h, follow instructions at https://arcade.makecode.com/hardware/adding#generating-bootloader

License

License: LGPL for libopencm3, BSD for what was left of the PX4 bootloader (see LICENSE.md), MIT for the UF2 stuff, and ISC for the bits from dapboot.

Credits

This repo was forked from https://github.com/PX4/Bootloader

It contains small bits from https://github.com/devanlai/dapboot, mostly the WebUSB, that has been heavily modified though.

The UF2 stuff was mostly lifted from https://github.com/Microsoft/uf2-samdx1 by way of (non-working) https://github.com/Microsoft/uf2-nrf5

The dmesg subsystem is adapted from https://github.com/lancaster-university/codal-core