Transplantation of the embedded operating system ECOs on the s698 series Processor

Source: Internet
Author: User
Author: Yan Jun Xu xueyi time: Source: Zhuhai oubit Control Engineering Co., Ltd.
 

1 Introduction
An embedded operating system is an operating system software that supports embedded system applications. It is an extremely important part of embedded systems (including hardware and software systems, it usually includes hardware-related underlying driver software, system kernel, Device Driver Interface, communication protocol, graphical interface, and standardized browser. Embedded operating systems have the basic characteristics of general operating systems, such as the ability to effectively manage increasingly complex system resources; the ability to virtualize hardware, this frees developers from busy driver migration and maintenance; provides library functions, standard device drivers, and toolsets. Compared with general operating systems, embedded operating systems have outstanding features in real-time system efficiency, hardware dependence, software solid-state, and application specialization.
ECos (embedded Configurable operating system) is a portable embedded real-time operating system for 16-bit, 32-bit, and 64-bit processors. As its source code is open, more and more designers are paying attention to the eCos operating system.
ECos features flexible configuration and provides a wide range of options for developers to configure the operating system to best match application requirements, in this way, the OS is adjusted to adapt to the application. Typical configuration options include the scheduler type and task priority. Currently, ECOs has more than 200 configuration options. ECos supports many platforms, including. For the new architecture, only the Hal layer of eCos needs to be transplanted. Upper-layer applications do not have to be changed or slightly changed. It is suitable for Embedded Systems of commercial or industrial level, such as consumer electronics and automobiles. Compared with embedded Linux, ECOs has the advantages of flexible configuration and resource saving. Another advantage is that it uses a multi-task preemption mechanism with minimal interrupt latency and supports all synchronization primitives (mutex, conditional variables, counting semaphores, mailboxes, and event flags) required by the embedded system ), it also has flexible scheduling policies and interrupt processing mechanisms, so it has good real-time performance. Compared with the eCos operating system in Embedded Linux, ECOs is more suitable for devices that process real-time signals, such as mobile communication and WLAN communication equipment development.

The ECOs kernel scheduling mechanism is shown in the following table:

Scheduling Method

Scheduling Method

Time slice Scheduling

Priority series/count

Task count/count

Bitmap

Preemptible priority

None

32

32

Multi-level queue

Preemptible priority

Same-level time slice Scheduling

Yes

32

Unlimited

2 s698 series processor chip Introduction
S698 series processor chips are high-end chips with proprietary intellectual property rights in China, its successful research and development will break the foreign monopoly on China's related technologies in the aerospace, electronics, ships and other fields. Oubit (Zhuhai) Software Engineering Co., Ltd. is one of the few high-tech enterprises in China that can design, produce, develop embedded operating systems, dedicated chips and their high-end computer systems. This series of processors are widely used in China's industrial control, electronic information, special industries and other fields. S698-ECR processor is one of the s698 series processor produced by oubit (Zhuhai) Software Engineering Co., Ltd. The S698-ECR is a high-performance, 64-bit, 64-bit embedded microprocessor with a 0.18 μm CMOS process and qfp160 encapsulation.

 

2.1 S698-ECR processor features are as follows:

1 memory controller:
Prom, SRAM Interface
Chip selection Signal Generator
Wait period Generator
Memory write Protection
2. Peripherals:
4 24-bit timers
1 24-bit watchdog timer
80-bit GPI Port
Four UART Controllers
PS/2 Controller
IIC Bus Controller
SPI bus controller
Card Controller
Three Smart Card Controllers
3. DSU: debug support unit and DCL: Data Communication Link );
4. 64 kB RAM is integrated with backup power;
5. Optimized Power Consumption Design, kernel Power Consumption: <4 mW/MHz;
6. advanced multi-clock mechanism and clock multiplier mechanism;
0.18 μcmos process production
8. Performance
PS/33 mflops (Double Precision) @ 166 MHz
0.8 dhrystone MIPS/MHz

9. Level: commercial level
10. encapsulation: qfp160

 

2.2 S698-ECR function Diagram


This article will take S698-ECR as an example to introduce the transplantation of ecos2.0 on s698 series processor. Let developers have a global understanding of the ECOS porting process. Use the ECOS tool to configure and compile, so that it runs on the Development Board of the S698-ECR.
3. Basic knowledge of eCos underlying Transplantation

The directory structure of the ECOS file is as follows:

Table: ECOs directory structure description

 

 

Directory

Description

Compat

Software packages compatible with POSIX (ieee1003.1) and uitron3.0

Cygmon

Debug the cygmon software package of the monitor

Devs

Package of device driver components, such as serial port and Ethernet.

Error

Common error and status packages provide common interfaces for error and status reports in different packages

FS

Including ROM file system and RAM File System

Hal

Hal package of the target hardware platform

INFA

ECos base package that contains common types, macros, code tracking, assertions, and startup options

Io

Public I/O system support packages independent of hardware devices

Isoinfra

Packages that implement iso c libraries (such as stdlib and stdio) and POSIX

Kernel

Core Heart Function package in the ECOS kernel, including the main, debugger, semaphore, and thread

Language

Iso c library and Math Library

Net

Network Support Package

Redboot

Redboot Rom monitor for debugging

Services

Supported libraries including dynamic memory allocation, compression, and decompression

 

 

Shows the main components of the ECOS system.


Core Components of eCos

The real-time embedded operating system includes some standard functions, such as interrupt and exception handling, thread synchronization mechanism, scheduler and driver. These also constitute the core components of ECOs. Including:

Hardware Abstraction Layer (HAL): used to provide a unified hardware View to the upper layer to shield hardware differences
Kernel: including Exception Handling, thread synchronization support, scheduler, timer, and counter
Iso c and Math Library: Standard C function library
Device Drivers: standard serial port, ethernet card, Flash ROM, etc.
GDB support: enables cross-debugging between the target machine and the host.

It can be seen that the hardware abstraction layer is the basic layer for direct access between the ECOS embedded operating system and hardware. It completely isolates the system kernel from the specific hardware platform, the system kernel is unrelated to the hardware, which is an embodiment of the good portability of the operating system. Therefore, for developers, the true significance and work of porting an operating system lies in porting the hardware abstraction layer of the operating system.
The Hardware Abstraction Layer mainly includes three modules: Architecture Hal, variant Hal, and platform Hal ). The architecture abstraction layer mainly refers to the processor Series Supported by ECOs with different architectures, such as The iSCSI series and ARM Series. The variant abstraction layer refers to the special characteristics of a certain processor in the processor series in terms of cache, MMU, and FPU. The abstraction layer abstracts the current system hardware platform, including the platform startup, chip selection and configuration, timing devices, I/O register access, and interrupt registers. Coding at the abstraction layer of the platform is the focus of eCos porting. The Hardware Abstraction Layer HAL abstracts the processor structure and system hardware platform. to port ECOs on a new target platform, you only need to modify the underlying hardware abstraction layer.

Set the following in the graphic window:
A) menu "build"-> "repsitory" is set to/root/ECOS/Ecos-Rep (Ecos-rep is the source code package of ECOs );
B) set the menu "Tools"-> "path"-> "build tools"
/Opt/sparc-elf-3.4.4/bin (location of the iscsi-elf tool chain );
C) All options are set by default.
Save the settings
D) choose "build"> "generate build tree" to generate makefile and other files;
E) menu "build"-> "library" to generate the ECOS binary file, and generate the ecos_install directory in/root/ECOS.
So far, the porting has ended. The generated ecos_install directory contains the ECOS header file and link file. Applications can compile and link these files to generate executable applications.

5 conclusion
This article mainly studies the kernel structure of the eCos operating system, and studies the transplantation process of the eCos operating system in the s698 series processor. The eCos operating system has been tested on the s698 series Processors. The system is stable, reliable, and can run multi-task applications. The specific discussion of the transplantation process helps developers understand the operating principles of the eCos operating system and facilitate developers to use ECOs for project development in the military and civil fields on the s698 series Processors.

References:
[1] S698P-SOC ECOs reference manual, oubit (Zhuhai) Software Engineering Co., Ltd., 2006
[2] ECOs instructions, oubit (Zhuhai) Software Engineering Co., Ltd., 2006
[3] eCos operating system for parallel S698P-SOC startup initialization process, oubit (Zhuhai) Software Engineering Co., Ltd., 2006
[4] S698-ECR user manual, oubit (Zhuhai) Software Engineering Co., Ltd., 2004
[5] embedded and configurable real-time operating system ECOs software development (embedded software development with ECOs), Beijing University of Aeronautics and Astronautics Press, 2006

 

Keywords: ECOs, ECOs port, iSCSI V8

 

Address: http://www.eaw.com.cn/news/newsdisplay/article/21554

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.