Skip to content
Snippets Groups Projects
Verified Commit 4d7717b1 authored by rahix's avatar rahix
Browse files

build: Build .bin files as well


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 92aec5b8
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
set -e
PYTHON="$1"
ELF="$2"
BIN="$3"
arm-none-eabi-objcopy -O binary "$ELF" "$BIN"
"$PYTHON" "$(dirname "$0")/crc_patch.py" "$BIN"
......@@ -17,3 +17,6 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
# build_image.sh
build_image = [files('./build_image.sh'), python3]
name = 'bmatest'
executable(
elf = executable(
name + '.elf',
'main.c',
dependencies: [libcard10, max32665_startup],
......@@ -9,3 +9,11 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
name = 'bmetest'
executable(
elf = executable(
name + '.elf',
'main.c',
dependencies: [libcard10, max32665_startup],
......@@ -9,3 +9,11 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
name = 'ecgtest'
executable(
elf = executable(
name + '.elf',
'main.c',
dependencies: [libcard10, max32665_startup],
......@@ -9,3 +9,11 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
......@@ -16,7 +16,7 @@ sources = files(
'main.c',
)
executable(
elf = executable(
name + '.elf',
sources,
include_directories: freertos_sdk_includes,
......@@ -27,3 +27,11 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
name = 'hello-world'
executable(
elf = executable(
name + '.elf',
'main.c',
dependencies: [libcard10, max32665_startup],
......@@ -9,3 +9,11 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
name = 'imutest'
executable(
elf = executable(
name + '.elf',
'main.c',
dependencies: [libcard10, max32665_startup],
......@@ -9,3 +9,11 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
name = 'ips'
executable(
elf = executable(
name + '.elf',
'main.c',
'image/image.c',
......@@ -11,3 +11,11 @@ executable(
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
],
)
custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment