Tutorial 4 of WinCE

Source: Internet
Author: User

Now, we have generated our own system and understood the Pb folder structure. This time, let's take a look at how to run our own system on the target device, here our target device is x86, so we will take this device as an example. Of course, if you do not have your own hardware platform, you can use another PC instead.

Based on what we have learned before, we still use the hello system, but we have to do it again, because the last time we did it was used in the simulator, this time we want to create a device. We can select cepc in the Wizard,

Of course, we can also select cepc and emulator at the same time, which can be used on both the cepc device and the simulator, but this is not recommended.

After compilation, go to the public folder and find the project folder. There are two subfolders in the reldir Folder: Debug and release. The former allows debugging, contains debugging information, which is for release. We usually use the debug version in the debugging phase. We found the NK. binfile in this folder. As we said before, this is the final file of our system. However, at this time, we have no way to run it. Let's look at the method for running it.

The Startup Program of CE is also called the bootloader program. It can boot the CE operating system, that is, load the NK. binfile into the memory, unpackage it, and then run the kernel of the operating system. I will write the bootloader program in the future. Because we are new to CE, we don't need to write a special Startup Program first. We just need to use the DOS boot disk to guide the system and then load ce.

Speaking of the DOS boot disk, it seems difficult to find it in the era where Windows XP is popular. Fortunately, Pb reminds us of this point. It comes with a tool that can make DoS boot disks, next we will do this first.

Go to the pb program folder and find the folder "program files/Windows CE platform Builder/4.20/cepb/utilities.pdf. Here there is an executable file of websetup.exe. Let's run it first. It will prompt you to install, click the "Install" button, and the installation will be completed instantly. After the installation is complete, we can run the strange cepcboot.144 file. The running interface is as follows:

Find a floppy disk. A DoS boot disk will be ready soon. It seems to be dos6.22. After the boot disk is complete, this disk can guide the CE system. Let's take a look at the composition of the files in this disk:

The DoS Files are not mentioned here. Let's look at eboot. bin. This file is used to load NK through the network. BIN file, sboot. binfile is used to load NK through serial port. BIN file, if you want to load NK through the network or serial port. bin, you can select one of them. Loadcepc.exe is a program that can be executed in DOS to load NK. bin of the cepc architecture, because it can start NK. Bin through the network, serial port or root folder.

Program. For more information about loadcepc.exe, see the readme.txt file.

In addition, if you want to directly start NK in the C: disk root directory on the target machine. bin, change autoexec. BAT file to load NK. bin instead of loading eboot. bin. If you only use one of them, you can modify the config. sys and autoexec. BAT files as required.

The above is just an implementation method. If you already have a boot disk, you can also copy the files to your boot disk directly under wince420/public/common/oak/CSP/istrap/DOS/bootdisk, this is the same as the result obtained using the above method.

With the above preparations, we can direct NK. bin to the target device. If the network adapter of your target device is of the following type:

Smc9000

Ne2000

Dec21140

Rtl8139

Dp83815

3c90x

Remote debugging is supported and can be directly downloaded to the device in Pb; otherwise, the NK. binfile can be copied to the root folder of the C: disk of the target device.

Let's take a look at the process of remotely starting the target device using a network cable.

First, insert the boot disk into the drive of the target device and power on the target device. When the target device is started, we will see the prompt jump xxxxxxx on the screen, at this time, the network card of the target device broadcasts the bootme message to the network. We can use "configure remote connection" under the "target" menu in Pb on the development machine ", in the pop-up dialog box, configure as follows:

Click the "Configure" button in the dialog box. In the displayed dialog box, the device name is displayed:

Run the "download/initialize" command under the "target" menu to download NK. bin to the target device and start it.

If the target device cannot be found, try restarting the target device or changing the network IP address and other information in autoexec. bat in the boot disk to try again.

Let's get your system started on a real device.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.