Topic: How to compile for Windows CE 5

Hello

I see there is one dependency for _WIN32_WCE, but how do I compile for Windows CE (Standard SDK 500)?

Is there a ready-to-use Visual Studio 2008 solution or project file? Or do I have to use cygwin with CE gcc?

I tried with a copy of the VS project for Windows. But there are refernces to undefined functions, for example tm and rewind. There are also not really defines suitable for Windows CE.

I want to replace openSSL within my remote dekstop (rdesktopce) for Windows CE.

~Josef

Share

Re: How to compile for Windows CE 5

Hi Josef,

In the wolfSSL root directory you will find a solution file called "wolfssl64.sln". By default this is set for VS 2008.

Let us know if you have any issues working with it. We also have a guide here that you may find useful: https://www.wolfssl.com/docs/visual-studio/

Warm Regards,

Kaleb

Re: How to compile for Windows CE 5

All the supplied Visual Studio Projects are not created as SmartDevice solution with "Windows CE/Standard SDK 500" target. These are not helpful.

Who did ever compile wolfSSL for Windows CE? Please share your setup.

Share

Re: How to compile for Windows CE 5

Hi Josef,

Did you try updating the pre-processor macros to include the define "_WIN32_WCE "?

I apologize I do not have a test environment with VS 2008 setup. I can ask around to see if one of our other engineers has a setup to test this out but I can't make any promises as it is a product you can no longer download from Microsoft for testing purposes.

Warm Regards,

Kaleb

Re: How to compile for Windows CE 5

Hello Kaleb

I created a new VS2008 project und added all source and header files as in the standard win32 project. The pre-processor macros included a define for _WIN32_WCE but the source files do not care about that. The headers and source files have no #ifdef (_WIN32_WCE).

I tried some fixes for time.h and XREWIND but still get errores about rewind undefined. Does not look very well.

If you do not have any experience with _WIN32_WCE, you just should not claim to support this. I will then give up for now.

~Josef

Share

Re: How to compile for Windows CE 5

Josef,

There should be checks for the define _WIN32_WCE in the following headers and source files:

<wolfssl-root>/wolfssl/internal.h
<wolfssl-root>/wolfssl/wolfcrypt/wc_port.h

<wolfssl-root>/wolfcrypt/src/wc_port.c
<wolfssl-root>/src/wolfio.c

If you are not seeing those defines could you tell me which version of the wolfssl library you are working with by checking <wolfssl-root>/wolfssl/version.h?

For example in <wolfssl-root>/wolfcrypt/src/wc_port.c:

1227 #ifndef NO_ASN_TIME                                                              
1228 #if defined(_WIN32_WCE)                                                          
1229 time_t windows_time(time_t* timer)                                               
1230 {                                                                                
1231     SYSTEMTIME     sysTime;                                                      
1232     FILETIME       fTime;                                                        
1233     ULARGE_INTEGER intTime;                                                      
1234     time_t         localTime;                                                    
1235                                                                                  
1236     if (timer == NULL)                                                           
1237         timer = &localTime;                                                      
1238                                                                                  
1239     GetSystemTime(&sysTime);                                                     
1240     SystemTimeToFileTime(&sysTime, &fTime);                                      
1241                                                                                  
1242     XMEMCPY(&intTime, &fTime, sizeof(FILETIME));                                 
1243     /* subtract EPOCH */                                                         
1244     intTime.QuadPart -= 0x19db1ded53e8000;                                       
1245     /* to secs */                                                                
1246     intTime.QuadPart /= 10000000;                                                
1247     *timer = (time_t)intTime.QuadPart;                                           
1248                                                                                  
1249     return *timer;                                                               
1250 }                                                                                
1251 #endif /*  _WIN32_WCE */ 
....

Warm Regards,

Kaleb

Re: How to compile for Windows CE 5

Kaleb J. Himes wrote:

In the wolfSSL root directory you will find a solution file called "wolfssl64.sln". By default this is set for VS 2008.

wolfssl64.sln is for VS2010
wolfssl.sln is for VS2008

Share

Re: How to compile for Windows CE 5

Frank42,

Thanks, good catch! You are correct, I mistakenly stated the wolfssl64.sln was VS 2008 but it is in fact VS2010.

Cheers,

- Kaleb

Re: How to compile for Windows CE 5

I'm building WolfSSL for WinCE6.  See this:https://www.wolfssl.com/forums/topic119 … tings.html  Building the static lib is pretty straight forward.  Getting the example apps working takes some effort.

WinCE5 is not much different.

Share

10

Re: How to compile for Windows CE 5

This is regarding cross-compiling wolfssl for Win CE 7 with target type as arm using VS 2008. I could see people have tried compiling with WIN CE 5 and thought you might help me.

Environment : Customized Win CE 7 SDK with cpu type arm (not x86)
Steps followed for compilation.
- Cloned wolfssl latest version
- Created a smart device project in VS 2008 as a DLL and then added the wolfssl files
(user_settings.h was chosen from the /IDE/WIN and not sure that's right for WIN CE
- Added the preprocessor directives '_WIN32_WCE' and further more like WOLFSSL_USER_SETTINGS (referring from default wolfssl64.sln project)
- Tried compiling and ended up with the many undefined errors under 'wc_port.c' file like struct 'tm' undefined and so on... (time related structure undefines).

I did refer to the 'noob: Cutom enviroment settings' and 'How to compile for Windows CE 5' but couldn't find steps exactly for resolving time structure issue. Any help would be highly appreciated. Also if references to detailed steps for compiling and running samples

- Senche

Share

Re: How to compile for Windows CE 5

Hi @Sen,

Thanks for reaching out. Please find our porting guide here: https://www.wolfssl.com/docs/porting-guide/

We provide many useful tips for building in non-standard environments including how to resolve or port time functionality and other common errors experienced when porting. We also do provide a basic wolf tm struct that can be enabled with

USE_WOLF_TM setting

Please let us know if you have any other questions.

- K