The present invention discloses a method, device, and storage medium for
porting CODESYS runtime
software, relating to the technical field of
software porting. The method includes obtaining specific
macro definitions in a
Makefile script; obtaining a libcobalt
library header file and a Xenomai header file based on compilation parameters within the
Makefile script; locating a
source code file of a specified format within the path where the
Makefile script is located, and converting the
source code file of the specified format into a binary target file based on the libcobalt
library header file and the Xenomai header file; obtaining a
static library file; obtaining
library files for a real-time-related library, libcobalt, and a
memory management library; passing a main function wrapper parameter to a local
linker; and linking the binary target file, the
static library file, the library files for the real-time-related library, libcobalt, and the
memory management library via the local
linker to obtain a target file
executable within the Xenomai framework. The method, device, and storage medium disclosed in the present invention can port CODESYS runtime
software to a
system within the Xenomai framework.