Implementation of a Novel Embedded System Based on EP7312
2026-04-06 04:19:52··#1
Abstract: This paper details the implementation of an embedded system based on the EP7312, which supports a graphical interface and an embedded browser. The improvements to the browser interface are highlighted. The system has been successfully run on a self-developed hardware platform. 1 Introduction With the rapid development of digital technologies centered on computers and software, multimedia technology and the Internet have become increasingly widespread. The trend of integrating computers, communications, and consumer electronics is becoming increasingly apparent. Embedded systems and technologies, as a new type of intelligent 3C integration, have entered a stage of intelligent and networked development. An embedded system is a system that integrates application programs, operating systems, and computer hardware. In short, it is hardware and software integration. Such systems are characterized by their small size, flexibility, high cost-effectiveness, high automation, strong real-time performance, and high professionalism. Embedded systems are suitable for application in various fields of human work and life, with typical applications including set-top boxes, digital applications, WebTV, ATMs/POS machines, multimedia mobile phones, pocket computers, car navigation systems, avionics, etc. Embedded technology has penetrated into all aspects of human life and work, and also has strong application potential in entertainment and military fields. There are four major operating systems globally: WinCE, Palm OS, EPoc, and Linux. Linux, with its stability, efficiency, ease of customization, scalability, and broad hardware support, combined with its free and open-source nature, is playing an increasingly important role in embedded operating systems. More and more embedded systems, including PDAs, set-top boxes, and WAP phones, not only require high-performance, high-reliability graphical interfaces but also full-featured web browsers, including HTML support, JavaScript support, and even Java Virtual Machine support. The system described in this article is an ARM Linux system with a graphical interface and embedded browser support. 2. Embedded System Architecture The EP7312-based embedded system consists of two main parts: software and hardware. The hardware is the independently developed EB7312-B embedded development system. The software comprises ARM Linux, Microwindows, and ViewML. 2.1 EB7312-B The CPU used in the EB7312-B is the EP7312 from Cirrus Logic. The EP7312 consists of a 32-bit RISC microcontroller and on-chip peripherals, designed for ultra-low power and high performance in PDAs, Internet devices, mobile phones, and handheld devices. The core logic of the EB7312-B is an ARM720T processor, comprising an ARM7TCMI CPU core module, a memory management unit, a write buffer module, and an 8KB independent instruction and data cache. The memory management unit is compatible with WinCE and Linux. Other functional blocks include a memory controller; 48KB of on-chip SRAM (shared with the LCD controller and general applications); 32MB SDRAM and 16MB Flash memory; two full-duplex UARTs (model 16550); a 10M Ethernet card CS8900A; a color 320x240 LCD (the EP7312 itself does not directly support color LCDs; color support is achieved through minor external logic and slight modifications to the LCD driver); and an 83-key ASCII keyboard. [align=center]Figure 2 ViewML Architecture[/align] 2.2 ARM Linux ARM Linux is a project that ports the Linux kernel to various target systems based on ARM processors. It is led by Russell [email protected]. It has successfully ported to over 100 different target systems. The Linux kernel ported here is Linux-2.4.24, and the ARM Linux patch is Linux-2.4.24-vrs1 released in February 2004. The key work during the porting process is the implementation of the bootloader and the design of frame buffer device drivers for specific hardware environments under ARM Linux. The main steps of the bootloader are: setting the entry pointer, setting the interrupt vector, setting and initializing RAM, initializing at least one scrambling port, detecting the CPU type, initializing the stack and registers, initializing the memory system, setting the kernel-related lists, and calling the kernel image. It is particularly important to note that when setting the CPU registers, r0 is 0, r2 is the detected CPU model number, the MMU is disabled, the instruction catch is enabled, and the data catch is cleared and then disabled. A framebuffer is a device that maps display memory and display chip registers from physical memory to the process address space. Its driver primarily relies on three data structures: `fb_info`, `fb_var_screeninfo`, and `fb_fix_screeninfo`. The `fb_info` structure can only be accessed in kernel space and internally defines `struct fb_ops`, whose members are a series of framebuffer operation functions. The framebuffer device driver mainly involves writing these interface functions. `fb_var_screeninfo` and `fb_fix_screeninfo` define the hardware characteristics of the video card, such as video memory size, number of bits per line, and resolution—specific hardware-related characteristics. The framebuffer driver first calls `register_framebuffer` to register a framebuffer device, and then registers the initialization function in `Linux/drivers/video/fbmem.c`. All ioctl calls of the framebuffer driver are uniformly implemented in `fbmem.c`. 2.3 Microwindows Microwindows is an open-source desktop system specifically designed for developing high-quality graphics on small devices. It uses relatively little RAM and file storage space (100K-600K), requiring only 50-250KB of memory during operation. Microwindows does not require any operating system or graphics system support and can run on 32-bit Linux systems with a framebuffer mechanism. One of Microwindows' main goals is to bring a graphical windowing environment to small devices and platforms running Linux, providing functionality similar to X Window. Microwindows adopts a layered architecture design. The bottom layer provides drivers for the screen, mouse or touchscreen, and keyboard, allowing programs to access actual hardware and other user-customized devices. The middle layer implements a portable graphics engine that implements line drawing, fill, polygons, clipping, and various color modes. The top layer implements various APIs to adapt to different application environments. Each layer can be modified or re-coded according to different application requirements. The system defines a data structure for each device (display screen, mouse, touchscreen, keyboard) for the graphics engine: `struct _mwscreendevice`, `struct _mousedevice`, and `struct _kbddevice`. These structures contain the hardware driver code interface for the specified devices. Microwindows' graphics engine supports framebuffer; therefore, only the `config.ads` configuration file in `src/` for ARM-based Linux needs to be modified to specify framebuffer as the underlying graphics support engine. Microwindows supports the Linux mouse driver `mou-gpm.c` and the keyboard driver `kbd_tty.c`. This system did not rewrite the member functions of the mouse and keyboard data structures from scratch; only modifications were made to the hardware-specific parts of the original drivers. 2.4 ViewML ViewML was the first open-source, small browser specifically developed for the rapid development of embedded Linux systems. Its code file is only 800KB, requires approximately 2MB of memory to run, uses FLTK as the GUI platform, and employs an object-oriented design in C++. The ViewML browser can run on X Windows and Microwindows systems, allowing for debugging and improvement on Linux platforms. This greatly facilitates further improvements to the browser. The improvements to ViewML in this system were completed on a Microwindows system based on the X Windows platform. The architecture of the ViewML browser is shown in Figure 2. Its application layer is small, entirely written in C++ FLTK (Fast Light Tool Kit) application framework, providing a basic graphical user interface layout. This layer also handles network and local file access requirements. Its parser and display engine utilize the KDE 1.0 HTML widget (i.e., the KHTML View and widget module in Figure 1) from the open-source KDE desktop's kfm file manager. This window management widget is stable and supports all HTML 3.2 features and some JavaScript 1.1 functionalities. KDE's widgets use the QT widget collection; to adapt to the requirements of embedded systems, ViewML uses the lightweight graphics library FLTK. The QT compatibility layer provides the interface between the HTML widget and the FLTK application framework. The underlying network protocol uses the WWWLib library from the World Wide Web Consortium to perform all asynchronous network input/output and HTTP retrieval functions. ViewML is a high-quality web browser directly designed for embedded Linux environments. By including open-source core components, it can utilize a high-quality graphics engine with minimal RAM and ROM resources. However, some shortcomings of this browser were discovered during actual porting and use. The following focuses on improvements made to the ViewML window interface in this system. 3. Improvements to the ViewML Window Interface ViewML's application layer is small, providing only a basic graphical user interface layout. As a window for user interaction, it requires aesthetics, practicality, and operability. To improve the user interface, the main work of this system is to add functions for opening, saving, and closing HTML files; and refreshing, forward, and back navigation on web pages. The interface development primarily utilizes FLTK window components. FLTK provides a rich set of controls, such as buttons, scrollbars, text boxes, dialog boxes, list boxes, etc. The framework classes for all these window components are defined in 100 header files contained in the FL folder of FLNK (a version of FLTK ported to the Nano-X API of Microwindows). In ViewML, windows are implemented by creating a basic graphical user interface using the class VMLAppWindow, which includes only three functions: VMLAppWindow(int x, int y, int w, int h) : PARENT_WINDOW(x,y,w,h,"ViewML Browser") { }, virtual void resize_notify(int x, int y, int w, int h), virtual int handle(int event); }. To add buttons to the graphical interface, such as save, open, reload, forward, and backward, the corresponding functions must be defined in the VMLAppWindow class. extern Fl_Button *Save; extern Fl_Button *Open; extern Fl_Button *Forward; extern Fl_Button *Backward; extern Fl_Button *Reload; For details, see the header files Fl_Window.H and Fl_Widget.H. After the graphical interface is developed, it is associated with corresponding events by responding to mouse events. In the ViewML application layer, there are two existing functions: `static int send(Fl_Widget* o, int event)`: sends a request to HTTP and adds the request instance to a queue; and `int VMLAppWindow::handle(int event)`: calls a thread to process the instance queue. In addition to instantiating the functions defined above, a new function, `int VMLAppWindow::temp(int event)`, is added here. This function is used for saving, back, and forward actions on the webpage and temporarily saves the webpage. The processing flow is as follows: (1) When the processing instance queue is not empty, take out a processed HTTP request from the queue. (2) Process the HTTP request result using the three HTML steps: Tokenizer, HTNL-Parser, HTML-Layout. (3) Add the HTTP processing result to the temporary storage queue. (4) Delete the request result from the processing instance queue. The queue is implemented using a linked list. When it is necessary to go back from the current page, the processing flow is as follows: (1) Capture the mouse event. (2) Search from the head of the queue to the next element of the working pointer. When the current pointer is the current pointer, the current pointer goes back. (3) Call the HTML engine to process the element pointed to by the current pointer. The forward and refresh functions are implemented in a similar way to the back function, so they will not be described in detail here. Saving the current HTM method is slightly more complicated because when saving the page, the image files in the page must also be saved at the same time. The algorithm is as follows: (1) Input the storage path and file name (2) Automatically process the file name, such as adding the suffix .htm, create a directory, and store the image files with the suffix .files (3) Take the current pointer from the temporary storage queue. If the pointer is not the head pointer, take the HTML file it points to and process the file. (4) Store the file on the disk. Due to the limited hardware conditions of the embedded system, there are no large storage devices such as disks. Moreover, the price of storage media such as FLASH or ROM is relatively expensive compared to the hard disks and optical discs used on desktop computers. Therefore, the embedded system can only win the market by being small and efficient. The system with improved window functions can fully meet the application needs of most users. 4 Conclusion Current communication is rapidly becoming a general requirement of embedded systems. This article mainly describes a new embedded system that supports graphical interface and browser. The system has been successfully run on the self-developed hardware platform. In future work, we will focus on adding more comprehensive functions to the system, such as support for Java Virtual Machine and adding email sending and receiving. References [1] http://www.mirowindows.org [2] http://www.pixil.org [3] http://www.armlinux.com [4] Cirrus Logic.EP73xx User's Guide[M].2001 [5] http://www.fltk.org [6] Chen Lijun “Linux Operating System Kernel Analysis” 2000