Skip to content
Snippets Groups Projects
Commit 0c1c731a authored by Nikolay Amiantov's avatar Nikolay Amiantov
Browse files

Improve bootloader-update build process

parent 31e8aeb3
No related branches found
No related tags found
No related merge requests found
Pipeline #3044 failed
......@@ -13,7 +13,7 @@ splash_screen = custom_target(
],
)
executable(
elf = executable(
name + '.elf',
'main.c',
'mscmem.c',
......@@ -39,3 +39,11 @@ build_image = [files('./build_image.sh'), python3]
# build_multi_image.sh
build_multi_image = [files('./build_multi_image.sh'), python3]
bootloader_bin = custom_target(
name + '.bin',
build_by_default: true,
output: name + '.bin',
input: elf,
command: [build_image, '@INPUT@', '@OUTPUT0@'],
)
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -4,7 +4,7 @@
/***** Includes *****/
#include "card10.h"
#include "bootloader-9251ea6.h"
#include "bootloader.h"
#include "display.h"
#include "gfx.h"
#include "pmic.h"
......@@ -59,8 +59,8 @@ int main(void)
ret = FLC_Write(
0x10000000,
sizeof(bootloader_data),
(uint32_t *)bootloader_data
bootloader_bootloader_bin_len,
(uint32_t *)bootloader_bootloader_bin
);
if (ret != E_NO_ERROR) {
printf("FLC_Write failed with %d\n", ret);
......
name = 'bootloader-update'
header = custom_target(
'bootloader.h',
output: 'bootloader.h',
input: bootloader_bin,
command: [xxd, '-i', '@INPUT@', '@OUTPUT0@'],
)
header_dep = declare_dependency(
sources: [header],
)
elf = executable(
name + '.elf',
'main.c',
dependencies: [libcard10, max32665_startup],
dependencies: [libcard10, max32665_startup, header_dep],
link_whole: [max32665_startup_lib, board_card10_lib],
link_args: [
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
......
......@@ -54,6 +54,7 @@ version_hdr = custom_target(
)
jq = find_program('jq', required: false)
if jq.found()
compile_commands = custom_target(
'compile_commands_tidy.json',
......@@ -68,6 +69,8 @@ if jq.found()
)
endif
xxd = find_program('xxd')
subdir('lib/')
subdir('bootloader/')
......
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