Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
46fa78a
feat: add VPP plugin compilation and dynamic loading support
thiagoralves Apr 7, 2026
f097669
fix: pass RUNTIME_ROOT to VPP plugin Makefile
thiagoralves Apr 7, 2026
4938815
refactor: consolidate cJSON into shared native plugin utility
thiagoralves Apr 7, 2026
e2e057d
fix: load symbols for new plugins added after initial boot
thiagoralves Apr 7, 2026
04c1184
fix: reload native plugin .so on config update (VPP recompilation)
thiagoralves Apr 7, 2026
5f244b0
fix: retry START after upload until STOP transition completes
thiagoralves Apr 21, 2026
55e039b
refactor: move post-build START to the editor
thiagoralves Apr 21, 2026
3183c7d
feat: let plugins publish runtime statistics via get_stats export
thiagoralves Apr 22, 2026
62c8ca0
feat: plugins can request an async PLC-wide stop on fault
thiagoralves Apr 22, 2026
aa5e9c8
fix: wipe scan-cycle stats on PLC start and unload
thiagoralves Apr 22, 2026
edd865e
Merge branch 'development' into feat/vpp-plugin-support
thiagoralves Apr 23, 2026
bdc81b5
fix: move scan-cycle stats mutex to process scope
thiagoralves Apr 23, 2026
6d9d6d5
fix: don't leak socket fd on failed reconnect in SyncUnixClient
thiagoralves Apr 23, 2026
8e30d83
fix: untrack runtime-mutable plugins.conf
thiagoralves Apr 23, 2026
8202dd5
fix: register VPP plugins in plugins.conf after on-target compile
thiagoralves Apr 23, 2026
748e409
Phase 5: STruC++ .so interface; runtime → C++; minimal shim
thiagoralves May 1, 2026
c32837b
Phase 6: thread-per-task with SCHED_FIFO
thiagoralves May 1, 2026
7785a90
Phase 7: anchor housekeeping on the fastest IEC task
thiagoralves May 1, 2026
ddfffab
strucpp: drop vendored headers; use ABI mirror; Linux-only
thiagoralves May 1, 2026
d518915
strucpp_abi: drop static_assert layout pins
thiagoralves May 1, 2026
6f85148
strucpp_abi: move from core/include/ to core/src/lib/
thiagoralves May 1, 2026
f602760
shim: define lifecycle/time/MD5 symbols the runtime expects
thiagoralves May 1, 2026
4ed0a38
runtime v4: drop MatIEC symbol names from .so contract and runtime lo…
thiagoralves May 1, 2026
242c497
runtime v4: pick up real project MD5 from editor-emitted header
thiagoralves May 1, 2026
ba8bd9e
runtime v4: pick up MD5 from defines.h (matches Arduino convention)
thiagoralves May 1, 2026
ac55347
runtime v4: drop MD5 placeholder; require defines.h
thiagoralves May 1, 2026
5f592f4
runtime v4: define strucpp_program_md5 as char[], not char*
thiagoralves May 1, 2026
672f9a7
runtime v4: drop const on strucpp_program_md5 so dlsym can find it
thiagoralves May 1, 2026
0322ff4
build: force-include iec_python.h into generated.cpp (MatIEC parity)
thiagoralves May 2, 2026
19b9919
build: drop generated.{cpp,debug.cpp} to -O1 -pipe (Arduino keeps -Os)
thiagoralves May 2, 2026
6a9f7bb
build: parallel make + ccache; replace serial compile.sh body
thiagoralves May 2, 2026
bafd24c
build: install ccache via install.sh; drop Darwin fallback in compile.sh
thiagoralves May 2, 2026
8393885
feat(api): support ?clean=1 on /api/upload-file for forced cache wipe
thiagoralves May 3, 2026
a4a827d
feat(plugins): expose STruC++ debugger surface to plugins
thiagoralves May 3, 2026
fd5885b
refactor(opcua): bump config schema to {arr,elem} + drop initial_value
thiagoralves May 3, 2026
125520c
refactor(opcua): rewire address space + sync loop on debug_* surface
thiagoralves May 3, 2026
cb70aba
chore(plugins): purge MatIEC-era flat-index variable infra
thiagoralves May 3, 2026
5c114a0
fix(compile): wait for runtime state, separate compile/cleanup status
thiagoralves May 4, 2026
6f98e83
fix(opcua): anonymous = full role when no users configured + clean de…
thiagoralves May 4, 2026
b6c146b
fix(state): report STATUS:TRANSITIONING during STOP/START workers
thiagoralves May 4, 2026
e5070f4
fix(compile): wait for runtime IDLE, not specifically STOPPED, before…
thiagoralves May 4, 2026
d38e502
fix(opcua): faster stop — short timeouts + mid-cycle preemption
thiagoralves May 4, 2026
3bc0b1e
fix(plc): drop PluginManager on load failure so rebuilds load fresh
thiagoralves May 5, 2026
59d153c
feat(stats): per-task scan cycle stats
thiagoralves May 5, 2026
109e82e
feat(ethercat): dedicated SCHED_FIFO bus thread per master
thiagoralves May 5, 2026
3803af5
refactor(ethercat): drop tracker registry, fix bus-cycle stats accoun…
thiagoralves May 5, 2026
c541a9d
feat(ethercat): expose bus-cycle period and wake-up latency stats
thiagoralves May 5, 2026
8172cfb
fix(ethercat): missing includes + forward decl for bus thread
thiagoralves May 5, 2026
a4c8a58
Merge branch 'development' into strucpp-impl
thiagoralves May 5, 2026
d835129
Merge branch 'fix/ethercat-iface-isolation' into strucpp-impl
thiagoralves May 5, 2026
bc88a70
feat(stats): use IEC task name from compiled .so
thiagoralves May 5, 2026
feb1e33
feat(stats): unify on time-based EWMA targeting a 2 s window
thiagoralves May 5, 2026
f330ad0
Merge branch 'development' into strucpp-impl
thiagoralves May 5, 2026
bcb12a0
Merge feat/vpp-plugin-support into consolidate/strucpp+vpp
thiagoralves May 5, 2026
dcbbc48
fix(state/plugins/debug): address PR #129 review findings
thiagoralves May 6, 2026
7be9f88
fix(debug): MD5 probe writes 0xDEAD via native uint16_t
thiagoralves May 12, 2026
af9bb14
feat(plugins): vpp_plugins.conf — editor-owned VPP plugin gate
thiagoralves May 15, 2026
74216f7
fix(vpp): copy plugin config to path declared in vpp_plugins.conf
thiagoralves May 15, 2026
6207b97
fix(plugins): acquire GIL in update_config; reload Python symbols
thiagoralves May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
cmake_minimum_required(VERSION 3.10)
project(plc_application C)
project(plc_application CXX C)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Find Python development libraries
find_package(PkgConfig REQUIRED)
pkg_check_modules(PYTHON REQUIRED python3-embed)

# Include directories
# Include directories.
#
# Runtime-side strucpp assets live in:
# core/src/lib/strucpp_abi.hpp — ABI mirror used to walk the .so
# We do NOT vendor strucpp's full runtime headers into the runtime —
# those ship with each user-program upload and are only consumed by
# scripts/compile.sh when building the .so.
include_directories(${CMAKE_SOURCE_DIR}/core/src/plc_app
${CMAKE_SOURCE_DIR}/core/src/plc_app/utils
${CMAKE_SOURCE_DIR}/core/generated/plc_lib
${CMAKE_SOURCE_DIR}/core/generated/plc_lib/lib
${PYTHON_INCLUDE_DIRS})

# Compiler options
add_compile_options(-Wall -Werror -Wextra -fstack-protector-strong
add_compile_options(-Wall -Werror -Wextra -fstack-protector-strong
-D_FORTIFY_SOURCE=2 -O2 -Wformat
-Werror=format-security -fPIC -fPIE)

# On Cygwin/MSYS2, disable treating warnings as errors due to header conflicts
# The _POSIX_C_SOURCE redefinition warning is caused by Python headers vs system headers
# Detection: CMAKE_SYSTEM_NAME is "CYGWIN" or "MSYS" on these platforms
if(CMAKE_SYSTEM_NAME MATCHES "CYGWIN|MSYS")
# Remove -Werror but keep all other warnings and specific -Werror=format-security
add_compile_options(-Wno-error)
endif()

Expand All @@ -33,14 +39,14 @@ add_executable(plc_main
${CMAKE_SOURCE_DIR}/core/src/plc_app/utils/log.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/utils/utils.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/utils/watchdog.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/image_tables.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/image_tables.cpp
${CMAKE_SOURCE_DIR}/core/src/plc_app/journal_buffer.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/plc_state_manager.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/plc_io_cycle.cpp
${CMAKE_SOURCE_DIR}/core/src/plc_app/plc_state_manager.cpp
${CMAKE_SOURCE_DIR}/core/src/plc_app/plcapp_manager.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/scan_cycle_manager.c
${CMAKE_SOURCE_DIR}/core/src/drivers/plugin_driver.c
${CMAKE_SOURCE_DIR}/core/src/drivers/plugin_config.c
${CMAKE_SOURCE_DIR}/core/src/drivers/plugin_utils.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/unix_socket.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/debug_handler.c
${CMAKE_SOURCE_DIR}/core/src/plc_app/client_tcp_udp.c
Expand Down
Loading