In 1993, the European automobile organization put forward OSEK/VDX real-time operating system standard for automobile electronics, which reflected better performance in compatibility, portability and configurability. And because of its distributed characteristics, the technical standard on automobile electronics attracted more attention and achieved wide utilization in the field of automobile industry. A large numbers of manufacturers research and development their own RT OS in terms of OSEK/VDX. In 2003, a new standard named AUTOSAR was proposed by European automobile organization, which aimed to further improve the performance of compatibility and portability for vehicle software. In China, such related research and study on vehicle electronics standard started lately, and developed poorly and had less advanced compared with the former country and organization. This study designs and implements the OS kernel based on the standard of OSEK/VDX, furthermore, in order to match the standard of AUTOSAR, the interfaces of OSEK/VDX is upgraded for the electronics software of vehicle. This article designs the OS kernel with the ideas of hierarchical and modular. The OS kernel supports the conformance class of ECC2, 16 task priorities, both extend and basic tasks, at least 8 resources and 1 alarm. The OS also implements task management, resource management, event mechanism, interrupts processing, alarms and priority celling protocol which is used to prevent the task priority reverse and dead lock. The schedule mechanism in this OS supports both non-preempt strategy and preempt strategy. In order to make sure the real-time property and determinacy of task schedule, this article designs the schedule algorithm based on the first in first out (FIFO) queue and bit map searching strategy. While implementing the alarm management, article adopts the data structure of difference time linked list, this structure decreases the time significantly when the OS searching the ready alarm. In order to verify the validity of the vehicle electronics OS based on OSEK/VDX and AUTOSAR standard, it is transplanted and implemented on the LPC2378 microprocessor of Philips. And the performance of time and memory of OS required are measured, the result proves that the OS kernel can satisfy the needs of automobile and real-time circumstances. At last, a simple application has been implemented which uses the OS kernel above. This application shows that the implemented OS is stability and ...
修改评论