Noora
Hello everyone,
I have a beagleboard-x15 which runs ubuntu16.04 base on Linux arm 4.9.69-ti-rt-r85.I ready to make it as the host and control our customize PLC board. They communicate with UART.
I tried to modify the hardware_layer.cpp for BB-x15 but faild.

when I executed the ./ build.sh that I modified for my board on BB-X15 ,it prints:

./configure: line 4835: bison: command not found
------------------------------------------
Wrong bison version: < 2.4
------------------------------------------
Makefile:374: recipe for target 'config.status' failed
make: *** [config.status] Error 1
[LADDER]
./build.sh: line 13: ./iec2c: cannot execute binary file: Exec format error
mv: cannot stat 'POUS.c': No such file or directory
mv: cannot stat 'POUS.h': No such file or directory
mv: cannot stat 'LOCATED_VARIABLES.h': No such file or directory
mv: cannot stat 'VARIABLES.csv': No such file or directory
mv: cannot stat 'Config0.c': No such file or directory
mv: cannot stat 'Config0.h': No such file or directory
mv: cannot stat 'Res0.c': No such file or directory
[ST OPTIMIZER]
[GLUE GENERATOR]

OpenPLC can talk Modbus/TCP and DNP3 SCADA protocols. Modbus/TCP is already
added to the system. Do you want to add support for DNP3 as well (Y/N)?

Skipping DNP3 installation
The OpenPLC needs a driver to be able to control physical or virtual hardware.
Please select the driver you would like to use:
1) Blank 5) UniPi 9) Arduino+RaspberryPi
2) Modbus 6) PiXtend 10) Simulink
3) Fischertechnik 7) Arduino 11) ti
4) RaspberryPi 8) ESP8266
#? 11
[OPENPLC]
Generating object files...
Generating glueVars.cpp
Compiling main program



It looks like the ladder faild and compile succeed , and I cannot upload the HelloWorld.st ,the webserver print:

optimizing ST code...
Program optimized successfully
compiling new program...
./iec2c: 3: ./iec2c: Syntax error: "(" unexpected

Error compiling program. Please check console log

I don't know how to sovle it and run openPLC on my board.

I refered the Arduino.cpp , is the host of Arduino  Linux?
If it is,whether can I use Arduino.cpp with slight modification?
Quote 0 0
thiagoralves
What were your modifications? It seems that your build process is failing when it tries to compile MatIEC. You must install all packages that are listed on the OpenPLC installation instructions for Raspberry Pi. The build log complains about not finding bison. Try installing all the packets first, and then building a clean OpenPLC from git (without modifications) using the blank driver. If that works, then you can try changing the hardware_layer.cpp with your modification and see what works and what doesn’t.
Quote 0 0
Noora
Hi thiagoralves,
    Thanks for your answer!
    Now I can run openPLC on my BB-X15~
    I referenced arduino.cpp to change my hardware_layer.cpp ,and it has run successfully on my board!

Thanks & Regards,
Noora
Quote 0 0
gsus24
wrote:
Hi thiagoralves,
    Thanks for your answer!
    Now I can run openPLC on my BB-X15~
    I referenced arduino.cpp to change my hardware_layer.cpp ,and it has run successfully on my board!

Thanks & Regards,
Noora


Hi Noora,
look at this
https://openplc.discussion.community/post/get-started-with-custom-hardware-layer-9962760?pid=1306616532#post1306616532
what do you think? what need to be done
Merry Chrismas
Quote 0 0