Hardware resource configuration method and hardware resource configuration device

By using the YAML configuration file to describe the hardware characteristic parameters of the development board and parsing the file to perform hardware resource configuration, the problem of lack of flexibility in hardware description and configuration in the prior art is solved, and higher flexibility, convenience and cross-platform use are achieved.

CN120010950APending Publication Date: 2025-05-16JINGWEI HIRAIN (TIANJIN) RES&DEV CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510083976.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The hardware description and configuration in existing RTOS systems rely on hard-coded or specialized configuration tools, lack flexibility, increases development costs and risks, and the configuration process is not intuitive enough and error-prone.

Method used

By obtaining the target YAML configuration file written based on the target hardware feature parameters of the target development board in advance, parsing the configuration file to determine the hardware description information, and performing hardware abstract descriptions, and finally performing hardware resource configuration operations in the RTOS system.

Benefits of technology

It realizes the flexibility and convenience of hardware description and configuration of different systems, reduces development costs and risks, improves development efficiency and quality, and supports cross-platform use, expands application scope and market competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010950A_ABST
    Figure CN120010950A_ABST
Patent Text Reader

Abstract

The invention discloses a hardware resource configuration method and a hardware resource configuration device, and relates to the field of embedded technologies. The method is applied to a real-time operating system (RTOS) and comprises the steps that a target YAML configuration file is acquired, and the target YAML configuration file is compiled based on target hardware feature parameters of a target development board in advance; analyzing the target YAML configuration file, and determining target hardware description information corresponding to the target hardware feature parameters; performing hardware abstraction description on the target hardware description information, and determining a target hardware abstraction description result of the target development board; and executing a hardware resource configuration operation related to the target development board according to the target hardware abstraction description result. According to the embodiment of the invention, hardware description and configuration of different systems can be realized more flexibly and conveniently, so that the purpose of easily adapting to different hardware platforms and demand changes is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of embedded technology, and in particular, relates to a hardware resource configuration method and a hardware resource configuration device. Background Art

[0002] In existing RTOS (Real-Time Operating System) systems, hardware description and configuration usually rely on hard coding or special configuration tools. The hard coding method writes hardware information directly into the source code of the RTOS system. Although this method is simple and direct, it lacks flexibility. Once the hardware changes, the source code needs to be modified and recompiled, which increases development costs and risks. Although configuration tools improve the flexibility of configuration to a certain extent, they often require additional development tools and learning costs, and the configuration process is often not intuitive and prone to errors.

[0003] Based on this, the industry is still in urgent need of a new type of hardware description and configuration solution to more flexibly and conveniently implement hardware description and configuration for different systems, so as to easily adapt to different hardware platforms and changing requirements. Summary of the invention

[0004] The embodiments of the present application provide a hardware resource configuration method and a hardware resource configuration device, which can more flexibly and conveniently implement hardware description and configuration of different systems, thereby achieving the purpose of easily adapting to different hardware platforms and demand changes.

[0005] In a first aspect, an embodiment of the present application provides a hardware resource configuration method, which is applied to a real-time operating system RTOS system. The hardware resource configuration method includes:

[0006] Obtain a target YAML configuration file, which is pre-written based on target hardware characteristic parameters of a target development board;

[0007] Parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters;

[0008] Perform hardware abstract description on the target hardware description information to determine the target hardware abstract description result of the target development board;

[0009] According to the target hardware abstract description results, perform hardware resource configuration operations related to the target development board.

[0010] In some possible implementations, before obtaining the target YAML configuration file, the hardware resource configuration method further includes:

[0011] Based on the hardware requirement information of the target development board by the RTOS system, the global hardware characteristic parameters corresponding to the target development board are screened to determine the target hardware characteristic parameters;

[0012] Based on the target hardware characteristic parameters, write the target YAML configuration file.

[0013] In some possible implementations, before obtaining the target YAML configuration file, the hardware resource configuration method further includes:

[0014] Define the YAML configuration file format of the target YAML configuration file, which is used to describe the hardware characteristic parameters at the development board level; the YAML configuration file format includes at least one of the number of central processing units (CPUs), the memory base address, and the device information connected to each interface in the development board;

[0015] Based on the YAML configuration file format and the target hardware characteristic parameters, a target YAML configuration file is compiled.

[0016] In some possible implementations, parsing the target YAML configuration file to determine target hardware description information corresponding to the target hardware characteristic parameters includes:

[0017] When the RTOS system is started, data is extracted from the target YAML configuration file based on the YAML configuration file format to obtain initial parsed data;

[0018] The initial parsed data is verified according to the YAML configuration file format, and when the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

[0019] In some possible implementations, the initial parsed data is verified according to the YAML configuration file format, and when the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information, including:

[0020] Perform syntax and semantic verification on the initial parsed data according to the YAML configuration file format, and verify the development board type that the initial parsed data matches;

[0021] When the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

[0022] In some possible implementations, before obtaining the target YAML configuration file, the hardware resource configuration method further includes:

[0023] Obtain target hardware characteristic parameters corresponding to each development board of N development boards of different models, where N is a positive integer and the N development boards include the target development board;

[0024] Based on the target hardware characteristic parameters corresponding to each of the N development boards, N YAML configuration files corresponding to the N development boards are compiled, and the N YAML configuration files include the target YAML configuration file;

[0025] Parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters, including:

[0026] Receiving a selection input of a target YAML configuration file among the N YAML configuration files;

[0027] In response to the selection input, a target YAML configuration file is selected from the N YAML configuration files for parsing to determine and obtain target hardware description information.

[0028] In some possible implementations, N YAML configuration files respectively define model description fields of their respective corresponding development boards; the selection input includes a target model description field of the target development board; in response to the selection input, the target YAML configuration file is selected from the N YAML configuration files for parsing, and the target hardware description information is determined to be obtained, including:

[0029] In response to the selection input, the target model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a first comparison result;

[0030] According to the first comparison result, a YAML configuration file having the same model description field as the target model description field in the N YAML configuration files is determined as the target YAML configuration file;

[0031] Parse the target YAML configuration file to determine the target hardware description information.

[0032] In some possible implementations, after performing a hardware resource configuration operation related to the target development board according to the target hardware abstract description result, the hardware resource configuration method further includes:

[0033] Receiving a configuration change input of a development board required by the RTOS system, wherein the configuration change input includes a specified model description field of a specified development board;

[0034] In response to the configuration change input, the specified model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a second comparison result;

[0035] According to the second comparison result, a YAML configuration file in which the model description field is the same as the specified model description field in the N YAML configuration files is determined as the YAML configuration file corresponding to the specified development board;

[0036] Parse the YAML configuration file corresponding to the specified development board to determine the hardware description information corresponding to the specified development board to update the hardware resource configuration of the RTOS system.

[0037] In some possible implementations, performing hardware abstract description on the target hardware description information to determine a target hardware abstract description result of the target development board includes:

[0038] Perform hardware abstraction description on the target hardware description information, and abstract the target hardware description information of the target development board into a target software interface supported by the RTOS system.

[0039] Based on the same inventive concept, in a second aspect, an embodiment of the present application provides a hardware resource configuration device, which is applied to a real-time operating system RTOS system, and the hardware resource configuration device includes:

[0040] A first acquisition module is used to acquire a target YAML configuration file, where the target YAML configuration file is pre-written based on target hardware characteristic parameters of a target development board;

[0041] The first parsing module is used to parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters;

[0042] The first determination module is used to perform hardware abstraction description on the target hardware description information to determine the target hardware abstraction description result of the target development board;

[0043] The first configuration module is used to perform hardware resource configuration operations related to the target development board according to the target hardware abstract description result.

[0044] In a third aspect, an embodiment of the present application provides a hardware resource configuration device, the hardware resource configuration device comprising:

[0045] a processor and a memory storing computer program instructions;

[0046] When the processor executes the computer program instructions, it implements the hardware resource configuration method provided in any one of the above-mentioned embodiments of the present application.

[0047] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer readable storage medium is stored computer program instructions, and when the computer program instructions are executed by a processor, a hardware resource configuration method as provided in any one of the above embodiments of the present application is implemented.

[0048] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a hardware resource configuration method as provided in any one of the above-mentioned embodiments of the present application.

[0049] A hardware resource configuration method and a hardware resource configuration device provided in an embodiment of the present application are applied to an RTOS system. The solution obtains a target YAML configuration file that is pre-written based on the target hardware characteristic parameters of the target development board, and then parses the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters. In this case, the target hardware abstract description result of the target development board is determined by performing hardware abstract description on the target hardware description information. Finally, the RTOS system implements the hardware resource configuration operation related to the target development board according to the target hardware abstract description result.

[0050] It can be seen from the above description that a hardware resource configuration method and a hardware resource configuration device of an embodiment of the present application, the hardware characteristic parameters of the development board are described by means of a YAML configuration file, and then the YAML configuration file is parsed to obtain the hardware description information, and the hardware description information is subjected to a hardware abstraction description to obtain the hardware abstraction description result of the development board, so as to perform the hardware resource configuration corresponding to the development board in the RTOS system. The embodiment of the present application describes the hardware characteristic parameters of the development board by means of a YAML configuration file, so that the separation of the hardware description and the RTOS system source code can be achieved. This makes the RTOS system more flexible and portable, so that it can easily adapt to different hardware platforms and demand changes. In addition, since the YAML configuration file is concise, easy to read and easy to understand, the user can easily modify and expand the hardware description information, thus effectively reducing the development cost and risk, and improving the development efficiency and quality. In addition, since the YAML configuration file is universal and extensible, different RTOS systems can share the same YAML configuration file. This allows the RTOS system to be used across platforms, expanding its scope of application and market competitiveness. Therefore, a hardware resource configuration method and a hardware resource configuration device provided in the embodiments of the present application can more flexibly and conveniently implement the hardware description and configuration of different systems, thereby achieving the purpose of easily adapting to different hardware platforms and changes in requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0052] Figure 1It is a flowchart of a hardware resource configuration method provided in an embodiment of the present application;

[0053] Figure 2 It is a scenario flow diagram of a hardware resource configuration method provided in an embodiment of the present application;

[0054] Figure 3 is a structural diagram of a hardware resource configuration device provided in an embodiment of the present application;

[0055] Figure 4 It is a structural diagram of a hardware resource configuration device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0056] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0057] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0058] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0059] As described in the background technology section, the hardware description and configuration in the existing RTOS system usually rely on hard coding or special configuration tools, but the above-mentioned hard coding method or configuration tool method has certain defects. Specifically, for the hard coding method, the hard coding method directly writes the hardware information into the source code of the RTOS system, so that the system code is tightly coupled with the hardware and lacks flexibility. Once the hardware changes, it is necessary to modify the source code and recompile, which increases the development cost and risk. In addition, the hard coding method is not conducive to the reuse and sharing of hardware resources.

[0060] Although the configuration file method based on a specific format improves flexibility, the format of the configuration file is often complex, which makes it difficult for users to understand and adjust the content and format of the configuration file. At the same time, different RTOS systems may need to use different configuration file formats, which also increases the user's learning cost and the complexity of system integration. In addition, the configuration file method based on a specific format does not support cross-platform use, thus limiting the application scope of the RTOS system.

[0061] Therefore, how to more flexibly and conveniently implement the hardware description and configuration of different systems so as to easily adapt to different hardware platforms and changing requirements is of great significance to fully realize the hardware resource configuration of the RTOS system.

[0062] In view of the above, in order to solve the problems of the prior art, the embodiments of the present application provide a hardware resource configuration method and a hardware resource configuration device. It should be noted that the embodiments provided in the present application are not intended to limit the scope of the present application.

[0063] The following first introduces the hardware resource configuration method provided in the embodiment of the present application.

[0064] Figure 1 FIG. 1 is a flow chart of a method for configuring hardware resources provided by an embodiment of the present application. The method for configuring hardware resources is applied to a real-time operating system RTOS system. Figure 1 As shown, the hardware resource configuration method includes the following steps:

[0065] S110, obtaining a target YAML configuration file, where the target YAML configuration file is pre-written based on target hardware characteristic parameters of a target development board;

[0066] S120, parsing the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters;

[0067] S130, performing hardware abstract description on the target hardware description information to determine a target hardware abstract description result of the target development board;

[0068] S140, executing hardware resource configuration operations related to the target development board according to the target hardware abstract description result.

[0069] From the above description, it can be seen that a hardware resource configuration method and a hardware resource configuration device in an embodiment of the present application describe the hardware characteristic parameters of the development board in the form of a YAML configuration file, and then parse the YAML configuration file to obtain hardware description information, and perform hardware abstraction description on the hardware description information to obtain the hardware abstraction description result of the development board, thereby performing hardware resource configuration corresponding to the development board in the RTOS system.

[0070] Compared with the prior art, the embodiment of the present application describes the hardware characteristic parameters of the development board through a YAML configuration file, so that the separation of the hardware description and the RTOS system source code can be achieved. This makes the RTOS system more flexible and portable, so that it can easily adapt to different hardware platforms and demand changes. In addition, since the YAML configuration file is concise, easy to read and easy to understand, users can easily modify and expand the hardware description information, thus effectively reducing development costs and risks, and improving development efficiency and quality. In addition, since the YAML configuration file is universal and scalable, different RTOS systems can share the same YAML configuration file. This allows the RTOS system to be used across platforms, expanding its scope of application and market competitiveness.

[0071] Therefore, a hardware resource configuration method and a hardware resource configuration device provided in the embodiments of the present application can more flexibly and conveniently implement the hardware description and configuration of different systems, thereby achieving the purpose of easily adapting to different hardware platforms and changes in requirements.

[0072] The specific implementation of the above steps 110 to 140 is described in detail below.

[0073] In S110 , during specific implementation, a target YAML configuration file is obtained, where the target YAML configuration file is pre-written based on target hardware characteristic parameters of a target development board.

[0074] The target hardware characteristic parameters of the above-mentioned target development board, such as the number of CPUs (Central Processing Units), memory base addresses, devices connected to interfaces such as IIC (Inter-Integrated Circuit) and SPI (Serial Peripheral Interface), etc., are not strictly limited in this embodiment.

[0075] According to some embodiments of the present application, optionally, in order to more efficiently implement the writing and determination of the target YAML configuration file, before obtaining the target YAML configuration file, the hardware resource configuration method may further include:

[0076] Based on the hardware requirement information of the target development board by the RTOS system, the global hardware characteristic parameters corresponding to the target development board are screened to determine the target hardware characteristic parameters;

[0077] Based on the target hardware characteristic parameters, write the target YAML configuration file.

[0078] In the specific implementation, it is considered that the hardware characteristic parameters involved in the target development board are relatively numerous, and the target hardware characteristic parameters of the target development board required by the RTOS system may be only a part of them. Therefore, in order to efficiently realize the writing of the target YAML configuration file while fully meeting the hardware configuration requirements of the RTOS system, this embodiment screens the global hardware characteristic parameters corresponding to the target development board according to the hardware requirement information of the RTOS system for the target development board, so as to determine the target hardware characteristic parameters. The target hardware characteristic parameters are more streamlined after global screening, and are more matched with the hardware configuration requirements of the RTOS system, so that the writing cycle of the target YAML configuration file can be effectively shortened.

[0079] It should also be added that the global hardware characteristic parameters corresponding to the above-mentioned target development board can be obtained in advance based on the production and manufacturing drawings or schematic diagrams of the target development board. The hardware requirement information of the above-mentioned RTOS system for the target development board can be flexibly configured according to the specific version of the RTOS system, the configuration requirements of the developer, etc., and this embodiment does not impose strict restrictions here.

[0080] According to some embodiments of the present application, optionally, in order to more fully realize the standardization of the target YAML configuration file obtained by the RTOS system, so that the subsequent system can more accurately parse the target YAML configuration file, before obtaining the target YAML configuration file, the hardware resource configuration method may also include:

[0081] Define the YAML configuration file format of the target YAML configuration file, which is used to describe the hardware characteristic parameters at the development board level; the YAML configuration file format may include at least one of the number of central processing units (CPUs), the memory base address, and the device information connected to each interface in the development board;

[0082] Based on the YAML configuration file format and the target hardware characteristic parameters, a target YAML configuration file is compiled.

[0083] In this embodiment, the YAML configuration file format is defined in advance to express board-level hardware information. The format may include at least one of the CPU quantity, memory base address, and device information connected to each interface in the development board (such as IIC, SPI, etc.). This embodiment is not strict here. The hardware description information specified in the specific YAML configuration file format can be determined according to the actual RTOS system hardware description and resource configuration requirements. The above YAML configuration file format supports data results such as scalars, lists, dictionaries, and can represent structural levels by indentation.

[0084] After defining the above-mentioned YAML configuration file format, the above-mentioned target hardware characteristic parameters are written according to the specifications corresponding to the file format, so that the target YAML configuration file that conforms to the specifications of the YAML configuration file format can be obtained, which is helpful for subsequent faster implementation of file parsing and verification of the configuration file and other processing operations.

[0085] In S120, when specifically implemented, after obtaining the target YAML configuration file, the target hardware description information corresponding to the target hardware characteristic parameters is determined by parsing the target YAML configuration file. For example, a YAML parser (such as the PyYAML library in Python) can be used to parse the file content of the target YAML configuration file to determine the above target hardware information.

[0086] According to some embodiments of the present application, optionally, the above-mentioned parsing of the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters may include:

[0087] When the RTOS system is started, data is extracted from the target YAML configuration file based on the YAML configuration file format to obtain initial parsed data;

[0088] The initial parsed data is verified according to the YAML configuration file format, and when the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

[0089] In this embodiment, first, when the RTOS system is started, data is extracted from the target YAML configuration file according to the YAML configuration file format. For example, the YAML configuration file format specifies data hierarchies and indentation relationships with certain meanings, and during parsing, required data is accessed and extracted according to the data hierarchies and indentation relationships, thereby obtaining initial parsed data.

[0090] Next, in order to ensure that the parsed data is sufficient to provide strong data support for the subsequent system hardware configuration, the initial parsed data needs to be verified. The verification direction can be flexibly set according to actual historical experience and hardware configuration priorities. For example, the grammatical semantics in the initial parsed data can be verified, and there is no strict restriction here.

[0091] According to some embodiments of the present application, optionally, in order to further improve the accuracy and representativeness of the target hardware description information finally determined, so as to lay a solid foundation for effectively completing the hardware resource configuration, the initial parsed data is verified according to the YAML configuration file format, and when the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information, which may include:

[0092] Perform syntax and semantic verification on the initial parsed data according to the YAML configuration file format, and verify the development board type that the initial parsed data matches;

[0093] When the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

[0094] In this embodiment, the initial parsed data is syntaxally and semantically checked in the YAML configuration file format to ensure data accuracy, and the development board type that matches the initial parsed data is checked, thereby ensuring that the target YAML configuration file is a YAML configuration file that matches the target development board, thereby avoiding misconfiguration of system hardware resources.

[0095] Only when all the checks of the above initial parsed data are passed, the initial parsed data is determined as the target hardware description information. If the initial parsed data fails to pass the above checks, the check error result can be output so that the developer can correct and adjust the content of the YAML configuration file in time. The implementation of this verification step not only improves the accuracy and reliability of the target hardware description information, ensures the correctness and effectiveness of the target YAML configuration file, but also provides effective data support for the final realization of hardware resource configuration.

[0096] In S130, during the specific implementation, after obtaining the above-mentioned target hardware description information through parsing, the target hardware description information is subjected to hardware abstraction description, and the target hardware abstraction description result of the target development board is determined. In embedded system design, hardware abstraction (Hardware Abstraction Layer, HAL) allows the operating system or application to perform hardware operations in a hardware-independent manner. Through hardware abstraction, application developers do not need to care about the specific implementation of the underlying hardware, and only need to develop through the API (Application Programming Interface) provided by the abstract layer, thereby improving the portability and maintainability of the code.

[0097] This application describes the target hardware description information in a hardware abstraction manner. The RTOS system can shield the complexity of the underlying hardware, provide a unified hardware access interface, and facilitate the development and transplantation of upper-level applications.

[0098] The RTOS system performs hardware abstraction description based on the hardware description information obtained through analysis. Hardware abstraction description is the process of abstracting specific hardware resources into objects or interfaces that can be understood and operated by the RTOS system.

[0099] According to some embodiments of the present application, optionally, more specifically, the above-mentioned performing hardware abstract description on the target hardware description information to determine the target hardware abstract description result of the target development board may include:

[0100] Perform hardware abstraction description on the target hardware description information, and abstract the target hardware description information of the target development board into a target software interface supported by the RTOS system.

[0101] In this embodiment, the target hardware description information is described in a hardware abstraction manner and is abstracted into a target software interface that can be supported and understood by the RTOS system. When the system hardware resources are subsequently configured, the complexity of the underlying hardware can be shielded by calling the target software interface, thereby facilitating the development and transplantation of upper-level applications.

[0102] It should be added that the above hardware abstraction description may include at least one of processor abstraction, memory abstraction and SPI abstraction, etc., which is not strictly limited here. The above processor abstraction includes defining processor-related functions, such as clock setting and low-power mode switching. Memory abstraction includes defining memory access functions, including heap memory allocation and release. SPI / IIC abstraction includes defining SPI / IIC communication functions, such as initialization and data transmission.

[0103] In S140, when specifically implemented, after processing the target hardware abstract description result corresponding to the German and Austrian target hardware description information through the hardware abstract description, the hardware resource configuration operation related to the target development board is performed according to the target hardware abstract description result. The above-mentioned hardware resource configuration operation may include steps such as initializing hardware resources, setting parameters, establishing connections, etc., which are not strictly limited here.

[0104] According to some embodiments of the present application, optionally, before obtaining the target YAML configuration file, the hardware resource configuration method may further include:

[0105] Obtain target hardware characteristic parameters corresponding to each development board of N development boards of different models, where N is a positive integer, and the N development boards may include the target development board;

[0106] Based on the target hardware characteristic parameters corresponding to each of the N development boards, N YAML configuration files corresponding to the N development boards are compiled, and the N YAML configuration files may include the target YAML configuration file;

[0107] Parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters, which may include:

[0108] Receiving a selection input of a target YAML configuration file among the N YAML configuration files;

[0109] In response to the selection input, a target YAML configuration file is selected from the N YAML configuration files for parsing to determine and obtain target hardware description information.

[0110] In a specific implementation, the target hardware characteristic parameters corresponding to different types of development boards can be obtained in advance. The target hardware characteristic parameters can be the hardware characteristic parameters of the corresponding development board obtained by screening according to the different development requirements of the RTOS system. Next, according to the target hardware characteristic parameters corresponding to each of the N development boards, N YAML configuration files corresponding to the N development boards are written. After being written, the above N YAML configuration files can be stored in a fixed storage area accessible to the RTOS system, such as a database.

[0111] When the RTOS system needs to connect to the target development board to complete the development test, the target YAML configuration file among the N stored YAML configuration files is selected and inputted, and the selection input can be implemented by page command input or touch click input, etc. Thus, in response to the selection input, the required target YAML configuration is determined from the N YAML configuration files for parsing, thereby obtaining the target hardware description information corresponding to the target development board.

[0112] According to some embodiments of the present application, optionally, in order to accurately implement the selection input of the target YAML configuration file in the above embodiment to ensure the accuracy and reliability of the selected target YAML configuration file, this embodiment provides a sufficiently reasonable means for selecting the target YAML configuration file. Specifically, the above N YAML configuration files respectively define the model description fields of the development boards corresponding to them; the selection input may include the target model description field of the target development board; in response to the selection input, the target YAML configuration file is selected from the N YAML configuration files for parsing, and the target hardware description information is determined to be obtained, which may include:

[0113] In response to the selection input, the target model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a first comparison result;

[0114] According to the first comparison result, a YAML configuration file having the same model description field as the target model description field in the N YAML configuration files is determined as the target YAML configuration file;

[0115] Parse the target YAML configuration file to determine the target hardware description information.

[0116] In the specific implementation, the model description field of the development board corresponding to the description is written in the YAML configuration file writing process. In this way, when the required target YAML configuration file is selected from multiple YAML configuration files later, the target model description field corresponding to the target development board currently requiring development configuration is directly entered.

[0117] In this way, by comparing the target model description fields with the model description fields in multiple YAML configuration files one by one, the target YAML configuration file that matches the target development board can be accurately found. Then, based on the target YAML configuration file, accurate and reliable target hardware description information can be obtained, which will help lay a solid foundation for the subsequent effective implementation of system hardware resource configuration.

[0118] According to some embodiments of the present application, optionally, considering the application requirements and the actual hardware conditions, in order to effectively enhance the portability and flexibility of the RTOS system and reduce the cost and time of software development on different development boards, after performing the hardware resource configuration operation related to the target development board according to the target hardware abstract description result, the hardware resource configuration method may further include:

[0119] Receiving a configuration change input of a development board required by the RTOS system, wherein the configuration change input may include a specified model description field of a specified development board;

[0120] In response to the configuration change input, the specified model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a second comparison result;

[0121] According to the second comparison result, a YAML configuration file in which the model description field is the same as the specified model description field in the N YAML configuration files is determined as the YAML configuration file corresponding to the specified development board;

[0122] Parse the YAML configuration file corresponding to the specified development board to determine the hardware description information corresponding to the specified development board to update the hardware resource configuration of the RTOS system.

[0123] In specific implementation, the RTOS system will replace or configure different YAML configuration files according to the application requirements and the actual hardware conditions, so that the same RTOS image can adapt to hardware combinations such as CPUs, motherboards, and peripherals with different architectures.

[0124] Specifically, when replacing or configuring different YAML configuration files, by receiving the configuration change input of the development board including the specified model description field of the specified development board, the specified model description field is compared one by one with the model description fields in multiple YAML configuration files, so as to accurately find the YAML configuration file that matches the specified development board of the latest requirement.

[0125] Next, the specified YAML configuration file is parsed according to the implementation method provided in the aforementioned embodiment, and finally the hardware description information corresponding to the specified development board can be obtained. Subsequently, hardware abstract description and other processing are performed based on the hardware description information, so as to effectively realize the update configuration of the hardware resources of the RTOS system.

[0126] In this embodiment, the hardware resource configuration corresponding to different development boards is realized by flexibly replacing the YAML file, which greatly enhances the portability and flexibility of the RTOS system and effectively reduces the cost and time of software development on different development boards.

[0127] In order to facilitate understanding of the hardware resource configuration method provided in the above embodiment, the above method is described below using a specific scenario embodiment. Figure 2 A flowchart of a scenario implementation of a hardware resource configuration method provided in one embodiment of the present application.

[0128] This scenario embodiment provides an RTOS system board-level hardware abstract description and configuration solution based on a YAML configuration file. In this solution, the YAML configuration file is used to describe the board-level hardware information and implement the abstract description of the hardware, so that the RTOS system can adapt to different development board hardware environments according to different YAML configuration files.

[0129] The implementation of this scenario embodiment may specifically include the following steps:

[0130] Step S1, define the YAML configuration file format:

[0131] In the embodiment of this scenario, a YAML configuration file format is first designed to describe board-level hardware information. The YAML configuration file format can contain key information such as the number of CPUs, memory base address, and device information connected to interfaces such as IIC and SPI. The YAML configuration file format can define a unified description field and format for development board hardware of different models and types, using a hierarchical structure and indentation to indicate nested relationships, thereby ensuring its versatility and readability.

[0132] Step S2, write the YAML configuration file:

[0133] According to the hardware requirements of the RTOS system, write a corresponding YAML configuration file for each model of development board to describe the hardware characteristic parameters of the corresponding development board. In this step, by writing the YAML configuration file, the hardware characteristic parameters of the development board are separated from the source code of the RTOS system, thereby improving the portability and reusability of the RTOS system.

[0134] Step S3, parse the YAML configuration file:

[0135] When the RTOS system is started, the required YAML configuration file is read and parsed to obtain the hardware description information. The YAML configuration file parsing process includes syntax checking, type checking, and semantic checking to ensure the correctness and validity of the YAML configuration file. The implementation of this verification step not only improves the accuracy and reliability of the target hardware description information, ensures the correctness and validity of the target YAML configuration file, but also provides effective data support for the final implementation of hardware resource configuration.

[0136] Furthermore, after the RTOS system completes parsing the YAML configuration file, the RTOS system may further convert the hardware description information into an internal data structure for subsequent use.

[0137] Step S4, hardware abstraction description:

[0138] The RTOS system performs hardware abstraction description processing based on the hardware description information obtained through analysis. Hardware abstraction description is the process of abstracting specific hardware resources into objects or interfaces that the RTOS system can understand and operate. In this step, the RTOS system processes the hardware description information through hardware abstraction description, thereby shielding the complexity of the underlying hardware, providing a unified hardware access interface, and facilitating the development and transplantation of upper-level applications.

[0139] Step S5, start the RTOS system:

[0140] In this step, the RTOS system configures the hardware resources related to the required development board according to the hardware abstraction description results. The configuration process may include initializing hardware resources, setting parameters, establishing connections, and other steps.

[0141] Furthermore, after completing this hardware resource configuration, the RTOS system will also flexibly implement hardware resource configuration for different development boards by replacing or configuring different YAML configuration files based on application requirements and the actual hardware conditions. In this way, the same RTOS image can adapt to hardware combinations such as CPUs, motherboards, and peripherals of different architectures, and greatly enhance the portability and flexibility of the RTOS system, reducing the cost and time of software development on different development boards.

[0142] Overall, the hardware resource configuration solution provided by this scenario embodiment effectively improves the flexibility and portability of the RTOS system. It describes hardware information in the form of a YAML configuration file, which can separate the hardware description from the RTOS system source code. This makes the RTOS system more flexible and portable, and can easily adapt to different hardware platforms and demand changes.

[0143] Moreover, the solution provided by the embodiment of this scenario can also reduce development costs and risks. Specifically, since the YAML configuration file is concise, easy to read and understand, users can easily modify and expand the hardware description information, thereby reducing development costs and risks and improving development efficiency and quality. In addition, the hardware resource configuration solution provided by the embodiment of this scenario can also support cross-platform use. Since the YAML configuration file is universal and scalable, different RTOS systems can share the same YAML configuration file, so that the RTOS system can be used across platforms, fully expanding its application scope and market competitiveness.

[0144] In summary, the embodiments of this scenario can more flexibly and conveniently implement hardware description and configuration of different systems, thereby being able to easily adapt to different hardware platforms and changes in requirements.

[0145] Based on the hardware resource configuration method provided in the above embodiment, out of the same inventive concept, the present application also provides a hardware resource configuration device corresponding to the above hardware resource configuration method. Figure 3 A detailed introduction to the hardware resource configuration device is given.

[0146] Figure 3A schematic diagram of the structure of a hardware resource configuration device provided in an embodiment of the present application is shown, and the hardware resource configuration device is applied to a real-time operating system RTOS system. Figure 3 The hardware resource configuration device 300 shown includes:

[0147] A first acquisition module 310 is used to acquire a target YAML configuration file, where the target YAML configuration file is pre-written based on target hardware characteristic parameters of a target development board;

[0148] The first parsing module 320 is used to parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters;

[0149] The first determination module 330 is used to perform hardware abstraction description on the target hardware description information to determine the target hardware abstraction description result of the target development board;

[0150] The first configuration module 340 is used to perform hardware resource configuration operations related to the target development board according to the target hardware abstract description result.

[0151] A hardware resource configuration device provided in an embodiment of the present application obtains a target YAML configuration file pre-written based on the target hardware characteristic parameters of a target development board by setting corresponding functional modules, and then parses the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters. In this case, the target hardware abstract description result of the target development board is determined by performing hardware abstract description on the target hardware description information. Finally, the RTOS system implements the hardware resource configuration operation related to the target development board according to the target hardware abstract description result.

[0152] A hardware resource configuration device of an embodiment of the present application, describes the hardware characteristic parameters of the development board through a YAML configuration file, so that the separation of the hardware description and the RTOS system source code can be achieved. This makes the RTOS system more flexible and portable, so that it can easily adapt to different hardware platforms and demand changes. In addition, since the YAML configuration file is concise, easy to read and easy to understand, users can easily modify and expand the hardware description information, thus effectively reducing development costs and risks, and improving development efficiency and quality. In addition, since the YAML configuration file is universal and scalable, different RTOS systems can share the same YAML configuration file. This allows the RTOS system to be used across platforms, expanding its scope of application and market competitiveness. Therefore, a hardware resource configuration device provided by an embodiment of the present application can more flexibly and conveniently realize the hardware description and configuration of different systems, so that it can achieve the purpose of easily adapting to different hardware platforms and demand changes.

[0153] According to some embodiments of the present application, optionally, before obtaining the target YAML configuration file, the hardware resource configuration device may further include:

[0154] Based on the hardware requirement information of the target development board by the RTOS system, the global hardware characteristic parameters corresponding to the target development board are screened to determine the target hardware characteristic parameters;

[0155] Based on the target hardware characteristic parameters, write the target YAML configuration file.

[0156] According to some embodiments of the present application, optionally, before obtaining the target YAML configuration file, the hardware resource configuration device may further include:

[0157] Define the YAML configuration file format of the target YAML configuration file, which is used to describe the hardware characteristic parameters at the development board level; the YAML configuration file format may include at least one of the number of central processing units (CPUs), the memory base address, and the device information connected to each interface in the development board;

[0158] Based on the YAML configuration file format and the target hardware characteristic parameters, a target YAML configuration file is compiled.

[0159] According to some embodiments of the present application, optionally, parsing the target YAML configuration file to determine the target hardware description information corresponding to the target hardware feature parameters may include:

[0160] When the RTOS system is started, data is extracted from the target YAML configuration file based on the YAML configuration file format to obtain initial parsed data;

[0161] The initial parsed data is verified according to the YAML configuration file format, and when the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

[0162] According to some embodiments of the present application, optionally, verifying the initial parsed data according to the YAML configuration file format, and determining the initial parsed data as the target hardware description information when the initial parsed data passes the verification, may include:

[0163] Perform syntax and semantic verification on the initial parsed data according to the YAML configuration file format, and verify the development board type that the initial parsed data matches;

[0164] When the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

[0165] According to some embodiments of the present application, optionally, before obtaining the target YAML configuration file, the hardware resource configuration device may further include:

[0166] Obtain target hardware characteristic parameters corresponding to each development board of N development boards of different models, where N is a positive integer, and the N development boards may include the target development board;

[0167] Based on the target hardware characteristic parameters corresponding to each of the N development boards, N YAML configuration files corresponding to the N development boards are compiled, and the N YAML configuration files may include the target YAML configuration file;

[0168] Parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters, which may include:

[0169] Receiving a selection input of a target YAML configuration file among the N YAML configuration files;

[0170] In response to the selection input, a target YAML configuration file is selected from the N YAML configuration files for parsing to determine and obtain target hardware description information.

[0171] According to some embodiments of the present application, optionally, N YAML configuration files respectively define model description fields of their respective corresponding development boards; the selection input may include a target model description field of the target development board; in response to the selection input, selecting a target YAML configuration file from the N YAML configuration files for parsing, and determining to obtain target hardware description information may include:

[0172] In response to the selection input, the target model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a first comparison result;

[0173] According to the first comparison result, a YAML configuration file having the same model description field as the target model description field in the N YAML configuration files is determined as the target YAML configuration file;

[0174] Parse the target YAML configuration file to determine the target hardware description information.

[0175] According to some embodiments of the present application, optionally, after performing a hardware resource configuration operation related to a target development board according to a target hardware abstract description result, the hardware resource configuration device may further include:

[0176] Receiving a configuration change input of a development board required by the RTOS system, wherein the configuration change input may include a specified model description field of a specified development board;

[0177] In response to the configuration change input, the specified model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a second comparison result;

[0178] According to the second comparison result, a YAML configuration file in which the model description field is the same as the specified model description field in the N YAML configuration files is determined as the YAML configuration file corresponding to the specified development board;

[0179] Parse the YAML configuration file corresponding to the specified development board to determine the hardware description information corresponding to the specified development board to update the hardware resource configuration of the RTOS system.

[0180] According to some embodiments of the present application, optionally, performing hardware abstract description on the target hardware description information to determine the target hardware abstract description result of the target development board may include:

[0181] Perform hardware abstraction description on the target hardware description information, and abstract the target hardware description information of the target development board into a target software interface supported by the RTOS system.

[0182] Based on the hardware resource configuration method provided in the above embodiment, out of the same inventive concept, the present application also provides a hardware resource configuration device corresponding to the above hardware resource configuration method. Figure 4 Provides a detailed introduction to the hardware resource configuration equipment.

[0183] See below Figure 4 , Figure 4 It is a structural diagram of a hardware resource configuration device provided in one embodiment of the present application.

[0184] The hardware resource configuration device may include a processor 401 and a memory 402 storing computer program instructions.

[0185] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0186] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, memory 402 may be inside or outside of an integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.

[0187] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0188] The processor 401 implements any one of the hardware resource configuration methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .

[0189] In one example, the data hardware resource configuration device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.

[0190] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0191] Bus 410 includes hardware, software or both, and the parts of hardware resource configuration equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0192] The hardware resource configuration device executes the hardware resource configuration method in the embodiment of the present application, thereby realizing the hardware resource configuration method described in the embodiment of the present application.

[0193] In addition, in combination with the hardware resource configuration method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the hardware resource configuration methods in the above embodiment is implemented.

[0194] Based on the hardware resource configuration method in the above embodiment, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the hardware resource configuration method provided in any one of the above embodiments of the present application.

[0195] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0196] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0197] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0198] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0199] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for configuring hardware resources, characterized in that: Applied to a real-time operating system RTOS system, the method comprises: Obtain a target YAML configuration file, where the target YAML configuration file is pre-written based on target hardware characteristic parameters of a target development board; Parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters; Performing hardware abstract description on the target hardware description information to determine the target hardware abstract description result of the target development board; According to the target hardware abstraction description result, a hardware resource configuration operation related to the target development board is performed.

2. The method according to claim 1, characterized in that Before obtaining the target YAML configuration file, the method further includes: Based on the hardware requirement information of the target development board by the RTOS system, the global hardware characteristic parameters corresponding to the target development board are screened to determine the target hardware characteristic parameters; Based on the target hardware characteristic parameters, the target YAML configuration file is compiled and obtained.

3. The method according to claim 1, characterized in that Before obtaining the target YAML configuration file, the method further includes: Define the YAML configuration file format of the target YAML configuration file, the YAML configuration file format is used to describe the hardware characteristic parameters of the development board level; the YAML configuration file format includes at least one of the number of central processing units (CPUs), the memory base address, and the device information connected to each interface in the development board; Based on the YAML configuration file format and the target hardware characteristic parameters, the target YAML configuration file is compiled and obtained.

4. The method according to claim 3, characterized in that The parsing of the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters includes: When the RTOS system is started, extracting data from the target YAML configuration file based on the YAML configuration file format to obtain initial parsed data; The initial parsed data is verified according to the YAML configuration file format, and if the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

5. The method according to claim 4, characterized in that The verifying the initial parsed data according to the YAML configuration file format, and determining the initial parsed data as the target hardware description information if the initial parsed data passes the verification, includes: Performing syntax and semantic verification on the initial parsed data according to the YAML configuration file format, and verifying the development board type matched by the initial parsed data; In the case where the initial parsed data passes the verification, the initial parsed data is determined as the target hardware description information.

6. The method according to claim 1, characterized in that Before obtaining the target YAML configuration file, the method further includes: Obtain target hardware characteristic parameters corresponding to each development board in N development boards of different models, where N is a positive integer, and the N development boards include the target development board; Based on the target hardware characteristic parameters corresponding to each of the N development boards, N YAML configuration files corresponding to the N development boards are compiled, wherein the N YAML configuration files include the target YAML configuration file; The parsing of the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters includes: Receive a selection input of the target YAML configuration file among the N YAML configuration files; In response to the selection input, the target YAML configuration file is selected from the N YAML configuration files for parsing to determine and obtain the target hardware description information.

7. The method according to claim 6, characterized in that The N YAML configuration files respectively define the model description fields of the development boards corresponding to them; the selection input includes the target model description field of the target development board; and in response to the selection input, the target YAML configuration file is selected from the N YAML configuration files for parsing to determine the target hardware description information, including: In response to the selection input, the target model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a first comparison result; According to the first comparison result, determining a YAML configuration file in which a model description field in the N YAML configuration files is the same as the target model description field as the target YAML configuration file; The target YAML configuration file is parsed to determine the target hardware description information.

8. The method according to claim 7, characterized in that After performing the hardware resource configuration operation related to the target development board according to the target hardware abstract description result, the method further includes: Receiving a configuration change input of a development board required by the RTOS system, wherein the configuration change input includes a specified model description field of a specified development board; In response to the configuration change input, the specified model description field is compared with the model description fields in the N YAML configuration files respectively to obtain a second comparison result; According to the second comparison result, determining the YAML configuration file in the N YAML configuration files whose model description field is the same as the specified model description field as the YAML configuration file corresponding to the specified development board; Parse the YAML configuration file corresponding to the specified development board to determine the hardware description information corresponding to the specified development board to update the hardware resource configuration of the RTOS system.

9. The method according to claim 1, characterized in that: The performing hardware abstract description on the target hardware description information to determine a target hardware abstract description result of the target development board includes: Performing hardware abstraction description on the target hardware description information, abstracting the target hardware description information of the target development board into a target software interface supported by the RTOS system.

10. A hardware resource configuration device, characterized in that: Applied to a real-time operating system RTOS system, the device comprises: A first acquisition module is used to acquire a target YAML configuration file, where the target YAML configuration file is pre-written based on target hardware characteristic parameters of a target development board; A first parsing module is used to parse the target YAML configuration file to determine the target hardware description information corresponding to the target hardware characteristic parameters; A first determination module is used to perform hardware abstraction description on the target hardware description information to determine and obtain a target hardware abstraction description result of the target development board; The first configuration module is used to perform hardware resource configuration operations related to the target development board according to the target hardware abstract description result.

Citation Information

Cited By

  • Low-code service configuration engine and configuration method thereof

    CN121613787A