Patch generation method, device, electronic device and computer storage medium

A patch and file technology, applied in the computer field, can solve the problems of increased time cost, low work efficiency, poor portability, etc., and achieve the effect of reducing the number

Active Publication Date: 2021-09-21
NANJING ZGMICRO CO LTD
View PDF15 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At the same time, the process of manually making patches not only requires software engineers to maintain the C code, but also maintains the assembly code, and its code, which virtually increases a lot of time costs
It can be seen that while the method of manually generating patches improves the maintainability and scalability of the chip, it also brings about low work efficiency and poor portability.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Patch generation method, device, electronic device and computer storage medium
  • Patch generation method, device, electronic device and computer storage medium
  • Patch generation method, device, electronic device and computer storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0021] Such as figure 2 As shown, this embodiment proposes a patch generation method, the method comprising:

[0022] S101. Receive a patch source code file.

[0023] Specifically, the patch source code file is a source code file generated after modifying the original source code file, and the patch source code file includes one or more modified functions with a single entry.

[0024] When multiple modified functions exchange information, it can be strictly required to be passed in the form of parameters, and it is forbidden to define new global variables that are only used to transfer information in these specific functions. At the same time, when programming the original source code, if the realization of a certain function is still uncertain, a certain empty stub function (StubFunction) can be reserved in the original source code, so that the function can be implemented in the stub function. To increase or modify, to realize the addition or modification of functions.

...

Embodiment 2

[0053] This embodiment proposes a patch generation device, the device includes a processor, and the processor is configured with processor-executable operation instructions, so as to execute each step in the method described in Embodiment 1. The specific working principle is as follows Figure 4 As shown, the processor in the patch generation device described in this embodiment includes:

[0054] The patch assembly code file generation module is used to receive the patch source code file, and compile the patch source code file to generate the patch assembly code file;

[0055] A compiler, configured to compile the patch assembly code file to generate a patch object code file of a single patch channel. In this embodiment, the compiler can select ARMCC or open-source GCC in the Keil tool chain of ARM Company.

[0056] Specifically, the patch source code file is a source code file generated after modifying the original source code file, and the patch source code file includes o...

Embodiment 3

[0081] This embodiment provides an electronic device, the electronic device includes: a display, a memory, one or more processors; and one or more modules, the one or more modules are stored in the memory, and Configured to be executed by the one or more processors, the one or more modules include instructions for executing each step in the method described in Embodiment 1.

[0082] The electronic device in this embodiment can automatically generate patches, making up for the defects of traditional manually generated patches. The patch source code file contains multiple modified functions, so all the modifications are concentrated in one or several functions of a single entry, so as to reduce the number of patch channels. In addition, the patch generation method proposed by the present invention can be used with the ROM version of the embedded chip, so that the latter initially has the chip performance of the on-chip flash memory version, and the cost is increased by less than...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

An embodiment of the present invention provides a method for generating a patch, the method comprising: receiving a patch source code file, wherein the patch source code file is a source code file generated after modifying the original source code file, and the patch The source code file contains one or more modified functions with a single entry; the patch source code file is compiled to generate a patch assembly code file; the patch assembly code file is compiled to generate a patch object code for a single patch channel document. The embodiment of the present invention also provides a patch generation device, electronic equipment and computer program products. The invention can automatically generate patches, which makes up for the defects of traditional manually generated patches.

Description

technical field [0001] The present invention relates to computer technology, in particular to a patch generation method, device, electronic equipment and computer program product. Background technique [0002] Small-scale embedded solutions are usually based on ARM Cortex-M series processors. This type of product, in order to achieve the ultimate cost, prefers to use ROM as the code storage medium, and avoids the use of on-chip flash memory, which is about 30% more expensive. The ROM version of the chip product must burn the code during the production process, and cannot continue to be updated in the subsequent use process; while the chip product of the on-chip flash memory version can erase and write the content of the code multiple times. In the system solution using ROM as the code storage, due to the non-rewritable nature of ROM, once there is a bug in the code, even a small mistake, it will bring irreparable consequences to the entire system, and even make it unusable....

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/658G06F8/41
CPCG06F8/41G06F8/658
Inventor 张亦农邹世彬张超
Owner NANJING ZGMICRO CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products