Commit 87e1e880 authored by Esteban Blanc's avatar Esteban Blanc

Add current work

parent 7d457d9e
File added
# ProviewR collect and compile
Collect ProviewR generated files and necessary files to compile a PLC on our own
\ No newline at end of file
Collect ProviewR generated files and necessary files to compile a PLC on our own
# Usage
## Generate .XX files
In order to generate .XX files, in ProviewR workbench we need to enable the Debug build, then build our project
## Collect files
Run the ``./collect.sh`` and fill the project path on disk when prompted
## Compile PLC
Run ``./compile.sh``
# Remarks
The compile part is not working and I ran out of time
#!/bin/bash
read -p 'Enter project path: ' --
project_path=$REPLY
echo "Project: $project_path: ${REPLY}"
src=$(find 'test/' -name '*.gc')
include=$(find $pwrb_root -name '*.h')
mkdir 'collect'
mkdir 'collect/src'
mkdir 'collect/include'
cp -t 'collect/src' $src
cp -ft 'collect/include' $include
cp -t 'collect/include' $(find $project_path -name 'ra_plc_user.h')
for file in $(find 'collect/src' -name '*.gc'); do
#echo "$file" => "${file%.gc}.c"
#echo "${file%.gc}.c"
cp -- "$file" "${file%.gc}.c"
done
#!/bin/sh
# G++ invoked by ProviewR workbench
#"g++", "-g", "-L/lib/thread", "-L/home/chrx/Dev/godot-modbus-demo/test/bld/x86_64_linux/lib", "-L/home/chrx/Dev/godot-modbus-demo/test/x86_linux/lib", "-L/home/chrx/Dev/godot-modbus-demo/ProviewR/rls/os_linux/hw_x86_64/exp/lib", "-o", "/home/chrx/Dev/godot-modbus-demo/test/bld/x86_64_linux/exe/plc_chrx_0999_plc", "/home/chrx/Dev/godot-modbus-demo/ProviewR/rls/os_linux/hw_x86_64/exp/obj/rt_plc_process.o", "/home/chrx/Dev/godot-modbus-demo/test/bld/x86_64_linux/obj/plc_chrx_0999_plc.o", "-lplcf000_001_001_001", "/home/chrx/Dev/godot-modbus-demo/ProviewR/rls/os_linux/hw_x86_64/exp/obj/rt_io_user.o", "-lpwr_rt", "-lpwr_usbio_dummy", "-lpwr_usb_dummy", "-lpwr_pnak_dummy", "-lpwr_cifx_dummy", "-lpwr_nodave_dummy", "-lpwr_epl_dummy", "/home/chrx/Dev/godot-modbus-demo/ProviewR/rls/os_linux/hw_x86_64/exp/obj/pwr_msg_rt.o", "/home/chrx/Dev/godot-modbus-demo/ProviewR/rls/os_linux/hw_x86_64/exp/obj/pwr_msg_co.o", "-lrt", "-lpwr_remote", "-lpwr_nmps", "-lpwr_rt", "-lpwr_co", "-lrpcsvc", "-lpwr_msg_dummy", "-lpthread", "-lm"
# Our take
CFLAGS='-fpermissive'
g++ $CFLAGS -g -I collect/include/ -I collect/src/ collect/src/plc_m*.c collect/src/plc_chrx_0999_plc.c
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment