Josef Bernhardt
Hi there,
With the Raspberry Pi Pico, the Raspberry Pi Foundation today presented a powerful microcontroller board based on the RP2040 microcontroller chip that it developed itself. This new RP2040 chip ("Raspberry Silicon") offers a dual-core ARM Cortex-M0 + processor (133 MHz), 256 KB RAM, 30 GPIO pins and many other interface options. There is also 2 MB on-board QSPI flash memory for code and data storage.

The board costs only about $ 4 and has enough I / O lines to use it as a PLC. Would it be possible to compile the openplc PLC program in C to run it on the Pico.
Regards Josef Bernhardt

RaspberryPIPico.jpg
Reply 0 0
thiagoralves
At the moment OpenPLC runtime cannot run on any microcontroller. OpenPLC is not a bare metal application, it is a user level application and therefore needs an OS to run. 
Reply 0 0
Josef Bernhardt
Thank You for Info !
Reply 0 0
safetyfactorman
I think a better question might be whether or not openplc could be refactored to run using micropython and whether or not this refactored openplc could run on a microcontroller.
Reply 0 0
thiagoralves
OpenPLC's main dependency is not python, but GCC, since the runtime compiles its own code when an .ST file is uploaded to it. GCC will never run on a microcontroller. That's why I always say that a major refactoring needs to be done for OpenPLC runtime to be able to run on a microcontroller. We're already going towards that with the Editor compiling code for simulation. The next step would be to add a cross compiler toolchain in the Editor and have it generate binary code for foreign platforms (like ARM, Atmel, etc). Once that is done, instead of uploading .ST code to the runtime, you would upload the compiled code directly.
Reply 0 0
Reply