From b1838d1c5b6bd27757d50d784543ea0ae16c1769 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 24 May 2025 11:17:46 +0200 Subject: Remove `st-flash`-based build targets This was used since flashing was complex. Thus the build system should help making it easier. The new approach is more to provide artifacts by the build system which are easy to flash / remote-update. A `factory-image.bin` and `update-image.bin` should be provided. --- fw/meson.build | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'fw/meson.build') diff --git a/fw/meson.build b/fw/meson.build index f61058c..8194827 100644 --- a/fw/meson.build +++ b/fw/meson.build @@ -7,14 +7,3 @@ subdir('rtos') subdir('app') subdir('btl') subdir('sim') - -erase = custom_target( - build_always_stale: true, - build_by_default: false, - command: [ - 'st-flash', - '--connect-under-reset', - 'erase', - ], - output: ['erase'], -) -- cgit v1.2.3-70-g09d2 From fc3b3cbf7fecee7226f249f7b62cf36aa82a545a Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 24 May 2025 11:20:08 +0200 Subject: Provide `factory-image.bin` with Meson This automatically creates `build/artifacts/factory-image.bin` with the Meson build system. The resulting file can simply be moved to the virtual file system of the `nucleo_f767zi` board to flash bootloader and application making the board ready for operation and remote updates. --- artifacts/meson.build | 1 + fw/btl/meson.build | 1 - fw/meson.build | 14 ++++++++++++++ tools/meson.build | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'fw/meson.build') diff --git a/artifacts/meson.build b/artifacts/meson.build index ea6fc39..9e14232 100644 --- a/artifacts/meson.build +++ b/artifacts/meson.build @@ -6,6 +6,7 @@ artifacts = [ simulation, bootloader, application_signed, + factory_image, ] foreach artifact : artifacts diff --git a/fw/btl/meson.build b/fw/btl/meson.build index 2ba1cf4..204fe20 100644 --- a/fw/btl/meson.build +++ b/fw/btl/meson.build @@ -22,5 +22,4 @@ bootloader = custom_target( '--binary-name', 'zephyr.bin', '--target-name', 'bootloader.bin', ], - build_by_default: true, ) diff --git a/fw/meson.build b/fw/meson.build index 8194827..8f45d5b 100644 --- a/fw/meson.build +++ b/fw/meson.build @@ -7,3 +7,17 @@ subdir('rtos') subdir('app') subdir('btl') subdir('sim') + +factory_image = custom_target( + output: ['factory-image.bin'], + command: [ + make_factory_image, + '--bootloader', bootloader, + '--application', application_signed_confirmed, + '--factory-image', '@OUTPUT@', + ], + depends: [ + bootloader, + application_signed_confirmed, + ], +) diff --git a/tools/meson.build b/tools/meson.build index 85ddbb3..f58c54b 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,2 +1,3 @@ configure_zephyr = meson.current_source_dir() / 'configure_zephyr.py' build_zephyr = meson.current_source_dir() / 'build_zephyr.py' +make_factory_image = meson.current_source_dir() / 'make_factory_image.py' -- cgit v1.2.3-70-g09d2