-
Notifications
You must be signed in to change notification settings - Fork 4
How to build and run sdl on wince platform
BrandonHe edited this page Dec 25, 2015
·
3 revisions
- OS: Windows7
Note: This wiki is build on windows7 32-bit system, for 64-bit system, please download corresponding software. - Install CMake
Note: If ask you about adding to the Path environment variable. PressYes
, or set Path environment variable manually. - Install Python
- Install Visual Studio 2008
- Install WinCE SDK.
Please contact your head unit OEM to offer correlative SDK.
- Clone SmartDeviceLink reporsitory(git clone https://github.com/APCVSRepo/sdl_core_v3.6_wince.git) or directly download zip archive file.
- Open windows command prompt(cmd.exe) or run other Unix style bash on windows such as git Bash
- Go to directory of cloned repository
- Make a new build directory and go to build directory
Suggest make build directory in same level of source code directory in order to keep source code clean - Run CMake command:
cmake -G "Visual Studio 9 2008 'INSTALLED WINCE SDK NAME'" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_SYSTEM_NAME=WindowsCE -DPROJECT_SDK_NAME="xxx" /Path/to/source/code
For example: if installed WinCE SDK name is CHSINT SDK For WinCE 6.0 (ARMV4I), no special PROJECT_SDK_NAME, then run commands as
cmake -G "Visual Studio 9 2008 CHSINT SDK For WinCE 6.0 (ARMV4I)" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_SYSTEM_NAME=WindowsCE /Path/to/source/code
Note:
-
'INSTALLED WINCE SDK NAME'
must be replaced by your specified WinCE SDK name which was just installed in Environment Configuration step.
-
CMAKE_BUILD_TYPE
variable default value is "debug", should be specified if need "Release" type
-
PROJECT_SDK_NAME
variable mostly don't need, if this variable is absent, it means to use libusb to realize USB function in code. Otherwise, it can specify the customized code for USB connection without libusb library, in this situation, you are required to modify the codes in sdl core and change CMakeListst.txt to let build steps success(such as iAP).
-
BUILD_TARGET_LIBRARY
variable is used for generating dynamic library, should add this variable BUILD_TARGET_LIBRARY=ON.
-
- After CMake configuration and generation both done, there will have a smartDeviceLinkCore.sln file, open it with Visual Studio 2008
- Set smartDeviceLink project as startup, choose right value in configuration manager corresponding with CMake_BUILD_TYPE value and CMAKE_WINCE_SDK value.
- Find the project ApplicationManager in Solution Explorer window, right click then select "Project Depencies..." in menu list. Checked "HMI_API", "MOBILE_API" and "v4_protocol_v1_2_no_extra" under "Depends on" window. Click OK button.
- Find the project smartDeviceLink, Right click the Property, select Configuration Properties -> Linker -> Advanced -> Entry Point. Keep sure the Entry point value is mainCRTStartup.
- Find the ALL_BUILD project, right click and then choose "Build" to build, waiting build is finished. Find the INSTALL project, right click and then choose "Build" to build, waiting build is finished.
- After building done, the executable file will be located in %BUILD_DIR%\bin
- Copy all files in %BUILD_DIR%\bin directory that generated in Build steps to WinCE Head Unit
- Connect the cell phone to the WinCE HU with the USB cable
- Clone [Web HMI] (https://github.com/LuxoftSDL/sdl_hmi.git) to WinCE Head Unit
- Open
index.html
from Web HMI repository using Google Chrome browser - Run smartDeviceLink.exe file