Skip to content

Commit 1901da0

Browse files
committed
Add esp32boot library to idf.py flash target
Adds the esp32boot library flavor (determined from partition table) to the idf.py flash job, allowing developers to simply skip running mkimage.sh and flashimage.sh from the build directory to flash all of the necessary partitions for a complete install to their device. Signed-off-by: Winford <[email protected]>
1 parent 17ecd4d commit 1901da0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/platforms/esp32/components/libatomvm/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@ target_link_libraries(${COMPONENT_LIB}
3535
INTERFACE libAtomVM "-u platform_nifs_get_nif" "-u platform_defaultatoms_init")
3636

3737
target_compile_features(${COMPONENT_LIB} INTERFACE c_std_11)
38+
39+
include(../../GetBootAVM.cmake)
40+
partition_table_get_partition_info(boot_offset "--partition-name boot.avm" "offset")
41+
42+
message(NOTICE "-- Found atomvmlib esp32boot flavor: ${BOOT_LIBS}")
43+
esptool_py_flash_target_image(flash esp32boot ${boot_offset} ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../build/libs/esp32boot/${BOOT_LIBS}”)

0 commit comments

Comments
 (0)