You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

45 lines
860 B

project('ossw-fw', 'c')
linker_script = [ '-T', meson.source_root() + '/src/linker.ld' ]
xtensa_args = [
'-mlongcalls',
'-mtext-section-literals',
'-fstrict-volatile-bitfields',
'-fno-strict-aliasing',
'-fdata-sections',
'-ffunction-sections'
]
ossw_fw_sources = [
'src/main.c',
]
ossw_fw = executable (
'ossw-fw',
ossw_fw_sources,
c_args: [ '-g', '-Wall', '-Wextra', '-nostdlib', xtensa_args ],
link_args: [ '-g', '-nostdlib', linker_script ],
install: false,
)
esptool = find_program('esptool.py', 'esptool')
image = custom_target (
'image',
input: ossw_fw,
output: 'ossw-fw.bin',
command: [
esptool,
'--chip', 'esp32',
'elf2image',
'--flash_mode=dio',
'--flash_freq', '40m',
'--flash_size', '4MB',
'-o', '@OUTPUT@',
'@INPUT@'
],
install: false,
)