Switch more things to new script.

This commit is contained in:
Brad Nelson
2023-12-22 20:22:30 -08:00
parent 9bb8a3e28e
commit 3c0f249b71
8 changed files with 67 additions and 56 deletions

View File

@ -531,82 +531,84 @@ $(ESP32)/ESP32forth/ESP32forth.ino: \
-include $(GEN)/esp32.dd
$(ESP32)/ESP32forth/README.txt: esp32/README.txt | $(ESP32)/ESP32forth
cat esp32/README.txt | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
>$@
./tools/importation.py $< $@ \
--set-version $(VERSION) \
--set-revision $(REVISION)
$(ESP32)/ESP32forth/optional/README-optional.txt: \
esp32/optional/README-optional.txt | $(ESP32)/ESP32forth/optional
cat esp32/optional/README-optional.txt | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
>$@
./tools/importation.py $< $@ \
--set-version $(VERSION) \
--set-revision $(REVISION)
$(ESP32)/ESP32forth/optional/assemblers.h: \
esp32/optional/assemblers/assemblers.h \
$(GEN)/esp32_assembler.h \
$(GEN)/esp32_xtensa-assembler.h \
$(GEN)/esp32_riscv-assembler.h | $(ESP32)/ESP32forth/optional
cat esp32/optional/assemblers/assemblers.h | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
assembler=@$(GEN)/esp32_assembler.h \
xtensa_assembler=@$(GEN)/esp32_xtensa-assembler.h \
riscv_assembler=@$(GEN)/esp32_riscv-assembler.h \
>$@
./tools/importation.py $< $@ \
--keep-first-comment \
-I . -I $(GEN) --depsout $(GEN)/esp32_optional_assemblers.h.dd \
--set-version $(VERSION) \
--set-revision $(REVISION)
-include $(GEN)/esp32_optional_assemblers.h.dd
$(ESP32)/ESP32forth/optional/camera.h: \
esp32/optional/camera/camera.h \
$(GEN)/esp32_camera.h | $(ESP32)/ESP32forth/optional
cat esp32/optional/camera/camera.h | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
camera=@$(GEN)/esp32_camera.h \
>$@
./tools/importation.py $< $@ \
--keep-first-comment \
-I . -I $(GEN) --depsout $(GEN)/esp32_optional_camera.h.dd \
--set-version $(VERSION) \
--set-revision $(REVISION)
-include $(GEN)/esp32_optional_camera.h.dd
$(ESP32)/ESP32forth/optional/interrupts.h: \
esp32/optional/interrupts/interrupts.h \
$(GEN)/esp32_interrupts.h | $(ESP32)/ESP32forth/optional
cat esp32/optional/interrupts/interrupts.h | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
interrupts=@$(GEN)/esp32_interrupts.h \
>$@
./tools/importation.py $< $@ \
--keep-first-comment \
-I . -I $(GEN) --depsout $(GEN)/esp32_optional_interrupts.h.dd \
--set-version $(VERSION) \
--set-revision $(REVISION)
-include $(GEN)/esp32_optional_interrupts.h.dd
$(ESP32)/ESP32forth/optional/oled.h: \
esp32/optional/oled/oled.h \
$(GEN)/esp32_oled.h | $(ESP32)/ESP32forth/optional
cat esp32/optional/oled/oled.h | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
oled=@$(GEN)/esp32_oled.h \
>$@
./tools/importation.py $< $@ \
--keep-first-comment \
-I . -I $(GEN) --depsout $(GEN)/esp32_optional_oled.h.dd \
--set-version $(VERSION) \
--set-revision $(REVISION)
-include $(GEN)/esp32_optional_oled.h.dd
$(ESP32)/ESP32forth/optional/rmt.h: \
esp32/optional/rmt.h | $(ESP32)/ESP32forth/optional
cat esp32/optional/rmt.h | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
>$@
./tools/importation.py $< $@ \
--keep-first-comment \
--set-version $(VERSION) \
--set-revision $(REVISION)
$(ESP32)/ESP32forth/optional/serial-bluetooth.h: \
esp32/optional/serial-bluetooth/serial-bluetooth.h \
$(GEN)/esp32_serial-bluetooth.h | $(ESP32)/ESP32forth/optional
cat esp32/optional/serial-bluetooth/serial-bluetooth.h | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
serial_bluetooth=@$(GEN)/esp32_serial-bluetooth.h \
>$@
./tools/importation.py $< $@ \
--keep-first-comment \
-I . -I $(GEN) --depsout $(GEN)/esp32_optional_serial-bluetooth.h.dd \
--set-version $(VERSION) \
--set-revision $(REVISION)
-include $(GEN)/esp32_optional_serial-bluetooth.h.dd
$(ESP32)/ESP32forth/optional/spi-flash.h: \
esp32/optional/spi-flash/spi-flash.h \
$(GEN)/esp32_spi-flash.h | $(ESP32)/ESP32forth/optional
cat esp32/optional/spi-flash/spi-flash.h | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
spi_flash=@$(GEN)/esp32_spi-flash.h \
>$@
./tools/importation.py $< $@ \
--keep-first-comment \
-I . -I $(GEN) --depsout $(GEN)/esp32_optional_spi-flash.h.dd \
--set-version $(VERSION) \
--set-revision $(REVISION)
-include $(GEN)/esp32_optional_spi-flash.h.dd
# ---- ESP32 ARDUINO BUILD AND FLASH ----
@ -710,10 +712,9 @@ pico-ice/pico-ice-sdk/README.md:
git submodule update --init pico-ice/pico-ice-sdk
$(PICO_ICE)/ueforth-pico-ice/README.txt: pico-ice/README.txt | $(PICO_ICE)/ueforth-pico-ice
cat pico-ice/README.txt | tools/replace.js \
VERSION=$(VERSION) \
REVISION=$(REVISION) \
>$@
./tools/importation.py $< $@ \
--set-version $(VERSION) \
--set-revision $(REVISION)
$(PICO_ICE)/ueforth-pico-ice/LICENSE: LICENSE
cp $< $@

View File

@ -24,7 +24,7 @@
PUSH assembler_source; PUSH sizeof(assembler_source) - 1) \
PLATFORM_ASSEMBLER_SUPPORT
{{assembler}}
#include "esp32_assembler.h"
#if defined(__riscv)
@ -32,7 +32,7 @@
XV(internals, "riscv-assembler-source", RISCV_ASSEMBLER_SOURCE, \
PUSH riscv_assembler_source; PUSH sizeof(riscv_assembler_source) - 1)
{{riscv_assembler}}
#include "esp32_riscv-assembler.h"
#else
@ -40,6 +40,6 @@
XV(internals, "xtensa-assembler-source", XTENSA_ASSEMBLER_SOURCE, \
PUSH xtensa_assembler_source; PUSH sizeof(xtensa_assembler_source) - 1)
{{xtensa_assembler}}
#include "esp32_xtensa-assembler.h"
#endif

View File

@ -31,4 +31,4 @@
YV(camera, esp_camera_save_to_nvs, n0 = esp_camera_save_to_nvs(c0)) \
YV(camera, esp_camera_load_from_nvs, n0 = esp_camera_load_from_nvs(c0))
{{camera}}
#include "esp32_camera.h"

View File

@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* ESP32forth Interrupts v{{VERSION}}
* Revision: {{REVISION}}
*/
#define INTERRUPT_STACK_CELLS 64
#include "esp_intr_alloc.h"
@ -149,4 +154,4 @@ static cell_t TimerIsrCallbackAdd(cell_t group, cell_t timer, cell_t xt, cell_t
return timer_isr_callback_add((timer_group_t) group, (timer_idx_t) timer, HandleInterruptAndRet, args, flags);
}
{{interrupts}}
#include "esp32_interrupts.h"

View File

@ -55,4 +55,4 @@ static Adafruit_SSD1306 *oled_display = 0;
YV(oled, OledRectR, oled_display->drawRoundRect(n5, n4, n3, n2, n1, n0); DROPn(5)) \
YV(oled, OledRectRF, oled_display->fillRoundRect(n5, n4, n3, n2, n1, n0 ); DROPn(5))
{{oled}}
#include "esp32_oled.h"

View File

@ -12,6 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* ESP32forth RMT v{{VERSION}}
* Revision: {{REVISION}}
*/
#include "driver/rmt.h"
#define OPTIONAL_RMT_VOCABULARY V(rmt)

View File

@ -47,4 +47,4 @@
/* Bluetooth */ \
YV(bluetooth, esp_bt_dev_get_address, PUSH esp_bt_dev_get_address())
{{serial_bluetooth}}
#include "esp32_serial-bluetooth.h"

View File

@ -77,4 +77,4 @@
n0 = esp_partition_check_identity((const esp_partition_t *) a1, \
(const esp_partition_t *) a0); NIP)
{{spi_flash}}
#include "esp32_spi-flash.h"