Forked from
card10 / firmware
1415 commits behind the upstream repository.
-
rahix authored
This commit adds a script to embed the git-version of the firmware into the bootloader, epicardium, and pycardium. All three binaries will display their version on startup. Signed-off-by:
Rahix <rahix@rahix.de>
rahix authoredThis commit adds a script to embed the git-version of the firmware into the bootloader, epicardium, and pycardium. All three binaries will display their version on startup. Signed-off-by:
Rahix <rahix@rahix.de>
meson.build 1018 B
project(
'card10-firmware',
'c',
default_options: [
'buildtype=minsize',
'c_lto=true',
'c_std=c99',
'b_staticpic=false',
'b_asneeded=false',
],
)
assert(
meson.is_cross_build(),
'card10-firmware can only be cross-compiled for card10.\n' +
'Please use `--cross-file card10-cross.ini`.',
)
add_global_arguments(
meson.get_cross_property('target_defs'),
language: 'c',
)
if get_option('debug_prints')
add_global_arguments(
['-DLOG_ENABLE_DEBUG=1'],
language: 'c',
)
endif
add_global_link_arguments(
'-Wl,--gc-sections',
'-lm',
language: 'c',
)
# python3 = import('python').find_installation('python3')
python3 = 'python3'
# Version Header
version_hdr = custom_target(
'card10-version.h',
output: 'card10-version.h',
build_by_default: true,
build_always_stale: true,
command: [files('tools/version-header.sh'), '@OUTPUT@'],
)
subdir('lib/')
subdir('bootloader/')
subdir('epicardium/')
subdir('pycardium/')
subdir('hw-tests/')
subdir('l0dables/')