Method for IAR engineering automatic library creating, computer and storage medium
By automating the library logging process in IAR projects, including configuration file reading, development tool checking, saving directory renaming, file copying and compilation, and static library construction, the cumbersome and error-prone problems are solved, improving efficiency and reducing software release time.
Patent Information
- Application Number
- CN202411915544.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-25
Smart Images

Figure CN119883218A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of automatic library opening, and in particular to a method, a computer and a storage medium for automatic library opening in IAR engineering. Background Art
[0002] Library packaging is the process of packaging the source code files required in the IAR project into a static library, deleting the packaged source code files in the IAR project, and referencing the static library in the IAR project. The whole process is very cumbersome and error-prone, and it takes a lot of time and developer energy in the embedded software development process.
[0003] Chinese patent 108614696A provides a method for application production, including: receiving a call instruction to a target static library, the target static library is applied to at least two service functions of the application to be produced; according to the call instruction, calling the target static library, the target static library includes at least two sub-static libraries corresponding to the at least two service functions, the at least two sub-static libraries respectively contain the same type of program code with different class name prefixes, and the class name prefix in each sub-static library is configured according to the service function corresponding to each sub-static library during pre-compilation; adding the program code of the at least two sub-static libraries to the programs of the corresponding service functions to realize the production of the application to be produced.
[0004] There is no method in the prior art that can improve the efficiency of stockpiling. Summary of the invention
[0005] The present invention aims to provide a method, a computer and a storage medium for IAR engineering automated database entry, so as to achieve the technical purpose of improving the efficiency of database entry.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is:
[0007] The present invention provides a method for IAR engineering automation library:
[0008] Step 1: After the work starts, the computer reads the information in the configuration file.
[0009] Step 2: After receiving the library instruction, the computer checks the development tool and proceeds to the next step after the check passes.
[0010] Step 3: The computer renames the save directory.
[0011] Step 4: The computer copies the files in the project directory to the save directory.
[0012] Step 5: The computer compiles the files in the saved directory through the development tool.
[0013] Step 6: The computer builds a static library.
[0014] Step 7: Add the relative path of the static library to the project file on the computer.
[0015] Step 8: The computer compiles the files in the static library.
[0016] In step 2, the checking of the development tool includes checking whether the project directory of the development tool exists and checking whether the installation directory of the development tool is correct.
[0017] In step 3, rename the save directory according to the information in the configuration file.
[0018] The new name of the storage directory includes the original name, project name, version number, date and computer hardware information.
[0019] In step six, the computer imports the building parameters in the static library building file into the archive management tool in the development tool to build the static library.
[0020] In step 6, after the static library is built, the computer deletes the C language source code files in the save directory and included in the build parameters.
[0021] In step 7, after the path generation is completed, the path of the C language source code file included in the static library build file is deleted.
[0022] The present invention provides a computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method when executing the computer program.
[0023] The present invention provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method are implemented.
[0024] The technical effects of the present invention are:
[0025] (1) The present invention automatically performs the database operation, reduces the workload of engineering integrators, improves the efficiency of database operation, and reduces the software release time. At the same time, it avoids the influence and consequences of manual database operation errors as much as possible.
[0026] (2) The present invention checks the project directory and installation directory of the development tool to ensure the integrity of the development tool.
[0027] (3) The present invention renames the storage directory, making it easier for personnel to understand file information when exporting files.
[0028] (4) The present invention compiles the files in the project directory after copying them to the saved files, thereby preventing the files from being missing during the file copying process. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] This specification includes the following drawings, which show the following contents:
[0030] Figure 1 The present invention discloses a flow chart of a method, a computer and a storage medium for IAR engineering automation library opening. DETAILED DESCRIPTION
[0031] The specific implementation methods of the present invention are further explained in detail below by describing the embodiments with reference to the accompanying drawings, with the aim of helping those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention and facilitating their implementation.
[0032] The present invention provides a method for IAR engineering automation library:
[0033] Step 1: After the work starts, the computer reads the information in the configuration file.
[0034] Step 2: After receiving the library instruction, the computer checks the development tool and proceeds to the next step after the check passes.
[0035] Step 3: The computer renames the save directory.
[0036] Step 4: The computer copies the files in the project directory to the save directory.
[0037] Step 5: The computer compiles the files in the saved directory through the development tool.
[0038] Step 6: The computer builds a static library.
[0039] Step 7: Add the relative path of the static library to the project file on the computer.
[0040] Step 8: The computer compiles the files in the static library.
[0041] In step 2, the checking of the development tool includes checking whether the project directory of the development tool exists and checking whether the installation directory of the development tool is correct.
[0042] In step 3, rename the save directory according to the information in the configuration file.
[0043] The new name of the saved directory includes the original name, project name, version number, date, and computer hardware information.
[0044] In step six, the computer imports the building parameters in the static library building file into the archive management tool in the development tool to build the static library.
[0045] In step 6, after the static library is built, the computer deletes the C language source code files in the save directory and included in the build parameters.
[0046] In step 7, after the path generation is completed, the path of the C language source code file included in the static library build file is deleted.
[0047] The present invention provides a computer, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the method are implemented when the processor executes the computer program.
[0048] The present invention provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements the steps of the method when executed by a processor.
[0049] The following is a detailed description of a method, computer and storage medium for IAR engineering automation library creation according to the present invention.
[0050] A method for IAR engineering automation library opening of the present invention is:
[0051] S1: After the work starts, the computer reads the information in the configuration file. The information in the configuration file includes the project directory that needs to be opened, the installation directory of the development tool, the project name, the storage directory for saving the opening project, whether a HEX file needs to be generated, and whether a ZIP compressed package needs to be generated. The development tool in the present invention is IAR Embedded Workbench.
[0052] S2: After receiving the library instruction, the computer checks the development tool and proceeds to the next step after the check passes. Specifically, the check of the development tool includes checking whether the project directory of the development tool exists and whether the installation directory of the development tool is correct. The present invention checks the project directory and installation directory of the development tool to ensure the integrity of the development tool.
[0053] S3: The computer renames the storage directory. Specifically, the storage directory is renamed according to the information in the configuration file, and the new name of the storage directory includes the original name of the storage directory, the project name, the version number, the date, and the computer hardware information. The present invention facilitates personnel to understand the file information when exporting files by renaming the storage directory.
[0054] S4: The computer copies the files in the project directory to the save directory.
[0055] S5: The computer compiles the files in the save directory through the development tool. Specifically, the computer creates a new process and calls IarBuild.exe in the development tool to compile the files in the save directory. The present invention compiles the files in the project directory after copying them to the save files to prevent missing files during the file copying process.
[0056] S6: The computer builds a static library. Specifically, the computer imports the build parameters in the static library build file into the archive management tool iarchive.exe in the development tool to build the static library. After the static library is built, the computer deletes the C language source code files contained in the save directory and the build parameters.
[0057] S7: The computer adds the relative path of the static library in the engineering file. After the path generation is completed, the computer deletes the path of the C language source code file included in the static library build file. The present invention transfers the engineering file to the static library through the relative path.
[0058] S8: The computer compiles the files in the static library. After the static library is built, the project files in the static library are compiled to ensure that there is no error in the file transfer.
[0059] After the static library is built, the computer decides whether to generate a HEX file or a ZIP compressed package based on the information in the configuration file. At the same time, the directories and files in the directories specified in the configuration file are deleted.
[0060] The present invention automatically performs the library operation, reduces the workload of engineering integrators, improves the efficiency of library operation, and reduces the software release time. At the same time, it avoids the influence and consequences of manual library operation errors as much as possible.
[0061] The present invention is described above by way of example in conjunction with the accompanying drawings. Obviously, the specific implementation of the present invention is not limited to the above-mentioned methods. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention; or the above concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.
Claims
1. A method for IAR engineering automation library, characterized in that: Step 1: After the work starts, the computer reads the information in the configuration file; Step 2: After receiving the library instruction, the computer checks the development tool and proceeds to the next step after the check passes; Step 3: The computer renames the save directory; Step 4: The computer copies the files in the project directory to the save directory; Step 5: The computer compiles the files in the saved directory through the development tool; Step 6: The computer builds a static library; Step 7: Add the relative path of the static library to the project file on the computer; Step 8: The computer compiles the files in the static library.
2. A method for IAR engineering automation library according to claim 1, characterized in that: In step 2, the checking of the development tool includes checking whether the project directory of the development tool exists and checking whether the installation directory of the development tool is correct.
3. A method for IAR engineering automation library according to claim 1, characterized in that: In step 3, rename the save directory according to the information in the configuration file.
4. A method for IAR engineering automation library according to claim 3, characterized in that: The new name of the storage directory includes the original name, project name, version number, date and computer hardware information.
5. A method for IAR engineering automation library according to claim 1, characterized in that: In step six, the computer imports the building parameters in the static library building file into the archive management tool in the development tool to build the static library.
6. A method for IAR engineering automation library according to claim 1, characterized in that: In step 6, after the static library is built, the computer deletes the C language source code files in the save directory and included in the build parameters.
7. A method for IAR engineering automation library according to claim 1, characterized in that: In step 7, after the path generation is completed, the path of the C language source code file included in the static library build file is deleted.
8. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and device for making application, method and device for generating static library
CN108614696A