summaryrefslogtreecommitdiff
path: root/fw/app/meson.build
blob: 8d8420955293e4b93c4f2415ca2fd61bd5fdbbc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
external_project = import('unstable-external_project')

application_source = meson.current_source_dir()

external_project.add_project(
  configure_zephyr,
  configure_options: [
    '--source-tree', application_source,
    '--build-tree', meson.current_build_dir() / 'build',
    '--board', board,
    '--zephyr-base', zephyr,
    '--zephyr-modules', ';'.join(zephyr_modules),
  ],
  verbose: true,
)

application = custom_target(
  'application',
  output: ['application.bin'],
  command: [
    build_zephyr,
    '--build-tree', meson.current_build_dir() / 'build',
    '--binary-name', 'zephyr.bin',
    '--target-name', 'application.bin',
  ],
)

application_signed = custom_target(
  'application_signed',
  output: ['application.signed.bin'],
  command: [
    imgtool,
    'sign',
    '--version', '0.0.0',
    '--header-size', '0x200',
    '--slot-size', '0xc0000',
    '--key', signing_key,
    meson.current_build_dir() / 'application.bin',
    meson.current_build_dir() / 'application.signed.bin',
  ],
  build_by_default: true,
  depends: application,
  install: true,
  install_dir: '/',
)