Methods for implementing code and data replacement by TCM (tightly coupled memory)
A data replacement and code technology, applied in the direction of program control devices, etc., can solve the problems of unstable execution files, large workload of software machine code modification, omissions or errors in modification, etc., so as to avoid unstable execution files and easy omissions. and error effects
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
specific Embodiment 1
[0045] This specific embodiment is a preferred implementation of the present invention using TCM to implement code replacement. The code replacement process of this embodiment is as follows figure 2 shown.
[0046] In this embodiment, step 100 needs to be executed first to modify the execution file:
[0047] 100. Add the first new code segment to the execution file;
[0048] The specific adding method may be the method described in the background art or any adding method in the prior art; this embodiment is not limited thereto.
[0049] 101. Enable ITCM;
[0050] 102. Load the first code into the ITCM;
[0051] 103. Configure the address of the ITCM as the first code address.
[0052] The software of an embedded system can usually be divided into a boot program, an operating system, and various functional programs. After the embedded system is powered on, the processor will first load and run the boot program to perform system initialization. After the system initializati...
specific Embodiment 2
[0065] This specific embodiment is a preferred implementation of the present invention using TCM to implement data replacement. The overall process of this embodiment is as follows image 3 shown.
[0066] In this embodiment, firstly, step 200 needs to be performed to modify the execution file:
[0067] 200. Add the first new data segment to the execution file;
[0068] The specific adding method may be the method described in the background art or any adding method in the prior art; this embodiment is not limited thereto.
[0069] 201. Enable DTCM.
[0070] 202. Load the first data into the DTCM;
[0071] 203. Configure the address of the DTCM as the first data address;
[0072] The software of an embedded system can usually be divided into a boot program, an operating system, and various functional programs. After the embedded system is powered on, the processor will first load and run the boot program to perform system initialization. After the system initialization is ...
specific Embodiment 3
[0084] Below, the method of the present invention is further described with a specific code and data replacement process in an embedded system.
[0085] The processor of the embedded system has an ITCM and a DTCM built in. The embedded software system includes the operating system task scheduler Service Management and multiple functional programs Service(i); among them, the functional program Service(2) is provided by a third party, and the program cannot be directly modified.
[0086] Service(2) will call code segments Code1 and Code2 during execution; among them, the calling address of Code1 is address_C1, the calling address of Code2 is address_C2, and Code1 is called before Code2.
[0087] Service(2) will also call the data segments Data1 and Data2 during execution; the calling address of Data1 is address_D1, the calling address of Data2 is address_D2, and Data1 is called before Data2.
[0088] In this embodiment, it is necessary to replace Code1 with the Code1_new code s...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 