Skip to content

Commit c5b6722

Browse files
committed
docs: added partition docs
1 parent c00d95b commit c5b6722

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

docs/PARTITIONS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Partition Table
2+
===============
3+
4+
The partition table is flashed during provisioning and created within
5+
the [provision tool](https://github.com/firefly/pixie-repl) with the
6+
following configuration:
7+
8+
```
9+
const table = new PartitionTable(16 * 1024 * 1024);
10+
table.addPartition("attest", "data", "nvs", 0x009000, 0x7000, true);
11+
table.addPartition("factory", "app", "factory", 0x0010000, 0x700000, false);
12+
table.addPartition("nvs", "data", "nvs", 0x0f00000, 0x100000, false);
13+
```
14+
15+
The bootloader and *attestation data* are also flashed during provisioning,
16+
so it is important when flashing a device to not overwrite these partitions.
17+
18+
In general, when uisng the `idf.py` command, only the `app-flash` should
19+
be used to add new firmware, preserving the other partitions.
20+
21+
22+
Layout
23+
------
24+
25+
| Type | Name | Offset | Size | Purpose |
26+
| :------------ | :-------- | :---------------- | :--------------- | :------------------- |
27+
| *bootloader* | | `0x0` (0kb) | `0x8000` (32kb) | 2nd stage bootloader |
28+
| *partitions* | | `0x8000` (32kb) | `0x1000` (4kb) | partition table |
29+
| `data/nvs` | `attest` | `0x9000` (36kb) | `0x7000` (28kb) | provision data |
30+
| `app/factory` | `factory` | `0x10000` (64kb) | `0x700000` (7Mb) | firmware |
31+
| *unused* | | `0x710000` | `0x7f0000` | reserved |
32+
| `data/nvs` | `nvs` | `0xf00000` (15Mb) | `0x100000` (1Mb) | user storage |
33+
34+
There is a reserved space for future use, which is being invetigsted.
35+
Currently we are considering 2 options:
36+
37+
1. a single ~15Mb partition for the factory app
38+
2. a small (simple) factory app with DFU support and a single OTA partition, which the factory app would be responsible for failed flash (to the OTA) recovery

0 commit comments

Comments
 (0)