summaryrefslogtreecommitdiff
path: root/fw
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-04-06 18:43:28 +0200
committerxengineering <me@xengineering.eu>2025-04-06 18:43:28 +0200
commit7fc6bc84609022992e1827a07b95c427208e7289 (patch)
tree882f62c869d4b41f9800ea07e7f44e4f3c81b9a3 /fw
parent8350421e659e9273a94debdd6f29cd80979a63f1 (diff)
downloadiot-contact-7fc6bc84609022992e1827a07b95c427208e7289.tar
iot-contact-7fc6bc84609022992e1827a07b95c427208e7289.tar.zst
iot-contact-7fc6bc84609022992e1827a07b95c427208e7289.zip
fw: sim: Integrate into Meson build
This adds a build for the native_sim board of the application firmware to the default Meson build. The resulting Linux binary is also added to the webpage.
Diffstat (limited to 'fw')
-rw-r--r--fw/app/meson.build5
-rw-r--r--fw/btl/meson.build1
-rw-r--r--fw/meson.build1
-rw-r--r--fw/sim/meson.build27
4 files changed, 33 insertions, 1 deletions
diff --git a/fw/app/meson.build b/fw/app/meson.build
index 7f35ebb..d477331 100644
--- a/fw/app/meson.build
+++ b/fw/app/meson.build
@@ -1,9 +1,11 @@
external_project = import('unstable-external_project')
+application_source = meson.current_source_dir()
+
external_project.add_project(
configure_zephyr,
configure_options: [
- '--source-tree', meson.current_source_dir(),
+ '--source-tree', application_source,
'--build-tree', meson.current_build_dir() / 'build',
'--board', board,
'--zephyr-base', zephyr,
@@ -17,6 +19,7 @@ application = custom_target('application',
command: [
build_zephyr,
'--build-tree', meson.current_build_dir() / 'build',
+ '--binary-name', 'zephyr.bin',
'--target-name', 'application.bin',
],
build_by_default: true,
diff --git a/fw/btl/meson.build b/fw/btl/meson.build
index b64fd40..4d80a58 100644
--- a/fw/btl/meson.build
+++ b/fw/btl/meson.build
@@ -19,6 +19,7 @@ bootloader = custom_target('bootloader',
command: [
build_zephyr,
'--build-tree', meson.current_build_dir() / 'build',
+ '--binary-name', 'zephyr.bin',
'--target-name', 'bootloader.bin',
],
build_by_default: true,
diff --git a/fw/meson.build b/fw/meson.build
index 492465e..8194827 100644
--- a/fw/meson.build
+++ b/fw/meson.build
@@ -6,3 +6,4 @@ signing_key = fs.expanduser('~') / 'mcuboot' / 'key.pem'
subdir('rtos')
subdir('app')
subdir('btl')
+subdir('sim')
diff --git a/fw/sim/meson.build b/fw/sim/meson.build
new file mode 100644
index 0000000..a4dcb8a
--- /dev/null
+++ b/fw/sim/meson.build
@@ -0,0 +1,27 @@
+external_project = import('unstable-external_project')
+
+external_project.add_project(
+ configure_zephyr,
+ configure_options: [
+ '--source-tree', application_source,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--board', 'native_sim/native/64',
+ '--zephyr-base', zephyr,
+ '--zephyr-modules', ';'.join(zephyr_modules),
+ ],
+ verbose: true,
+)
+
+simulation = custom_target(
+ 'simulation',
+ output: ['simulation-linux-amd64.exe'],
+ command: [
+ build_zephyr,
+ '--build-tree', meson.current_build_dir() / 'build',
+ '--binary-name', 'zephyr.exe',
+ '--target-name', 'simulation-linux-amd64.exe',
+ ],
+ build_by_default: true,
+ install: true,
+ install_dir: 'website/static',
+)