Embedded software standardized code management system and embedded software development method

By standardizing code management of embedded software, layered design and visual configuration interface generation, the uncertainty problem caused by direct modification of source code in embedded software development is solved, and efficient and stable code generation and reusability improvement is achieved.

CN120371267APending Publication Date: 2025-07-25JIANGYIN ACREL ELECTRICAL APPLIANCE MFGCO +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510500497.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-21
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the development of existing embedded software, direct modification of source code leads to uncertainty problems, reduces code quality and stability, and is difficult to merge universal modifications, making development efficiency inefficient.

Method used

The embedded software standardized code management system is adopted, and the embedded software code architecture is divided into application layer, software package layer, driver layer, device class layer, board-level support package and public function layer. The development and analysis interface are set up to generate standardized code through the visual configuration interface to avoid directly modifying the source code.

Benefits of technology

It improves the reusability and development efficiency of embedded software code, reduces the risk of introducing bugs, and improves the stability and reliability of code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371267A_ABST
    Figure CN120371267A_ABST
Patent Text Reader

Abstract

The invention discloses an embedded software standardized code management system and an embedded software development method. The system comprises an embedded software basic platform and an embedded software management platform, the embedded software basic platform divides an embedded software code architecture into an application layer, a software package layer, a driver layer, an equipment class layer, a board-level support package layer and a public function layer, and the software package layer, the driver layer and the equipment class layer are respectively provided with corresponding standardized code configuration files; the embedded software management platform is used for analyzing the standardized code configuration file and generating a visual configuration interface of a configuration item corresponding to a standardized code in the standardized code configuration file; and generating a corresponding embedded software standardized code according to the configuration item selected by the user on the visual configuration interface. According to the method, the problem of uncertainty caused by direct modification of source codes can be avoided, and the reusability and development efficiency of embedded software codes are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded software development, and particularly relates to an embedded software standardized code management system and an embedded software development method. Background Art

[0002] Embedded software plays an important role in modern electronic devices and systems, and its development efficiency and quality directly affect the function realization and market competitiveness of products. At present, the standardized code of embedded software is usually provided in the form of source code, and users need to perform transplantation work after obtaining the source code to adapt to the specific project requirements. However, the existing transplantation methods mainly modify directly on the basis of the standardized source code, and there are many problems with this method. First, directly modifying the source code easily introduces uncertain factors, resulting in BUGs in the code, thereby reducing the code quality and affecting the product stability. Second, for the general modification content in the source code, the existing methods cannot effectively merge it back into the standardized code, which limits the further optimization and universality improvement of the standardized code. In addition, due to the transplantation process highly relying on manual operation, the development efficiency is low and it is difficult to meet the market demand of rapid iteration. Summary of the Invention

[0003] The purpose of the present invention is to overcome the defects existing in the prior art and provide an embedded software standardized code management system and an embedded software development method that can avoid the uncertainty problems brought by directly modifying the source code and improve the reusability and development efficiency of embedded software code.

[0004] To achieve the above purpose, the first aspect of the present invention provides an embedded software standardized code management system, including: an embedded software basic platform and an embedded software management platform; The embedded software basic platform divides the embedded software code architecture into an application layer, a software package layer, a driver layer, a device class layer, a board support package layer, and a common function layer. Each architecture layer is provided with corresponding development interfaces and parsing interfaces. The development interfaces are used to develop the software standardized code of the corresponding architecture, and the parsing interfaces are used to parse the source code of the corresponding architecture in the input software code; among them, the software package layer, the driver layer, and the device class layer are respectively provided with corresponding standardized code configuration files; The embedded software management platform is used to parse the standardized code configuration files, generate a visual configuration interface for the configuration items corresponding to the standardized code in the standardized code configuration files; and generate corresponding embedded software standardized code according to the configuration items selected by the user in the visual configuration interface.

[0005] Further, the application layer is used to implement application functions for user interaction, the software package layer is used to convert hardware capabilities into directly callable function modules, the driver layer is used to control hardware devices, the device class layer is used to describe the attributes of different types of devices and define abstract interfaces for different types of devices, the board support package layer is used to provide a standardized software interface for connecting hardware and the operating system, and the common function layer is used to provide general basic services.

[0006] Further, the standardized code configuration file includes a software package configuration file, a driver configuration file, and a device configuration file; the software package configuration file is used to define the function modules and their parameters of the software package, the driver configuration file is used to define the functional characteristics and hardware interfaces of the driver, and the device configuration file defines the type of the device and its related attributes.

[0007] Further, the embedded software management platform is further used to receive the software function requirements of the user and evaluate whether the standardized code meets the software function requirements; if the software function requirements are not met, an update and maintenance message of the standardized code is sent to the embedded software basic platform so that the embedded software basic platform updates and maintains the standardized code in the standardized code configuration file; if the software function requirements are met, the corresponding embedded software standardized code is generated according to the configuration items corresponding to the software function requirements and their corresponding standardized code.

[0008] Further, the embedded software management platform is further used to export the generated embedded software standardized code to the project directory.

[0009] Further, the embedded software management platform is further used to record the modification content input by the user in the visual configuration interface.

[0010] Further, the embedded software management platform is further used to compare the code in the modification content with the standardized code in the standardized code configuration file, identify the general modification content in the modification content, and transmit the general modification content to the embedded software basic platform; The embedded software basic platform is further used to merge the general modification content into the standardized code configuration file.

[0011] In the first aspect of the present invention, an embedded software development method is provided, which is applicable to the embedded software standardized code management system according to any item in the first aspect. The embedded software development method includes: Correspondingly set standardized code configuration files for the software package layer, the driver layer, and the device class layer respectively; Parse the standardized code configuration file to generate a visual configuration interface for the configuration items corresponding to the standardized codes in the standardized code configuration file; Generate corresponding embedded software standardized codes according to the configuration items selected by the user in the visual configuration interface.

[0012] Further, the method further includes: Receive the software function requirements of the user; Evaluate whether the standardized code meets the software function requirements; If it does not meet the software function requirements, update and maintain the standardized code; If it meets the software function requirements, generate corresponding embedded software standardized codes according to the configuration items corresponding to the software function requirements and their corresponding standardized codes.

[0013] The advantages and beneficial effects of the present invention are as follows: Standardized architecture layering of embedded software codes can achieve parallel development and parsing of software codes. At the same time, develop standardized configuration codes for software packages, drivers, and device classes respectively, and parse the standardized configuration codes of software packages, drivers, and device classes to generate a visual configuration interface that is convenient for users to operate, enabling users to automatically generate embedded software standardized codes through simple configuration item selection operations. Through this configuration-based development method, not only the efficiency of embedded software development is improved, direct modification of source codes is avoided, the risk of introducing BUGs is reduced, the stability and reliability of the codes are improved, but also the reusability of the codes is enhanced, and the dependence on personnel and product development costs in the process of embedded software development are reduced. Description of the Drawings

[0014] Figure 1 is a schematic diagram of the architecture of the embedded software standardized code management system of the present invention; Figure 2 is a flowchart of the embedded software development method of the present invention; Figure 3 is a flowchart of another embedded software development method of the present invention Wherein, 10, embedded software standardized code management system; 11, embedded software basic platform; 12, embedded software management platform. Detailed Embodiments

[0015] The following combines the drawings and embodiments to further describe the specific embodiments of the present invention. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention.

[0016] According to Figure 1As shown in the figure, the embedded software standard code management system 10 of the present invention includes: an embedded software basic platform 11 and an embedded software management platform 12.

[0017] The embedded software basic platform 11 divides the embedded software code architecture into an application layer, a software package layer, a driver layer, a device class layer, a board support package layer, and a common function layer. Each architecture layer is provided with corresponding development interfaces and parsing interfaces. The development interfaces are used to develop software standard codes for the corresponding architectures, and the parsing interfaces are used to parse the source codes of the corresponding architectures in the input software codes. Among them, the software package layer, the driver layer, and the device class layer are respectively provided with corresponding standard code configuration files. The embedded software management platform 12 is used to parse the standard code configuration files and generate a visual configuration interface for the configuration items corresponding to the standard codes in the standard code configuration files; and generate corresponding embedded software standard codes according to the configuration items selected by the user in the visual configuration interface.

[0018] Among them, the application layer is used to implement application functions for interacting with users, the software package layer is used to convert hardware capabilities into directly callable function modules, the driver layer is used to control hardware devices, the device class layer is used to describe the attributes of different types of devices and define abstract interfaces for different types of devices, the board support package layer is used to provide standardized software interfaces for connecting hardware and operating systems, and the common function layer is used to provide common basic services.

[0019] The embedded software basic platform divides the embedded software code architecture into six layers: Application layer, Packages layer, Driver layer, Device layer, Board Support Package (BSP) layer, and Common Function layer. Among them, the Application layer is used to implement specific business logic functions, such as the communication protocol parsing function in the gateway DTU product or the data acquisition function in the power meter product; the Packages layer provides common function modules, such as file systems, task schedulers, etc.; the Driver layer is responsible for implementing hardware drivers, including serial port drivers, I2C drivers, etc.; the Device layer defines the abstract interfaces of devices, such as sensor interfaces or display interfaces. The Device layer standardizes the operations of hardware devices by designing unified interfaces (such as initialization, read / write, control, etc. methods). Regardless of the specific hardware at the bottom layer, the Application layer can call through the same interface without paying attention to the underlying differences; the BSP layer provides underlying hardware support, such as startup code and hardware initialization code; the Common Function layer contains some common basic function modules, such as logging, error handling, etc. Through the above hierarchical design, the modularization and standardization of the code architecture are achieved, enabling clear responsibility divisions and interface definitions between each layer, laying a foundation for subsequent configuration development. At the same time, each software architecture layer can provide corresponding development interfaces and parsing interfaces. The development interface is for developers to write standardized code for this software architecture, and the parsing interface is used to analyze the existing input code and extract configuration information.

[0020] To achieve the standardized design of embedded software code configuration and improve code generality, the preferred implementation of the present invention is that the standardized code configuration file includes a software package configuration file, a driver configuration file, and a device configuration file; the software package configuration file is used to define the function modules and their parameters of the software package, the driver configuration file is used to define the functional characteristics and hardware interfaces of the driver, and the device configuration file defines the type of the device and its related attributes.

[0021] The functions of the software package configuration file pkg_config, the driver configuration file Driver_config, and the device configuration file device_config are to extract the content that originally needed to be hard-coded in the source code into an external configuration file, thereby avoiding the uncertainty problems caused by directly modifying the source code. Such as Figure 1As shown, the software package configuration file, driver configuration file, and device configuration file exist in the format of C language source code files in the embedded software basic platform, and exist in JSON format in the embedded software management platform. The.c format file is a code-level configuration for the compiler, suitable for static parameters related to hardware and directly involved in compilation. The.json format file is a structured data configuration for the toolchain, suitable for scenarios where code needs to be flexibly generated. The standardized code configuration file is converted between the two platforms through tools, which can balance usability and execution efficiency.

[0022] The embedded software management platform helps users complete the configuration-based development of embedded software by parsing the configuration file and generating a visual configuration interface. The role of parsing the standardized code configuration file is to read and parse the software package configuration file pkg_config, driver configuration file Driver_config, and device configuration file device_config, extract the configuration information therein, and convert it into an internal data structure. For example, when the system reads the driver configuration file Driver_config, it will parse the relevant parameters of the serial port driver and store them in memory for subsequent use. The visual configuration interface generates a visual interface that is convenient for users to operate according to the parsed configuration file. Users select the required function modules and set relevant parameters through this interface. For example, they select to enable a certain file system module and set its cache size to 1MB. The system automatically generates the standardized code of the embedded software according to the user's configuration items.

[0023] For example, for Figure 1 different types of products such as the gateway DTU product, power meter product, and charging pile product shown in the figure, by developing different application software on the same embedded software basic platform, the development efficiency can be improved, and the project implementation of various products can be accelerated. The embedded software code is layered and corresponding configuration files are developed. During the development process, if there are general modification contents, they can be uniformly adjusted at the configuration file level instead of directly modifying the source code, so that the general modifications can be merged into the standardized code to improve its generality. According to the parsed configuration file, a visual configuration interface is generated. After the user completes the configuration on this interface, the system can automatically generate the standardized code of the embedded software. Users do not need to write a large number of complex codes and can complete software development only through simple configuration operations, reducing the dependence on personnel during the development process, reducing the risk of introducing BUGs, and improving the stability and reliability of the code.

[0024] Taking the software package configuration file pkg_config as an example, this file defines the functional modules of the software package and their parameters, such as the maximum number of files in a certain file system, cache size and other parameters. The driver configuration file Driver_config defines the functional characteristics and hardware interfaces of the driver, such as the baud rate, data bits, stop bits, etc. of the serial port driver. The device configuration file device_config defines the type of the device and its related attributes, such as the measurement range, accuracy, etc. of a certain sensor. Through the design of the above configuration files, developers can adjust the functional modules by modifying the configuration files, cooperate with the visual configuration interface for automatic code clipping, realize the flexible configuration of different levels of functions, without directly modifying the source code, thereby reducing the risk of introducing BUGs, meeting the needs of different projects, and improving the flexibility and efficiency of development.

[0025] In order to ensure the efficient application of standardized code in actual projects, make embedded software development more efficient, and improve the versatility of the system, a further preferred implementation of the present invention is that the embedded software management platform is also used to receive the software function requirements of users and evaluate whether the standardized code meets the software function requirements; if it does not meet the software function requirements, it sends an update and maintenance message of the standardized code to the embedded software basic platform to enable the embedded software basic platform to update and maintain the standardized code in the standardized code configuration file; if it meets the software function requirements, the corresponding embedded software standardized code is generated according to the configuration items corresponding to the software function requirements and the corresponding standardized code.

[0026] The embedded software management platform receives the software function requirement document input by the user and evaluates whether the existing standardized code meets the software function requirements in the document. For example, the software function requirement is to develop an intelligent gateway product that requires support for multiple communication protocols and has a remote upgrade function. The embedded software management platform will evaluate whether the existing standardized code can meet these requirements according to the software function requirement document. If the required communication protocol module and remote upgrade module are not included in the standardized code configuration file, a message needs to be sent to the embedded software basic platform to update and maintain the standardized code first.

[0027] If the standardized code configuration file contains the required communication protocol module and remote upgrade module, the embedded software management platform can directly determine that the configuration items corresponding to the software function requirements are to enable the communication protocol module and the remote upgrade module according to the software function requirement document, and generate the embedded software standardized code based on the communication protocol module and the remote upgrade module contained in the standardized code configuration file. Alternatively, the embedded software management platform generates a corresponding visual interface according to the software function requirement document, and the user can select to enable the communication protocol module and set its baud rate in the visual interface, and at the same time select to enable the remote upgrade module and set its upgrade server address. After the configuration is completed, the system generates the corresponding embedded software standardized code.

[0028] To enable the generated code to be imported into the project for testing and verification, a further preferred embodiment of the present invention is that the embedded software management platform is also used to export the generated embedded software standardized code to the project directory.

[0029] To facilitate the optimization of the standardized code, a further preferred embodiment of the present invention is that the embedded software management platform is also used to record the modification content input by the user in the visual configuration interface.

[0030] For example, if the user modifies the cache size parameter of a certain file system in the visual interface, the system will record this modification content so that subsequent developers can perform adaptive optimization on the standardized code in the configuration file for this modification content.

[0031] To further improve the reusability of the standardized code, a further preferred embodiment of the present invention is that the embedded software management platform is also used to compare the code in the modification content with the standardized code in the standardized code configuration file, identify the general modification content in the modification content, and transmit the general modification content to the embedded software basic platform; the embedded software basic platform is also used to merge the general modification content into the standardized code configuration file.

[0032] For example, the system records the cache size parameter modified by the user in the visual interface, and the system will compare it with the standardized code in the configuration file to analyze whether it is general. If the modification content is general, the system will merge it into the standardized code. For example, a new cache policy option is added, so that other projects can also benefit from this improvement, further improving the reusability and generality of the standardized code.

[0033] According to Figure 2 As shown, the present invention discloses an embedded software development method, which is applicable to the embedded software standardized code management system introduced in the above embodiments. The embedded software development method includes: S201. Set corresponding standardized code configuration files for the software package layer, the driver layer, and the device class layer respectively.

[0034] S202. Parse the standardized code configuration files to generate a visual configuration interface for the configuration items corresponding to the standardized codes in the standardized code configuration files.

[0035] S203. Generate corresponding embedded software standardized codes according to the configuration items selected by the user in the visual configuration interface.

[0036] In a further preferred embodiment of the present invention to make the embedded software development process more efficient and improve generality, the method further includes: S301. Receive the software function requirements of the user.

[0037] S302. Evaluate whether the standardized codes meet the software function requirements.

[0038] If not, execute S303.

[0039] S303. Update and maintain the standardized codes.

[0040] If so, execute S304.

[0041] S304. Generate corresponding embedded software standardized codes according to the configuration items corresponding to the software function requirements and their corresponding standardized codes.

[0042] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art of this technology, without departing from the technical principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. An embedded software standardized code management system, characterized in that Including: Embedded software basic platform and embedded software management platform; The embedded software basic platform divides the embedded software code architecture into an application layer, a software package layer, a driver layer, a device class layer, a board support package layer, and a common function layer. Each architecture layer is provided with corresponding development interfaces and parsing interfaces. The development interfaces are used to develop standardized software codes for the corresponding architectures, and the parsing interfaces are used to parse the source codes of the corresponding architectures in the input software codes. Among them, the software package layer, the driver layer, and the device class layer are respectively provided with corresponding standardized code configuration files; The embedded software management platform is used to parse the standardized code configuration files, generate a visual configuration interface for the configuration items corresponding to the standardized codes in the standardized code configuration files, and generate corresponding embedded software standardized codes according to the configuration items selected by the user in the visual configuration interface.

2. The embedded software standardized code management system according to claim 1, characterized in that, The application layer is used to implement application functions for interacting with users. The software package layer is used to convert hardware capabilities into directly callable function modules. The driver layer is used to control hardware devices. The device class layer is used to describe the attributes of different types of devices and define abstract interfaces for different types of devices. The board support package layer is used to provide standardized software interfaces for connecting hardware and operating systems. The common function layer is used to provide general basic services.

3. The embedded software standard code management system according to claim 1, wherein The standardized code configuration files include software package configuration files, driver configuration files, and device configuration files; The software package configuration files are used to define the function modules and their parameters of the software packages. The driver configuration files are used to define the functional characteristics and hardware interfaces of the drivers. The device configuration files define the types of devices and their related attributes.

4. The embedded software standardized code management system according to claim 1, characterized in that, The embedded software management platform is also used to receive the software function requirements of the user and evaluate whether the standardized codes meet the software function requirements. If the software function requirements are not met, an update and maintenance message for the standardized codes is sent to the embedded software basic platform, so that the embedded software basic platform updates and maintains the standardized codes in the standardized code configuration files. If the software function requirements are met, corresponding embedded software standardized codes are generated according to the configuration items corresponding to the software function requirements and their corresponding standardized codes.

5. The embedded software standard code management system according to claim 1 or 4, characterized in that, The embedded software management platform is also used to export the generated embedded software standardized codes to the project directory.

6. The embedded software standard code management system according to claim 1, wherein The embedded software management platform is also used to record the modification content input by the user in the visual configuration interface.

7. The embedded software standard code management system according to claim 6, characterized in that The embedded software management platform is also used to compare the codes in the modification content with the standardized codes in the standardized code configuration files, identify the general modification content in the modification content, and transmit the general modification content to the embedded software basic platform; The embedded software basic platform is also used to merge the general modification content into the standardized code configuration files.

8. An embedded software development method, applicable to the embedded software standardized code management system according to any one of claims 1-7, characterized in that, Including: Corresponding standardized code configuration files are respectively set for the software package layer, the driver layer, and the device class layer; Parse the standardized code configuration file to generate a visual configuration interface for the configuration items corresponding to the standardized codes in the standardized code configuration file; Generate corresponding embedded software standardized codes according to the configuration items selected by the user in the visual configuration interface.

9. The embedded software development method according to claim 8, characterized in that, The method further includes: Receive the software function requirements of the user; Evaluate whether the standardized code meets the software function requirements; If the software function requirements are not met, update and maintain the standardized code; If the software function requirements are met, generate corresponding embedded software standardized codes according to the configuration items corresponding to the software function requirements and their corresponding standardized codes.