A configuration method and system for a runtime environment and an operating system

By automatically configuring the operating system and runtime environment modules, using software component design information and electronic control unit partition information, the problem of low configuration efficiency in the existing technology is solved, efficient and standardized configuration is achieved, and integration efficiency and system stability are improved.

CN119781836APending Publication Date: 2025-04-08ISOFT INFRASTRUCTURE SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411552855.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, the configuration of operating system and runtime environment modules depends on the personal experience and professional knowledge of the integrators, resulting in high technical thresholds and low configuration efficiency, making it difficult to meet the needs of rapid development and iteration of modern automotive electronic systems.

Method used

By obtaining software component design information, basic software description information and electronic control unit partition information, the tasks of the running entity are automatically configured, and the operating system objects are mapped into the operating system, and the operating system is configured after generating code to achieve automated configuration.

Benefits of technology

It lowers the technical threshold for integrated personnel, reduces configuration workload, improves integration efficiency, realizes standardized configuration of the AUTOSAR architecture, and enhances the stability and maintainability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781836A_ABST
    Figure CN119781836A_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for configuring a runtime environment and an operating system, which belongs to the field of software development technology, and includes: obtaining software component design information, basic software description information, and electronic control unit partition information; configuring tasks for running entities according to the software component design information and basic software description information, and mapping the operating system objects associated with the configured tasks to the operating system according to the electronic control unit partition information; after the runtime environment generates code, configuring the operating system according to the operating system objects that the runtime environment relies on for communication. Beneficial effects: The present invention automatically configures the runtime environment and the operating system based on the model and partition information, reduces the technical threshold of the integrator, reduces the configuration workload, and improves the integration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a configuration method and system for a runtime environment and an operating system. Background Art

[0002] As an open and standardized software architecture, AUTomotive Open System ARchitecture (AUTOSAR) has gradually become the mainstream standard in the industry. The AUTOSAR architecture provides a unified set of specifications, describes basic software modules, defines program connections, and implements a common method for further development based on a standardized format, thereby achieving compatibility between vehicles from different manufacturers and independence and portability of software components.

[0003] The configuration of the operating system (OS) and runtime environment (RTE) modules is one of the key links in the AUTOSAR architecture software integration work. In the existing technology, integrators are required to manually configure the OS and RTE modules based on the model functional requirements. This configuration process is highly dependent on the personal experience and professional knowledge of the integrators. This manual configuration method not only has high technical barriers and is prone to errors, but also has low efficiency and is difficult to meet the needs of rapid development and iteration of modern automotive electronic systems.

[0004] In order to simplify the configuration work and improve the usability of the tool, some solutions are to design a user interface (UI) in the RTE module to map the running entity to the operating system task (OS Task). This design only partially simplifies the configuration behavior, and the main configuration work still needs to be completed manually by the integrator, which has a high technical threshold and low integration efficiency.

[0005] In addition, different integrators have different integration ideas and focuses on the implementation of the same function, which leads to certain difficulties in the standardization of AUTOSAR. Although the AUTOSAR architecture itself provides a set of standardized frameworks and interfaces, in the actual integration process, it is difficult to achieve completely consistent configuration results due to the subjective differences of integrators. This difference not only increases the complexity of project management, but also affects the stability and maintainability of the system. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides a method for configuring a runtime environment and an operating system; on the other hand, it also provides a system for configuring a runtime environment and an operating system.

[0007] The technical problem solved by the present invention can be achieved by adopting the following technical solutions:

[0008] A first aspect of the present invention is to provide a method for configuring a runtime environment and an operating system, comprising:

[0009] Obtain software component design information, basic software description information, and electronic control unit partition information;

[0010] According to the software component design information and the basic software description information, configure tasks for the running entity, and map the operating system objects associated with the configured tasks into the operating system according to the electronic control unit partition information;

[0011] After the runtime environment generates the code, the operating system is configured according to the operating system objects on which the runtime environment relies to implement communication.

[0012] Preferably, configuring tasks for the running entity includes:

[0013] Determine an operation entity that meets a first preset condition; wherein the first preset condition is that the operation entity belongs to the same partition and has the same scheduling period;

[0014] According to the software component design information and the basic software description information, basic periodic tasks and corresponding operating system objects that trigger and activate the basic periodic tasks are configured respectively, and all running entities that meet the first preset condition are mapped to the basic periodic tasks.

[0015] Preferably, the respectively configuring basic periodic tasks further comprises:

[0016] The priority of the basic periodic task is determined according to the scheduling period of the running entity.

[0017] Preferably, the priority of the basic periodic task is inversely proportional to the size of the scheduling period of the running entity.

[0018] Preferably, the scheduling mode of the basic periodic task is a preemptible mode.

[0019] Preferably, configuring tasks for the running entity further comprises:

[0020] Determine an operation entity that meets a second preset condition; wherein the second preset condition is that the operation entity belongs to the same partition and is triggered by a non-periodic event;

[0021] According to the software component design information and the basic software description information, one or more extended tasks and corresponding operating system objects that trigger activation of the extended tasks are configured respectively, and all running entities that meet the second preset condition are mapped to the one or more extended tasks.

[0022] Preferably, each of the extended tasks maps at most a preset first number of running entities.

[0023] Preferably, the scheduling mode of the extended task is a preemptible mode.

[0024] Preferably, the configuring the operating system includes task initialization of each partition and communication configuration between operating systems.

[0025] A second aspect of the present invention is to provide a runtime environment and operating system configuration system, which is used to implement the above-mentioned runtime environment and operating system configuration method, and the configuration system includes:

[0026] An information acquisition module, used to acquire software component design information, basic software description information and electronic control unit partition information;

[0027] A runtime environment configuration module, connected to the information acquisition module, configured to configure tasks for the running entity according to the software component design information and the basic software description information, and map the operating system object associated with the configured task to the operating system according to the electronic control unit partition information;

[0028] The operating system configuration module is connected to the runtime environment configuration module and is used to configure the operating system according to the operating system objects on which the runtime environment relies to implement communication after the runtime environment generates code.

[0029] The advantages or beneficial effects of the technical solution of the present invention are:

[0030] The present invention automatically configures the runtime environment and the operating system based on the model and partition information, lowers the technical threshold of integration personnel, reduces configuration workload, and improves integration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of a flow chart of a method for configuring a runtime environment and an operating system in a preferred embodiment of the present invention;

[0032] Figure 2 It is a structural block diagram of the configuration system of the runtime environment and the operating system in the preferred embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0035] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.

[0036] See also Figure 1 In a preferred embodiment of the present invention, based on the above problems existing in the prior art, a configuration method of a runtime environment (RTE) and an operating system (OS) is provided, comprising:

[0037] S100, obtaining software component (SWC) design information, basic software (BSW) description information and electronic control unit (ECU) partition information;

[0038] Furthermore, the method for obtaining software component design information includes:

[0039] First, obtain the electronic control unit extraction file (such as EcuExtract.arxml), which usually contains a detailed description of the ECU and its internal software components.

[0040] Then, parse the EcuExtract.arxml file to obtain the software component design information.

[0041] Preferably, the software component design information includes, but is not limited to, trigger events of all runnable entities (RunnableEntity), software component prototype information, application software component instance information, software component exclusive area requirement information, internal and external trigger function requirement information, and storage requirement information. Among them, the trigger event defines when the software component is executed; the prototype information includes its interface, parameters, etc.; the application software component instance information is used to help understand the specific instance of each software component in the ECU; the exclusive area requirement information is used to ensure that the software component can run correctly on the specified hardware resources; the internal and external trigger function requirement information is used to help understand how the software component interacts with other components or external systems; the storage requirement information is used to determine the storage space required by the software component.

[0042] Furthermore, the method for obtaining the basic software description information includes:

[0043] First, the basic software module description file (such as bswmd.arxml), which describes the structure and function of the BSW module in detail.

[0044] Then, parse the bswmd.arxml file to obtain the basic software description information.

[0045] Preferably, the basic software description information includes but is not limited to basic software module implementation information, trigger events of basic software module entities (BswModuleEntity), basic software prototype information, and basic software exclusive area requirement information. Among them, the basic software module implementation information includes the services and functions it provides; the trigger events of BswModuleEntity are used to understand when to call the functions of the BSW module; the prototype information includes its interface and parameters; and the exclusive area requirement information is used to ensure that the BSW module can run correctly on the specified hardware resources.

[0046] Furthermore, the partition information of the electronic control unit includes but is not limited to the overall partition information of the electronic control unit, the partition distribution information of all software component instances, the partition distribution information of the basic software instance, the association information between the partition and the core, and the access permission information of the partition. Among them, the overall partition information of the ECU understands the partition layout of the hardware resources and software components of the ECU; the partition distribution information of all SWC instances and BSW instances is used to ensure that each software component is correctly allocated to the corresponding partition; the association information between the partition and the core is used to understand which core (processor) in the ECU is associated with each partition; the access permission information of the partition is used to ensure that the communication and data access between software components meet the security requirements.

[0047] S200, configuring tasks for the running entity according to the software component design information and the basic software description information, and mapping the operating system object associated with the configured task into the operating system according to the electronic control unit partition information;

[0048] S300, after the runtime environment generates the code, the operating system is configured according to the operating system objects that the runtime environment relies on to implement communication.

[0049] Specifically, the embodiment of the present invention realizes automatic configuration of the runtime environment RTE and the operating system OS related to the external functions of the ECU based on the SWC design information, the BSW description information, the ECU partition information, and the implementation of the runtime environment RTE and the operating system OS.

[0050] The automatic configuration logic is summarized as follows:

[0051] For the running entities in the same partition and the same scheduling period, a basic periodic task is configured according to the SWC design information and BSW description information. The task is triggered periodically and mapped with the corresponding running entity.

[0052] The running entities triggered by non-periodic events in the same partition are configured with N extended tasks (extended Tasks) according to the SWC design information and BSW description information, and are triggered by configuring the corresponding operating system events (OsEvent).

[0053] The present invention automatically configures the runtime environment and the operating system based on the model and partition information, lowers the technical threshold of integration personnel, reduces configuration workload, and improves integration efficiency.

[0054] As a preferred implementation, configuring tasks for the running entity includes:

[0055] Determine an operation entity that meets a first preset condition; wherein the first preset condition is that the operation entity belongs to the same partition and has the same scheduling period;

[0056] According to the software component design information and the basic software description information, basic periodic tasks and corresponding operating system objects that trigger and activate the basic periodic tasks are configured respectively, and all running entities that meet the first preset condition are mapped to the basic periodic tasks.

[0057] Specifically, in this embodiment, for the runnable entities (RunnableEntities) activated by the periodic events (TimingEvent) located in the same partition and with the same scheduling period, a basic periodic task basic Task is configured for them in the operating system OS, and the period of the task (OsTaskPeriod) is determined according to the period of the TimingEvent.

[0058] At the same time, an alarm is also configured to periodically activate the basic Task. The alarm reference (OsAlarmCounterRef) is associated with the system counter of the current core (Core), and the operating system alarm active task reference (OsAlarmActiveTaskRef) is associated with the basic Task.

[0059] In the runtime environment RTE, an event-to-task mapping (RteEventToTaskMapping) is automatically created, and all running entities that meet the first preset condition are mapped to run on the basic periodic task basic Task. Preferably, the position in the mapping (RtePositionInTask) is sorted by default starting from 0, the mapped task reference (RteMappedToTaskRef) is associated with the basic periodic task basic Task, and the used alarm reference (RteUsedOsAlarmRef) is associated with the corresponding alarm Alarm.

[0060] At the same time, a configuration (RteUsedOsActivation) is created to determine how to activate the alarm. The expected activation offset (RteExpectedActivationOf fset) is set incrementally starting from 0, the expected tick duration (RteExpectedTickDuration) is the period value of the TimingEvent, and the activated alarm reference (RteActivationOsAlarmRef) is associated with the corresponding alarm.

[0061] The configuration logic of the basic software module entities (BswModuleEntities) activated by TimingEvents of the same partition and the same scheduling period is similar to the configuration logic of the executable entities, which will not be repeated here.

[0062] As a preferred implementation, respectively configuring the basic periodic tasks further includes:

[0063] Determine the priority of the basic periodic tasks according to the scheduling period of the running entity.

[0064] As a preferred implementation, the priority of the basic periodic task is inversely proportional to the size of the scheduling period of the running entity.

[0065] Specifically, in this embodiment, the priority of the basic periodic task (OsTaskPriority) is set according to the size of the TimingEvent scheduling period. The smaller the period, the higher the priority; conversely, the larger the period, the lower the priority.

[0066] As a preferred implementation, the scheduling mode of the basic periodic task is a preemptible mode.

[0067] Specifically, in this embodiment, the scheduling mode of the basic periodic task (OsTaskSchedule) is configured as FULL, that is, the preemptive mode.

[0068] When OsTaskSchedule is configured as FULL, tasks are defined as preemptible. This means that if a high-priority task (whose OsTaskSchedule is also configured as FULL) is ready to run, and a low-priority preemptible task is currently running, the low-priority task will be suspended and the high-priority task will immediately gain control of the CPU and begin execution.

[0069] As a preferred implementation, configuring tasks for the running entity further includes:

[0070] Determine an operation entity that meets a second preset condition; wherein the second preset condition is that the operation entity belongs to the same partition and is triggered by a non-periodic event;

[0071] According to the software component design information and the basic software description information, one or more extended tasks and corresponding operating system objects that trigger and activate the extended tasks are configured respectively, and all running entities that meet the second preset condition are mapped to the one or more extended tasks.

[0072] Specifically, for the RunnableEntities triggered by non-periodic events in the same partition, configure an operating system event (OsEvent) for each RunnableEntities and configure several extended tasks (extendedTask). Each extended task can map up to 30 runnable entities, and the number of extended tasks is determined by the number of runnable entities triggered by non-periodic events in the same partition.

[0073] The task event reference (OsTaskEventRef) is associated with the operating system events corresponding to all executable entities of the current task mapping that meet the second preset condition, and the task accessing application (OsTaskAccessingApplication) is associated with other operating system applications that need to set these operating system events.

[0074] In the runtime environment (RTE), an event-to-task mapping (RteEventToTaskMapping) is automatically created, and the runnable entity that meets the second preset condition is mapped to run on the extended task. Among them, the position in the mapping (RtePositionInTask) is sorted by default starting from 0, the mapped task reference (RteMappedToTaskRef) is associated with the extended task, and the used operating system event reference (RteUsedOsEventRef) is associated with the operating system event corresponding to the current runnable entity.

[0075] At the same time, a configuration (RteUsedOsActivation) for determining how to activate the extended task is also created, wherein the activated operating system task reference (RteActivationOsTaskRef) is associated with the corresponding extended task.

[0076] As a preferred implementation, each extended task maps at most a preset first number of running entities.

[0077] As an example but not a limitation, the preset first number is 30. Each extended task can map up to 30 executable entities.

[0078] Specifically, the number of extended tasks is determined according to the number of runnable entities triggered by non-periodic events in the same partition. For example, assuming that there are 45 runnable entities triggered by non-periodic events in partition A, two extended tasks need to be configured, namely extended task 1 and extended task 2. Extended task 1 is associated with 30 of the runnable entities, and extended task 2 is associated with the remaining 15 runnable entities.

[0079] As a preferred implementation, the scheduling mode of the extended task is a preemptible mode.

[0080] Specifically, in this embodiment, the scheduling mode of the extended task (OsTaskSchedule) is also configured as FULL, that is, the preemptive mode.

[0081] The operating system objects, namely the alarms, counters and various tasks mentioned above, are mapped to the corresponding operating system applications (OsApplication) according to the ECU partition information.

[0082] As a preferred implementation, configuring the operating system includes task initialization of each partition and inter-operating system communication (Inter OS Communication, IOC) configuration.

[0083] Specifically, the dependencies implemented inside the runtime environment (RTE), namely the operating system configuration, are automatically completed after the RTE generates the code.

[0084] Specifically: After the RTE code generation stage, the system sets up and initializes the necessary tasks for each partition, which are configured according to the tasks configured above to ensure that each partition can correctly perform its assigned functions.

[0085] The implementation of cross-partition functions depends on IOC configuration to ensure effective communication and data exchange between different partitions, thereby achieving collaborative work of the overall system.

[0086] The present invention also provides a runtime environment and operating system configuration system, which is used to implement the runtime environment and operating system configuration method as described above. Figure 2 As shown, the configuration system includes:

[0087] Information acquisition module 1, used to acquire software component design information, basic software description information and electronic control unit partition information;

[0088] The runtime environment configuration module 2 and the connection information acquisition module 1 are used to configure tasks for the running entity according to the software component design information and the basic software description information, and map the operating system objects associated with the configured tasks into the operating system according to the electronic control unit partition information;

[0089] The operating system configuration module 3 is connected to the runtime environment configuration module 2 and is used to configure the operating system according to the operating system objects that the runtime environment relies on to implement communication after the runtime environment generates the code.

[0090] In the above preferred embodiments, the configuration method and system of the embodiments of the present invention can provide relatively better general integrated configuration examples for integrators to choose from. Preferably, the container (Container) of the general integrated configuration examples of OS and RTE modules provided by the present invention is represented by a preset prefix name, such as the naming prefix is ​​uniformly "isoft_auto_".

[0091] The prefix name is preset to be different from the prefix of the custom configuration, so that the integrator can distinguish the custom configuration from the automatic configuration of the present invention.

[0092] The advantages or beneficial effects of adopting the above technical solution are: the present invention automatically configures the runtime environment and the operating system based on the model and partition information, lowers the technical threshold of the integration personnel, reduces the configuration workload, and improves the integration efficiency.

[0093] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.

Claims

1. A method for configuring a runtime environment and an operating system, characterized in that: include: Obtain software component design information, basic software description information, and electronic control unit partition information; According to the software component design information and the basic software description information, configure tasks for the running entity, and map the operating system objects associated with the configured tasks into the operating system according to the electronic control unit partition information; After the runtime environment generates the code, the operating system is configured according to the operating system objects on which the runtime environment relies to implement communication.

2. The method for configuring a runtime environment and an operating system according to claim 1, characterized in that: The configuration task for the running entity includes: Determine an operation entity that meets a first preset condition; wherein the first preset condition is that the operation entity belongs to the same partition and has the same scheduling period; According to the software component design information and the basic software description information, basic periodic tasks and corresponding operating system objects that trigger and activate the basic periodic tasks are configured respectively, and all running entities that meet the first preset condition are mapped to the basic periodic tasks.

3. The method for configuring a runtime environment and an operating system according to claim 2, characterized in that: The respectively configuring basic periodic tasks also includes: The priority of the basic periodic task is determined according to the scheduling period of the running entity.

4. The method for configuring a runtime environment and an operating system according to claim 3, characterized in that: The priority of the basic periodic task is inversely proportional to the size of the scheduling period of the running entity.

5. The method for configuring a runtime environment and an operating system according to claim 2, characterized in that: The scheduling mode of the basic periodic task is a preemptible mode.

6. The method for configuring a runtime environment and an operating system according to claim 1, characterized in that: The configuring tasks for the running entity also includes: Determine an operation entity that meets a second preset condition; wherein the second preset condition is that the operation entity belongs to the same partition and is triggered by a non-periodic event; According to the software component design information and the basic software description information, one or more extended tasks and corresponding operating system objects that trigger activation of the extended tasks are configured respectively, and all running entities that meet the second preset condition are mapped to the one or more extended tasks.

7. The method for configuring a runtime environment and an operating system according to claim 6, characterized in that: Each of the extended tasks is mapped to at most a preset first number of running entities.

8. The method for configuring a runtime environment and an operating system according to claim 6, characterized in that: The scheduling mode of the extended task is a preemptible mode.

9. The method for configuring a runtime environment and an operating system according to claim 1, characterized in that: The configuration of the operating system includes task initialization of each partition and communication configuration between operating systems.

10. A configuration system for a runtime environment and an operating system, characterized in that: A method for implementing a runtime environment and an operating system configuration as claimed in any one of claims 1 to 9, comprising: An information acquisition module, used to acquire software component design information, basic software description information and electronic control unit partition information; A runtime environment configuration module, connected to the information acquisition module, configured to configure tasks for the running entity according to the software component design information and the basic software description information, and map the operating system object associated with the configured task to the operating system according to the electronic control unit partition information; The operating system configuration module is connected to the runtime environment configuration module and is used to configure the operating system according to the operating system objects on which the runtime environment relies to implement communication after the runtime environment generates code.