summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fw/app/meson.build14
-rw-r--r--fw/btl/meson.build14
-rw-r--r--fw/meson.build11
3 files changed, 39 insertions, 0 deletions
diff --git a/fw/app/meson.build b/fw/app/meson.build
index 8d84209..ddd5aa6 100644
--- a/fw/app/meson.build
+++ b/fw/app/meson.build
@@ -43,3 +43,17 @@ application_signed = custom_target(
install: true,
install_dir: '/',
)
+
+flash_application = custom_target(
+ build_always_stale: true,
+ build_by_default: false,
+ command: [
+ 'st-flash',
+ '--connect-under-reset',
+ 'write',
+ meson.current_build_dir() / 'application.signed.bin',
+ '0x8040000',
+ ],
+ depends: application_signed,
+ output: ['flash'],
+)
diff --git a/fw/btl/meson.build b/fw/btl/meson.build
index c22ba3c..8ca1eb3 100644
--- a/fw/btl/meson.build
+++ b/fw/btl/meson.build
@@ -26,3 +26,17 @@ bootloader = custom_target('bootloader',
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 8194827..f61058c 100644
--- a/fw/meson.build
+++ b/fw/meson.build
@@ -7,3 +7,14 @@ 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'],
+)