Skip to content

Commit

Permalink
add binary bundle build to tbb tool
Browse files Browse the repository at this point in the history
  • Loading branch information
mjleehh committed Dec 20, 2024
1 parent 12e4c9c commit 638b9ed
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/bin/tbb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions tools/scripts/src/tbb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 638b9ed

Please sign in to comment.