From 638b9ed76c8d4a4bdbed32a17be0936f58d83924 Mon Sep 17 00:00:00 2001 From: Michael Jonathan Lee Date: Fri, 20 Dec 2024 17:35:25 +0000 Subject: [PATCH] add binary bundle build to tbb tool --- tools/bin/tbb | 15 +++++++++++++++ tools/scripts/src/tbb.sh | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/tools/bin/tbb b/tools/bin/tbb index 85795e26..9bd6bcf8 100755 --- a/tools/bin/tbb +++ b/tools/bin/tbb @@ -415,6 +415,21 @@ if tbd_is_item_in_list "build" $commands; then tbd_run cmake --build "$build_dir/$platform" fi +if tbd_is_item_in_list "bin" $commands; then + tbd_logi "creating merged binary" + if ! pushd "$build_dir/$platform" > /dev/null ; then + tbd_abort "failed to enter build directory" + fi + + tbd_run cmake --build "$PWD" \ + -t bootloader \ + -t partition_table_bin \ + -t gen_project_binary \ + -t littlefs_storage_bin \ + -t blank_ota_data + tbd_run esptool.py --chip esp32 merge_bin -o "tbd-${platform}-flash.bin" @flash_args +fi + if tbd_is_item_in_list "flash" $commands; then tbd_logi "flashing to device" tbd_abort "not implemented" diff --git a/tools/scripts/src/tbb.sh b/tools/scripts/src/tbb.sh index 295f49f5..06f5a021 100755 --- a/tools/scripts/src/tbb.sh +++ b/tools/scripts/src/tbb.sh @@ -138,6 +138,21 @@ if tbd_is_item_in_list "build" $commands; then tbd_run cmake --build "$build_dir/$platform" fi +if tbd_is_item_in_list "bin" $commands; then + tbd_logi "creating merged binary" + if ! pushd "$build_dir/$platform" > /dev/null ; then + tbd_abort "failed to enter build directory" + fi + + tbd_run cmake --build "$PWD" \ + -t bootloader \ + -t partition_table_bin \ + -t gen_project_binary \ + -t littlefs_storage_bin \ + -t blank_ota_data + tbd_run esptool.py --chip esp32 merge_bin -o "tbd-${platform}-flash.bin" @flash_args +fi + if tbd_is_item_in_list "flash" $commands; then tbd_logi "flashing to device" tbd_abort "not implemented"