Hi
OpenPLC works fine with me, I can create PLC program and download to Arduino, everything works perfect.
I'm trying to read and debug the OpenPLC editor source code, and found one problem, I started Python source code in VS Code whose Python intepreter was correctly set, but the following wrong information was shown, can you help to check the probme?
Start build in D:\work\OpenPLC\Projects\blinky\build
Generating SoftPLC IEC-61131 ST/IL/SFC code......
Collecting data types
Collecting POUs
Generate POU Blink
Generate POU function0
Generate POU program0
Generate Config(s)
Compiling IEC Program into C code...
Extracting Located Variables...
C code generated successfully.
PLC:
[CC] plc_main.c -> plc_main.o
C Build crashed !
Traceback (most recent call last):
File "D:\work\OpenPLC\OpenPLC_Editor\editor\ProjectController.py", line 1307, in _Build
if not builder.build():
File "D:\work\OpenPLC\OpenPLC_Editor\editor\targets\toolchain_gcc.py", line 195, in build
status, _result, _err_result = ProcessLogger(
File "D:\work\OpenPLC\OpenPLC_Editor\editor\util\ProcessLogger.py", line 145, in __init__
self.Proc = subprocess.Popen(self.Command, encoding="utf-8", errors="backslashreplace", **popenargs)
File "C:\Users\re009\OpenPLC_Editor\python\lib\subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\re009\OpenPLC_Editor\python\lib\subprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
File "c:\Users\re009\.vscode\extensions\ms-python.debugpy-2024.8.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\_pydev_bundle\pydev_monkey.py", line 901, in new_CreateProcess
return getattr(_subprocess, original_name)(app_name, cmd_line, *args)
I made a break point in this line, and found the self.Command has no problem at all.
self.Proc = subprocess.Popen(self.Command, encoding="utf-8", errors="backslashreplace", **popenargs)
self.Command is b'gcc', b'-c', b'D:\\work\\OpenPLC\\Projects\\blinky\\build\\plc_main.c', b'-o', b'D:\\work\\OpenPLC\\Projects\\blinky\\build\\plc_main.o', b'-O2', b'-Wno-implicit-function-declaration', b'-Wno-int-conversion', b'-ID:\\work\\OpenPLC\\OpenPLC_Editor\\matiec\\lib\\C', b'-w'