Graphic Interface support system for real-time embedded systems

Source: Internet
Author: User
Article title: graphic interface support system for real-time embedded systems. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Overview of GUI development in embedded Linux
  
   1.1 Position of GUI in embedded or real-time systems
  
In common small handheld devices such as PDAs, due to restrictions of hardware conditions, the user interfaces we see are very simple, and almost do not see the gorgeous and beautiful GUI support we see on PC machines. However, the recent appearance of handheld computers such as Palm or operating systems for embedded systems such as Windows CE has seen the complete graphic user interface support. With the improvement of the hardware conditions of hand-held devices, we estimate that embedded systems require more and more lightweight GUIs.
  
Recent market demands show that more and more embedded systems, including PDAs, set-top boxes, DVD/VCD players, and WAP mobile phones, require a full-featured Web browser. This includes support for HTML 4.0, JavaScript, and even Java virtual machines. All of these require the support of a high-performance, highly reliable GUI.
  
Another system that urgently needs a lightweight GUI is an industrial real-time control system. These systems are generally built on a standard PC platform. the hardware conditions are better than those of embedded systems, but they have high requirements on real-time performance. In addition, they have higher requirements on GUI than embedded systems. These systems generally do not want to be built on a huge and cumbersome operating system or GUI that consumes a lot of system resources, such as Windows or X Windows. At present, many of these systems are built on DOS and other systems, and GUI is implemented in a relatively simple way. However, after the emergence of Linux systems, especially RT-Linux systems, many industrial control systems began to adopt RT-Linux as the operating system, but the GUI is still a problem. The key is that X Windows is too large and bloated. In this way, these systems have more prominent requirements for light GUI.
  
However, we must be clear that embedded systems are often customized devices with different GUI requirements. For example, some systems only require some graphical functions, while some systems require complete GUI support. Therefore, the GUI must also be customizable.
  
To sum up, the role of GUI in embedded systems or real-time systems will become more and more important. The basic requirements of these systems for GUI include:
1. light and less occupied resources.
2. high performance.
3. high reliability.
4. configurable.
  
   1.2 Current implementation of real-time embedded system GUI
  
Although real-time embedded systems require more and more GUI, the current GUI implementation methods are different:
  
1. some large manufacturers have the ability to develop their own GUI systems to meet their own needs.
2. some vendors did not strip the GUI from the application as a software layer, and the GUI support logic is the responsibility of the application itself.
3. use some mature GUI systems, such as MiniGUI or other GUI systems.
  
Among the above measures, the 2nd method is a temporary solution. Programs written using this method cannot be divided into Display logic and data processing logic, resulting in poor program structure, difficulty in debugging, and a large number of code duplication. We believe that GUI is a kind of basic software similar to the operating system. such software systems should follow certain standards and should be open source free software, this allows open vendors to focus on developing their own applications. Currently, vendors that develop (real-time) Embedded systems on Linux generally choose the following GUI systems: Compact X Window System, MiniGUI, MicroWindows, OpenGUI, QT/Embedded, etc, the following describes these systems and compares their advantages and disadvantages.
  
   1.2.1 tightening X Window System
  
As we all know, X Window is a standard GUI for Linux and other UNIX-like systems. The X Window System adopts a standard client/server architecture and has the advantages of good scalability and portability. However, we all know that the system is huge, cumbersome, and inefficient. To achieve the portability of applications, many manufacturers have tried to compress the X Window System so that it can run on embedded systems. An X server with a size of about 800 K has been developed abroad. This can basically meet the needs of embedded systems in Western countries. However, the source code of the system is not open, making it difficult to implement local development.
  
   1.2.2 MicroWindows
  
MicroWindows is an open-source project, which is currently under development by a U.S. company. The development of this project is very active, and some people in China have also participated in the development, and compiled support for GB2312 and other character sets. The main feature of this project is to provide relatively complete graphics functions, including some advanced functions, such as Alpha hybrid, 3D support, TrueType font support, etc. However, as a window system, the window processing functions provided by this project need to be further improved. for example, the implementation of controls or components is not complete yet, and the keyboard and mouse drivers are not complete yet. It is worth mentioning that many controls of this project are transplanted from the MiniGUI, and the mine clearance game is also transplanted from the MiniGUI.
  
This project has launched an open-source browser project, which is developed based on the HTML interpreter provided by KDE kfm. Currently, it can explain some simple HTML pages.
  
   1.2.3 OpenGUI
  
OpenGUI has existed on Linux for a long time. The initial name is FastGL, which only supports the linear memory mode of 256. However, other display modes are also supported. This library is written in C ++ and only provides C ++ interfaces.
  
   1.2.4 Qt/Embedded
  
QT/Embedded is a well-known QT library open-source QT version for Embedded systems. This version has good portability. many QT-based X Window programs can be easily transplanted to embedded versions. However, this system is not open source code. if you want to use this library, you may have to pay for expensive authorization fees. Currently, the demo version of QT/Embedded is available. it is expected that the official release of QT/Embedded will be available early next year.
  
   1.3 Introduction to MiniGUI
  
MiniGUI is a graphical user interface support system for embedded systems or real-time systems. It runs mainly on the Linux console and can actually run on any POSIX compatible system with POSIX Thread support. MiniGUI is also one of the first free software projects in China.
  
The main features of MiniGUI include:
  
Pure free software that complies with LGPL terms.
Provides a complete multi-window mechanism. This includes:
Multiple windows running in multiple independent threads.
The subsidiary of the main window in a single thread.
Dialog box and predefined controls (buttons, single-line and multi-line edit boxes, list boxes, progress bars, and toolbar ).
Message transmission mechanism.
Multi-character set and multi-font support, currently supports ISO8859-1, GB2312, Big5 and other character sets, and supports a variety of grating fonts and TrueType, Type 1 and other vector fonts.
Supports Chinese character input methods such as full spelling and five strokes.
Support for common image files such as BMP, GIF, JPEG, PCX, and TGA.
Windows Resource file support, such as bitmap, icon, and cursor.
Inserts, timers, and acceleration keys.
Others (Beep, ETC/INI file operations ).
Small. The size of the library file containing all functions is about 300 kB.
Configurable. Configuration and compilation can be customized based on project requirements.
High stability and performance. MiniGUI has been applied in key applications such as the Linux release installation program, the CNC system, and the blue-dot embedded system.
Good portability. Currently, MiniGUI can be run on X Window and Linux console. The EEOS development team of the Chinese Emy of Sciences has successfully transplanted MiniGUI to their POSIX compatibility system. The blue dot software (Beijing) R & D center has also successfully transplanted MiniGUI to two Strongarm-based embedded systems.
  
   1.4 Comparison of various GUIs for real-time embedded systems
  
Compared with the preceding GUI for embedded systems, we believe that the X Window System, MiniGUI, and MicroWindows systems are relatively mature and most developers recognize them. Although the compressed X Window system's X server can be reduced to 800 K, the operation of X Window system also requires support from other programs and libraries, including X Window manager, XLib, GTK and QT libraries built on XLib. Therefore, the compact X Window System occupies a lot of system resources during its operation, after the localized code such as Chinese display and Chinese input is added, the overall system size and runtime resource consumption will further increase. Therefore, developers of embedded systems often place the tightening X Window system on a set-top box and other embedded systems that do not have strict requirements on resources.
  
MiniGUI and MicroWindows are both free software, but the former follows the LGPL clause and the latter follows the MPL clause. The technical routes of these two systems are also different. The strategy of MiniGUI is first built on mature graphics engines, such as SVGALib and LibGGI. the focus of development is on window systems and graphic interfaces; at present, the focus of MicroWindows development is on the underlying graphics engine, and the functions of window systems and graphic interfaces are still insufficient. For example, MiniGUI has a set of function interfaces that support multiple character sets and multi-encoding, and supports various common character sets, including GB, BIG5, and UNICODE, microWindows does not have a unified interface for multi-character set support.
  
Important features of MiniGUI
  
   2.1 Design goals: small and configurable
  
MiniGUI was initially designed and developed to meet the needs of an industrial control system (computer numerical control system. This industrial control system is a computer numerical control system (CNC) designed by Tsinghua University for a numerical control machine tool ). After comparing systems such as DOS, Windows 98, Windows NT, and Linux, the project team decided to select RT-Linux as the real-time operating system to meet the requirement of 2 ms or higher real-time performance. However, the graphical user interface is a problem because X Window is not suitable for real-time control systems, and the localization of X Window systems was not satisfactory at that time. Therefore, we decided to develop a graphical user interface support system. This is the background of MiniGUI. Obviously, MiniGUI was designed for real-time systems from the very beginning. Therefore, it was designed with small size, high performance, and high efficiency. At present, the development of this numerical control system is nearing completion, and MiniGUI plays a very important role in it.
  
Considering other embedded systems different from the numerical control system, GUI systems must be configurable to meet ever-changing needs. After successful application in the CNC system, we immediately started the configurable design of the MiniGUI. We use the automake and autoconf interfaces in Linux to implement a large number of compilation configuration options. these options can be used to specify which functions are included in the MiniGUI library and which functions are not included at the same time.
  
Therefore, MiniGUI is a customizable and compact graphic user interface support system suitable for real-time industrial control systems and embedded systems.
 

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.