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