Skip to content

Commit 66e96b4

Browse files
authored
Merge pull request #139 from adafruit/prep-release-0.5.1
prepare for release 0.5.1
2 parents de2e89f + ed68730 commit 66e96b4

File tree

11 files changed

+37
-36
lines changed

11 files changed

+37
-36
lines changed

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,10 @@ TODO more docs later
2828

2929
## Build and Flash
3030

31-
### Requirements
32-
33-
- GCC cross compiler and Make
31+
Following is generic compiling information. Each port may require extra set-up and slight different process e.g esp32s2 require setup IDF.
3432

3533
### Compile
3634

37-
Firstly clone this repo and its submodules with
38-
39-
```
40-
$ git clone --recurse-submodules https://github.com/adafruit/tinyuf2
41-
```
42-
4335
To build this for a specific board, we need to change current directory to its port folder
4436

4537
```
@@ -52,6 +44,8 @@ Then compile with `make BOARD=[board_name] all`, for example
5244
make BOARD=feather_stm32f405_express all
5345
```
5446

47+
The required mcu driver submodule if any will be clone automatically if needed.
48+
5549
### Flash
5650

5751
`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

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# TinyUF2 Changelog
22

3+
## 0.5.1 - 2021.07.30
4+
5+
### ESP32-S2
6+
7+
- Added new board: unexpectedmaker_feathers2_neo
8+
9+
### STM32F4
10+
11+
- fix updating issue with circuipython
12+
313
## 0.5.0 - 2021.07.12
414

515
- Update self-update as application

ports/esp32s2/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UF2 Bootloader **Application** for ESP32-S2
1+
# TinyUF2 "Bootloader Application" for ESP32-S2
22

33
The project is composed of customizing the 2nd stage bootloader from IDF and UF2 factory application as 3rd stage bootloader. **Note**: since IDF is actively developed and change very often, it is included as submodule at `lib/esp-idf`, please run export script there to have your environment setup correctly.
44

@@ -68,9 +68,10 @@ There are a few ways to enter UF2 mode:
6868

6969
To create your own UF2 file, simply use the [Python conversion script](https://github.com/Microsoft/uf2/blob/master/utils/uf2conv.py) on a .bin file, specifying the family as **0xbfdd4eee**. Note you must specify application address of 0x00 with the -b switch, the bootloader will use it as offset to write to ota partition.
7070

71-
To create a UF2 image from a .bin file:
71+
To create a UF2 image from a .bin file using family option `ESP32S2` or its magic number as followss:
7272

7373
```
74+
uf2conv.py firmware.bin -c -b 0x00 -f ESP32S2
7475
uf2conv.py firmware.bin -c -b 0x00 -f 0xbfdd4eee
7576
```
7677

@@ -94,9 +95,7 @@ NOTE: uf2 bootloader, customized 2nd bootloader and partition table can be overw
9495

9596
## Partition
9697

97-
The following partition isn't final yet, current build without optimization and lots of debug is around 100 KB. Since IDF requires application type must be 64KB aligned, uf2 is best with size of 64KB, we will try to see if we could fit https://github.com/microsoft/uf2/blob/master/hf2.md and https://github.com/microsoft/uf2/blob/master/cf2.md within 64KB.
98-
99-
UF2 only uses `ota_0` user application can change partition table (e.g increase ota_0 size, re-arrange layout/address) but should not overwrite the uf2 part. If an complete re-design partition is required, `uf2_bootloader.bin` and the `modified 2nd_stage_bootloader.bin` should be included as part of user combined binary for flash command.
98+
Following is typical partition for 4MB flash, check out the `partition-xMB.csv` for details.
10099

101100
```
102101
# Name, Type, SubType, Offset, Size, Flags

ports/stm32f4/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# TinyUF2 for STM32F4
2+
3+
TinyUF2 reserved 64KB for compatible with eixisting application e.g ciruitpython, even though TinyUF2 actual binary size is much smaller (less than 32KB). Therefore application should start at `0x08010000`.
4+
5+
To create a UF2 image from a .bin file, either use family option `STM32F4` or its magic number as follows:
6+
7+
```
8+
uf2conv.py -c -b 0x08010000 -f STM32F4 firmware.bin
9+
uf2conv.py -c -b 0x08010000 -f 0x57755a57 firmware.bin
10+
```

ports/stm32f4/board_flash.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
//#define FLASH_CACHE_SIZE 4096
3434
//#define FLASH_CACHE_INVALID_ADDR 0xffffffff
3535

36-
3736
#define FLASH_BASE_ADDR 0x08000000
38-
#define APP_LOAD_ADDRESS 0x08010000
3937

4038
/* flash parameters that we should not really know */
4139
static const uint32_t sector_size[] =
@@ -45,17 +43,19 @@ static const uint32_t sector_size[] =
4543
16 * 1024,
4644
16 * 1024,
4745
16 * 1024,
48-
// Application (APP_LOAD_ADDRESS)
46+
// Application (BOARD_FLASH_APP_START)
4947
64 * 1024,
5048
128 * 1024,
5149
128 * 1024,
5250
128 * 1024,
51+
52+
// flash sectors only in 1 MB devices
5353
128 * 1024,
5454
128 * 1024,
5555
128 * 1024,
5656
128 * 1024,
5757

58-
// flash sectors only in 2MiB devices
58+
// flash sectors only in 2 MB devices
5959
16 * 1024,
6060
16 * 1024,
6161
16 * 1024,

ports/stm32f4/boards/feather_stm32f405_express/board.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@ JLINK_DEVICE = stm32f405rg
1010

1111
flash: flash-dfu-util
1212
erase: erase-jlink
13-
14-
#flash: flash-stlink
15-
#erase: erase-stlink

ports/stm32f4/boards/stm32f401_blackpill/board.mk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@ SRC_S += \
88
# For flash-jlink target
99
JLINK_DEVICE = stm32f401cc
1010

11-
flash: flash-jlink
11+
flash: flash-dfu-util
1212
erase: erase-jlink
13-
14-
#flash: flash-stlink
15-
#erase: erase-stlink

ports/stm32f4/boards/stm32f411ce_blackpill/README.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

ports/stm32f4/boards/stm32f411ce_blackpill/board.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
//--------------------------------------------------------------------+
5353

5454
// Flash size of the board
55-
#define BOARD_FLASH_SIZE (512 * 1024)
56-
#define BOARD_FLASH_SECTORS 8
55+
#define BOARD_FLASH_SIZE (512 * 1024)
56+
#define BOARD_FLASH_SECTORS 8
5757

5858
//--------------------------------------------------------------------+
5959
// USB UF2

ports/stm32f4/boards/stm32f411ce_blackpill/board.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ SRC_S += \
88
# For flash-jlink target
99
JLINK_DEVICE = stm32f411ce
1010

11-
flash: flash-jlink
11+
flash: flash-dfu-util
1212
erase: erase-jlink

0 commit comments

Comments
 (0)