Embedded flash partition layout calculator

Calculate partition [index,start,allocated bytes] and remaining flash bytes with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use partition [index,start,allocated bytes] and remaining flash bytes to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Partition requested sizes (bytes)
1000,5000,12000
Erase sector alignment (bytes)
4096
Total flash bytes
65536
Reserved bytes at beginning
4096
Partition [index,start,allocated bytes]
[[0,4096,4096],[1,8192,8192],[2,16384,12288]]
Remaining flash bytes
36864

Try another scenario

Partition requested sizes (bytes)
[2000, 8000, 15000]
Erase sector alignment (bytes)
4096
Total flash bytes
65536
Reserved bytes at beginning
4096
Partition [index,start,allocated bytes]
[[0,4096,4096],[1,8192,8192],[2,16384,16384]]
Remaining flash bytes
32768
Calculation method

Calculation method

Partition [index,start,allocated bytes]

Align starting reserve and each partition size upward to erase sector boundary.

Remaining flash bytes

Total minus aligned end; insufficient capacity is rejected.

Symbols and units
a
Partition requested sizes (bytes)
b
Erase sector alignment (bytes)
c
Total flash bytes
d
Reserved bytes at beginning

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Image sizes, erase sectors, boot slots, reserve. Returns Aligned partitions and unused space. All coefficients and observations are user supplied; results describe only the stated mathematical model. Quantities are deterministic calculations from supplied observations and assumptions; no external data is fetched. Supported limits: Finite inputs only; numeric fields bounded as labelled. Lists and JSON records are limited to 256 entries unless a stricter tool bound is stated. No automatic design approval, legal conclusion, treatment recommendation or safety certification. Partition requested sizes (bytes): minimum 0, maximum 1000000000. Erase sector alignment (bytes): minimum 1, maximum 1000000000. Total flash bytes: minimum 1, maximum 1000000000000. Reserved bytes at beginning: minimum 0, maximum 1000000000.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.