1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
if get_option('fwbuild')
espmake = find_program('espmake')
sourcedir = meson.current_source_dir()
fw_filenames = ['main.ino', 'indicator.c', 'temperature.c', 'indicator.h', 'temperature.h']
fw_sources = files(fw_filenames)
fw = custom_target('fw',
output : 'fw.bin',
input : fw_sources,
command : [espmake, '-C', sourcedir, '&&', 'cp', '/tmp/mkESP/main_d1_mini/main.bin', '@OUTDIR@/fw.bin'])
if get_option('fwflash')
esptool = find_program('esptool.py')
run_target('flash_fw', depends : fw, command : [esptool, 'write_flash', '0x0', fw])
endif
endif
|