Simulators and remote Debugging tools (i)

Source: Internet
Author: User

This article mainly explains the use of remote debugging tools, and using a PB simulator to test.

First, simulator

The simulator (emulator) is a part of the PB. Dedicated to debugging the kernels and applications created under the PB. The simulator can simulate the physical platform of Windows CE under the PC. But in fact it's just a user program running at the CPU ring level 3. So it's going to run slower than the normal physical platform. The emulator only supports the x86 platform, which can only debug the kernel based on "emulator:x86" and all programs compiled with the x86 instruction set. Emulators have a lot of limitations that make it possible to run only simple applications. But one thing is good, most APIs for the operating system are the same for any CPU. Consider the simple program that is not affected by the CPU type or can be debugged on the emulator. In actual development, I only use the simulator to debug the software interface. If you want to learn PB, use it to create the kernel without the actual physical platform to debug, then the simulator is perfect. But the simulator has a lot of limitations, so even if you've tried all the kernel features (feature, or components) that you can debug in the simulator, you're just the tip of the iceberg. Here, by the way, the amount of knowledge that PB contains and the amount of knowledge that Windows CE itself adds up to is like a vast ocean, much more than the amount of knowledge you use to develop software in eVC. So if you only use EVC to develop a few software, you are still a first-year student of Windows CE.

Figure One Simulator

Hardware Restrictions on Emulators: (Excerpt from Windows CE Help)

Only can simulate the DEC 2114x network card driver to provide network support, other network card driver is not supported.

Can only simulate flat display driver, other display driver is not supported.

USB Device not supported

PC Card, hard drive, CF card is not supported.

Fat, CDFS, DVD file formats are not supported.

IEEE1394 devices are not supported.

Microsoft recommended configuration of the development platform using the simulator:

1 GHZ CPU

384 MB system memory

MB of available hard disk space

Second, create the kernel and download to the simulator

To test remote debugging tools, we must first create a kernel using PB v4.1:

To create a kernel using the New Kernel Wizard: Click PB "New Platform" and select "Emulator:x86" in "Available BSPs" in "Step 2", then "Available configurations" in "Step 3" Select a predefined kernel configuration that is targeted by the predefined kernel configurations. Here we choose "Internet appliance". Note: Some of the predefined kernel configurations are shipped with the shell, some of which are not. After selecting, fill in the project name (for example, the Internet) and the save path for the project. Default "Step 4" option to remove all check boxes from "Step 5". Because we just need the kernel and the shell to do it. Also remove all check boxes from step 6. The last step is to click the Done button.

Compile this new kernel: In the menu "Platform"-"Settings"-"Environment", click "New", add the variable name "IMGRAM64" and the value "1" In the pop-up dialog box. Then click "Build"-"built Platform" to start compiling. The time to compile is very much related to your machine configuration.

Configuration emulator: After the compilation is successful, click Target-Configure Remote Connection, locate the Download drop-down box in the pop-up dialog box, select Emulator, and click Configure at the back. Set the resolution to x 600 or 640 x 480 in the dialog box that pops up. The system memory is set to 64MB. When you click OK, select Emulator in the Kernel drop-down box. Click OK.

Start Emulator: Click Target-Download Initialize. Wait a while, the simulator will come out. You can see the interface of the standard shell, which is the desktop.

Write an application in PB and download it to the emulator:

On the premise of opening the kernel project (if you just open PB, open a kernel project first). Click the PB Menu "file"-"New Project or file". I won't have to say the rest of the steps. As with EVC, adding a project name can be coded. Just don't have MFC, ATL support. Select an SDK program to display "Hello World" here. Then click Build-Builds all to compile the program. I generally do not develop software under the PB. Trouble!

On the premise that the emulator is already open, click Target-Run Programs, locate your program name, and then click Run. You can see your program on the simulator.

Shutdown: Close the emulator first. And then click Target-"Disconnect".

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.