AtomVM icon indicating copy to clipboard operation
AtomVM copied to clipboard

Add ability to boot from multiple AVM partitions (ESP32 only).

Open fadushin opened this issue 3 years ago • 0 comments

This change set modifies the partitioning scheme on ESP32 flash modules, to allow multiple application (data) partitions to be flashed to the device. An NVS key (boot_partition) in the atomvm namespace is used to control which partition should be used to boot the application. By default, the first partition (app1.avm) is used, which has the same address as the main.avm application it replaces.

This change set also adds a KConfiguration entry to tell the AtomVM application to revert to booting off the first partition if the running application fails to return the atom ok. This entry is disabled by default.

These changes are intended to provide support for "soft" (meaning only the Erlang/Elixir code) over-the-air updates of AtomVM applications.

This change is backwards-compatible with previous releases; however, the allowable partition size of an AtomVM application is reduced from 2MB to just under 1MB. Most users should find this reduction permissible.

Signed-off-by: Fred Dushin [email protected]

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

fadushin avatar Sep 17 '22 20:09 fadushin