Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Active Publication Date: 2015-01-14
RDA CHONGQING MICROELECTRONICS TECH CO LTD
View PDF6 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] Although method 2 can solve the shortcomings of method 1, modifying the machine code (binary code) of the execution file can easily cause the instability of the execution file, especially where the replaced code segment and / or data segment in the execution file is called. For a long time, the workload of software machine code modification is very large and it is prone to modification omissions or errors

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
  • Methods for implementing code and data replacement by TCM (tightly coupled memory)
  • Methods for implementing code and data replacement by TCM (tightly coupled memory)
  • Methods for implementing code and data replacement by TCM (tightly coupled memory)

Examples

Experimental program
Comparison scheme
Effect test

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...

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

The embodiment of the invention discloses a method for implementing code replacement by a TCM (tightly coupled memory). The method comprises the following steps of loading a first code to an instruction tightly coupled memory (ITCM); configuring the address of the ITCM as a first code address, wherein the first code address is a call address of a first old code segment replaced by a first new code segment corresponding to the first code. The embodiment of the invention also discloses a method for implementing data replacement by the TCM. The method comprises the steps of loading first data to a data tightly coupled memory (DTCM); configuring the address of the DTCM as a first data address. According to the method for implementing code and data replacement, the code and data replacement can be implemented under the condition of not modifying binary coding of executive software, and the probability of generating errors during code and data replacement can be effectively reduced.

Description

technical field [0001] The present invention relates to a code and data replacement method for an embedded system, and in particular to a method for implementing code and data replacement using a tightly coupled memory (Tightly Coupled Memory, TCM) of an embedded system processor. Background technique [0002] With the development of embedded systems, the software functions of embedded systems are becoming more and more complex, and the software codes are becoming larger and larger. In order to reduce the cost of software modification, the software and data of embedded systems usually adopt a modular design method. , to realize various functions by calling other program modules and data modules in the program module. [0003] The execution file running in the embedded system is generally obtained in two steps: compiling the source file into an object file and / or library file; linking the object file and / or library file to obtain an executable file. The execution file is act...

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
IPC IPC(8): G06F9/44
Inventor 陈俊华
Owner RDA CHONGQING MICROELECTRONICS TECH CO LTD