Cross compiling for Windows CE 6.0

487 views
Skip to first unread message

martin...@gmail.com

unread,
Nov 23, 2016, 4:52:47 AM11/23/16
to open62541
Hello

We are looking into implementing OPC UA in our current platform which is based on the Windows CE 6.0 OS. 
Do you think it is possible to compile open62541 for this platform with the limitations of Windows CE 6.0 and VS2005 in mind.
I know that open62541 is ANSI C99 but will it be possible with simple modifications to compile under C89 since this is what the VS2005 supports

Hope for your help answering my questions.

Best regards
Martin

Julius Pfrommer

unread,
Nov 23, 2016, 6:10:26 AM11/23/16
to open62541, martin...@gmail.com
Dear Martin,

we use some features that are not in C89 (ANSI C). However, most compilers support them nowadays.
For example, we compile with a recent Visual Studio even though the compiler is not fully C99 compliant.

Also, one of our users ported the v0.2-rc1 to a C++ dialect that is compatible with VS2008 and Windows Embedded Compact 7.
Please consider his work posted here: https://github.com/open62541/open62541/issues/884

If VS2005 supports the C-features used in our public API, we are happy to accept contributions to support more compilers.
Changing the public API is difficult since it would break existing code.
An issue might be the availability of standard headers in C89, such as stdint.h. We rely heavily on size_t, int32_t, etc.
Furthermore, we use static inline functions in the API.

I don't have access to VS2005.
It would be helpful to have an estimation for the amount of work necessary to get support in the main repository.

Best regards,
Julius

martin...@gmail.com

unread,
Nov 25, 2016, 4:51:07 AM11/25/16
to open62541, martin...@gmail.com
Hello Julius

Thanks for your answer and thank you for guiding me to the thread which deals with porting Open62541 to WEC7.

I tried to download the zipped project for WEC7 and converted the project to a VS2005 project targeting our X86 windows ce 6.0 platform just for testing it out.
I also managed to get the server example working with an external connection from the UAExpert client. 
However trying to do the client example as well I kept getting a return value of the UA_STATUSCODE of BADCONNECTIONCLOSED 0x80ae0000 in the client even though I can see that the Server registers a connection. 
It is the client example I have been playing around with and I also tried to get the client to connect to other OPC UA servers but the problem still persists :-(
Am I missing something basic in order to getting it to work ?

Server Console Output 
[11/25/2016 09:16:23.489] info/network  TCP network layer listening on opc.tcp://WindowsCE:16664
[11/25/2016 09:18:15.641] info/network  New Connection 3 over TCP from 127.0.0.1:49213


Since we are moving to WEC7 in the near future getting Open62541 to be supported by a VS2008 compiler as mentioned in https://github.com/open62541/open62541/issues/884 could be very interesting for us as well.
It was a fairly easy task to downgrade the VS2008 project to a VS2005 since Windows CE 6.0 and WEC7 are binary compatible.

Best regards
Martin

Julius Pfrommer

unread,
Nov 25, 2016, 5:11:49 AM11/25/16
to open62541, martin...@gmail.com
Hello Martin,

I'm glad to hear you got the server working so easily.

With regards to the client problems, I cannot reproduce them on my box and don't have access to Windows Embedded atm.
Maybe you can ask in the Github issue where the WC7 code was posted.

Or you just use a debugger to find the error source. The client layer is very thin.
There's no more than 500 lines relevant to the error you described.

Best regards,
Julius
Reply all
Reply to author
Forward
0 new messages