Embedded Operation System (EOS) refers to an operating system used in embedded systems. Embedded systems are divided into four layers: hardware layer, driver layer, operating system layer and application layer. The embedded operating system is responsible for the allocation of all software and hardware resources of the embedded system, task scheduling, control, and coordination of concurrent activities. It must reflect the characteristics of the system in which it is located, and can achieve the functions required by the system by loading and unloading certain modules. It is a widely used system software.
Embedded LINUX
Embedded Linux is an operating system that is tailored and modified to run on embedded computer systems. The advantages of Linux as an embedded system are: first, Linux is open source; second, Linux kernel is small, efficient, and can be customized, and its minimum system kernel is only about 134KB; third, Linux is a free OS. Linux also has many features required by embedded operating systems, especially Linux is adaptable to a variety of CPUs and hardware platforms, with stable performance, good tailorability, and easy to develop and use. At the same time, the structure of the Linux kernel is very complete in terms of network, and Linux has the most complete support for the most commonly used TCP/IP protocol in the network. It provides support for 10M, 100M, and 1G Ethernet networks, as well as wireless networks, Token Ring, optical fiber, and even satellites.
Migration steps: 1. Migration of Bootloader; 2. Migration of embedded Linux operating system kernel; 3. Creation of embedded Linux operating system root file system; 4. Writing peripheral Linux drivers on the circuit board.
WinCE
WinCE is the foundation of Microsoft's embedded and mobile computing platform. It is an open, scalable 32-bit embedded operating system. It is an operating system for electronic devices based on handheld computers. It is a streamlined Windows 95. The graphical user interface of Win CE is quite outstanding. WinCE is a multi-threaded, full priority, multi-tasking operating system designed for platforms with limited resources. Its modular design allows it to be customized for user electronic devices from handheld computers to dedicated industrial controllers. The basic kernel of the operating system requires at least 200K of ROM.
Generally speaking, a WinCE system consists of four layers: application, WinCE kernel image, board support package (BSP), and hardware platform. The basic software platform is mainly composed of WinCE system kernel image (OS Image) and board support package (BSP). Because the WinCE system is a system that is closely integrated with software and hardware, even if the CPU processor is the same, if the peripheral hardware on the development board is different, it is still necessary to modify the BSP to complete a new BSP. In other words, the WinCE porting process is mainly the process of rewriting the BSP.
Android
Android is a hierarchical software set specifically for mobile devices, including an operating system, middleware, and some important applications. As a completely open source operating system, Android is a software stack consisting of the Linux operating system, middleware, and core applications. Through the API provided by the Android SDK and the corresponding development tools, programmers can easily develop applications on the Android platform. The entire system consists of five parts: applications, application frameworks, application libraries, Android runtimes, and Linux kernels. The Android operating system has built-in applications, including email clients, SMS programs, calendars, maps, browsers, address books, and other programs. It is worth mentioning that all these programs are written in Java.
The main work of transplantation is the transplantation of drivers and hardware abstraction layers. In order to better understand and debug the system, you should also properly understand the calls of the upper layer to the hardware abstraction layer.
TinyOS is an open source embedded operating system developed by the University of California, Berkeley, and is mainly used in wireless sensor networks. The program adopts a modular design, so its program core is often very small. Generally speaking, the core code and data are about 400 Bytes, which can break through the limitation of sensor storage resources. TinyOS provides a series of reusable components. An application can connect various components through a connection profile (A Wiring Specification) to complete the functions it needs.
Embedded Real-Time Operating System (RTOS)
In the fields of industrial control, military equipment, aerospace, etc., there are stringent requirements for the response time of the system, which requires the use of real-time systems. When external events or data are generated, they can be accepted and processed at a sufficiently fast speed, and the processing results can control the production process or respond quickly to the processing system within the specified time, and control the coordinated operation of all real-time tasks. Therefore, the understanding of embedded real-time operating systems should be based on the understanding of embedded systems and add the requirements for response time.
FreeRTOS
FreeRTOS is a small embedded system with a mini operating system kernel. As a lightweight operating system, its functions include: task management, time management, semaphores, message queues, memory management, recording functions, etc., which can basically meet the needs of smaller systems. FreeRTOS tasks can choose whether to share a stack, and there is no limit on the number of tasks. Multiple tasks can be assigned the same priority. Round-robin scheduling of tasks of the same priority can be set as a preemptive kernel or a non-preemptive kernel.
The FreeRTOS porting mainly requires rewriting the following three files: 1. portmacro.h 2. port.c 3. port.asm
μTenux is based on the ARM microcontroller platform. It is the most suitable for ARM Cortex M0-M4 series microcontrollers. The code is open source and free. It is a powerful preemptive real-time multitasking operating system. In addition to the general characteristics of real-time embedded operating systems: portability, curability, and scalability, μTenux also has the following advantages: (1) Microkernel. No MMU, small ROM/RAM footprint, maximum ROM 60KB, minimum 10KB; maximum RAM 12KB, minimum 2KB; (2) Open source and free; (3) Supports all 32-bit ARM7/9 and Cortex M series microcontrollers; (4) Can be configured with up to 256 tasks and 140 task priorities; (5) Good commercial support, and the T-Engine forum is responsible for overall maintenance.
The transplantation mainly includes: chip system clock transplantation, peripheral transplantation, general output/input port transplantation and watchdog module transplantation. Considering the importance of kernel code and its significance in the entire transplantation, and in order to make the whole system have better real-time performance, assembly language can be used to write the startup code of the operating system.
VxWorks
The VxWorks system provides efficient semaphores, message queues, pipes, and network-transparent sockets between multiple processors and tasks. Another key feature of real-time systems is hardware interrupt processing. In order to obtain the fastest and most reliable interrupt response, the interrupt service program ISR of the VxWorks system has its own context. The VxWorks real-time operating system consists of more than 400 relatively independent, short and refined target modules. Users can select appropriate modules to tailor and configure the system according to their needs, which effectively ensures the security and reliability of the system. The system's linker can automatically link some target modules according to the needs of the application. In this way, through the on-demand combination of target modules, many applications that meet functional requirements can be obtained.
The porting process can refer to some BSP codes on the Internet. The full name of BSP is board support package, which provides an operating interface for the VxWorks kernel for special hardware platforms.
μClinux
As an open source operating system, embedded Linux is being widely used for its low price, powerful functions and easy portability. μClinux is an embedded Linux designed specifically for processors without MMU, which is very suitable for the needs of low-end and mid-range embedded systems. Under the authorization of the GNU General Public License, users of the μClinux operating system can use almost all Linux API functions without being affected by the lack of a memory management unit MMU; moreover, μClinux has been appropriately tailored and optimized on the basis of standard Linux to form a highly optimized, compact code embedded Linux, which is small in size but still retains most of the advantages of Linux, such as good stability, powerful network functions, good portability, complete file system support functions, and standard and rich application program interface APIs, etc., which can support a variety of small and exquisite central processors such as ARM7TDMI.
eCos
eCos is translated into Chinese as embedded configurable operating system or embedded configurable real-time operating system. It is suitable for deeply embedded applications, and its main application targets include consumer electronics, telecommunications, vehicle-mounted equipment, handheld devices and other low-cost and portable applications. eCos is a source code development software without any copyright fees. The biggest feature of eCos is modularity and configurable kernel. If embedded Linux is too large, then eCos may be able to meet the requirements. It is a portable open source embedded RTOS for 16-bit, 32-bit and 64-bit processors. Unlike embedded Linux, it is designed by a working group dedicated to designing embedded systems. eCos has quite rich features and a configuration tool that allows you to select the features you need.
The eCos software is divided into several modules, and the porting work is mainly carried out in its HAL layer. The so-called HAL (hardware abstraction layer) brings together hardware-related software.
μC/OS-II
μC/OS-II is a complete, portable, curable, and customizable preemptive real-time multitasking kernel. Most of the code of μC/OS-II is written in ANSI C language, including a small part of assembly code, so that it can be used by microprocessors of different architectures. Its structure is compact and concise and supports preemptive multitasking scheduling and management. This real-time operating system manages up to 64 tasks and provides functions such as internal program memory management, system runtime management, and multitasking real-time scheduling and management. Since its author occupies and reserves 8 tasks, a maximum of 56 tasks can be left for user applications. The priority assigned to each task must be different. This means that μC/OS-II does not support time slice round-robin scheduling. μC/OS-II sets up an independent stack space for each task, which can quickly implement task switching.
To port the μC/OS-II operating system to the target processor, both hardware and software aspects need to be considered. In terms of hardware, the target processor must meet the following conditions:
① The processor's C compiler can generate reentrant code;
②Interrupts can be turned on/off using C language;
③The processor supports interrupts and can generate timed interrupts (usually between 10 and 1000 Hz);
④The processor can support a hardware stack that can accommodate a certain amount of data;
⑤The processor has instructions to read and store the stack pointer and other registers into the stack or memory.
In terms of software, it mainly involves some processor-related code porting, which is distributed in three different files: OS_CPU .H, OS_CPU_C.C and OS_CPU_A.ASM.
Previous article:Parallelization Method for Embedded ARM Multi-core Processors
Next article:Dual-core intelligent electro-hydraulic servo controller using DSP and STM32
Recommended ReadingLatest update time:2024-11-15 01:51
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- [GD32E503 Review]——07.LCD Part 2: Drawing Custom Patterns
- Xiaozhi Science Popularization丨Why do instruments generally have set values and readback values?
- SensorTile.box emulates STEVAL-MKI109V3
- TI.com live broadcast: Interpretation of popular smart electronic locks, visual doorbells, smart sensors and network camera solutions
- 【TI Recommended Course】#What can universal fast charging bring?#
- Prize-giving Event | Tektronix High Precision Power Supply Test Knowledge Planet
- Post-COVID-19 Era: What important experiences and gains should we have? Check out these ten!
- BMA400 triaxial accelerometer development
- Principle of Sense Amplifier in SRAM
- Inverted state of transistor