Skip to content

Instantly share code, notes, and snippets.

@hanetzer
Created April 20, 2022 22:46
Show Gist options
  • Save hanetzer/78736b6210628f785f6db8b0177efa10 to your computer and use it in GitHub Desktop.
Save hanetzer/78736b6210628f785f6db8b0177efa10 to your computer and use it in GitHub Desktop.
stdin
project('bootrom', 'c')
inc = include_directories('include')
bootrom_elf = executable(
'bootrom',
sources: ['bootrom.S'],
c_args: ['-nostdlib'],
include_directories : inc,
link_args: ['-nostdlib'],
)
bootrom_bin = custom_target('bootrom.bin',
input: bootrom_elf,
output: 'bootrom.bin',
command: [
find_program('objcopy'),
'@INPUT',
'--gap-fill', '0xff',
'--pad-to', '0x1000',
'-v', '-O', 'binary', '@OUTPUT@',
],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment