summaryrefslogtreecommitdiffstats
path: root/src/tempmodule
diff options
context:
space:
mode:
authorGravatar Gediminas Jakutis <gediminas@varciai.lt> 2018-05-10 14:25:33 +0300
committerGravatar Gediminas Jakutis <gediminas@varciai.lt> 2018-05-10 14:25:33 +0300
commit4c8d5def856d93a12cf47819f6b70fe2d66d7366 (patch)
tree7319101f526285900d1f1631648daecb2a88255a /src/tempmodule
parentf8a9eeea2b054db663d3c519d8b5bb78b7a6bf38 (diff)
downloadcoffeetemp-4c8d5def856d93a12cf47819f6b70fe2d66d7366.tar.gz
coffeetemp-4c8d5def856d93a12cf47819f6b70fe2d66d7366.tar.bz2
coffeetemp-4c8d5def856d93a12cf47819f6b70fe2d66d7366.zip
tempmodule: add rudimentary meson suport.
Diffstat (limited to 'src/tempmodule')
-rw-r--r--src/tempmodule/meson.build16
1 files changed, 16 insertions, 0 deletions
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