Share this

Embedded System Reuse Software Design Based on Component Technology

2026-04-06 07:28:27 · · #1
Introduction For an embedded software component platform, its supporting platform is first and foremost an embedded real-time multitasking operating system, and secondly, it provides development tools and an integration environment for the design of the entire software component. In the design process of the supporting platform, the concepts of domain engineering can be adopted, and the entire embedded real-time multitasking operating system can be designed as a system-level software component library. This not only achieves the customizability of the embedded operating system, but also facilitates the integration and debugging of embedded control application software design because the design from the embedded operating system to the application is based on discrete software components. To facilitate the management of software components, the system-level and application-level software component libraries can be integrated into a fully functional software component library. It includes all the software components required from the system layer, support layer, and application layer of the embedded control system, thus possessing functional completeness. 1 Architecture of the Embedded Software Component Platform The architecture of the embedded software component platform is shown in Figure 1. It consists of three parts: the system layer, the connection layer (support layer), and the application layer. The system layer falls under the scope of domain engineering. It uses domain engineering analysis methods to analyze, abstract, and refine the embedded control system, and decomposes it into corresponding system class and application class functional modules. The connection layer is an embedded software component platform that achieves seamless connection between the system layer and the application layer, providing an integrated development platform for software components. The application layer falls under the scope of application engineering. Users select the required software components from the software component library based on the actual control requirements and objectives of the embedded control system, and after integration, generate the actual embedded control application program. 2. Design of the Embedded Software Component Platform This software component platform is a component-based embedded real-time multitasking operating system built on the TMS320F2812 DSP chip. The design fully utilizes the design principles described in the platform architecture, resulting in excellent program readability and customizability. Its features are: ① Two data structures, the operating system and the system, are designed. To facilitate platform design and centralized management of system resources, an operating system data structure is designed. This data structure is exclusively owned by the platform designer, and users do not have access to it. Additionally, to facilitate interaction between user programs and the operating system, as well as access and request for system resources, a system data structure is designed. This data structure is visible to users and is the only way for applications to access the operating system. ② A minimal system is configured. Its main function is to confirm the start command and determine the start mode upon receiving it; then, based on the start mode, it initializes the microprocessor's CPU registers and some peripheral registers, and initializes the operating system and system data structures. However, it cannot implement any control functions and enters the system scanning state after initialization. ③ The system is designed with 16 or fewer tasks (i.e., one word length), making the task scheduling algorithm relatively simple and fully meeting the requirements of embedded real-time control system applications. Each task is assigned a unique priority, which is consistent with its task identifier; the higher the priority, the lower the priority ID. The available priority ID range for tasks is 0-15, with the system reserving the highest and lowest priority tasks. Communication and system synchronization use semaphores (which can be expanded), and two software components, P and V operations, are designed for system communication and synchronization management; simultaneously, two software components, task creation and task start, are designed to provide system management for task creation and termination, respectively. ④ Software components such as task scheduling, task switching, task locking, and virtual messages are designed to realize the system's control and management of multiple tasks. To facilitate task switching within the system, the entire support platform system is designed with two types of stacks—the system stack and the task stack. 2.1 Design of Component Interface Software Since this component assembly adopts a language-configured software component integration method, the interface definition is similar to configuring the input parameter sequence. It mainly includes software component identification information, software component registration information, and software component configuration information. The identification information identifies which software component is currently in use and provides the software component's entry point (virtual address pointer); the registration information contains the system services and system resources requested by the software component from the operating system. After receiving the registration information, the operating system provides the corresponding system services and allocates the required system resources to the software component; the configuration information includes the parameter information required by the software component in different system states, which can be given in data or address form. The interface software mainly completes the interaction between the application program and the support platform, acting as a system interface to facilitate user access to the support platform. It includes functions such as Error Watcher(), Parameter Registration SysCom-pReg, Get Integer *GetAddN(), Get Floating-Point *GetAddF(), Get Structure *GetAddS(), Get Switch Quantity Sys_GetBit(), Store Switch Quantity Sys_BitGetvalue(), Floating-Point Upper/Lower Limit Sys_Fmaxmin(), and Integer Upper/Lower Limit Sys_Nmaxmin(). 2.2 Design of System Configuration Software Components These components can only be used once during system software integration. They mainly complete the configuration of system resources and the activation of some system functions, including components for system start, system end, expansion, and memory expansion. 2.2.1 Design of System Start Component An embedded control application must include one and only one system start component, and this component is located at the end of the software component configuration integration sequence. This component is the first component entered when the system loop scan begins. The function of this component is to configure system parameters and program space according to the system state. The interface is defined as follows: Interface Description: The component number is the unique identifier and entry point of the component (the virtual program address pointer for the component's entry point); the startup selection mode is mainly used to set the system's startup mode; the default communication mode is mainly selected from CAN, MORDBUS, and Industrial Ethernet as the system's default communication mode; the external high-speed and low-speed clock frequencies are used to set the clock frequencies required by high-speed and low-speed peripherals, i.e., the initial configuration in the minimum system can be modified; the system password mainly ensures system security and does not allow arbitrary modification of the configuration integration format; the system model and assembly date provide some text information about the system software integration. Designers can freely configure these during component configuration integration according to system design needs. 2.2.2 Designing Extended Components Since the system design specifies that the maximum number of original components is less than or equal to 511 in the system's overall configuration form, when the number of system components exceeds the original number, it is necessary to extend the system components through extended components. The interface definition of extended components is as follows: Interface Description: To facilitate the extension of components, this interface is designed in a more flexible manner. It only indicates the address of the extended component, and the number of extended components is terminated by the configuration integration end flag 0, which ends the setting of the configuration interface parameters. 2.2.3 Design of Extended Memory Components In the design of the support platform, based on the needs of the embedded control application, the entire memory space of the system is divided into four main blocks, each with a fixed length and usage domain. When the application's memory requirements exceed the design scope, extended memory components can be used to expand the memory. Its interface definition is as follows: 2.2.4 Design of System Termination Components The system termination component is fixed at the front of the software configuration integration sequence, i.e., configuration integration number 0. It is activated after the system software component configuration integration is completed and before the system runs, i.e., at the end of the system loop. It works in the system working state, performing the function of returning the starting address of the software configuration integration sequence. In the system initialization state, it completes the acquisition and saving of calibration data and general data, and performs system functions such as starting the system clock and watchdog, and returning the starting address of the configuration sequence. The interface parameter has only one identifier: component number 0. 2.3 Design of System Task-Type Software Components Task Creation Component: Before a typical multi-tasking operating system runs, the system must establish at least one task, usually an idle task. Other tasks can be created during program execution. However, in the design of this support platform, given that the number of tasks in an actual embedded control application can be determined in advance, a task creation component was designed. This component can be used to create the required tasks during the software integration process of the application. The configuration integration interface of this component is defined as follows: Design Notes: This component is used once for each defined task. The task number is an external pointer, visible to the user, containing information such as the virtual program address pointer and task priority; the system allocates stack space for each task. Due to the different tasks, the system resource requirements may also be different. To save the overall system memory space, the user can directly specify the task stack size from the configuration integration interface; to track the task's running time and task timing, two parameters, time unit and time length, are designed in the interface to statistically analyze and count the task's running time. In addition, to facilitate task switching, the entire support platform is designed with two types of stacks: system stack and task stack. Therefore, when creating a task, the task stack of each task must be initialized according to the current system state. 2.4 Design of Communication and Synchronization Management Software Components There are two ways for tasks to communicate: through global variables or by sending a message to another task. When using global variables, it must be ensured that each task or interrupt service routine has exclusive access to the variable. The only way to ensure exclusivity in an interrupt service routine is to disable interrupts. If two tasks share a variable, each task can achieve exclusive access to the variable by disabling and then re-enabling interrupts, or by using semaphores. In the design of the support platform, semaphores are used for system communication and synchronization management, including two software components: P-operation PSema and V-operation VSema. The P-operation software component performs the following functions: in the system registration state, it completes the registration of the registry and requests the required system resources from the system; in the system parameter initialization state, it initializes the semaphore data structure; in the system working state, if the semaphore is greater than zero (i.e., the semaphore is available), the semaphore is decremented by 1; otherwise, it indicates that the semaphore is unavailable, and task suspend operations and task switching are performed. Its interface definition is as follows: Interface description: The semaphore address is an external pointer, visible to the user, and is the entry point of the semaphore data structure; if the initial value of the semaphore is set to 1, it indicates task communication; if it is 0, it indicates task synchronization. The V-operation software component only works in the system working state and shares a data structure with the P-operation software component. It first decrements the semaphore by 1, then checks if the semaphore is greater than zero. If it is greater than zero, it indicates that the public resource is available, thus making the given task ready and performing task scheduling and switching. Its interface is as follows: Due to the component-based design, the system communication and synchronization methods can be freely extended. For example, mailboxes or message queues can be added to the support platform. The choice of communication and synchronization method depends mainly on the system design requirements. 3. Integrated Development Environment This research group adopts the Micro Message Bus (MMB) embedded system integrated development environment (MMBIDE) application programming language, incorporating the IEC 611 31-3 standard, and uses Structured Text (SMT) as the programming language for its embedded system application software. This is mainly because MMB embedded systems are applied in the industrial control field, requiring the ability to perform complex control calculations independently, while also requiring clear, easy-to-understand statements and a highly compressed expression format for programming tasks. A cross-development method is used to develop the target machine connected to it on the Windows host platform. The development environment includes its own customizable microkernel real-time multitasking operating system, compilation, debugging, and viewing tools on the host machine, as well as serial port, network, and target machine connection tools. Its main functions include a basic framework for industrial applications, a reusable component library, a source code compiler, configuration download user tools, parameter download user tools, and a real-time parameter monitoring interface, providing various user tools to support application development. It forms a crucial foundation for user application development, emphasizing the accumulation and reuse of knowledge, and is a concentrated embodiment of the platform's development model philosophy. Conclusion This software development platform primarily addresses the following issues using software component technology: defining software component interfaces, providing interaction mechanisms between software components and the system, and between software components themselves, while also providing a basis for software component design and encapsulation. Software component development and integration, providing necessary development tools for software component design and integration. This paper introduces the main system-level software component development methods, providing an overall framework for integrating various application-level software into the system, solving the problems of difficult maintenance and inheritance of control system application software, and providing a basis for the development of control application software.
Read next

CATDOLL 88CM Maruko (soft Silicone Head with TPE Body)

Height: 88cm Weight: 11.5kg Shoulder Width: 25cm Bust/Waist/Hip: 49/45/51cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm Anal...

Articles 2026-02-22