Fix version#s, move bluetooth serial into optional

NOTE: Bluetooth serial and ESP32-CAM support has regressed.
This commit is contained in:
Brad Nelson
2021-02-12 23:43:48 -08:00
parent fc6e437b7e
commit 071de38508
7 changed files with 20 additions and 15 deletions

View File

@ -124,23 +124,24 @@ POSIX_BOOT = common/boot.fs common/vocabulary.fs common/hide_calls.fs common/an
common/utils.fs common/highlevel.fs common/filetools.fs posix/posix_desktop.fs \ common/utils.fs common/highlevel.fs common/filetools.fs posix/posix_desktop.fs \
common/tasks.fs common/streams.fs common/blocks.fs posix/args.fs common/tasks.fs common/streams.fs common/blocks.fs posix/args.fs
$(GEN)/posix_boot.h: common/source_to_string.js $(POSIX_BOOT) | $(GEN) $(GEN)/posix_boot.h: common/source_to_string.js $(POSIX_BOOT) | $(GEN)
echo "ok" | cat $(POSIX_BOOT) - | $< boot >$@ echo "ok" | cat $(POSIX_BOOT) - | $< boot $(VERSION) $(REVISION) >$@
WINDOWS_BOOT = common/boot.fs common/vocabulary.fs common/hide_calls.fs common/ansi.fs \ WINDOWS_BOOT = common/boot.fs common/vocabulary.fs common/hide_calls.fs common/ansi.fs \
windows/windows.fs windows/windows_highlevel.fs common/highlevel.fs \ windows/windows.fs windows/windows_highlevel.fs common/highlevel.fs \
common/utils.fs common/tasks.fs common/streams.fs common/blocks.fs common/utils.fs common/tasks.fs common/streams.fs common/blocks.fs
$(GEN)/windows_boot.h: common/source_to_string.js $(WINDOWS_BOOT) | $(GEN) $(GEN)/windows_boot.h: common/source_to_string.js $(WINDOWS_BOOT) | $(GEN)
echo "ok" | cat $(WINDOWS_BOOT) - | $< boot >$@ echo "ok" | cat $(WINDOWS_BOOT) - | $< boot $(VERSION) $(REVISION) >$@
ARDUINO_BOOT = common/boot.fs common/vocabulary.fs \ ARDUINO_BOOT = common/boot.fs common/vocabulary.fs \
arduino/arduino.fs arduino/arduino_highlevel.fs \ arduino/arduino.fs arduino/arduino_highlevel.fs \
arduino/bindings.fs common/highlevel.fs \ arduino/bindings.fs common/highlevel.fs \
common/filetools.fs common/utils.fs \ common/filetools.fs common/utils.fs \
common/tasks.fs common/streams.fs arduino/arduino_server.fs \ common/tasks.fs common/streams.fs arduino/arduino_server.fs \
arduino/arduino_bterm.fs \
arduino/esp_camera.fs common/blocks.fs \ arduino/esp_camera.fs common/blocks.fs \
arduino/autoboot.fs arduino/autoboot.fs
$(GEN)/arduino_boot.h: common/source_to_string.js $(ARDUINO_BOOT) | $(GEN) $(GEN)/arduino_boot.h: common/source_to_string.js $(ARDUINO_BOOT) | $(GEN)
echo "ok" | cat $(ARDUINO_BOOT) - | $< boot >$@ echo "ok" | cat $(ARDUINO_BOOT) - | $< boot $(VERSION) $(REVISION) >$@
$(GEN)/dump_web_opcodes: web/dump_web_opcodes.c common/opcodes.h | $(GEN) $(GEN)/dump_web_opcodes: web/dump_web_opcodes.c common/opcodes.h | $(GEN)
$(CC) $(CFLAGS) $< -o $@ $(CC) $(CFLAGS) $< -o $@
@ -257,7 +258,7 @@ ARDUINO_PARTS = arduino/arduino.template.ino \
$(ARDUINO)/ESP32forth/ESP32forth.ino: \ $(ARDUINO)/ESP32forth/ESP32forth.ino: \
arduino/fuse_ino.js $(ARDUINO_PARTS) | $(ARDUINO)/ESP32forth arduino/fuse_ino.js $(ARDUINO_PARTS) | $(ARDUINO)/ESP32forth
$< "$(VERSION)" "$(REVISION)" $(ARDUINO_PARTS) >$@ $< $(VERSION) $(REVISION) $(ARDUINO_PARTS) >$@
# ---- PACKAGE ---- # ---- PACKAGE ----

View File

@ -34,3 +34,6 @@ forth definitions
-1 z" /spiffs" 10 SPIFFS.begin drop -1 z" /spiffs" 10 SPIFFS.begin drop
led OUTPUT pinMode led OUTPUT pinMode
high led pin high led pin
( Setup entry )
: ok ." ESP32forth v{{VERSION}} - rev {{REVISION}}" cr prompt refill drop quit ;

View File

@ -11,8 +11,8 @@ var core = fs.readFileSync(process.argv[7]).toString();
var interp = fs.readFileSync(process.argv[8]).toString(); var interp = fs.readFileSync(process.argv[8]).toString();
var boot = fs.readFileSync(process.argv[9]).toString(); var boot = fs.readFileSync(process.argv[9]).toString();
code = code.replace('{{version}}', function() { return version; }); code = code.replace('{{VERSION}}', function() { return version; });
code = code.replace('{{revision}}', function() { return revision; }); code = code.replace('{{REVISION}}', function() { return revision; });
code = code.replace('{{opcodes}}', function() { return opcodes; }); code = code.replace('{{opcodes}}', function() { return opcodes; });
code = code.replace('{{calling}}', function() { return calling; }); code = code.replace('{{calling}}', function() { return calling; });
code = code.replace('{{boot}}', function() { return boot; }); code = code.replace('{{boot}}', function() { return boot; });

View File

@ -4,7 +4,11 @@ var fs = require('fs');
var source = fs.readFileSync(process.stdin.fd).toString(); var source = fs.readFileSync(process.stdin.fd).toString();
var name = process.argv[2]; var name = process.argv[2];
var version = process.argv[3];
var revision = process.argv[4];
source = source.replace('{{VERSION}}', version);
source = source.replace('{{REVISION}}', revision);
source = source.replace(/["]/g, '\\"'); source = source.replace(/["]/g, '\\"');
source = '"' + source.split('\n').join('\\n"\n"') + '\\n"'; source = '"' + source.split('\n').join('\\n"\n"') + '\\n"';
source = source.replace(/["] ["]/g, ''); source = source.replace(/["] ["]/g, '');

View File

@ -1,9 +0,0 @@
also bluetooth also internals
SerialBT.new constant bt
z" ueforthbt" 0 bt SerialBT.begin .
esp_bt_dev_get_address hex 6 dump cr
: bt-type bt SerialBT.write drop ;
: bt-key
begin bt SerialBT.available until 0 >r rp@ 1 bt SerialBT.readBytes drop r> ;
: bt-on ['] bt-type is type ['] bt-key is key ;
: bt-off ['] arduino-type is type ['] arduino-key is key ;

View File

@ -129,3 +129,6 @@ O_RDWR constant r/w
: ms ( n -- ) 1000 * usleep drop ; : ms ( n -- ) 1000 * usleep drop ;
forth forth
( Setup entry )
: ok ." uEforth v{{VERSION}} - rev {{REVISION}}" cr prompt refill drop quit ;

View File

@ -143,3 +143,6 @@ r/o w/o or constant r/w
: ms ( n -- ) Sleep ; : ms ( n -- ) Sleep ;
forth forth
( Setup entry )
: ok ." uEforth v{{VERSION}} - rev {{REVISION}}" cr prompt refill drop quit ;