CN115291958A - Method and device for replacing main control chip and peripheral chip - Google Patents

Method and device for replacing main control chip and peripheral chip Download PDF

Info

Publication number
CN115291958A
CN115291958A CN202211230970.1A CN202211230970A CN115291958A CN 115291958 A CN115291958 A CN 115291958A CN 202211230970 A CN202211230970 A CN 202211230970A CN 115291958 A CN115291958 A CN 115291958A
Authority
CN
China
Prior art keywords
chip
replacement
main control
function
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211230970.1A
Other languages
Chinese (zh)
Other versions
CN115291958B (en
Inventor
梁嘉浩
李青
林弟
张常华
朱正辉
赵定金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Baolun Electronics Co ltd
Original Assignee
Guangzhou Baolun Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Baolun Electronics Co Ltd filed Critical Guangzhou Baolun Electronics Co Ltd
Priority to CN202211230970.1A priority Critical patent/CN115291958B/en
Publication of CN115291958A publication Critical patent/CN115291958A/en
Application granted granted Critical
Publication of CN115291958B publication Critical patent/CN115291958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of chip development and discloses a method and a device for replacing a main control chip and a peripheral chip. When a chip is replaced, modifying a chip mapping relation of a function code in a main configuration file, determining a main control driving program and a replacement chip, calling the main control driving program by the function code to write the function configuration table information of the replacement chip into the replacement chip, and completing replacement; when the master control is replaced, the master control mapping relation of the function link program is modified in the master configuration file, a replacement master control driving program corresponding to the replacement master control is selected, if the replacement master control driving program does not exist, an engineer inputs the replacement master control driving program, and the function codes corresponding to all functions on the chip corresponding to the original master control call the replacement master control driving to write the function configuration table information into the chip corresponding to the original master control, so that the replacement is completed. The method can reduce the coupling degree between the main control and the chip, reduce the code development amount when the chip or the main control is replaced, reduce the development difficulty and save the development time of engineers.

Description

Method and device for replacing main control chip and peripheral chip
Technical Field
The invention relates to the technical field of chip development, in particular to a method and a device for replacing a master control chip and a peripheral chip.
Background
With the development of chip technology, more and more chip application fields are provided, and various industries need to rely on chips as control cores of products to realize intellectualization. However, as the demand for chips increases, the chips are in short supply, and the chips are frequently replaced due to the shortage of chips.
The traditional method for replacing the chip directly calls a master control drive function to drive the chip, that is, the corresponding driver program needs to be rewritten once every time the chip is replaced. When the chip is replaced by the method, a large code amount needs to be changed, and development time of engineers is consumed.
Disclosure of Invention
The invention provides a method and a device for replacing a main control chip and a peripheral chip, which can be used for reducing the coupling degree of software between the chip and the main control chip, thereby reducing the development difficulty when replacing the chip and the main control chip and saving the development time of engineers.
In order to achieve the above object, a first embodiment of the present invention provides a method for replacing a main control chip and a peripheral chip, including:
when the original chip is determined to be replaced by the replacement chip, acquiring a first main configuration file; the first main configuration file stores a first main control name, an original chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original chip;
modifying the original chip name into a replacement chip name in a first main configuration file;
modifying the chip mapping relation of the function linking program in the first main configuration file, and modifying the first function code corresponding to the original chip into a first function code corresponding to the replacement chip; the first function code is a code corresponding to any function on the original chip;
generating a function configuration table of the replacement chip according to the first function code;
determining a first main control driving program corresponding to a first main control according to the first main configuration file;
and compiling a first master control driver program to enable the first function code to write the function configuration table information of the replacement chip into the replacement chip through the first master control driver program, so as to complete replacement.
When the chip is replaced, the chip mapping relation of the function codes is modified in the main configuration file, the main control driving program and the replacement chip are determined, so that the function codes call the main control driving program to write the function configuration table information of the replacement chip into the replacement chip, the replacement is completed, the coupling degree between the main control and the chip can be reduced, the tedious steps and code development amount of the conventional replacement chip are saved, and the development time of an engineer is saved.
Further, the generating a function configuration table of the replacement chip according to the first function code specifically includes:
extracting a first function according to the first function code;
and generating a function configuration table of the replacement chip according to the configuration of the register in the chip manual and the first function. The method for generating the function configuration table of the replacement chip acquires the corresponding first function according to the first function code, and generates the function configuration table of the replacement chip by checking the configuration of the register in the chip manual and combining the first function. The method can quickly and conveniently generate the function configuration table of the replacement chip and ensure the smooth operation of the subsequent operation.
Further, the compiling the first master driver specifically includes:
after the main configuration file is modified, when the first main control driver is compiled, the macro definition of the replacement chip is opened, and the macro definitions of other chips which do not need to be modified are closed, so that the other chips which do not need to be modified are not compiled.
In the compiling process, only the modified macro definition of the replacement chip is opened, and simultaneously the macro definitions of other chips which do not need to be changed are closed, so that the other chips which do not need to be changed are not compiled, and the other chips can be ensured not to be influenced in the chip replacing process.
Accordingly, a first embodiment of the present invention provides a device for replacing a main control and peripheral chip, including: the system comprises a first acquisition module, a first name modification module, a first relation modification module, a first generation module, a first determination module and a first compiling module;
the first acquisition module is used for acquiring a first main configuration file when the original chip is determined to be replaced by the replacement chip by the equipment; the first main configuration file stores a first main control name, an original chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original chip;
the first name modification module is used for modifying the original chip name into a replacement chip name in a first main configuration file;
the first relation modification module is used for modifying the chip mapping relation of the function linking program in the first main configuration file and modifying the function configuration table of the original chip corresponding to the first function code into the function configuration table of the replacement chip corresponding to the first function code; wherein, the first function code is any function code on the original chip;
the first generation module is used for generating a function configuration table of the replacement chip according to the first function code;
the first determining module is used for determining a first main control driving program corresponding to a first main control according to the first main configuration file;
the first compiling module is used for compiling a first main control driving program so that the first functional code writes the functional configuration table information of the replacement chip into the replacement chip through the first main control driving program to complete replacement.
Further, the first generating module includes: an extraction unit and a generation unit;
the extracting unit is used for extracting a first function according to the first function code;
the generating unit is used for generating a function configuration table of the replacement chip by combining the first function according to the configuration of the register in the chip manual.
Further, the first obtaining compiling module includes: a closing unit;
the closing unit is used for opening the macro definition of the replacement chip and closing the macro definitions of other chips which do not need to be changed when the first master control driver is compiled after the main configuration file is modified, so that the other chips which do not need to be changed are not compiled.
When the device is determined to replace the original chip with the replacement chip, the first embodiment of the invention can acquire the first main configuration file, modify the chip mapping relation of the function codes in the main configuration file, and determine the main control driving program and the replacement chip, so that the first function codes call the first main control driving program to write the function configuration table information of the replacement chip into the replacement chip, and complete the replacement.
A second embodiment of the present invention provides a method for a main control chip and a peripheral chip, including:
when the device is determined to replace the original main control with the replacement main control, a second main configuration file is obtained; the second main configuration file stores an original main control name, a name of a chip corresponding to the original main control, a main control mapping relation of a function linking program and a communication mode of the original main control and the chip corresponding to the original main control;
modifying the original master control name into a replacement master control name in a second master configuration file;
modifying the main control mapping relation of the function linking program in a second main configuration file, and modifying the second function code corresponding to the original main control into a second function code corresponding to the replacement main control; the second function code is a code of any function on the chip corresponding to the original master control;
generating a function configuration table of the original main control corresponding chip according to the second function code;
determining a replacement main control driving program corresponding to the replacement main control according to the second main configuration file;
and compiling the replacement main control driver program to enable the second functional code to write the functional configuration table information of the original main control corresponding chip into the original main control corresponding chip through the replacement main control driver so as to finish replacement.
When the master control is replaced, the master control mapping relation of the function linking program is modified in the master configuration file, the replacement master control driving program corresponding to the replacement master control is selected, the function codes corresponding to all functions on the chip corresponding to the original master control call the replacement master control driving to write the function configuration table information into the chip corresponding to the original master control, the replacement is completed, the coupling degree between the master control and the chip can be reduced, the code development amount during the replacement of the master control is saved, and the development time of engineers is saved.
Further, the determining, according to the second master configuration file, a replacement master driver corresponding to the replacement master specifically includes:
detecting whether a replacement main control driving program exists in a second main configuration file according to the replacement main control;
and if the second main configuration file detects that the replacement main control driving program does not exist, receiving an externally input replacement main control driving program.
When the main control is replaced, the corresponding main control driving program needs to be replaced, some main control driving programs can be stored in the main configuration file, some main control driving programs do not exist, if the main configuration file does not detect the replacement of the main control driving program, a programmer needs to actively input to complete subsequent operation, and the replacement of the main control can be successfully completed.
Accordingly, a second embodiment of the present invention provides a device for replacing a main control chip and a peripheral chip, including: the second obtaining module, the second name modifying module, the second relation modifying module, the second generating module, the second determining module and the second compiling module;
the second obtaining module is used for obtaining a second main configuration file when the equipment is determined to replace the original main control with the replacement main control; the second main configuration file stores an original main control name, a name of a chip corresponding to the original main control, a main control mapping relation of a function linking program and a communication mode of the original main control and the chip corresponding to the original main control;
the second name modification module is used for modifying the original master control name into a replacement master control name in a second master configuration file;
the second relation modification module is used for modifying the master control mapping relation of the function linking program in a second master configuration file and modifying the second function code corresponding to the original master control into a second function code corresponding to the replacement master control; the second function is a code corresponding to any function on the chip corresponding to the original master control;
the second generating module is used for generating a function configuration table of the original main control corresponding chip according to a second function code;
the second determining module is used for determining a replacement main control driving program corresponding to the replacement main control according to the second main configuration file;
the second compiling module is used for compiling a replacement main control driver program so that the second functional codes write the functional configuration table information of the original main control corresponding chip into the original main control corresponding chip through the replacement main control driver to complete replacement.
Further, the second determining module includes: a detection unit and a receiving unit;
the detection unit is used for detecting whether a replacement main control driver exists in the second main configuration file according to the replacement main control;
the receiving unit is used for receiving an externally input replacement main control driving program if the second main configuration file detects that the replacement main control driving program does not exist.
In the second embodiment of the present invention, when it is determined that the device has replaced the original master control with the replacement master control, the master control mapping relationship of the function link program is modified in the second master configuration file, the replacement master control driver corresponding to the replacement master control is selected, and if there is no replacement master control driver, the replacement master control driver input by the engineer is received, so that the second function codes corresponding to all functions on the chip corresponding to the original master control call the replacement master control driver to write the function configuration table information into the chip corresponding to the original master control, thereby completing the replacement.
Drawings
FIG. 1 is a schematic flow chart illustrating a chip replacement method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating a chip replacement method according to another embodiment of the present invention;
fig. 3 is a schematic flowchart of an embodiment of a master replacement method according to the present invention;
fig. 4 is a schematic flowchart of another embodiment of a master replacement method according to the present invention;
fig. 5 is a schematic structural diagram of an embodiment of a method for replacing a main control and peripheral chip according to the present invention;
fig. 6 is a schematic structural diagram of another embodiment of a method for replacing a main control and peripheral chip according to the present invention;
FIG. 7 is a schematic diagram of a chip replacement method according to the present invention;
FIG. 8 is another schematic diagram of a chip replacement method according to the present invention;
fig. 9 is a further schematic diagram of a master control replacement method according to the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
In describing the present invention, it should be understood that the terminology used in the present invention is as follows:
"master profile": the main control, the chip and the communication mode are used, and the files are selected to be compiled or not compiled.
"function linking function": a configuration table indicating which driver to use to call the register of which chip.
Example 1
As shown in fig. 1, which is a schematic flow chart of an embodiment of a method for replacing a master control chip and a peripheral chip provided by the present invention, the method includes steps 101 to 106, and each step specifically includes the following steps:
step 101: when the device is determined to replace the original chip with a replacement chip, acquiring a first main configuration file; the first main configuration file stores a first main control name, an original chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original chip.
Step 102: the original chip name is modified to a replacement chip name in the first master configuration file.
Step 103: modifying the chip mapping relation of the function linking program in the first main configuration file, and modifying the first function code corresponding to the original chip into a first function code corresponding to a replacement chip; the first function code is a code corresponding to any function on the original chip.
Step 104: generating a function configuration table of the replacement chip according to the first function code;
in the first embodiment of the present invention, as shown in fig. 2, step 104 includes step 201 and step 202, specifically:
step 201: extracting a first function according to the first function code;
step 202: and generating a function configuration table of the replacement chip by combining the first function according to the configuration of the register in the chip manual.
In the first embodiment of the present invention, generating the function configuration table of the replacement chip requires an engineer to know the functions implemented by the function codes, then look up a chip manual to obtain the configurations of a series of registers, and fill the configurations of the registers in the function configuration table according to the implemented functions, thereby completing the function configuration table of the replacement chip. The contents of the function configuration table are a series of register-register values.
Step 105: determining a first main control driving program corresponding to a first main control according to the first main configuration file;
step 106: compiling a first main control driver program to enable the first function code to write the function configuration table information of the replacement chip into the replacement chip through the first main control driver program, and completing replacement.
In the first embodiment of the present invention, the compiling the first master driver in step 106 specifically includes:
after the main configuration file is modified, when the first main control driver is compiled, the macro definition of the replacement chip is opened, and the macro definitions of other chips which do not need to be changed are closed, so that the other chips which do not need to be changed are not compiled.
In the first embodiment of the present invention, the compiler of the present invention defines macro definitions of various chips, and when the macro definitions are closed, the code of the chip is not compiled, so that after the first main configuration file is modified, only the macro definition of the selected replacement chip is opened, and the macro definitions of other chips that do not need to be modified are closed, so that other chips that do not need to be modified are not compiled.
Correspondingly, as shown in fig. 5, the structural diagram of an embodiment of the replacement apparatus for a main control chip and a peripheral chip provided in the present invention is shown, where the apparatus includes a first obtaining module 501, a first name modifying module 502, a first relation modifying module 503, a first generating module 504, a first determining module 505, and a first compiling module 506;
the first obtaining module 501 is configured to obtain a first main configuration file when it is determined that the device has replaced the original chip with a replacement chip; the first main configuration file stores a first main control name, an original chip name, a chip mapping relation of a function link program and a communication mode of the first main control and the original chip;
the first name modification module 502 is configured to modify an original chip name into a replacement chip name in a first main configuration file;
the first relationship modification module 503 is configured to modify a chip mapping relationship of the function linking program in the first main configuration file, and modify a function configuration table of the original chip corresponding to the first function code into a function configuration table of the replacement chip corresponding to the first function code; the first function code is a code corresponding to any function on the original chip;
the first generating module 504 is configured to generate a function configuration table of the replacement chip according to the first function code;
the first determining module 505 is configured to determine, according to the first master configuration file, a first master driver corresponding to a first master;
the first compiling module 506 is configured to compile a first master driver, so that the first functional code writes the functional configuration table information of the replacement chip into the replacement chip through the first master driver, and completes replacement.
In the first embodiment of the present invention, the first obtaining module 501 includes a closing unit;
the closing unit is used for closing the macro definitions of the other chips which do not need to be changed before the first main configuration file is modified, so that the other chips which do not need to be changed are not compiled.
In the first embodiment of the present invention, makefile can be simply regarded as a compiling rule of a project file, and describes rules such as compiling and linking of the whole project. The files are compiled, the files do not need to be compiled, the files need to be compiled first, the files need to be compiled later, the files need to be rebuilt and the like. Compiling the whole project needs to be involved, and the compiling can be described in Makefile. The invention was constructed using Makefile.
In the first embodiment of the present invention, the first generating module 504 includes: an extraction unit and a generation unit;
the extracting unit is used for extracting a first function according to the first function code;
the generating unit is used for generating a function configuration table of the replacement chip by combining the first function according to the configuration of the register in the chip manual.
In the first embodiment of the present invention, the first compiling module 506 includes: a closing unit;
the closing unit is used for opening the macro definition of the replacement chip and closing the macro definitions of other chips which do not need to be changed when the first master control driver is compiled after the main configuration file is modified, so that the other chips which do not need to be changed are not compiled.
As an example of the first embodiment of the present invention, as shown in fig. 7, the i2c program of the master 1 corresponds to the chip 1, the spi program of the master 1 corresponds to the chip 3 and the chip 4, and the function 1 and the function 2 can call the i2c program of the master 1 to write the function 1 configuration table and the function 2 configuration table into the chip 1. As shown in fig. 8, when chip 1 is replaced with chip 2, the correspondence between the chip and function 1 and function 2 is changed, so that function 1 and function 2 call the i2c program of master control 1 to write the function 1 configuration table and function 2 configuration table into chip 2.
To sum up, when it is determined that the original chip has been replaced by the replacement chip by the device, the first embodiment of the present invention can obtain the first main configuration file, modify the chip mapping relationship of the function codes in the main configuration file, and determine the main control driver and the replacement chip, so that the first function code calls the first main control driver to write the function configuration table information of the replacement chip into the replacement chip, thereby completing the replacement.
Example 2
As shown in fig. 3, which is a schematic flow chart of another embodiment of the method for replacing a main control chip and a peripheral chip provided by the present invention, the method includes steps 301 to 306, and the steps specifically include:
step 301: when the device is determined to replace the original master control with the replacement master control, acquiring a second master configuration file; the second main configuration file stores an original main control name, a name of a chip corresponding to the original main control, a main control mapping relation of a function linking program and a communication mode of the original main control and the chip corresponding to the original main control;
step 302: modifying the original master control name into a replacement master control name in a second master configuration file;
step 303: modifying the main control mapping relation of the function linking program in a second main configuration file, and modifying the second function code corresponding to the original main control into a second function code corresponding to the replacement main control; the second function code is a code corresponding to any function on the original main control corresponding chip;
step 304: generating a function configuration table of the original main control corresponding chip according to the second function code;
step 305: determining a replacement main control driving program corresponding to a replacement main control according to the second main configuration file;
in the second embodiment of the present invention, as shown in fig. 4, step 305 includes step 401 and step 402, which are specifically as follows:
step 401: detecting whether a replacement main control driving program exists in a second main configuration file according to the replacement main control;
step 402: and if the second main configuration file detects that the replacement main control driving program does not exist, receiving an externally input replacement main control driving program.
Step 306: and compiling the replacement main control driver program to enable the second functional code to write the functional configuration table information of the original main control corresponding chip into the original main control corresponding chip through the replacement main control driver so as to finish replacement.
Correspondingly, as shown in fig. 6, the structural schematic diagram of an embodiment of the replacement apparatus for a main control chip and a peripheral chip provided by the present invention is shown, the apparatus includes a second obtaining module 601, a second name modifying module 602, a second relation modifying module 603, a second generating module 604, a second determining module 605, and a second compiling module 606;
the second obtaining module 601 is configured to obtain a second master configuration file when it is determined that the device has replaced the original master control with the replacement master control; the second main configuration file stores an original main control name, a name of a chip corresponding to the original main control, a main control mapping relation of a function linking program and a communication mode of the original main control and the chip corresponding to the original main control;
the second name modification module 602 is configured to modify the original master name into a replacement master name in a second master configuration file;
the second relationship modification module 603 is configured to modify the master control mapping relationship of the function linkage program in a second master configuration file, and modify the second function code corresponding to the original master control into a second function code corresponding to the replacement master control; the second function code is a code corresponding to any function on the original main control corresponding chip;
the second generating module 604 is configured to generate a function configuration table of the original master control corresponding chip according to the second function code
The second determining module 605 is configured to determine a replacement main control driver corresponding to the replacement main control according to the second main configuration file;
the second compiling module 606 is configured to compile a replacement main control driver, so that the second functional code writes the functional configuration table information of the original main control corresponding chip into the original main control corresponding chip through the replacement main control driver, and completes replacement.
In the second embodiment of the present invention, the second determining module 605 includes: the detection unit and the receiving unit are specifically:
the detection unit is used for detecting whether a replacement main control driver exists in the second main configuration file according to the replacement main control;
the receiving unit is used for receiving an externally input replacement main control driving program if the second main configuration file detects that the replacement main control driving program does not exist.
As an example of the first embodiment of the present invention, as shown in fig. 7, the i2c program of the master 1 corresponds to the chip 1, the spi program of the master 1 corresponds to the chip 3 and the chip 4, and the function 1 and the function 2 can call the i2c program of the master 1 to write the function 1 configuration table and the function 2 configuration table into the chip 1. As shown in fig. 9, when the master 1 is replaced with the master 2, the correspondence between the master and the functions 1 and 2 is changed, so that the functions 1 and 2 call the i2c program of the master 2 to write the function 1 configuration table and the function 2 configuration table into the chip 1.
To sum up, when it is determined that the device has replaced the original master control with the replacement master control, the second embodiment of the present invention modifies the master control mapping relationship of the function linkage program in the second master configuration file, selects the replacement master control driver corresponding to the replacement master control, and receives the replacement master control driver input by the engineer if there is no replacement master control driver, so that the second function codes corresponding to all functions on the chip corresponding to the original master control call the replacement master control driver to write the function configuration table information into the chip corresponding to the original master control, thereby completing the replacement.

Claims (10)

1. A method for replacing a master control chip and a peripheral chip is characterized by comprising the following steps:
when the original chip is determined to be replaced by the replacement chip, acquiring a first main configuration file; the first main configuration file stores a first main control name, an original chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original chip;
modifying the original chip name into a replacement chip name in a first main configuration file;
modifying the chip mapping relation of the function linking program in the first main configuration file, and modifying the first function code corresponding to the original chip into a first function code corresponding to a replacement chip; the first function code is a code corresponding to any function on the original chip;
generating a function configuration table of the replacement chip according to the first function code;
determining a first main control driving program corresponding to a first main control according to the first main configuration file;
compiling a first main control driver program to enable the first function code to write the function configuration table information of the replacement chip into the replacement chip through the first main control driver program, and completing replacement.
2. The method for replacing a main control and peripheral chip according to claim 1, wherein the generating a function configuration table of the replacement chip according to the first function code specifically includes:
extracting a first function according to the first function code;
and generating a function configuration table of the replacement chip according to the configuration of the register in the chip manual and the first function.
3. The method for replacing a host and peripheral chip according to claim 1, wherein the compiling the first host driver specifically comprises:
after the main configuration file is modified, when the first main control driver is compiled, the macro definition of the replacement chip is opened, and the macro definitions of other chips which do not need to be modified are closed, so that the other chips which do not need to be modified are not compiled.
4. A method for replacing a main control chip and a peripheral chip is characterized by comprising the following steps:
when the device is determined to replace the original main control with the replacement main control, a second main configuration file is obtained; the second main configuration file stores an original main control name, a name of a chip corresponding to the original main control, a main control mapping relation of a function linking program and a communication mode of the original main control and the chip corresponding to the original main control;
modifying the original master control name into a replacement master control name in a second master configuration file;
modifying the master control mapping relation of the function linking program in a second master configuration file, and modifying the second function code corresponding to the original master control into a second function code corresponding to the replacement master control; the second function code is a code corresponding to any function on the original main control corresponding chip;
generating a function configuration table of the original main control corresponding chip according to the second function code;
determining a replacement main control driving program corresponding to a replacement main control according to the second main configuration file;
and compiling the replacement main control driver program to enable the second functional code to write the functional configuration table information of the original main control corresponding chip into the original main control corresponding chip through the replacement main control driver so as to finish replacement.
5. The method for replacing a main control and peripheral chip according to claim 4, wherein the determining, according to the second main configuration file, a replacement main control driver corresponding to a replacement main control specifically includes:
detecting whether a replacement main control driving program exists in a second main configuration file according to the replacement main control;
and if the second main configuration file detects that the replacement main control driving program does not exist, receiving an externally input replacement main control driving program.
6. A master control and peripheral chip replacement device, comprising: the system comprises a first acquisition module, a first name modification module, a first relation modification module, a first generation module, a first determination module and a first compiling module;
the first acquisition module is used for acquiring a first main configuration file when the original chip is determined to be replaced by the replacement chip; the first main configuration file stores a first main control name, an original chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original chip;
the first name modification module is used for modifying the original chip name into a replacement chip name in a first main configuration file;
the first relation modification module is used for modifying the chip mapping relation of the function linking program in the first main configuration file and modifying the function configuration table of the original chip corresponding to the first function code into the function configuration table of the replacement chip corresponding to the first function code; the first function code is a code corresponding to any function on the original chip;
the first generation module is used for generating a function configuration table of the replacement chip according to the first function code;
the first determining module is used for determining a first main control driving program corresponding to a first main control according to the first main configuration file;
the first compiling module is used for compiling a first main control driving program so that the first functional code writes the functional configuration table information of the replacement chip into the replacement chip through the first main control driving program to complete replacement.
7. The device for replacing a host and peripheral chip according to claim 6, wherein the first generating module comprises: an extraction unit and a generation unit;
the extracting unit is used for extracting a first function according to the first function code;
the generating unit is used for generating a function configuration table of the replacement chip by combining the first function according to the configuration of the register in the chip manual.
8. The apparatus for replacing a host and peripheral chip according to claim 6, wherein the first compiling module comprises: a closing unit;
the closing unit is used for opening the macro definition of the replacement chip and closing the macro definitions of other chips which do not need to be changed when the first master control driver is compiled after the main configuration file is modified, so that the other chips which do not need to be changed are not compiled.
9. A master control and peripheral chip's change device which characterized in that includes: the second obtaining module, the second name modifying module, the second relation modifying module, the second generating module, the second determining module and the second compiling module;
the second obtaining module is used for obtaining a second main configuration file when the equipment is determined to replace the original main control with the replacement main control; the second main configuration file stores an original main control name, a name of a chip corresponding to the original main control, a main control mapping relation of a function linking program and a communication mode of the original main control and the chip corresponding to the original main control;
the second name modification module is used for modifying the original master control name into a replacement master control name in a second master configuration file;
the second relation modification module is used for modifying the master control mapping relation of the function linking program in a second master configuration file and modifying the second function code corresponding to the original master control into a second function code corresponding to the replacement master control; the second function code is a code corresponding to any function on the original main control corresponding chip;
the second generating module is used for generating a function configuration table of the original main control corresponding chip according to the second function code;
the second determining module is used for determining a replacement main control driving program corresponding to a replacement main control according to the second main configuration file;
the second compiling module is used for compiling a replacement main control driver program so that the second functional codes write the functional configuration table information of the original main control corresponding chip into the original main control corresponding chip through the replacement main control driver to complete replacement.
10. The apparatus for replacing a host and peripheral chip according to claim 9, wherein the second determining module comprises: a detection unit and a receiving unit;
the detection unit is used for detecting whether a replacement main control driving program exists in the second main configuration file according to the replacement main control;
the receiving unit is used for receiving an externally input replacement main control driving program if the second main configuration file detects that the replacement main control driving program does not exist.
CN202211230970.1A 2022-10-10 2022-10-10 Method and device for replacing main control chip and peripheral chip Active CN115291958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211230970.1A CN115291958B (en) 2022-10-10 2022-10-10 Method and device for replacing main control chip and peripheral chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211230970.1A CN115291958B (en) 2022-10-10 2022-10-10 Method and device for replacing main control chip and peripheral chip

Publications (2)

Publication Number Publication Date
CN115291958A true CN115291958A (en) 2022-11-04
CN115291958B CN115291958B (en) 2022-12-27

Family

ID=83819303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211230970.1A Active CN115291958B (en) 2022-10-10 2022-10-10 Method and device for replacing main control chip and peripheral chip

Country Status (1)

Country Link
CN (1) CN115291958B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183310A (en) * 2007-12-13 2008-05-21 华为技术有限公司 Method for establishing apparatus drive, driving apparatus of equipment and board
CN101625644A (en) * 2009-08-04 2010-01-13 大唐微电子技术有限公司 Flash memory chip operation method, in-circuit emulator and flash memory chip operation system
US20100235611A1 (en) * 2007-09-21 2010-09-16 Fujitsu Limited Compiler, compile method, and processor core control method and processor
CN102438329A (en) * 2011-10-12 2012-05-02 深圳市路畅科技有限公司 Dialing method of vehicle-mounted navigation device supporting multimode 3G (the 3rd generation) network
US20120159496A1 (en) * 2010-12-20 2012-06-21 Saurabh Dighe Performing Variation-Aware Profiling And Dynamic Core Allocation For A Many-Core Processor
US20130061250A1 (en) * 2011-09-01 2013-03-07 Govind Kothandapani Methods, Devices and Computer Program Products for Confluence of Multiple Operating Systems
CN103823664A (en) * 2012-11-19 2014-05-28 中兴通讯股份有限公司 Design method for binary system unified Boot programs and kernel programs
CN104503792A (en) * 2014-12-22 2015-04-08 山东超越数控电子有限公司 Method for realizing equipment management function in VxWorks
CN104850015A (en) * 2014-09-09 2015-08-19 北汽福田汽车股份有限公司 Software packaging method and automobile electronic controller
CN104991872A (en) * 2015-06-19 2015-10-21 上海卓易科技股份有限公司 Method and apparatus for implementing driving of intelligent device on peripheral device
CN105556402A (en) * 2013-12-09 2016-05-04 帝斯贝思数字信号处理和控制工程有限公司 Method for manipulating a control program of a control device
CN106484464A (en) * 2016-09-18 2017-03-08 青岛海信电器股份有限公司 Tuner chip driving method and electronic equipment
CN106547700A (en) * 2016-12-08 2017-03-29 广东小天才科技有限公司 A kind of method and device of program debugging
US20170206169A1 (en) * 2016-01-15 2017-07-20 Stmicroelectronics (Grenoble 2) Sas Apparatus and methods implementing dispatch mechanisms for offloading executable functions
US20180176748A1 (en) * 2016-12-21 2018-06-21 Samsung Electronics Co., Ltd. Method for providing content corresponding to accessory and electronic device thereof
US20190121647A1 (en) * 2017-10-24 2019-04-25 Intel Corporation Autonomous host detection
CN110709816A (en) * 2017-06-03 2020-01-17 苹果公司 Integrating learning models into software development systems
CN111124789A (en) * 2019-11-19 2020-05-08 博流智能科技(南京)有限公司 Chip simulation debugging system and debugging method
CN112631669A (en) * 2020-12-30 2021-04-09 北京天融信网络安全技术有限公司 Method, device, computer equipment and medium for starting embedded system

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100235611A1 (en) * 2007-09-21 2010-09-16 Fujitsu Limited Compiler, compile method, and processor core control method and processor
CN101183310A (en) * 2007-12-13 2008-05-21 华为技术有限公司 Method for establishing apparatus drive, driving apparatus of equipment and board
CN101625644A (en) * 2009-08-04 2010-01-13 大唐微电子技术有限公司 Flash memory chip operation method, in-circuit emulator and flash memory chip operation system
US20120159496A1 (en) * 2010-12-20 2012-06-21 Saurabh Dighe Performing Variation-Aware Profiling And Dynamic Core Allocation For A Many-Core Processor
US20130061250A1 (en) * 2011-09-01 2013-03-07 Govind Kothandapani Methods, Devices and Computer Program Products for Confluence of Multiple Operating Systems
CN102438329A (en) * 2011-10-12 2012-05-02 深圳市路畅科技有限公司 Dialing method of vehicle-mounted navigation device supporting multimode 3G (the 3rd generation) network
CN103823664A (en) * 2012-11-19 2014-05-28 中兴通讯股份有限公司 Design method for binary system unified Boot programs and kernel programs
CN105556402A (en) * 2013-12-09 2016-05-04 帝斯贝思数字信号处理和控制工程有限公司 Method for manipulating a control program of a control device
CN104850015A (en) * 2014-09-09 2015-08-19 北汽福田汽车股份有限公司 Software packaging method and automobile electronic controller
CN104503792A (en) * 2014-12-22 2015-04-08 山东超越数控电子有限公司 Method for realizing equipment management function in VxWorks
CN104991872A (en) * 2015-06-19 2015-10-21 上海卓易科技股份有限公司 Method and apparatus for implementing driving of intelligent device on peripheral device
US20170206169A1 (en) * 2016-01-15 2017-07-20 Stmicroelectronics (Grenoble 2) Sas Apparatus and methods implementing dispatch mechanisms for offloading executable functions
CN106484464A (en) * 2016-09-18 2017-03-08 青岛海信电器股份有限公司 Tuner chip driving method and electronic equipment
CN106547700A (en) * 2016-12-08 2017-03-29 广东小天才科技有限公司 A kind of method and device of program debugging
US20180176748A1 (en) * 2016-12-21 2018-06-21 Samsung Electronics Co., Ltd. Method for providing content corresponding to accessory and electronic device thereof
CN110709816A (en) * 2017-06-03 2020-01-17 苹果公司 Integrating learning models into software development systems
US20190121647A1 (en) * 2017-10-24 2019-04-25 Intel Corporation Autonomous host detection
CN111124789A (en) * 2019-11-19 2020-05-08 博流智能科技(南京)有限公司 Chip simulation debugging system and debugging method
CN112631669A (en) * 2020-12-30 2021-04-09 北京天融信网络安全技术有限公司 Method, device, computer equipment and medium for starting embedded system

Also Published As

Publication number Publication date
CN115291958B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
CN104407973A (en) Automatic unit test realizing method and device
CN102279789B (en) Debugging system and debugging method for embedded system of production phase
US20110126179A1 (en) Method and System for Dynamic Patching Software Using Source Code
US7721250B2 (en) System and method for interactive and integrated software development process and phases
CN113050938A (en) Visual software development system, method, device and computer storage medium
JPH0748182B2 (en) Program error detection method
CN115167831A (en) Software integration method and device based on AUTOSAR and use method
CN110069414B (en) Regression testing method and system
CN111352842A (en) Embedded software debugging method
US20030110468A1 (en) Program code generator and program
CN115291958B (en) Method and device for replacing main control chip and peripheral chip
CN116090376B (en) Chip integrated verification component development method and device and computer equipment
US8843908B2 (en) Compiler validation via program verification
JP4009517B2 (en) Program development support apparatus and compiling method
CN109144849B (en) Embedded software debugging method
EP2309386A1 (en) Notation enhancement system, compiler and method
US11651130B2 (en) Method, device, and storage medium for simulating a design
CN111880780B (en) Method, device and platform for developing boot loader of MCU
CN103605546A (en) Software version detecting method and device
EP0801348A1 (en) Method of monitoring the operation of a computer
JPH06236295A (en) Program transplant supporting system
CN112269740A (en) Automatic testing method and device for automatic driving software
CN111399827A (en) Descriptive object code automatic generation method for sensor data processing
CN112685095B (en) Virtual device loading method, device, equipment and storage medium
Jüttner et al. Integrating and testing of object-oriented software

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: No. 56 Nanli East Road, Shiqi Town, Panyu District, Guangzhou City, Guangdong Province, 510000

Patentee after: Guangdong Baolun Electronics Co.,Ltd.

Address before: No.19 Chuangyuan Road, Zhongcun street, Panyu District, Guangzhou, Guangdong 510000

Patentee before: GUANGZHOU ITC ELECTRONIC TECHNOLOGY Co.,Ltd.