This paper analyzes the characteristics of embedded operating system Windows CE. NET and uses the tool Platform Builder 4.2 to customize it on S3C2410 processor with ARM920T as the core.
1 Windows CE system and Platform Builder 4.2
Windows CE is a 32-bit, multi-threaded, multi-tasking embedded operating system launched by Microsoft. It is an embedded modular operating system designed by Microsoft specifically for information devices, mobile applications, embedded applications, etc. Users can select, combine and configure Windows CE. NET modules and components to create a user version of the operating system.
Windows CE. NET is the successor of Windows CE 3.0, and its system composition is shown in Figure 1. Windows CE. NET provides a good real-time operating system for quickly building the next generation of intelligent mobile and small memory footprint devices. It has a complete operating system feature set and an end-to-end development environment, and includes everything needed for customized devices, such as networking capabilities, real-time performance, small memory footprint, multimedia, and Web browsing functions.
Platform Builder 4.2 is an integrated development environment provided by Microsoft to Windows CE. NET developers to customize embedded operating systems based on the Windows CE. NET platform. It provides all the tools for designing, creating, compiling, testing and debugging Windows CE. NET operating system platforms. Developers can design and customize the kernel, select system features, and then compile and debug through an interactive environment. At the same time, developers can also use Platform Builder to develop drivers and application projects.
2 Hardware Platform
The HHARM9-EDU development platform is a platform for embedded system teaching developed by Huaheng Company. It consists of a core board and a base board. The core board integrates the Samsung S3C2410 processor, 16 M FLASH and 64 M SDRAM. Samsung's S3C2410 processor is a cost-effective, low-power, small, high-performance, and highly integrated microprocessor. It uses a 203 MHz ARM920T core, integrates 16 KB instruction cache and 16 KB data cache, and uses MMU to manage virtual memory. The LCD controller supports STN screen or FTT screen and supports NAND flash. The core board functional module is shown in Figure 2.
3 Windows CE. NET system transplantation
3.1 Migration Process
Basically, the migration process of Windows CE. NET is the process of rewriting BSP. BSP, also known as board support package, is a software package that includes a startup program, OEM adaptation layer program (OAL), standard development board (SDB) and drivers for related hardware devices. BSP is the main part of the system based on the Windows CE. NET platform. The operating system migration steps are:
1) Tailor the operating system, configure each component and modify related configuration files;
2) Develop device drivers on the target device system and create customized CE operating system image files;
3) Download the target file to the target device for debugging; [page]
4) After customizing the operating system kernel, export the platform SDK for developing upper-level application software in Embedded Visual C++.
The migration process is shown in Figure 3
The development tool Platform Builder itself provides BSPs for multiple target boards. If the user's target board is the same as that provided by Platform Builder, then you only need to recompile and generate the corresponding system image and download it to the target board. However, in actual situations, the processor is more likely to be the same, but the peripheral device interfaces on the board are different. In this case, you only need to modify the BSP of the same or similar processor in Platform Builder to generate a new BSP, which can greatly reduce the R&D cycle of the BSP.
3.2 BSP development based on S3C2410 board
The development of BSP mainly includes the development of Bootloader, OAL, local driver and the configuration of some files.
1) Bootloader is a small program that runs before the operating system kernel runs. Through this small program, the hardware devices can be initialized and the memory space mapping can be established, so as to bring the system's hardware and software environment to a suitable state, so as to prepare the correct environment for the final call to the operating system kernel. It is stored in the non-volatile storage medium of the target platform, such as ROM or Flash. The ppcboot provided by Huaheng Company is used in this transplantation.
2) OAL is a code layer located between the Windows CE kernel and the target hardware platform in the device vendor adaptation layer. The purpose of developing OAL is to realize the communication between the Windows CE. NET kernel and the target hardware, including processing interrupts, timers, etc.
3) Device Drivers refers to a software module that can manage virtual or physical devices, protocols, services, etc. The operating system directly interacts with the hardware through the driver. The specific steps of device driver design are to create a new platform through Platform Builder, and then insert and remove drivers according to the needs of the hardware platform. The files that need to be modified are Platform. Bib, Platform. reg and driver source code. Taking the LCD driver source code as an example, according to Huaheng's reference materials, the original driver of PB needs to be modified as follows:
WORD TempBuffer[241][320]; // changed buffer size
S3C2410DISP::S3C2410DISP(void)
{
RETAILMSG(0,(TEXT("++S3C2410DISP::S3C2410DISP ")));
//setup up display mode related constants
m_nScreenWidth=240; //screen width changed from 480 to 240
m_nScreenHeight=320; //screen height changed from 640 to 320
m_colorDepth=16;
m_cbScanLineLength=m_nScreenWidth*2;
m_FrameBufferSize=m_nScreenHeight*m_cbScanLineLength;
//memory map register access window, frame buffer, and program LCD controller InitializeHardware();
The register settings are set by the InitDisplay function in D:WINCE420PLATFORMsmdk2410KERNELHALcfw. c. The driver obtains the address of the framebuffer by reading the value of the corresponding key in the registry.
[HKEY_LOCAL_MACHINEDriverS3C2410CONFIG]
"DisplayDll"="s3c2410disp.dll"
"LCDVirtualFrameBase"=dword:ac100000
"LCDPhysicalFrameBase"=dword:30100000
4) Configuration of platform files. The configuration files include source code configuration files and operating system image configuration files. The source code configuration file mainly tells the Build tool the paths, C or Visual C++ source files, and what type of binary files to generate, including Dirs, Sources, Makefile, etc. The operating system image configuration file is mainly used to generate operating system images for the Makeimag tool, including. bib (binary image file),. reg (registry file),. dat (file system description file),. db (database file). In this article, the source code configuration file only makes corresponding modifications to the configuration file.
Using the BSP generated above, create a new platform through Platform Builder. This article directly selects the Mobile Handheld platform, and then selects according to needs. Finally, get NK under WINCE42OPUBLICplatformRelDirSAMSUNG_SMDK2410_ARMV4Release. bin, compress it and burn it into Flash. At the same time, export the platform SDK for developing applications on EVC.
3.3 Debugging the operating system image on the target device
The development board and PC can download the operating system image through the serial port, Ethernet and JTAG/BDM. In this article, the development board is connected to the PC through the network cable and serial port cable, the hyperterminal is set up, and finally the system runs on the development board.
4 Conclusion
This article briefly introduces the transplantation process of Windows CE. NET on HHARM9-EDU. It is also of reference value for other processor platforms. The transplantation of Windows CE. NET on different hardware platforms is mainly the process of modifying BSP according to the corresponding hardware. The design of the driver is one of the keys to building BSP. In the absence of new peripherals, the design of the driver can be modified based on the source code provided by PB. In the case of new hardware devices, it must be rewritten.
References:
[1]. ARM920T datasheet http://www.dzsc.com/datasheet/ARM920T_139814.html.
[2]. ROM datasheet http://www.dzsc.com/datasheet/ROM+_1188413.html.
Previous article:Development of pile foundation testing instrument based on embedded system
Next article:A wireless router based on GPRS/CDMA 1X
Recommended ReadingLatest update time:2024-11-16 16:33
- Popular Resources
- Popular amplifiers
- Network Operating System (Edited by Li Zhixi)
- Virtualization Technology Practice Guide - High-efficiency and low-cost solutions for small and medium-sized enterprises (Wang Chunhai)
- Arduino Uno Windows Driver
- Practical Development of Automotive FlexRay Bus System (Written by Wu Baoxin, Guo Yonghong, Cao Yi, Zhao Dongyang, etc.)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Characteristics and Applications of Voltage Monitoring Chip TPS383X
- 5G signal improvements could save $193 million per US fixed-access O-RAN network
- How to analyze which solution is better when two rectifier bridges are connected together?
- [RVB2601 Creative Application Development] Introduction and use of RVB2601 WiFi networking to obtain weather information
- IGBT Driver
- Renesas Electronics RL78/G11 target board free application, participate in the application can also win a JD card!
- Faster CircuitPython LED animation with ulab
- Simple analysis of a circuit for collecting the average value of AC voltage
- EEWORLD University Hall----Live Replay: Infineon / Weikeng - Market environment is uncertain, Infineon is very sure to protect IoT devices
- Usage of pragma in dsp