Building Windows CE Tiny Kernel Image

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Building Windows CE Tiny Kernel Image

Building Windows CE Tiny Kernel Image


2005-09-08

For some applications, they do not need display or just do simple jobs without display. The “Tiny Kernel” template in
Windows CE 5.0 is good for those developers. It is also a good solution for DOS programmers. Programmers can
access memory without 1M bytes limitation, have network function and get benefit of multi-tasking. Windows
programmer also can easily write code at “Tiny Kernel” in Windows CE because it just like console programming in
general desktop Windows (Windows 98, Windows 2000 or Windows XP). We will show developers how to make a
tiny kernel image with Platform Builder 5.0 on ICOP Vortex86 boards.

Working Environment

Please make sure Vortex86 BSP has installed in your Platform Builder. Or, download Vortex86 BSP from this URL:
http://www.dmp.com.tw/tech/software.htm#wince.

We also recommend installing QFE for Platform Builder. Please download QFE and new patches from this URL:
http://www.microsoft.com/downloads/results.aspx?sortCriteria=date&OSID=&productID=CCBACA17-9FFD-425D-A
218-30A35CB4CEE8&CategoryID=&freetext=&DisplayLang=en&DisplayEnglishAlso=

Before starting this demo, we assume you know how to use Platform Builder to make Windows CE image, how to
upload image via Ethernet. Or, visit http://www.vortex86.com/os.htm#wince to get more information about Windows
CE development.

1 of 11
Building Windows CE Tiny Kernel Image

Create a Tiny Kernel Workspace

Step1: Run Platform Builder 5.0 and select “File -> New Platform”.

Step 2: Enter project name.

2 of 11
Building Windows CE Tiny Kernel Image

Step 3: Select Vortex86 BSP.

Step 4: Select “Tiny Kernel” as template.

3 of 11
Building Windows CE Tiny Kernel Image

Step 5: Finish the platform wizard.

4 of 11
Building Windows CE Tiny Kernel Image

Add Network Functions and IDE Devices Support

Because there is no display in tiny kernel mode, we will add network functions to demo. In order to enable network
function, we have to add those components:

z Catalog -> Device Driver -> PCI Bus


z Catalog -> Device Driver -> Networking -> Local Area Networking (LAN) devices -> RealTek RTL8139
z Catalog -> Core OS -> Windows CE devices -> Communication Services and Networking -> Networking -
Local Area Network (LAN) -> Wired Local Area Network (802.3, 802.5)

After that, some networking components will be added automatically:

z Network Driver Architecture (NDIS)


z TCP/IP
z Winsock Support

If access IDE hard disk or DOM is needed, please add those:

z Catalog -> Device Drivers -> Storage Devices -> Storage Devices -> ATAPI PCI/IDE Storage Block Driver ->
ATAPI PCI/IDE Storage Block Driver
z Catalog -> Core OS -> Windows CE devices -> File Systems and Data Store -> Storage Manager -> FAT File
System

To test TCP/IP connection in Windows CE device, we add FTP, TELNET and web server for desktop PC to connect
to:

z Catalog -> Core OS -> Windows CE devices -> Communication Services and Networking -> Servers -> FTP
Server
z Catalog -> Core OS -> Windows CE devices -> Communication Services and Networking -> Servers -> Telnet
Server
z Catalog -> Core OS -> Windows CE devices -> Communication Services and Networking -> Servers -> Web
Server (HTTPD)

5 of 11
Building Windows CE Tiny Kernel Image

After adding those server functions, we need to add some registry setting to enable them. Please open project.reg:
(Workspace -> ParameterView -> TinyKernel parameters -> C:\WINCE500 -> ICOP_Vortex86_50D -> Project
Specific Files -> project.reg)

Add those registry settings into project.reg:


[HKEY_LOCAL_MACHINE\COMM\FTPD]
"IsEnabled"=dword:1
"UseAuthentication"=dword:0
"UserList"="@*;"
"AllowAnonymous"=dword:1
"AllowAnonymousUpload"=dword:1
"AllowAnonymousVroots"=dword:1
"DefaultDir"="\\"

[HKEY_LOCAL_MACHINE\COMM\TELNETD]
"IsEnabled"=dword:1
"UseAuthentication"=dword:0

[HKEY_LOCAL_MACHINE\COMM\HTTPD]
"IsEnabled"=dword:1
"UseAuthentication"=dword:0
"DirBrowse"=dword:1
[HKEY_LOCAL_MACHINE\Comm\HTTPD\VROOTS\/]
@="\\"

In FTPD registry, we enable anonymous login and the default root path is the whole file system on Windows CE
device. In the registry for HTTPD, we enable directory browse and set path for “http://x.x.x.x/”. See the test pictures
and you will know what the registry settings do. For more information about registry settings, please search “FTP
server”, “TELNET” or “Web server” in help of Platform Builder.

DHCP is enabled by default for all Windows CE projects in Vortex86 BSP. Because there is no display on our
Windows CE device, it needs some operations to get IP address of CE device. So, we set fixed IP address in this
demo. For most real applications, fixed IP address is used. Add those registry settings into project to disable DHCP

6 of 11
Building Windows CE Tiny Kernel Image

and use fixed IP address. The TCP/IP settings in registry are for your reference. Change them according your
network environment.

[HKEY_LOCAL_MACHINE\Comm\PCI\RTL81391\Parms\TcpIp]
"EnableDHCP"=dword:0
"DefaultGateway"=multi_sz:"192.168.0.1"
"UseZeroBroadcast"=dword:0
"IpAddress"=multi_sz:"192.168.0.236"
"Subnetmask"=multi_sz:"255.255.128.0"

Now, select “Build OS -> Sysgen” to build our tiny kernel image.

7 of 11
Building Windows CE Tiny Kernel Image

Run and Test Image

After building without any error, we will have an nk.bin (size is about 1.3M bytes). Run “Target -> Connectivity
Options”:

Press “Setting” button to listen BOOTME message from ICOP Vortex86 board. Boot ICOP Vortex86 board and run
loadcepc.exe in DOS to load eboot.bin. When Platform Builder gets the BOOTME message from Vortex86 board, a
random ID will appear in the dialog:

8 of 11
Building Windows CE Tiny Kernel Image

Press “OK” button and run “Target -> Attach Device” to start uploading CE image:

After uploading complete, we test FTP server function first. Type “ftp://192.168.0.236“at address bar of your Internet
Explorer to connect to FTP server (where 192.168.0.236 is IP address in this example):

As our test, some FTP client program in Windows can not connect to Windows CE device or see nothing in file list.
This is because the list command “ls –a” does not support by Windows FTP server. Most of FTP client programs will
send “ls –al” to get file list. So, you can use FTP in DOS prompt in Windows to test. “ls” or “ls –l” can work properly,
but “ls –a” will get nothing. Developer can do data transfer on Windows CE device with desktop/development PC via
FTP.

Run “telnet 192.168.0.236” in DOS prompt to connect to Vortex86:

9 of 11
Building Windows CE Tiny Kernel Image

Open Internet Explorer and type “http://192.168.0.236” in address bar to access our Windows CE device. Because
we enable directory browse function and set “/” as root of Windows CE device, we can see this:

Now, we have finished the demo. Programmer can have the same development procedure in tiny kernel mode.
Using eMbedded Visual C++ or Platform Builder tools to coding and debugging. The only one difference is that:
there is no display. Hope this demo can be a start of developers who want to use headless mode in Windows CE.

10 of 11
Building Windows CE Tiny Kernel Image

More Information

This demo is based on ICOP Vortex86 boards. Visit http://www.icop.com.tw/results.asp?search=vortex86 to get


more boards.

Vortex86 web page: http://www.vortex86.com/.


DM&P Group technical support web page: http://www.dmp.com.tw/tech/
Other ICOP Windows CE development reference: http://www.dmp.com.tw/tech/os-wince/homeauto.

Windows CE home page: http://msdn.microsoft.com/embedded/windowsce/default.aspx.

If you have trouble about building Windows CE image on ICOP boards, please mail to tech@dmp.com.tw for more
support.

11 of 11

You might also like