Skip to content

Commit 1ce5620

Browse files
committed
esp32-mkimage: release Elixir flavour with bigger boot.avm partition
esp32boot.avm when including Elixir library doesn't fit into standard boot.avm partition. Starting from this, and Elixir flavour with a bigger boot.avm partition will be released. Signed-off-by: Davide Bettio <davide@uninstall.it>
1 parent d5762d9 commit 1ce5620

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

.github/workflows/esp32-mkimage.yaml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
elixir_version: ["1.17"]
4444
compiler_pkgs: ["clang-10"]
4545
soc: ["esp32", "esp32c2", "esp32c3", "esp32s2", "esp32s3", "esp32c6", "esp32h2"]
46+
flavor: ["", "-elixir"]
4647

4748
env:
4849
CC: ${{ matrix.cc }}
@@ -117,36 +118,44 @@ jobs:
117118
run: |
118119
cp sdkconfig.release-defaults sdkconfig.defaults
119120
120-
- name: "Build ${{ matrix.soc }} with idf.py"
121+
- name: "Build ${{ matrix.soc }}${{ matrix.flavor }} with idf.py"
121122
shell: bash
122123
working-directory: ./src/platforms/esp32/
123124
run: |
124125
rm -rf build
125126
. $IDF_PATH/export.sh
127+
if [ ! -z "${{ matrix.flavor }}" ]
128+
then
129+
mv partitions${{ matrix.flavor }}.csv partitions.csv
130+
fi
126131
idf.py set-target ${{ matrix.soc }}
127132
idf.py reconfigure
128133
idf.py build
129134
130-
- name: "Create a ${{ matrix.soc }} image"
135+
- name: "Create a ${{ matrix.soc }}${{ matrix.flavor }} image"
131136
working-directory: ./src/platforms/esp32/build
132137
run: |
133138
./mkimage.sh
139+
if [ ! -z "${{ matrix.flavor }}" ]
140+
then
141+
mv atomvm-${{ matrix.soc }}.img atomvm-${{ matrix.soc }}${{ matrix.flavor }}.img
142+
fi
134143
ls -l *.img
135144
136145
- name: "Upload ${{ matrix.soc }} artifacts"
137146
uses: actions/upload-artifact@v4
138147
with:
139-
name: atomvm-${{ matrix.soc }}-image
140-
path: ./src/platforms/esp32/build/atomvm-${{ matrix.soc }}.img
148+
name: atomvm-${{ matrix.soc }}${{ matrix.flavor }}-image
149+
path: ./src/platforms/esp32/build/atomvm-${{ matrix.soc }}${{ matrix.flavor }}.img
141150
if-no-files-found: error
142151

143152
- name: "Rename and write sha256sum"
144153
if: startsWith(github.ref, 'refs/tags/')
145154
shell: bash
146155
working-directory: src/platforms/esp32/build
147156
run: |
148-
ATOMVM_IMG="AtomVM-${{ matrix.soc }}-${{ github.ref_name }}.img"
149-
mv atomvm-${{ matrix.soc }}.img "${ATOMVM_IMG}"
157+
ATOMVM_IMG="AtomVM-${{ matrix.soc }}${{ matrix.flavor }}-${{ github.ref_name }}.img"
158+
mv atomvm-${{ matrix.soc }}${{ matrix.flavor }}.img "${ATOMVM_IMG}"
150159
sha256sum "${ATOMVM_IMG}" > "${ATOMVM_IMG}.sha256"
151160
152161
- name: Release
@@ -156,5 +165,5 @@ jobs:
156165
draft: true
157166
fail_on_unmatched_files: true
158167
files: |
159-
src/platforms/esp32/build/AtomVM-${{ matrix.soc }}-${{ github.ref_name }}.img
160-
src/platforms/esp32/build/AtomVM-${{ matrix.soc }}-${{ github.ref_name }}.img.sha256
168+
src/platforms/esp32/build/AtomVM-${{ matrix.soc }}${{ matrix.flavor }}-${{ github.ref_name }}.img
169+
src/platforms/esp32/build/AtomVM-${{ matrix.soc }}${{ matrix.flavor }}-${{ github.ref_name }}.img.sha256

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [0.6.5] - Unreleased
88

9+
### Added
10+
11+
- ESP32: add a new Elixir release "flavor" with a bigger boot.avm partition that has room for
12+
Elixir standard library modules
13+
914
## [0.6.4] - 2024-08-18
1015

1116
### Added

UPDATING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
# AtomVM Update Instructions
88

9+
## v0.6.4 -> v0.6.5
10+
11+
- ESP32: partitioning schema for Elixir flavor is different, so app offset has been changed for
12+
Elixir images. Make sure to use `0x250000` as offset in your mix.exs or when performing manual
13+
flashing.
14+
915
## v0.6.0-beta.1 -> v0.6.0-rc.0
1016

1117
- Drivers that send messages from Esp32 callbacks should use new functions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2018-2021 Davide Bettio <davide@uninstall.it>
2+
# Copyright 2018-2021 Fred Dushin <fred@dushin.net>
3+
#
4+
# SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
5+
6+
# Name, Type, SubType, Offset, Size, Flags
7+
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
8+
nvs, data, nvs, 0x9000, 0x6000,
9+
phy_init, data, phy, 0xf000, 0x1000,
10+
factory, app, factory, 0x10000, 0x1C0000,
11+
boot.avm, data, phy, 0x1D0000, 0x80000,
12+
main.avm, data, phy, 0x250000, 0x100000

0 commit comments

Comments
 (0)