summaryrefslogtreecommitdiff
path: root/fw/app/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'fw/app/meson.build')
-rw-r--r--fw/app/meson.build45
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,
)