I successfully created an external library from a C source for C166.
Basically it is running!
Currently I have the following problem. I was not able to use a constant array with initial values that is defined in the C source. It seems that CoDeSys is pointing to a different memory address?!
The following does not work:
\#pragma class hc=NCONSThugestaticconstintaiTemp[]={0,11,22,33};
\#pragma default_attributes
CLASSES
(
 FUNCTABLE (40000h to 44BFFh),
 CINITROM
 CPROGRAM
 NCONST   Â
 SHAREDCLIB
 SHAREDRTLIB (4C00h to 4FFFFh),
 CNEAR
 CUSTACK (120000H to 127FFFH)
)
Hello,
I successfully created an external library from a C source for C166.
Basically it is running!
Currently I have the following problem. I was not able to use a constant array with initial values that is defined in the C source. It seems that CoDeSys is pointing to a different memory address?!
The following does not work:
If e.g. aiTemp[2] is read the result is not "22"!
A single global constant variable is working:
I use the following classes file:
Functable class contain the following:
Does anyone know what is needed to use arrays in CoDeSys V2.3 with inital values defined in C.
Best regards
Tobias Müller