Search

CN-122018862-A - Embedded software development method, device, equipment and storage medium

CN122018862ACN 122018862 ACN122018862 ACN 122018862ACN-122018862-A

Abstract

The application discloses an embedded software development method, device, equipment and storage medium, relating to the technical field of embedded software, comprising the steps of triggering a CI/CD pipeline after a preset code warehouse acquires project files and corresponding label information about target embedded software projects; determining a containerization environment based on tag information through a CI/CD pipeline, determining a project identification and a project variant identification based on a configuration file in a project file through a preset cross-platform construction tool in the containerization environment, and uploading a target file from the project file based on the project identification and the project variant identification; in a containerized environment, project construction and project packaging operations on target embedded software projects are performed on the basis of target files through a preset cross-platform construction tool and a packaging tool, so that embedded software products are obtained, and the embedded software products are released. The application can meet the high-efficiency and standardized requirements of software delivery in an embedded scene.

Inventors

  • LI BO

Assignees

  • 杭州麦唐科技有限公司

Dates

Publication Date
20260512
Application Date
20260213

Claims (10)

  1. 1. An embedded software development method, comprising: Triggering a CI/CD pipeline after a preset code warehouse acquires a project file related to a target embedded software project and label information corresponding to the project file, wherein the project file is a file containing a business code of the target embedded software project, a declaration list file written based on a preset cross-platform construction tool and a configuration file; Determining a containerization environment corresponding to the target embedded software item based on the tag information through the CI/CD pipeline, determining an item identifier and an item variant identifier corresponding to the target embedded software item based on the configuration file in the item file through the preset cross-platform construction tool in the containerization environment, and loading a target file related to item construction and item packaging from the item file based on the item identifier and the item variant identifier, wherein the item variant identifier is an identifier representing version information and configuration information of variants in the target embedded software item; And in the containerized environment, executing project construction and project packaging operations on the target embedded software project based on the target file through the preset cross-platform construction tool and a packaging tool of the preset cross-platform construction tool to obtain a corresponding embedded software product, so as to release the embedded software product through the CI/CD pipeline.
  2. 2. The embedded software development method of claim 1, wherein the declarative manifest file is a file built by sequentially passing through a project packing start function, a component addition function, a project packing end function and a custom command function of a preset cross-platform build tool.
  3. 3. The embedded software development method according to claim 1, wherein the configuration file is a file for encapsulating, by using a preset inheritance mechanism, a build parameter required for an embedded software product corresponding to the target embedded software project, the build parameter including configuration information, project name, project variant name, and build type of a tool chain for the target embedded software project.
  4. 4. The embedded software development method of claim 1, wherein loading a target file related to project construction and project packaging from the project file based on the project identification and the project variant identification comprises: Analyzing the project identifier and the project variant identifier by utilizing a root file in the project file, and judging whether a target variant corresponding to the project variant identifier exists currently or not to obtain a judging result; if the judgment result shows that the target variant is the target variant, determining a first file searching path corresponding to the target variant; if the judging result shows that the first file searching path is not the first file searching path, determining the root directory of the first file searching path as a second file searching path; Determining a module list file related to the construction of the target embedded software item and the declarative manifest file related to the packaging of the target embedded software item from the item files based on the first file lookup path or the second file lookup path; and determining the module list file and the declarative manifest file as target files.
  5. 5. The embedded software development method according to claim 1, wherein the determining a containerized environment corresponding to the target embedded software item based on the tag information includes: Determining a target platform for executing the target embedded software project based on the tag format of the tag information, and determining a tool chain for cross compiling on the target platform; A respective tool chain image is determined based on the current base image and the tool chain, and the tool chain image is determined as a containerized environment corresponding to the target embedded software item.
  6. 6. The embedded software development method of claim 5, wherein before said determining, by said CI/CD pipeline, a containerized environment corresponding to said target embedded software item based on said tag information, further comprising: When the text configuration file for constructing the Docker mirror image is changed, determining the changed text configuration file; Constructing a new mirror image based on the changed text configuration file, and adding an identity label and a current version label to the new mirror image to obtain an added mirror image; pushing the added image to a preset container image warehouse so as to determine the added image as the current base image.
  7. 7. The embedded software development method of any one of claims 1 to 6, wherein said issuing said embedded software product comprises: Generating a version update log related to the embedded software product through a preset change log generating tool, and creating a custom release target through a preset command line tool; And publishing the version update log, the embedded software product and the current version information of the embedded software product based on the custom publishing target.
  8. 8. An embedded software development device, comprising: The system comprises an information acquisition module, an information acquisition module and a configuration module, wherein the information acquisition module is used for triggering a CI/CD pipeline after a preset code warehouse acquires a project file related to a target embedded software project and label information corresponding to the project file, wherein the project file comprises a business code of the target embedded software project, a declaration list file written based on a preset cross-platform construction tool and a configuration file; a file loading module, configured to determine, through the CI/CD pipeline, a containerized environment corresponding to the target embedded software item based on the tag information, in the containerized environment, determine, through the preset cross-platform building tool, an item identifier and an item variant identifier corresponding to the target embedded software item based on the configuration file in the item file, and load, from the item file, a target file related to item construction and item packaging based on the item identifier and the item variant identifier, wherein the item variant identifier is an identifier that characterizes version information and configuration information of variants within the target embedded software item; And the product release module is used for executing project construction and project packaging operations on the target embedded software project based on the target file through the preset cross-platform construction tool and the packaging tool of the preset cross-platform construction tool in the containerized environment to obtain a corresponding embedded software product so as to release the embedded software product through the CI/CD pipeline.
  9. 9. An electronic device, comprising: A memory for storing a computer program; A processor for executing the computer program to implement the embedded software development method of any one of claims 1 to 7.
  10. 10. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the embedded software development method of any one of claims 1 to 7.

Description

Embedded software development method, device, equipment and storage medium Technical Field The present invention relates to the field of embedded software technologies, and in particular, to a method, an apparatus, a device, and a storage medium for developing embedded software. Background In complex embedded scenes such as the Internet of things and a vehicle-mounted information system, software delivery needs to be adaptive to multiple hardware platforms, multiple operating systems and multiple product models, source code compiling and linking are completed, and a constructed product and non-code resources are integrated to form a standardized delivery package. The process relies on cross-compilation and CI/CD (i.e., continuous Integration/Continuous Delivery, continuous integration/continuous delivery) flows, placing extremely high demands on automation, repeatability and reliability of delivery, which is difficult to meet with existing packaging schemes. The most common scheme at present adopts an independent process type packaging script, is started after the end of the main construction flow, and completes delivery by creating a temporary directory, copying files by a hard coding path and compressing filing. The scheme has the inherent defects that firstly, a file path in a script is hard-coded, when a project directory structure and a construction target name change, the script cannot sense, the problem of file searching failure or packaging error files is easy to occur, and the stability is extremely poor, secondly, packaging logic is completely separated from construction logic, a developer needs to maintain two independent systems at the same time, the script needs to be synchronously modified when a new construction target is added, the cognitive burden is heavy, negligence errors are easy to be caused, the maintenance difficulty is high, thirdly, when different product models are adapted, the script needs to be copied and modified to realize differential packaging, logic redundancy is caused, common logic modification needs to be synchronized to all script copies, the maintenance cost is greatly increased, errors are easy to occur, the expansibility is insufficient, fourthly, the difference of execution environments is large, the CI/CD environment consistency is increased, and the integration degree with an automatic process is low. Therefore, how to meet the requirements of high efficiency and standardization of software delivery in an embedded scenario is a technical problem to be solved currently. Disclosure of Invention In view of the above, the present invention aims to provide a method, a device and a storage medium for developing embedded software, which can meet the requirements of high efficiency and standardization of software delivery in an embedded scenario. The specific scheme is as follows: in a first aspect, the present application provides a method for developing embedded software, including: Triggering a CI/CD pipeline after a preset code warehouse acquires a project file related to a target embedded software project and label information corresponding to the project file, wherein the project file is a file containing a business code of the target embedded software project, a declaration list file written based on a preset cross-platform construction tool and a configuration file; Determining a containerization environment corresponding to the target embedded software item based on the tag information through the CI/CD pipeline, determining an item identifier and an item variant identifier corresponding to the target embedded software item based on the configuration file in the item file through the preset cross-platform construction tool in the containerization environment, and loading a target file related to item construction and item packaging from the item file based on the item identifier and the item variant identifier, wherein the item variant identifier is an identifier representing version information and configuration information of variants in the target embedded software item; And in the containerized environment, executing project construction and project packaging operations on the target embedded software project based on the target file through the preset cross-platform construction tool and a packaging tool of the preset cross-platform construction tool to obtain a corresponding embedded software product, so as to release the embedded software product through the CI/CD pipeline. Optionally, the declarative manifest file is a file built by sequentially passing through a project packaging start function, a component adding function, a project packaging end function and combining with an inslitol command function of a preset cross-platform building tool. Optionally, the configuration file is a file for encapsulating the construction parameters required by the embedded software product corresponding to the target embedded software item by using a preset inheritance