NetConsulate

 

   Home    | Partners  |  Virtual Software Development Center  |  Articles /White Papers  | Case Studies  | Clients    |  |News/Events 

     

Shared Source Code in Windows Embedded CE 6.0

                                                                    Author: Sanjaykumar Buragute. ,  NetConsulate Software Private Limited. 

web: www.netconsulate.com   |   www.embeddeduniversity.com   |   www.embeddedcommunity.org

Abstract

 Understanding and using shared source code is important for development of better Windows Embedded CE 6.0 based devices in less time. Microsoft provides over 3.9 million lines of source code for Windows Embedded CE 6.0. This article gives overview of Source code availability in Windows Embedded CE 6.0

Introduction

Access to source code is crucial for development of embedded systems. Many embedded developers are aware that Open Source Embedded operating systems like Embedded Linux provides access to it source code. For the benefit of embedded developers, Microsoft also has been providing source code for Windows Embedded CE since Windows CE 3.0 ( Year 2001).  With release of Windows Embedded CE 6.0 in year November 2007, Microsoft has made available 3.9 Million lines of Source code under different source code access programs.

 Shared Source Vs. Open Source

Microsoft uses term-shared source than open source. It indicates that source code is owned by Microsoft and is shared with you.With Open source code access available with open source RTOS like embedded Linux you are allowed to access source code, you can change source code but you must give changed source code back to community. So source code of Intellectual property developed using open source has to be given back to community. This is what your management may not like. But with Microsoft’ shared source access when you develop software by modifying shared source of windows embedded CE you need not give it back to the community or even Microsoft ! So your intellectual property rights and confidentiality is preserved.

Advantage of Source code Access for Embedded Developers.

  •  You can develop better devices:

Developers who need to differentiate their device software from other similar devices in the market and wants to give best look n feel to the device that matches particular device category. For example if you are developing internet appliance type device whose purpose is solely to browse internet, then in that case instead of using standard internet explorer, you can modify internet explorer browser and develop your own browser with new look n feel and use new browser as a shell in your device. You may also want to my modify some operating system components so that your device is optimized for intended application.

  •  You can better Debug your device

Having access to source code , you understand working and internals of operating system and you can step though the Microsoft source code to better debug you device and application.

  •  Reduce  development Time

Using source Code you can actually reduce time to develop your device. For example by jump starting with source code of driver which closely matches your device type you can reduce development by leveraging existing code.

 Embedded developers need access and rights to use source code to develop successful devices in less time. By studying source code developers can understand how particular module in operating system works internally and fine-tune his/her own source code. This understanding of how system works inside help in troubleshooting windows embedded CE 6.0 device.

Shared Source Programs

 Currently shared source code for windows embedded CE is available under two programs

  •     In the Box shared Source Code
  • Premium shared source code

 

In the Box Source Code

 The “In the Box” Shared Source code is available to any developer using the licensed version of Windows Embedded CE whether they use the evaluation copy of the software or the full packaged product. The source code available “In the Box” covers code sample code like drivers but also “Private” Shared Source code such as the kernel, the device manager and much more.

  • You can Reference, Debug, Modify and Share the In the Box source code.

developers can look at the Shared Source code for their reference, which means that they can see exactly how a component works. This can help them get a deeper understanding of Windows Embedded CE and its inner design.

  • developers can debug their devices and applications all the way down to the Shared OS code. With Shared Source, the OS is no longer a black box and they can dive into it to better troubleshoot the device.
  • Developers can edit and modify Windows Embedded CE Source code. You can modify it to tailor a component to a specific device’s use but they can also innovate on top of the existing code and add new functionalities. customers can redistribute their commercial derivatives with their device and they can do so without having to give it back to the community.
  • If you decide to do so,you can share their code modifications with customers, partners or/and other developers under the specific requirements of the license granted.

 Premium Shared Source

The Premium Shared Source program is available to qualified OEMs and Partners in eligible countries. It covers the Premium source code which is different than the Shared Source code available in the box. The premium shared source code includes more Windows Embedded CE components such as the Networking stack. The Premium Shared Source program has two different licenses:

  • The Premium Derivatives license and
  • The Premium Redistribution license.

 With the Premium Derivatives program, licensees can use the code for Reference and Debugging as defined before.

 And with the Premium Redistribution program, licensees can use the code for Reference, Debugging and Modifications.

Premium shared program is available in the 34 countries

The partners eligible for the programs are

• OEMs the purchased over 5k > run-time licenses in 12 months

• Windows Embedded Gold System Integrators.

• Premier Joint Development Partners

• Silicon Vendor Partners with a certified BSP for Windows CE

• Microsoft Most Valuable Professionals

 Premium Derivatives Details:

Unlike the “In the Box” Shared Source code, the Premium Shared Source code, is available to eligible customers and partners via Microsoft Code Center Premium (CCP). Code Center Premium is a Microsoft’s secure web-based repository that enables access to the Windows Embedded CE Premium Source code from any location. The service provides just-in-time access and the ability to browse, search, reference and download Windows CE Premium Shared Source code through a smart-card-based, Secure Sockets Layer (SSL) connection

 Premium Redistribution Details

The access via Code Center Premium is the same as the Premium Derivatives program.

 As mentioned before, the rights granted are: Document, Debug and Modify

In addition to creating derivatives for debugging purposes, licensees can create and redistribute commercial derivatives.

 Installation of Windows Embedded CE Source Code.

In the box Shared Source code available needs to be install in order to use it in your device development. Windows Embedded CE 6.0 installation step is shown below. 

 

After Selecting shared source code , in the next installation step you need to accept Microsoft Shared Source agreement as shown below.

Locating Windows Embedded CE shared source code:

When you install Windows Embedded CE, source code is typically copied into the  _WINCEROOT%\Public and %_WINCEROOT%\Platform directories, which are in the directory where Platform Builder is installed. This code is also referred to as public code. For example if you install Windows Embedded CE at  c:\wince600 then you can find public code at c:\wince600\public and c:\wince600\platform  directory.

When you install Windows Embedded CE Shared Source by following steps shown above additional source code is also installed in the %_WINCEROOT%\Private directory. This code is also referred to as private code. For example if you have installed windows embedded CE at c:\wince600 directory then you can find windows embedded ce shared source code at c:\wince600\private directory.

Following snapshot shows windows embedded CE shared source directory.

Locating shared source code in Platform Builder IDE

You can use following two methods to locate shared source code included with Windows Embedded CE:

·         Use the integrated development environment (IDE)

To locate shared source code using the IDE 

  1. In the Catalog Items View, select the Catalog item you need to find source code for.
  2.     Expand the selected node.

1.         If source code is available, double-click the source code icon to open the folder containing the source code files for the selected Catalog item in the Solution Explorer.

right click mouse as shown below  and click on the display in solution view.

Now you can select source code and edit/use as per your requirement.

You can use same debugging / code handling functionality in platform builder IDE to work with shared source code. For example, you can use call stacks, memory, watch windows, variables, registers, and breakpoints. You can use Solution Explorer to manually locate and open the code, and manually set breakpoints on any section of public or private code as you do for shared source code.

Many items list the available source code if it relates directly to that item.

·         Use a command-line prompt build window or Windows File Explorer

In some cases, the Catalog Items View does not display a component's available source code, or the component itself. An example of this is the Kernel Catalog item. If this is the case, use the alternate method to locate the source code.

To locate shared source code

1.         Navigate to %_WINCEROOT%\Public and %_WINCEROOT%\Private.

2.         Locate the directory containing the Catalog item you need source code for.

This directory also contains the available source code for that component.

3.         After you locate the source code for the component you selected, double-click a selected file to open it in Visual Studio.

This opens the source code file.

Backing up original shared source code files

If you want to modify Microsoft supplied shared source code is highly recommended that you back up the original Shared Source code and Windows Embedded CE library (.lib) files before you modify them.

To help accomplish this, Platform Builder includes a command-line tool called CeBackup, which searches the directory tree of your OS design for .lib files and copies them to a backup directory.

With the CeBackup tool (Cebackup.exe), you can back up and restore Windows Embedded CE library files (LIB) that Platform Builder ships. If you do not have a license that permits you to ship private code, this tool gives you the ability to customize the libraries during the OS design development process, and then restore the original libraries before releasing your product.

You can find cebackup.exe tool at the location %_WINCEROOT%/ SDK\BIN\I386 so if your windows embedded CE installation directory is you can find cebackup.exe tool at  D:\WINCE600\SDK\BIN\I386.

By default, CeBackup backs up all LIB files under %_WINCEROOT%\Public. Backup files are stored in directories that correspond to their original location. For example, files in %_WINCEROOT%\retail are backed up to %_WINCEROOT%\retail.CEBACKUP. If your development workstation has compression-enabled NTFS, the backup directory will be compression enabled.

Following example shows how to back up all .lib files in %_WINCEROOT%\Public and its subfolders.

To create a backup of the original .lib files using CeBackup

1.         In the platform builder IDE, from the Build menu, select Open Release Directory in Build Window.

2.         From the command prompt, type the following command.

cebackup backup

This backs up all .lib files in %_WINCEROOT%\Public and its subfolders.

Restoring original backup files.

To restore backed up files to orginal, use cebackup command line option “restore” as shown below.

cebackup restore

This performs a restore of .lib files in %_WINCEROOT%\Public that CeBackup backed up.

About Author:

Sanjaykumar is Post Graduate in Electronics Engineering with 14 years of experience in System Software, Windows Embedded and Windows Mobile development. Sanjaykumar is Microsoft Authorized trainer on windows embedded. sanjaykumar manages  windows Embedded community at www.embeddedcommunity.org . Sanjaykumar was given "Microsoft Most Valuable Professional [ Windows Embedded ] award by Microsoft Corporation for year 2006. Sanjaykumar has Green Belt \ Red Belt and Black Belt certification in Windows Embedded CE and Windows XP Embedded Sales and Technical training  From Microsoft Corporation.  Sanjaykumar is Microsoft Certified Technology Specialist in Windows Embedded CE 6.0

 

About NetConsulate: NetCosulate provides outsourced software product development services for Windows  Emmbedded CE, Windows XP Embedded and Windows Mobile technologies. NetConsulate's services  covers full life cycle of the product based on windows embedded  - from R&D to software development Development, Training, Testing, Support and Professional Services, thus allowing you to focus on your core competencies, while achieving time-to-market and cost. NetCosulate delivers unmatched value through high quality, faster time to market and lower total costs to worldwide customers.

 

Copyright ©  NetConsulate Software Pvt. Ltd. All Rights Reserved

Terms Of Use           Privacy Statement          Contact Us