diff options
Diffstat (limited to 'fw')
-rw-r--r-- | fw/app/meson.build | 45 | ||||
-rw-r--r-- | fw/btl/meson.build | 19 | ||||
-rw-r--r-- | fw/meson.build | 17 | ||||
-rw-r--r-- | fw/sim/meson.build | 3 |
4 files changed, 34 insertions, 50 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, ) diff --git a/fw/btl/meson.build b/fw/btl/meson.build index 8ca1eb3..204fe20 100644 --- a/fw/btl/meson.build +++ b/fw/btl/meson.build @@ -14,7 +14,7 @@ external_project.add_project( verbose: true, ) -bootloader = custom_target('bootloader', +bootloader = custom_target( output: ['bootloader.bin'], command: [ build_zephyr, @@ -22,21 +22,4 @@ bootloader = custom_target('bootloader', '--binary-name', 'zephyr.bin', '--target-name', 'bootloader.bin', ], - build_by_default: true, - install: true, - install_dir: '/', -) - -flash_bootloader = custom_target( - build_always_stale: true, - build_by_default: false, - command: [ - 'st-flash', - '--connect-under-reset', - 'write', - meson.current_build_dir() / 'bootloader.bin', - '0x8000000', - ], - depends: bootloader, - output: ['flash'], ) diff --git a/fw/meson.build b/fw/meson.build index f61058c..8f45d5b 100644 --- a/fw/meson.build +++ b/fw/meson.build @@ -8,13 +8,16 @@ subdir('app') subdir('btl') subdir('sim') -erase = custom_target( - build_always_stale: true, - build_by_default: false, +factory_image = custom_target( + output: ['factory-image.bin'], command: [ - 'st-flash', - '--connect-under-reset', - 'erase', + make_factory_image, + '--bootloader', bootloader, + '--application', application_signed_confirmed, + '--factory-image', '@OUTPUT@', + ], + depends: [ + bootloader, + application_signed_confirmed, ], - output: ['erase'], ) diff --git a/fw/sim/meson.build b/fw/sim/meson.build index 7667f9b..5edcad9 100644 --- a/fw/sim/meson.build +++ b/fw/sim/meson.build @@ -13,7 +13,6 @@ external_project.add_project( ) simulation = custom_target( - 'simulation', output: ['simulation-linux-amd64.exe'], command: [ build_zephyr, @@ -22,6 +21,4 @@ simulation = custom_target( '--target-name', 'simulation-linux-amd64.exe', ], build_by_default: true, - install: true, - install_dir: '/', ) |