duyhuynh2010
Hi, recently i've been studying on a project using openPLC and ESP32. I got that when you upload the LD to esp32, somehow it would convert xml to C++ so that esp32 could understand and excecute. Could you be more specific on this and also is it possible to inspect and modify the uploaded code in esp32 ?
Reply 0 0
thiagoralves
The editor transpiles the PLC program written in all IEC 61131-3 languages to structured text. Once that structured text file is generated, the editor calls MatIEC (https://github.com/beremiz/matiec) to generate C files from the structured text input. Those C files are copied over to the Arduino runtime folder (/editor/arduino/src) and then arduino-cli is called to compile everything into your platform binary file and uploads it.
Reply 0 0
duyhuynh2010
so as I understand (/editor/arduino/src) only used for arduino-based microcontrollers, it will not apply on different microcontrollers like ESP32 or RasPi right ?
Reply 0 0
duyhuynh2010
and is there any possible way to inspect the C code generated from MatIEC
Reply 0 0
thiagoralves
so as I understand (/editor/arduino/src) only used for arduino-based microcontrollers, it will not apply on different microcontrollers like ESP32 or RasPi right ?
ESP32 and Raspberry Pico are arduino-based. The C code generated from MatIEC is available in the build folder inside your project folder.
Reply 0 0
Reply