Hei hei,
I investigated OpenPLC for starting a new project and some questions came up, but let me first shortly summarize how I understand the architecture of the whole thing, please correct me, if anything is wrong:
- User opens GUI editor on a workstation and creates a control program saved in a .st file
- User transfers that .st file to the embedded target box
- Target box transpiles .st into .c
- Target box compiles .c into binary using a complete linux build environment (CMake, gcc, …) on the embedded target
- Runtime on target executes that binary somehow
(Also, one could connect additional tiny boards like Arduino to extend ports, but there must be one central embedded target doing all that compilation stuff and executing the core runtime.)
From an embedded system engineer perspective, this looks like an unusual approach, requiring quite a lot of space (both RAM and Flash) on the embedded target for compiling.
I can image to execute steps 3 and 4 on the workstation instead. This would reduce compile times and allow to run the runtime on smaller embedded targets with fewer RAM and flash than a modern Raspberry Pi 3 or 4. (In the wild there are rugged embedded Arm boards running Linux on e.g. 128 MiB RAM and effectively 50 MiB of flash.)
That would of course require to build the transpiler along with the GUI and probably even harder have a working cross compiling toolchain (matching the target architecture and maybe the runtime core) on the workstation and somehow configure the application to use that.
Let's say I would put some effort in that approach. Would it have a chance to be integrated in the OpenPLC project?
Let me know what you think about it.
Greets
Alex