Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvements to esp32 build configuration #1163

Draft
wants to merge 2 commits into
base: release-0.6
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/esp32-mkimage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,6 @@ jobs:
idf.py reconfigure
idf.py build

- name: "Create a ${{ matrix.soc }} image"
working-directory: ./src/platforms/esp32/build
run: |
./mkimage.sh
ls -l *.img

- name: "Upload ${{ matrix.soc }} artifacts"
uses: actions/upload-artifact@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix bug (with code compiled with OTP-21) with binary pattern matching: the fix introduced with
`02411048` was not completely right, and it was converting match context to bogus binaries.

### Changed

- ESP32 builds now assemble the complet image automatically if `esp32boot.avm` is found from a previous generic_unix build.
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/complet/complete/

- ESP32 cmake build options are now also exposed in `idf.py menuconfig`.

## [0.6.2] - 25-05-2024

### Added
Expand Down
17 changes: 17 additions & 0 deletions src/platforms/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,20 @@ option(AVM_VERBOSE_ABORT "Print module and line number on VM abort" OFF)
option(AVM_CREATE_STACKTRACES "Create stacktraces" ON)

add_subdirectory(tools)

add_custom_command(
OUTPUT atomvm-${IDF_TARGET}.img
DEPENDS gen_project_binary bootloader
COMMENT "Assembling complete image"
COMMAND ${CMAKE_BINARY_DIR}/mkimage.sh
COMMAND echo && cmake -E cmake_echo_color --yellow "ATTENTION: Ignore the following output and use: \"./build/flashimage.sh\" to flash the complete AtomVM image, including libraries."
VERBATIM
USES_TERMINAL)

if (EXISTS ${CMAKE_SOURCE_DIR}/../../../build/libs/esp32boot/esp32boot.avm)
add_custom_target(atomvm_image ALL DEPENDS atomvm-${IDF_TARGET}.img)
endif()


set_property(DIRECTORY "${BUILD_DIR}" APPEND PROPERTY
ADDITIONAL_CLEAN_FILES atomvm-${IDF_TARGET}.img)
18 changes: 18 additions & 0 deletions src/platforms/esp32/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,22 @@ menu "AtomVM configuration"
help
Reboot the ESP32 device if the start/0 entrypoint does not return the `ok` atom.

config AVM_CREATE_STACKTRACES
bool "Create BEAM stack traces."
default y
help
Create stacktraces for AtomVM application debugging, when an application crashes a stacktrace will be emitted.

config AVM_VERBOSE_ABORT
bool "Verbose error when a VM abort occurs."
default n
help
Print the C module and line number when a VM abort occurs.

config ENABLE_REALLOC_GC
bool "Enable experimental optimized realloc garbage collection."
default n
help
Enable experimental optimized garbage collection mode that makes use of C realloc instead of copying data.

endmenu
Loading