diff options
author | xengineering <me@xengineering.eu> | 2025-05-24 11:31:11 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2025-05-24 11:31:11 +0200 |
commit | a82bdbbec681cec0c6f5304318b6010f1752dbf6 (patch) | |
tree | 539d4610508c1bb3069c5f11ee63977e534b2a68 /fw/app/meson.build | |
parent | f38300b15627e5234f0f0a07c31c32135901dee7 (diff) | |
parent | bf8d20fe4d8d3369dd7f63e95f53613dbbfa3603 (diff) | |
download | iot-contact-a82bdbbec681cec0c6f5304318b6010f1752dbf6.tar iot-contact-a82bdbbec681cec0c6f5304318b6010f1752dbf6.tar.zst iot-contact-a82bdbbec681cec0c6f5304318b6010f1752dbf6.zip |
Merge build system improvements
- remove flash targets (replaced by easy to flash `factory-image.bin`)
- replaced installation step by copy targets
- provide `factory-image.bin` and `update-image.bin`
Diffstat (limited to 'fw/app/meson.build')
-rw-r--r-- | fw/app/meson.build | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/fw/app/meson.build b/fw/app/meson.build index ddd5aa6..6665fe4 100644 --- a/fw/app/meson.build +++ b/fw/app/meson.build @@ -15,7 +15,6 @@ external_project.add_project( ) application = custom_target( - 'application', output: ['application.bin'], command: [ build_zephyr, @@ -25,35 +24,37 @@ application = custom_target( ], ) -application_signed = custom_target( - 'application_signed', - output: ['application.signed.bin'], +version = '0.0.0' +header_size = '0x200' +slot_size = '0xc0000' + +update_image = custom_target( + output: ['update-image.bin'], command: [ imgtool, 'sign', - '--version', '0.0.0', - '--header-size', '0x200', - '--slot-size', '0xc0000', + '--version', version, + '--header-size', header_size, + '--slot-size', slot_size, '--key', signing_key, - meson.current_build_dir() / 'application.bin', - meson.current_build_dir() / 'application.signed.bin', + application, + '@OUTPUT@', ], - build_by_default: true, depends: application, - install: true, - install_dir: '/', ) -flash_application = custom_target( - build_always_stale: true, - build_by_default: false, +application_signed_confirmed = custom_target( + output: ['application.signed.confirmed.bin'], command: [ - 'st-flash', - '--connect-under-reset', - 'write', - meson.current_build_dir() / 'application.signed.bin', - '0x8040000', + imgtool, + 'sign', + '--version', version, + '--header-size', header_size, + '--slot-size', slot_size, + '--key', signing_key, + '--confirm', + application, + '@OUTPUT@', ], - depends: application_signed, - output: ['flash'], + depends: application, ) |