Detailed Implementation of Microwindows in Embedded Systems

Source: Internet
Author: User
This section describes the implementation of Microwindows in an embedded system-general Linux technology-Linux programming and kernel information. For more information, see the following section. Preface

At present, with the rapid development of various handheld, wireless and embedded devices, the corresponding software and hardware design has also undergone great changes. Many devices use Intel, MIPS, Motorola's 32-bit microprocessor, and large-screen LCD. In the past 10 years, the desktop operation mode has achieved great success, so many developers began to use desktop-like operating systems in Embedded design. One of the better solutions is to use the Linux operating system. Linux has all the functions and features of a desktop computer on an embedded system. As an open source code, it allows various modifications and can be customized according to specific requirements of users.

Microsoft Windows Overview

Microwindows is a well-known embedded GUI software with open source code. It aims to introduce the Modern Graphic Windows environment to small devices and platforms running Linux. As a substitute for X Window, Microwindows can use less RAM and file storage space (100 K-600 K) to provide functions similar to X Window. The architecture allows designers to easily add a variety of display devices, mouse, touch screen, and keyboard. The kernel code of Linux2.2 and later versions allows you to access the Graphic Display memory as a frame cache. This allows you to avoid operations on the memory ing area when writing and controlling the display device, therefore, you can develop graphics programs without understanding the underlying graphics hardware or using X Windows. This is why Microsoft Windows is widely used in embedded systems. Microwindows is very portable and basically implemented in C language. Only some key codes use Assembly to increase the speed. Microwindows supports Intel 16-bit, 32-bit CPU, MIPS R4000, and ARM chips.

Microsoft Windows has been transplanted to some handheld computers. Its graphics engine is designed to run on any system that supports readpixel, writepixel, drawhorzline, drawvertline, and setpalette. With the support of underlying functions, the upper layer supports bitmap, Font, cursor, and color. Microwindows supports the new Linux kernel frame cache structure. Currently, it supports 1, 2, 4, 8, 16, 24, and 32 bits per pixel. It also supports Color Display and Gray Display, the color display includes two modes: true color (15, 16, and 32 bits per pixel) and color palette (1, 2, 4, and 8 bits per pixel. In color display mode, all colors are given in RGB format, and the system converts them to the most similar printable colors, in the monochrome mode, it is converted to different gray levels. Microwindows supports window coverage and subwindow concepts, complete window and customer area cutting, proportional and fixed font, and also provides the font and bitmap file processing tools. The system uses an optimized drawing function, so that users can provide better responses when moving the window. The memory drawing and movement make the Screen Drawing look smooth, which is especially useful for displaying animations, polygon painting, filling in any area, and cutting.

Although Microsoft Windows fully supports Linux, its internal portable structure is based on a relatively simple screen device interface that can run on many different RTOS and bare metal. The advantage of this feature is that a graphic program designed by the user can be shared by different projects without rewriting, or even run on different objects of different RTOS.

The Microwindows system supports the simulation Target Platform on the host platform graphically. In this way, the Microwindows application designed for Linux can be written and developed on the desktop without cross-compilation, and can be tested and run directly on the target platform. The target application running on the desktop host is displayed in X window, which is implemented by the X window Screen driver provided by Microwindows, rather than the frame cache driver. The driver can accurately simulate the display on the Target Platform in terms of pixel level and color depth, so that even if the desktop system is 24-bit color, it can also preview and display the 2bpp grayscale target application.

Microwindows uses a hierarchical design method. At the bottom layer, the screen, mouse/touch screen, and keyboard drivers provide access to physical devices. In the middle layer, a portable graphics engine is implemented, which supports line drawing, area filling, cutting, and color model. At the upper layer, multiple APIs are implemented to adapt to different application environments.

Two APIs: Win32 and Nano-X

In Microsoft Windows, two popular Graphic programming interfaces are used: Microsoft Windows Win32/WinCE graphic display interface (GDI) and Xlib-like interface. The former applies to all Windows CE and Win32 applications, and the latter is like Nano-X, which is applied to the lowest layer of all Linux X plug-ins. This allows a large number of Windows programmers to develop graphics applications. Similarly, Linux graphic programmers can use the X interface to develop graphics applications.
Related Article

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.