ROM code patch running method and system
An operating method and operating system technology, which is applied in the computer field and can solve problems such as seldom use and inability to use jump instructions.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 2
[0027] Based on the embodiment 2 of the invention, the burning method of the patch code and the original code.
[0028] When writing ROM codes, first reserve interfaces for various C language functions that may need to be changed, and these interfaces are in the form of function pointers.
[0029] The C language source code is as follows:
[0030]
[0031]
[0032] By setting up the compiler, the Rom.c file is compiled to the physical address where the ROM is located, and the Ram.c file is compiled to the physical address where the RAM is located, thus obtaining two pieces of machine code.
[0033] When there is no need to modify the original function, we set the function pointer ExtPtrVoidFunc[1] to NULL (empty) in the initialization code, and the Rom_Func1 function will execute the code in the ROM to do the addition operation. If the function pointer ExtPtrVoidFunc[1] is set to Ram_Func1, then this module will execute the code in RAM for subtraction. Thus realizing t...
Embodiment 3
[0035] Embodiment 3 based on the invention, a kind of ROM code patch operating system, is used to realize above-mentioned method, comprises: compiler, is used for setting the interface based on the function pointer for the function in the original code; The volatile memory reads the patch code and stores it in RAM, and selects to read the original code or the patch code and run it according to the function pointer of the interface; ROM is used to store the original code; RAM is used to store the obtained code from the non-volatile memory patch code.
[0036] The microprocessor is also used to detect whether there is a non-volatile memory, and read patch data from it if ACK feedback occurs, the patch data includes configuration information and patch code, and the patch code is stored in RAM.
[0037] The configuration information includes a list of function pointers, the number and number of interfaces to be modified.
[0038] The microprocessor is also used to modify the func...
PUM

Abstract
Description
Claims
Application Information

- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com