I am trying to get Sequent megabas to run on a RockChip RK3566.
I had to recompile the cli util megabas and change the line in the comm.c file from "/dev/i2c-0" to "/dev/i2c-2" due to the IO mapping differences between broadcom and rockchip's to the physical pin 3 & 5. This all worked well and I can now talk to the board using the cli util. Like when I do a "megabas -list" it finds the board and when I do "megabas 0 board" it prints the mcu temperature and voltages and firmware revision of the hat.
My problem is now I used OpenPLC_editor to write this:
PROGRAM program0
VAR
SM_BAS0 : SM_BAS;
Stack : SINT := 0;
Set_In1_T : UINT := 1;
END_VAR
VAR
Uni_V1 AT %IW0 : UINT;
END_VAR
VAR
_TMP_REAL_TO_UINT5_OUT : UINT;
END_VAR
SM_BAS0(STACK := 0, IN1_T := 1);
_TMP_REAL_TO_UINT5_OUT := REAL_TO_UINT(SM_BAS0.UNIV1);
Uni_V1 := _TMP_REAL_TO_UINT5_OUT;
END_PROGRAM
CONFIGURATION Config0
RESOURCE Res0 ON PLC
TASK task0(INTERVAL := T#20ms,PRIORITY := 0);
PROGRAM instance0 WITH task0 : program0;
END_RESOURCE
END_CONFIGURATION
I goto the web interface and upload it to the runtime it compiles and fails with:
Optimizing ST program...
Generating C files...
POUS.c
POUS.h
LOCATED_VARIABLES.h
VARIABLES.csv
Config0.c
Config0.h
Res0.c
Moving Files...
Compiling for Raspberry Pi
Generating object files...
In file included from Config0.c:10:
POUS.h:13:3: error: ‘SM_BAS’ does not name a type
13 | SM_BAS SM_BAS0;
| ^~~~~~
Error compiling C files
Compilation finished with errors!
Does anyone know what is wrong I selected the Sequent Microsystems hardware layer. Is there something that I am missing? Is there a step that I missed when setting up the runtime that is causing this?