Nothing Special   »   [go: up one dir, main page]

CN115291958B - 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
CN115291958B
CN115291958B CN202211230970.1A CN202211230970A CN115291958B CN 115291958 B CN115291958 B CN 115291958B CN 202211230970 A CN202211230970 A CN 202211230970A CN 115291958 B CN115291958 B CN 115291958B
Authority
CN
China
Prior art keywords
chip
replacement
function
main control
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.)
Active
Application number
CN202211230970.1A
Other languages
Chinese (zh)
Other versions
CN115291958A (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 peripheral chip is replaced, modifying the 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 peripheral 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 chip and the peripheral chip, reduce the code development amount when the peripheral chip or the main control chip 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 peripheral 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, where a device is connected to the peripheral chip, the device includes a main control, and includes:
when the device is determined to replace the original peripheral chip with a replacement chip, acquiring a first main configuration file; the first main configuration file stores a first main control name, an original peripheral chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original peripheral chip;
modifying the name of the original peripheral chip into the name of a replacement chip 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 peripheral chip into a replacement chip corresponding to the first function code; the first function code is a code corresponding to any function on the original peripheral chip;
generating a function configuration table of the replacement chip according to the first function code;
determining a first master control driver corresponding to a first master control according to the first master configuration file;
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 to complete replacement;
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 master configuration file stores an original master control name, a peripheral chip name corresponding to the original master control, a master control mapping relation of a function linking program and a communication mode of the original master control and the peripheral chip corresponding to the original master 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 corresponding to any function on a peripheral chip corresponding to the original master control;
generating a function configuration table of the peripheral chip corresponding to the original master control 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 master control driver to enable the second functional code to write the function configuration table information of the peripheral chip corresponding to the original master control into the peripheral chip corresponding to the original master control through the replacement master control driver, so as to complete replacement.
When the peripheral 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 to complete replacement, when the main control is replaced, the main control mapping relation of the function linking program is modified in the main configuration file, the replacement main control driving program corresponding to the replacement main control is selected, the function codes corresponding to all functions on the peripheral chip corresponding to the original main control call the replacement main control driving to write the function configuration table information into the peripheral chip corresponding to the original main control to complete replacement, the coupling degree between the main control and the peripheral chip can be reduced, the complicated steps and code development amount of the original replacement main control or 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 that the subsequent operation is carried out smoothly.
Further, 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.
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 master control is replaced, the corresponding master control driving program needs to be replaced, some master control driving programs can be stored in the master configuration file, some master control driving programs do not exist, if the replacement master control driving program is not detected in the master configuration file, a programmer needs to input actively to complete subsequent operation, and the master control can be successfully replaced.
Accordingly, a first embodiment of the present invention provides a replacement apparatus for a main control and peripheral chip, where a device is connected to the peripheral chip, the device includes a main control, and includes: 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, a first compiling module, a second acquisition module, a second name modification module, a second relation modification module, a second generation module, a second determination module and a second compiling module;
the first acquisition module is used for acquiring a first main configuration file when the original peripheral chip is determined to be replaced by a replacement chip by the equipment; the first main configuration file stores a first main control name, an original peripheral chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original peripheral chip;
the first name modification module is used for modifying the name of the original peripheral chip into the name of a replacement chip 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 peripheral 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 peripheral 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;
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 master configuration file stores an original master control name, a peripheral chip name corresponding to the original master control, a master control mapping relation of a function linking program and a communication mode of the original master control and the peripheral chip corresponding to the original master 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 a peripheral chip corresponding to the original master control;
the second generating module is used for generating a function configuration table of the peripheral chip corresponding to the original master control according to the 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 code writes the function configuration table information of the peripheral chip corresponding to the original main control into the peripheral chip corresponding to the original main control through the replacement main control driver, and replacement is completed.
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.
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.
When the device is determined to replace the original peripheral chip with the replacement chip, a first main configuration file can be obtained, the chip mapping relation of the function codes is modified in the main configuration file, a main control driving program and the replacement chip are determined, 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 replacement, when the device is determined to replace the original main control with the replacement main control, the main control mapping relation of a function link program is modified in a second main configuration file, the replacement main control driving program corresponding to the replacement main control is selected, and if the replacement main control driving program does not exist, the replacement main control driving program input by an engineer is received, so that the second function codes corresponding to all functions on the peripheral chip corresponding to the original main control call the replacement main control driving program to write the function configuration table information into the peripheral chip corresponding to the original main control, replacement is completed, and the coupling degree between the main control and the chip can be reduced.
Drawings
Fig. 1 is a schematic flowchart illustrating an embodiment of a method for replacing a main control and peripheral chip according to the present invention;
fig. 2 is a schematic flowchart illustrating a method for replacing a main control and peripheral chip according to another embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a method for replacing a host and a peripheral chip according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of an embodiment of a device for replacing a master control chip and a peripheral chip according to the present invention;
FIG. 5 is a schematic diagram of a method for replacing a main control and peripheral chip according to the present invention;
FIG. 6 is another schematic diagram of a method for replacing a host and a peripheral chip according to the present invention;
fig. 7 is another schematic diagram of a method for replacing the main control and peripheral chip 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 is to be understood that the terms used in the present invention are 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 and peripheral chip provided by the present invention, the method includes steps 1001 to 1012, and the steps are specifically as follows:
step 1001: when the device is determined to replace the original peripheral chip with a replacement chip, acquiring a first main configuration file; the first main configuration file stores a first main control name, an original peripheral chip name, a chip mapping relation of a function link program and a communication mode of the first main control and the original peripheral chip.
Step 1002: and modifying the original peripheral chip name into a replacement chip name in the first main configuration file.
Step 1003: 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 peripheral chip into a replacement chip corresponding to the first function code; the first function code is a code corresponding to any function on the original peripheral chip.
Step 1004: and 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 1004 includes step 2001 and step 2002, specifically:
step 2001: extracting a first function according to the first function code;
step 2002: 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.
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 1005: and determining a first main control driving program corresponding to the first main control according to the first main configuration file.
Step 1006: 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 1006 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 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.
Step 1007: when the equipment is determined to replace the original main control with the replacement main control, acquiring a second main configuration file; the second master configuration file stores an original master control name, a peripheral chip name corresponding to the original master control, a master control mapping relation of a function linking program, and a communication mode of the original master control and the peripheral chip corresponding to the original master control.
Step 1008: and modifying the original master name into a replacement master name in the second master configuration file.
Step 1009: 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; and the second function code is a code corresponding to any function on the peripheral chip corresponding to the original master control.
Step 1010: and generating a function configuration table of the peripheral chip corresponding to the original master control according to the second function code.
Step 1011: and determining a replacement main control driving program corresponding to the replacement main control according to the second main configuration file.
In the first embodiment of the present invention, as shown in fig. 3, step 1011 includes step 3001 and step 3002, which are as follows:
step 3001: and detecting whether a replacement main control driving program exists in the second main configuration file or not according to the replacement main control.
Step 3002: 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 1012: and compiling the replacement master control driver to enable the second functional code to write the function configuration table information of the peripheral chip corresponding to the original master control into the peripheral chip corresponding to the original master control through the replacement master control driver, so as to complete replacement.
Correspondingly, as shown in fig. 4, the present invention is a schematic structural diagram of an embodiment of a replacement apparatus for a master control and peripheral chip, where the apparatus includes a first obtaining module 4001, a first name modifying module 4002, a first relationship modifying module 4003, a first generating module 4004, a first determining module 4005, a first compiling module 4006, a second obtaining module 4007, a second name modifying module 4008, a second relationship modifying module 4009, a second generating module 4010, a second determining module 4011, and a second compiling module 4012;
the first obtaining module 4001 is configured to obtain a first master configuration file when it is determined that the original peripheral chip has been replaced with a replacement chip by the device; the first main configuration file stores a first main control name, an original peripheral chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original peripheral chip;
the first name modification module 4002 is configured to modify an original peripheral chip name into a replacement chip name in a first master configuration file;
the first relationship modification module 4003 is configured to modify a chip mapping relationship of a function linking program in a first master configuration file, and modify a function configuration table of an original peripheral chip corresponding to a first function code into a function configuration table of a replacement chip corresponding to the first function code; the first function code is a code corresponding to any function on the original peripheral chip;
the first generating module 4004 is configured to generate a function configuration table of the replacement chip according to the first function code;
the first determining module 4005 is configured to determine, according to the first master configuration file, a first master driver corresponding to a first master;
the first compiling module 4006 is configured to compile a first master driver, so that the first function code writes the function 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 generation module 1004 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 1006 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.
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 second determining module 1011 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. 5, an i2c program of the master 1 corresponds to the chip 1, an 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. 6, when chip 1 is replaced by chip 2, the correspondence between the chip and functions 1 and 2 is changed, so that functions 1 and 2 call i2c program of master 1 to write configuration table of function 1 and configuration table of function 2 into chip 2.
As an example of the first embodiment of the present invention, as shown in fig. 5, an i2c program of the master 1 corresponds to the chip 1, an 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. 7, 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, the first embodiment of the present invention can obtain a first main configuration file when it is determined that the device has replaced the original peripheral chip with the replacement chip, modify the chip mapping relationship of the function codes in the main configuration file, 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, and complete the replacement, and when it is determined that the device has replaced the original main control with the replacement main control, modify the main control mapping relationship of the function linkage program in the second main configuration file, and select the replacement main control driver corresponding to the replacement main control, and if there is no replacement main control driver, receive the replacement main control driver input by the engineer, so that the second function code corresponding to all functions on the chip corresponding to the original main control calls the replacement main control driver to write the function configuration table information into the peripheral chip corresponding to the original main control, and complete the replacement, which can reduce the degree of coupling between the main control and the chip.

Claims (8)

1. A method for replacing a main control chip and a peripheral chip is characterized in that equipment is connected with the peripheral chip, the equipment comprises a main control chip and comprises the following steps:
when the device is determined to replace the original peripheral chip with a replacement chip, acquiring a first main configuration file; the first main configuration file stores a first main control name, an original peripheral chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original peripheral chip;
modifying the name of the original peripheral chip into the name of a replacement chip 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 peripheral chip into a replacement chip corresponding to the first function code; the first function code is a code corresponding to any function on the original peripheral 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 a replacement chip into the replacement chip through the first main control driver program to finish replacement;
when the equipment is determined to replace the original main control with the replacement main control, acquiring a second main configuration file; the second master configuration file stores an original master control name, a peripheral chip name corresponding to the original master control, a master control mapping relation of a function linking program and a communication mode of the original master control and the peripheral chip corresponding to the original master 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 a peripheral chip corresponding to the original master control;
generating a function configuration table of the peripheral chip corresponding to the original master control 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 a replacement main control driver program to enable the second function code to write the function configuration table information of the peripheral chip corresponding to the original main control into the peripheral chip corresponding to the original main control through the replacement main control driver, and finishing replacement.
2. The method for replacing a main control chip and a 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 by combining the first function according to the configuration of the register in the chip manual.
3. The method for replacing a main control and peripheral chip according to claim 1, wherein compiling the first main control 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. The method for replacing a master and peripheral chip according to claim 1, wherein the determining, according to the second master configuration file, a replacement master driver corresponding to a 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.
5. The utility model provides a change device of master control and peripheral chip which characterized in that, equipment and peripheral chip are connected, equipment includes the master control, includes: 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, a first compiling module, a second acquisition module, a second name modification module, a second relation modification module, a second generation module, a second determination module and a second compiling module;
the first acquisition module is used for acquiring a first main configuration file when the original peripheral chip is determined to be replaced by a replacement chip by the equipment; the first main configuration file stores a first main control name, an original peripheral chip name, a chip mapping relation of a function linking program and a communication mode of the first main control and the original peripheral chip;
the first name modification module is used for modifying the name of the original peripheral chip into the name of a replacement chip 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 peripheral 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 peripheral 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 master control driver program so that the first function code writes the function configuration table information of the replacement chip into the replacement chip through the first master control driver program to complete replacement;
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 master configuration file stores an original master control name, a peripheral chip name corresponding to the original master control, a master control mapping relation of a function linking program and a communication mode of the original master control and the peripheral chip corresponding to the original master 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 a peripheral chip corresponding to the original master control;
the second generating module is used for generating a function configuration table of the peripheral chip corresponding to the original master control 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 the replacement master control driving program so that the second functional codes write the function configuration table information of the peripheral chip corresponding to the original master control into the peripheral chip corresponding to the original master control through the replacement master control driving program to complete replacement.
6. The device for replacing a main control and peripheral chip according to claim 5, 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.
7. The device for replacing a host and peripheral chip according to claim 5, 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.
8. The device for replacing a host and peripheral chip according to claim 5, 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 CN115291958A (en) 2022-11-04
CN115291958B true 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 (7)

* 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
CN102438329A (en) * 2011-10-12 2012-05-02 深圳市路畅科技有限公司 Dialing method of vehicle-mounted navigator device supporting multimode 3G network
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 广东小天才科技有限公司 Program debugging method and device
CN110709816A (en) * 2017-06-03 2020-01-17 苹果公司 Integrating learning models into software development systems

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009037731A1 (en) * 2007-09-21 2009-03-26 Fujitsu Limited Translating device, translating method and translating program, and processor core control method and processor
CN101625644B (en) * 2009-08-04 2013-06-26 大唐微电子技术有限公司 Flash memory chip operation method, in-circuit emulator and flash memory chip operation system
US9063730B2 (en) * 2010-12-20 2015-06-23 Intel Corporation Performing variation-aware profiling and dynamic core allocation for a many-core processor
US8924986B2 (en) * 2011-09-01 2014-12-30 American Megatrends, Inc. Methods, devices and computer program products for confluence of multiple operating systems
CN103823664B (en) * 2012-11-19 2017-12-15 中兴通讯股份有限公司 A kind of design method of binary system unification Boot programs and kernel program
CN104850015B (en) * 2014-09-09 2018-02-23 北汽福田汽车股份有限公司 A kind of software packaging method and a kind of automobile electronic controller
CN104503792A (en) * 2014-12-22 2015-04-08 山东超越数控电子有限公司 Method for realizing equipment management function in VxWorks
GB2546343A (en) * 2016-01-15 2017-07-19 Stmicroelectronics (Grenoble2) Sas Apparatus and methods implementing dispatch mechanisms for offloading executable functions
KR20180072389A (en) * 2016-12-21 2018-06-29 삼성전자주식회사 Method for providing content corresponding to an accessory and electronic device thereof
US11231937B2 (en) * 2017-10-24 2022-01-25 Intel Corporation Autonomous host detection for communication port management
CN111124789B (en) * 2019-11-19 2023-07-14 博流智能科技(南京)有限公司 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 (7)

* 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
CN102438329A (en) * 2011-10-12 2012-05-02 深圳市路畅科技有限公司 Dialing method of vehicle-mounted navigator device supporting multimode 3G network
CN105556402A (en) * 2013-12-09 2016-05-04 帝斯贝思数字信号处理和控制工程有限公司 Method for manipulating a control program of a control device
CN104991872A (en) * 2015-06-19 2015-10-21 上海卓易科技股份有限公司 Method and apparatus for implementing driving of intelligent device on peripheral device
CN106484464A (en) * 2016-09-18 2017-03-08 青岛海信电器股份有限公司 Tuner chip driving method and electronic equipment
CN106547700A (en) * 2016-12-08 2017-03-29 广东小天才科技有限公司 Program debugging method and device
CN110709816A (en) * 2017-06-03 2020-01-17 苹果公司 Integrating learning models into software development systems

Also Published As

Publication number Publication date
CN115291958A (en) 2022-11-04

Similar Documents

Publication Publication Date Title
McUmber et al. A general framework for formalizing UML with formal languages
US5615333A (en) Integration testing method for object-oriented software
CN104407973A (en) Method and device for realizing automatic unit test
CN105117210A (en) WSCN-oriented graphical programming system
US7721250B2 (en) System and method for interactive and integrated software development process and phases
WO2009081267A2 (en) Process for verifying computer codes and corresponding verification system
CN1627254A (en) Method for debuging embedded system and equipment
CN101344857A (en) Apparatus and method for accelerating Java translation
CN115291958B (en) Method and device for replacing main control chip and peripheral chip
CN110069414B (en) Regression testing method and system
JP2024539825A (en) ECU upgrade method, device and readable storage medium
CN103049602B (en) Based on model-driven engineering, AADL assembly is transformed into Interface Automata model method
EP2309386A1 (en) Notation enhancement system, compiler and method
US20120167066A1 (en) Compiler validation via program verification
CN109144849B (en) Embedded software debugging method
CN113806153B (en) Chip verification method
CN108228185B (en) Embedded software modularization generation method and device
CN113742249B (en) Test script granulation method and system based on desktop operating system
US20220198112A1 (en) Method, device, and storage medium for simulating a design
CN111399827B (en) Descriptive object code automatic generation method for sensor data processing
CN111880780B (en) Method, device and platform for developing boot loader of MCU
CN112685095B (en) Virtual device loading method, device, equipment and storage medium
CN104615539A (en) Measurement parameter processing method and system
CN115455877A (en) Verification platform generation device, method, medium and electronic equipment
CN102023870A (en) Detection method and device for software modification as well as electronic equipment

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.