Skip to content

ESP32: Increase Erlang boot.avm partition to 512KB#2254

Merged
bettio merged 1 commit intoatomvm:release-0.7from
bettio:grow-erlang-boot-partition
Apr 3, 2026
Merged

ESP32: Increase Erlang boot.avm partition to 512KB#2254
bettio merged 1 commit intoatomvm:release-0.7from
bettio:grow-erlang-boot-partition

Conversation

@bettio
Copy link
Copy Markdown
Collaborator

@bettio bettio commented Apr 3, 2026

The Erlang standard library has outgrown the 256KB boot.avm partition on ESP32.
This increases it to 512KB, matching the size already used by the Elixir partition layout.

  • partitions.csv: boot.avm size 0x40000 → 0x80000, main.avm offset 0x210000 → 0x250000
  • GetBootAVM.cmake: switch flavor detection from offset-based to ATOMVM_ELIXIR_SUPPORT
    flag, since both partition layouts now share the same main.avm offset
  • Documentation, CHANGELOG, and UPDATING updated with the new offset

Breaking change

Users flashing applications to ESP32 devices with Erlang-only images must update their
flashing offset from 0x210000 to 0x250000.

Notes

  • partitions.csv and partitions-elixir.csv are now identical in content but kept as
    separate files intentionally.
  • mkimage.config.in, flash.sh.in, and CMakeLists.txt did not need changes: they
    reference the boot.avm offset (0x1D0000, unchanged) or use CMake macros that
    auto-resolve from the partition table.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

The Erlang standard library has outgrown the 256KB boot.avm partition.
Increase it to 512KB (0x80000), matching the Elixir partition layout.

The main.avm offset moves from 0x210000 to 0x250000 for Erlang-only
images. Both partition layouts now share the same offsets, so
GetBootAVM.cmake switches from offset-based flavor detection to using
the ATOMVM_ELIXIR_SUPPORT flag.

This is a breaking change: users flashing applications to ESP32 devices
must update their tooling to use 0x250000 instead of 0x210000.

Signed-off-by: Davide Bettio <davide@uninstall.it>
Copy link
Copy Markdown
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this!

@bettio bettio merged commit 28d4906 into atomvm:release-0.7 Apr 3, 2026
175 of 183 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants