From 4c8d5def856d93a12cf47819f6b70fe2d66d7366 Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Thu, 10 May 2018 14:25:33 +0300 Subject: tempmodule: add rudimentary meson suport. --- src/tempmodule/meson.build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/tempmodule/meson.build (limited to 'src/tempmodule/meson.build') diff --git a/src/tempmodule/meson.build b/src/tempmodule/meson.build new file mode 100644 index 0000000..e974884 --- /dev/null +++ b/src/tempmodule/meson.build @@ -0,0 +1,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 -- cgit v1.2.3