Skip to content

Commit 1e0d881

Browse files
committed
Enable reproducible builds for ESP32 platform
Use reproducible builds for ESP32 platform so that locally build binaries will be an exact match of release binaries for the same tag. Error message line info will start from the source path, trimming any diectories leading up to it. SHA256 sums of binaries built from release tags should be an exact match of release binaries. Signed-off-by: Winford <winford@object.stream>
1 parent b1686ff commit 1e0d881

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ instead `badarg`.
9494
- ESP32 Elixir support is determined automatically from the offset of `boot.avm` in the partition
9595
table.
9696
- ESP32 ports now flash a complete working image using the `idf.py flash` task.
97+
- ESP32 platform now uses reproducible builds.
9798

9899
### Fixed
99100

doc/src/programmers-guide.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,22 @@ Deployment of the AtomVM virtual machine and an AtomVM application currently req
163163

164164
For more information about deploying the AtomVM image and AtomVM applications to your device, see the [Getting Started Guide](./getting-started-guide.md)
165165

166+
```{note}
167+
The ESP32 platform uses reproducible builds; this has an effect when doing advanced debugging with
168+
GDB because paths are altered to strip away leading paths that are substituted with the following
169+
placeholders:
170+
171+
* Path to ESP-IDF is replaced with /IDF
172+
* Path to the project is replaced with /IDF_PROJECT
173+
* Path to the build directory is replaced with /IDF_BUILD
174+
* Paths to components are replaced with /COMPONENT_NAME_DIR (where NAME is the name of the
175+
component)
176+
177+
For information on how to configure GDB for debugging reproducible builds, consult the ESP-IDF
178+
documentation about
179+
[Reproducible Builds and Debugging](https://docs.espressif.com/projects/esp-idf/en/v5.5/esp32/api-guides/reproducible-builds.html#reproducible-builds-and-debugging).
180+
```
181+
166182
## Applications
167183

168184
An AtomVM application is a collection of BEAM files, aggregated into an AtomVM "Packbeam" (`.avm`) file, and typically deployed (flashed) to some device. These BEAM files be be compiled from Erlang, Elixir, or any other language that targets the Erlang VM.

0 commit comments

Comments
 (0)