DLI PLC49 firmware source code
Lua JavaScript CSS Shell HTML Awk Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
nodemcu-env @ 52451d3
www
.gitmodules
LICENSE
Makefile
README.md
build-fs-dir.sh
build-image.sh
build-plc49.sh
build_index_html.awk
config.lua
configure_gpio.lua
configure_wifi.lua
flash.sh
http_util.lua
httpd.lua
init.lua
main.lua
pinout.lua
prepare_nodemcu_env.sh
require_once.lua
schedule.lua
upload.sh
web_ui_adc_GET.lua
web_ui_config_GET.lua
web_ui_eval_POST.lua
web_ui_input_GET.lua
web_ui_output_GET.lua
web_ui_output_cycle_POST.lua
web_ui_output_idx_GET.lua
web_ui_output_idx_PUT.lua
web_ui_routing.lua
web_ui_state_GET.lua
web_ui_state_values_GET.lua
web_ui_static_GET.lua
web_ui_str_GET.lua
web_ui_str_PUT.lua
web_ui_wifi_config_GET.lua
web_ui_wifi_config_PUT.lua
web_ui_wifi_mode_GET.lua
web_ui_wifi_mode_PUT.lua

README.md

plc49

DLI PLC49 firmware source code currently requires a Linux system to build (patches to make crosstool build work on other UN*X-like systems welcome).

Notable build dependencies (except those typically found on development machines) include Lua 5.1 and lua-filesystem.

Running 'make' in this directory should generate a plc49.bin firmware file. It will contain both the NodeMCU firmware and the SPIFFS filesystem image which stores the actual (compressed) data and (compiled) scripts for PLC49.

Running 'make flash' will flash the generated firmware onto the PLC49 (check out flash.sh, it allows configuring port/baud rate from environment). You will need to press and release the RST button while holding the PGM button to switch the PLC49 into firmware upload mode before running 'make flash'. It is not necessary to hold the PGM button throughout the flashing process.

If you spend much time changing the PLC49 data or scripts, you will find commands modifying the PLC49 filesystem (without full reflash) useful. 'make upload' will clear the device's filesystem and re-upload the whole set of files (it uses the same environment variables as 'make flash' for port and baud rate). 'make upload-update' will do the same, but try to upload only the changed files (keeping track of what it expects to be present on the device in a separate directory).