Code development management method

By establishing a new development framework, dividing code types, building code directory structures and management platforms, the problem of decentralization of existing code management models has been solved, code reuse rate and development efficiency have been improved, and software quality and sustainability have been improved.

CN116339702BActive Publication Date: 2025-03-21GUANGDONG HONGQIN COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310345875.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2025-03-21
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

The existing code management model is scattered, resulting in irregular code writing, low reuse rate, and high failure rate. It needs to be repeated when switching chips on different platforms or manufacturers. It has a large workload and takes a long time, and it cannot adapt to high-intensity and fast-paced business needs.

Method used

Establish a new development framework, and improve code reuse rate, establish development specifications, speed up code review and understanding, enhance code sustainability by dividing code types, building code directory structure, development management platform, sub-management platform, and unification of programming languages, etc., improve code reuse rate, establish development specifications, accelerate code review and understanding, enhance code sustainability, modularly split code distribution, and reduce code coupling rate.

Benefits of technology

It has achieved the improvement of code reuse rate, the establishment of development specifications, the acceleration of code reference, and the enhancement of code sustainability, reduced the code coupling rate, improved the software quality and development efficiency, and adapted to high-intensity and fast-paced business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116339702B_ABST
    Figure CN116339702B_ABST
Patent Text Reader

Abstract

The present invention discloses a code development management method, which comprises: dividing existing code modules into N code types; constructing a code directory structure for each functional module, wherein the code directory structure comprises at least one code type; constructing a code development management platform based on the code directory structure of all functional modules; developing definition functions, structure functions and pointer functions of code modules in each code type under the code directory structure of each functional module in a preset programming language; constructing a sub-management platform for each code project, wherein the sub-management platform of each code project can be independently bound to a code module under a specified code type; the present invention establishes a brand-new development framework, improves the code reuse rate, establishes development specifications, speeds up code review and understanding, enhances code sustainability, modularizes and splits code distribution, and reduces code coupling rate, thereby achieving the purpose of improving efficiency and software quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to a code development management method. Background Art

[0002] The existing code management model is fragmented, and each different person and different chip manufacturer has a different style, resulting in non-fixed formats for code writing, function declaration, file placement, etc., causing difficulties in learning and code reading, and it is difficult to form a company-level code management baseline. In addition, the code reuse rate and failure rate are very high, and sustainability is not strong.

[0003] When switching between different platforms and chips from different manufacturers, we need to overturn all previous work and start over. In addition, the function naming, comment writing, coding style, space and line breaking styles are all different, resulting in large code redundancy and imprecise code writing.

[0004] In addition, the random processing of temporary countermeasures code to fix specific problems caused major problems in subsequent extended development, and it was necessary to locate code anomalies from scratch, resulting in a waste of manpower.

[0005] In addition, the existing code management and allocation layout rely entirely on cumbersome methods such as manual comparison, keyword recording, and global search. This requires a lot of work and is time-consuming, and cannot adapt to high-intensity and fast-paced business needs. Summary of the invention

[0006] The purpose of the present invention is to provide a code development management method, which establishes a new development framework, improves the code reuse rate, establishes development specifications, speeds up code review and understanding, enhances code sustainability, modularizes and splits code distribution, and reduces code coupling rate, thereby achieving the purpose of improving efficiency and software quality, while realizing cross-reuse of multi-project codes, making countermeasures easy to learn from and reducing manpower investment.

[0007] In order to achieve the above object, the present invention discloses a code development management method, which comprises the following steps:

[0008] S1. Divide the existing code modules into N code types;

[0009] S2. Construct a code directory structure for each functional module, wherein the code directory structure includes at least one code type;

[0010] S3. Build a code development management platform based on the code directory structure of all functional modules;

[0011] S4, developing definition functions, structure functions and pointer functions of code modules in each code type under the code directory structure of each functional module in a preset programming language;

[0012] S5. Construct a sub-management platform for each code project. Each sub-management platform of the code project can be independently bound to a code module under a specified code type, so that the corresponding code module can be independently processed under the sub-management platform of the code project.

[0013] Preferably, the code development management method further comprises:

[0014] Check the programming language of the code modules in each code type under the code directory structure of each functional module;

[0015] If any code module is not written in the default programming language, the current code module is rewritten in the default programming language.

[0016] Preferably, the code development management method further comprises:

[0017] According to the requirements of the code project, the Windows PowerShell tool can be used to split and / or customize the corresponding code modules under the sub-management platform of any code project.

[0018] Preferably, the code development management method further comprises:

[0019] Categorize and store existing original factory codes;

[0020] Create a startup function for each factory code.

[0021] Preferably, the code development management method further comprises:

[0022] A project configuration file of the sub-management platform of each code project is established, and the project configuration file can modify the code model in the current code project.

[0023] Preferably, the code development management method further comprises:

[0024] Check whether the code model in any code project conflicts with the code model in the public code or other code projects;

[0025] When a code model in any code project conflicts with a common code or a code model in another code project, the code model in the current code project is redirected to a temporary compilation directory for execution, and the original code content is overwritten with the code model content in the current code project;

[0026] After calling the nmake tool to read the link file of the code model in the current code project, the code model in the current code project is compiled.

[0027] Preferably, the code development management method further comprises:

[0028] At the same time, temporary compilation directories of code models in different code projects are used to modify the compilation instruction configuration file of nmake to make the code models in different code projects compatible during the compilation process.

[0029] Preferably, the code development management method further comprises:

[0030] Use the compilation configuration script to compile the same code model into multiple versions and / or customized compilations.

[0031] Preferably, the code development management method further comprises:

[0032] Establish customer information database;

[0033] Configure specific configuration files for each customer and corresponding code project.

[0034] Preferably, the preset programming language is C language, C++ language or Linux language.

[0035] Compared with the prior art, the present invention establishes a new development framework, improves the code reuse rate, establishes development specifications, speeds up code review and understanding, enhances code sustainability, modularizes code distribution, and reduces code coupling rate, thereby achieving the purpose of improving efficiency and software quality. At the same time, it realizes cross-reuse of multi-project codes, and the countermeasures are easy to learn from, reducing manpower investment. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flowchart of the code development management method of the present invention;

[0037] Figure 2 It is the operation flow of the code module of the present invention;

[0038] Figure 3 This is the embedding process of the code module of the present invention. DETAILED DESCRIPTION

[0039] In order to explain the technical content, structural features, achieved objectives and effects of the present invention in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.

[0040] See also Figure 1-Figure 3 As shown, the code development management method of this embodiment is mainly used for framework management of old embedded chips such as 8051 / 8052. Of course, it can also be used for conventional code management.

[0041] The code development management method includes the following steps:

[0042] S1. Divide the existing code modules into N code types, such as chip underlying code, customer business code, project configuration code, transfer demand code, device driver code, interface code and other code types.

[0043] S2. Construct a code directory structure for each functional module, wherein the code directory structure includes at least one code type for subsequent compilation and calling.

[0044] It is understandable that this step, according to the code types involved in each functional module, summarizes the involved code types into the code directory structure corresponding to the functional module for classification. Further, the various code types within the same functional module can be sorted according to the level, intersection, importance and other standards. The code types contained in different functional modules can be different, or they can overlap partially or completely.

[0045] S3. Build a code development management platform based on the code directory structure of all functional modules, such as a code development management platform that forms a lightweight OSAL (operating system abstraction layer) and other RTOS-like task management mechanisms.

[0046] S4. Develop definition functions, structure functions and pointer functions of the code modules in each code type under the code directory structure of each functional module in a preset programming language to reduce the coupling rate between different code modules.

[0047] S5. Build a sub-management platform for each code project. Each sub-management platform of a code project can independently bind code modules under a specified code type so that the corresponding code modules can be independently processed under the sub-management platform of the code project. For example, bind code modules such as GPIO, LED, Charger settings, and PD configuration to a specified code project so that the code project can independently manage the above code modules. Figure 2 It shows the operation flow of the code module. Figure 3 The embedding process of the code module is shown.

[0048] Preferably, the code development management method further comprises:

[0049] Check the programming language of the code modules in each code type under the code directory structure of each functional module;

[0050] If any code module is not written in the default programming language, the current code module is rewritten in the default programming language.

[0051] It is understandable that the purpose of this step is to unify the writing language of all code modules in the code development management platform. For example, if the code modules such as PD, Power, Thermal, Charger, Battery, Keyboard, Sensor, and AMP are not written in the preset programming language, then the above code modules need to be rewritten in the preset programming language. The workload may be relatively large in the early stage, but in the later stage, programmers can use the code by directly calling it, which can greatly improve work efficiency in the later stage.

[0052] Preferably, the code development management method further comprises:

[0053] According to the requirements of the code project, the Windows PowerShell tool can be used to split and / or customize the corresponding code modules under the sub-management platform of any code project, which is similar to the implementation method of make / kconfig.

[0054] Preferably, the code development management method further comprises:

[0055] The existing original factory codes are classified and stored. Here is the original factory code of the chip, which is provided by the chip manufacturer and called by the programmer.

[0056] Create a startup function for each original code. For example, use build_all.ps1 with config_XXXX.ps1 (XXXX refers to the project code) to compile the script definition to find the chip startup file used by the appropriate code project.

[0057] Preferably, the code development management method further comprises:

[0058] A project configuration file of the sub-management platform of each code project is established, and the project configuration file can modify the code model in the current code project. For example, the code project configuration and proprietary function requirements are defined through the project.h file, and the functions required to configure the code project are implemented by turning on the define (specific macro definition) switch.

[0059] Preferably, the code development management method further comprises:

[0060] Check whether the code model in any code project conflicts with the code model in the public code or other code projects;

[0061] When a code model in any code project conflicts with a common code or a code model in another code project, the code model in the current code project is redirected to a temporary compilation directory for execution, and the original code content is overwritten with the code model content in the current code project;

[0062] After calling the nmake tool to read the link file of the code model in the current code project, the code model in the current code project is compiled.

[0063] Specifically, the code module is redirected to a temporary compilation directory through build_all.ps1, the original file is overwritten with the file in the project directory, and then the nmake tool is called to read the link file for compilation, realizing multi-project switching and function expansion.

[0064] Preferably, the code development management method further comprises:

[0065] At the same time, the temporary compilation directories of the code models in different code projects are used to modify the compilation instruction configuration file (ITEEC.mak / ITEEC.lin) of nmake to make it compatible with the code models in different code projects during the compilation process.

[0066] Preferably, the code development management method further comprises:

[0067] Use the compilation configuration script to compile the same code model into multiple versions and / or customized compilation. For example, use the compilation configuration scripts such as config_XXXX.ps1 in the project directory to implement functions such as compiling multiple versions of a set of code and customized compilation.

[0068] Preferably, the code development management method further comprises:

[0069] Establish customer information database;

[0070] Configure specific configuration files for each customer and the corresponding code project. For example, you can independently write specific code for customer differentiation according to customer needs, and customize it through the build.ps1 configuration file in the customer directory to facilitate more expansion in the future.

[0071] Preferably, the preset programming language is C language, C++ language or Linux language, and of course it can also be assembly language or other high-level languages.

[0072] Combination Figure 1-Figure 3 The present invention establishes a new development framework, improves the code reuse rate, establishes development specifications, speeds up code review and understanding, enhances code sustainability, modularizes and splits code distribution, and reduces code coupling rate, thereby achieving the purpose of improving efficiency and software quality. At the same time, it realizes cross-reuse of multi-project codes, and the countermeasures are easy to learn from, reducing manpower investment.

[0073] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of rights of the present invention. Therefore, equivalent changes made according to the scope of the patent application of the present invention are still within the scope covered by the present invention.

Claims

1. A code development management method, characterized in that: The steps include: Divide the existing code modules into N code types, including chip bottom layer code, customer service code, project configuration code, transfer requirement code, device driver code and interface code; Constructing a code directory structure for each functional module, wherein the code directory structure includes at least one code type; Build a code development management platform based on the code directory structure of all functional modules; Develop definition functions, structure functions and pointer functions of code modules in each code type under the code directory structure of each functional module in a preset programming language; Construct a sub-management platform for each code project, each sub-management platform of the code project can independently bind the code module under the specified code type, so that the corresponding code module can be independently processed under the sub-management platform of the code project; The code development management method further comprises: Check the programming language of the code modules in each code type under the code directory structure of each functional module; If any code module is not written in the preset programming language, rewrite the current code module in the preset programming language; Establish a project configuration file of the sub-management platform of each code project, wherein the project configuration file can modify the code model in the current code project; Check whether the code model in any code project conflicts with the code model in the public code or other code projects; When a code model in any code project conflicts with a common code or a code model in another code project, the code model in the current code project is redirected to a temporary compilation directory for execution, and the original code content is overwritten with the code model content in the current code project; After calling the nmake tool to read the link file of the code model in the current code project, compile the code model in the current code project; At the same time, temporary compilation directories of code models in different code projects are used to modify the compilation instruction configuration file of nmake to make the code models in different code projects compatible during the compilation process.

2. The code development management method according to claim 1, characterized in that: Further including: According to the requirements of the code project, the Windows PowerShell tool can be used to split and / or customize the corresponding code modules under the sub-management platform of any code project.

3. The code development management method according to claim 1, characterized in that: Further including: Categorize and store existing original factory codes; Create a startup function for each factory code.

4. The code development management method according to claim 1, characterized in that: Further including: Use the compilation configuration script to compile the same code model into multiple versions and / or customized compilations.

5. The code development management method according to claim 1, characterized in that: Further including: Establish customer information database; Configure specific configuration files for each customer and corresponding code project.

6. The code development management method according to claim 1, characterized in that: The preset programming language is C language, C++ language or Linux language.

Citation Information

Patent Citations

  • Data compilation processing method and terminal

    CN108614705A

  • Code compiling method and device for software development project, equipment and storage medium

    CN110569035A