Command: Generate Runtime System Files
Function: The command generates a C stub file and an M4 interface file from the current library project. These files are used as the basis for creating an external library file.
Call: Build menu
Requirement: A library project is open.
The command opens the Generate Files for Runtime System dialog.
Output directory | Directory where CODESYS creates the runtime system files Click the |
Component name | Name of the library project |
Which files do you want to create? | |
M4 interface file |
See also the table below with the IEC code constructs supported for M4 export. Example of M4 file: ![]() |
C stub file |
Example of stub file: ![]() |
Options | |
Export referenced types included in libraries |
|
Use original type names |
|
IEC constructs which are supported for M4 export
Important
All types which are not explicitly listed in the table are not supported. Their behavior can change unnoticed.
IEC construct and language means | Export to M4 file | Note |
---|---|---|
| Not supported | |
|
In addition, a method named | |
|
| |
|
| |
| Same as | |
| Same as | |
| Same as | |
| Method pair named | |
| Not supported | |
|
| |
|
| |
| Not supported | |
|
| Inheritance is supported. The components are exported "flat" (without structure) |
|
| Constants cannot be exported explicitly, but if they are used in the other objects, then they are automatically exported. |
Comments | C comment | Comments with three slashes are also exported. |
Predefined data types (INT, BOOL, REAL, etc.) | Corresponding C data type of the same size | |
Types beginning with | Are not exported separately because they are declared elsewhere in the runtime system | |
|
| All |
Arrays | C array with fixed size |
|
| One pointer and one size | |
Strings | C array of characters with fixed size |