A method, system, medium and device for remote debugging based on power line

By implementing remote debugging on the power lines of the slave chip and host controller, debugging problems in complex and harsh environments are solved, and efficient and reliable remote debugging and fault state maintenance are achieved.

CN115933490BActive Publication Date: 2025-02-11JACHIP SEMICONDUCTOR (SHENZHEN) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211683095.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-27
Publication Date
2025-02-11
Estimated Expiration
2042-12-27

AI Technical Summary

Technical Problem

In complex and harsh on-site environments, debuggers are difficult to reach, and the fault status of slave detection equipment cannot be maintained after being removed, resulting in increased difficulty in finding and debugging problems.

Method used

Design a remote debugging method based on power cords, which can be debugged by the ICP debugging line of the machine chip and realize near-end, remote and cloud debugging on the power cord of the host controller to ensure that the equipment is not removed debug.

Benefits of technology

It realizes efficient and reliable remote debugging in complex and harsh environments, reduces the need for on-site access, ensures the maintenance of fault status, and simplifies the problem search and debugging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115933490B_ABST
    Figure CN115933490B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electrical and electronic equipment, and more specifically, to a method, system, medium and device for remote debugging based on a power line. The scheme includes setting a slave controller so that the slave controller has a proximal debugging interface and a remote debugging interface; setting the connection relationship between the main controller, the power line and each slave controller; setting the current debugging mode; when the debugging mode is proximal debugging, proximal debugging is performed through the slave controller; when the debugging mode is remote debugging, remote debugging is performed through the slave controller; when the debugging mode is cloud debugging, cloud debugging is performed through the slave controller. The scheme debugs the chip or slave controller through the ICP debugging line of the slave chip, and can also debug the corresponding abnormal slave controller on site through the power line of the host controller, and can also debug all corresponding abnormal slave controllers remotely through the network through the power line controlled by the host.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrical and electronic equipment, and more specifically, to a method, system, medium and device for remote debugging based on a power line. Background Art

[0002] Power line technology is a technology that combines two power lines and two signal lines into two lines to achieve signal and power sharing. It saves construction and cable costs and brings great convenience to on-site construction and later maintenance. It has been widely used in fire protection, instrumentation, sensors, industrial control and other fields. It uses voltage pulse width modulation technology for downlink and current loop modulation technology for uplink.

[0003] Prior to the technology of the present invention, the scenarios in which the existing power line technology was used were usually complex and the environment was harsh. Some scenarios were even not suitable for debugging personnel to debug the slave on site, such as underground pipe corridors, which were difficult for debugging personnel to reach, and the on-site environment was not conducive to setting up a debugging environment and obtaining data. In addition, many times when the slave detection device has a false alarm or a fault, in order to facilitate problem finding and debugging, it is necessary to reproduce the problem on site, and it is necessary to promptly obtain the chip status or internal information of the slave at that time from the on-site slave. If the slave detection device is removed from the site, its fault state may not be maintained, which adds difficulty to problem finding and debugging. Summary of the invention

[0004] In view of the above problems, the present invention proposes a method, system, medium and device for remote debugging based on a power line. By designing a method that supports both near-end and remote debugging, the chip or slave controller can be debugged through the ICP debugging line of the slave chip. The corresponding abnormal slave controller can also be debugged on-site through the power line of the host controller. All corresponding abnormal slave controllers can also be debugged remotely through the network (cloud) through the power line controlled by the host.

[0005] According to a first aspect of an embodiment of the present invention, a power line-based remote debugging method is provided.

[0006] In one or more embodiments, preferably, the method for remote debugging based on a power line includes:

[0007] Setting the slave controller so that the slave controller has a local debugging interface and a remote debugging interface;

[0008] Set the connection relationship between the host controller, the power line and each slave controller;

[0009] Start power line debugging and set the current debugging mode according to requirements;

[0010] When the debugging mode is near-end debugging, near-end debugging is performed through the slave controller;

[0011] When the debugging mode is remote debugging, remote debugging is performed through the slave controller;

[0012] When the debugging mode is cloud debugging, cloud debugging is performed through the slave controller.

[0013] In one or more embodiments, preferably, the setting of the slave controller so that the slave controller has a proximal debugging interface and a remote debugging interface specifically includes:

[0014] Configure a slave controller, the slave controller including a two-wire debug controller, a power bus transceiver, a bus arbiter, an MCU core, an IO device, a memory, and a sensor detector;

[0015] The two-wire debug controller configured with the slave controller includes an ICP debug line and a Probe line, and is used for data communication with the outside of the slave controller;

[0016] The power bus transceiver configured with the slave controller includes a positive power line and a negative power line, and is used for data communication with the outside of the slave controller;

[0017] The bus arbiter exchanges data with the two-wire debug controller via the proximal debug bus;

[0018] The bus arbiter exchanges data with the power bus transceiver via the remote debugging bus;

[0019] The bus arbiter exchanges data with the MCU core via a functional bus;

[0020] The bus arbiter exchanges data with the IO device, the memory and the sensor detector via the function and debug bus;

[0021] The function and debug bus is directly electrically connected to the power bus transceiver for data transmission.

[0022] In one or more embodiments, preferably, setting the connection relationship between the host controller, the power line and each slave controller specifically includes:

[0023] A host controller is provided to connect with the power line to realize remote power line debugging;

[0024] The power line includes a positive line and a negative line;

[0025] The positive line and the negative line are both electrically connected to the host controller;

[0026] The positive pole of the power line corresponding to the power bus transceiver of each slave controller is electrically connected to the positive line;

[0027] The negative pole of the power line corresponding to the power bus transceiver of each slave controller is electrically connected to the negative pole line.

[0028] In one or more embodiments, preferably, starting the power line debugging and setting the current debugging mode according to the requirements specifically includes:

[0029] Obtain current monitoring requirements, and select a corresponding monitoring method according to the monitoring requirements, wherein the monitoring methods include remote, on-site, and cloud;

[0030] In different monitoring modes, the proximal end corresponds to the debugging mode as proximal end debugging;

[0031] In different monitoring modes, the remote end corresponds to the debugging mode as remote debugging;

[0032] Under different monitoring modes, the cloud corresponds to the debugging mode as cloud debugging;

[0033] The current debugging mode is directly sent to each debugging personnel.

[0034] In one or more embodiments, preferably, when the debugging mode is proximal debugging, performing proximal debugging through the slave controller specifically includes:

[0035] Sending a debug command sequence to the two-wire debug controller via an ICP debug line;

[0036] Converting the debug command sequence into bus read and write commands via the two-wire debug controller;

[0037] Passing the bus read and write commands to the bus arbiter;

[0038] The bus arbiter sends the bus read and write commands to the corresponding modules according to the addressing space corresponding to the bus read and write commands;

[0039] When the corresponding module receives a write command, it receives the corresponding write operation;

[0040] When the corresponding module receives a read command, it transmits the read data back to the ICP debug line via the function and debug bus, bus arbiter, and two-wire debug controller module;

[0041] Output to the outside through the Probe line for observation.

[0042] In one or more embodiments, preferably, when the debugging mode is remote debugging, performing remote debugging through the slave controller specifically includes:

[0043] Sending a debugging command with a built-in slave address to all the slave controllers via a power line loop by the host controller;

[0044] The slave controller reads the received slave address number through the power bus transceiver, and performs a remote monitoring procedure if the address number is consistent, and does not process if the address number is inconsistent;

[0045] After starting the remote monitoring program, sending a remote bus read and write command to the bus arbiter via the remote debugging bus;

[0046] The bus arbiter sends the remote bus read and write commands to the corresponding modules according to the addressing space corresponding to the remote bus read and write commands;

[0047] When the corresponding module receives a write command, it receives the corresponding write operation;

[0048] When the corresponding module receives a read command, it transmits the read data back to the ICP debug line via the function and debug bus, bus arbiter, and two-wire debug controller module;

[0049] Output to the outside through the Probe line for observation.

[0050] In one or more embodiments, preferably, when the debugging mode is cloud debugging, performing cloud debugging through the slave controller specifically includes:

[0051] Each of the host controllers corresponds to a fixed IP address;

[0052] Directly access the control host controller through the Internet via the unique IP address corresponding to the host controller;

[0053] Send a debugging command of the built-in IP address to the host controller of the corresponding IP address, start the remote debugging, and complete the cloud debugging.

[0054] According to a second aspect of an embodiment of the present invention, a power line-based remote debugging system is provided.

[0055] In one or more embodiments, preferably, the power line-based remote debugging system includes:

[0056] A slave configuration module is used to set the slave controller so that the slave controller has a local debugging interface and a remote debugging interface;

[0057] A loop configuration module is used to set the connection relationship between the host controller, the power line and each slave controller;

[0058] Status analysis module, used to start power line debugging and set the current debugging mode according to requirements;

[0059] An on-site debugging module, used for performing near-end debugging through the slave controller when the debugging mode is near-end debugging;

[0060] A remote debugging module, used for performing remote debugging through the slave controller when the debugging mode is remote debugging;

[0061] The cloud debugging module is used to perform cloud debugging through the slave controller when the debugging mode is cloud debugging.

[0062] According to a third aspect of an embodiment of the present invention, there is provided a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method as described in any one of the first aspect of the embodiment of the present invention is implemented.

[0063] According to a fourth aspect of an embodiment of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement any one of the methods described in the first aspect of the embodiment of the present invention.

[0064] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:

[0065] In the scheme of the present invention, a two-wire debugging controller module is built inside the slave chip, through which the slave chip can be debugged proximally, and a debugging controller module is built into the power line transceiver, so that remote debugging can be performed without dismantling the device.

[0066] In the solution of the present invention, a bus arbiter module is added to combine the remote debug bus, the proximal debug bus, and the MCU core function bus arbitration into a debug and function bus, which are shared and do not affect the normal operation of the system during debugging.

[0067] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.

[0068] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0070] Figure 1 The present invention is a flowchart of a method for remote debugging based on a power line according to an embodiment of the present invention.

[0071] Figure 2 The present invention is a flowchart of setting a slave controller in a power line-based remote debugging method according to an embodiment of the present invention, so that the slave controller has a proximal debugging interface and a remote debugging interface.

[0072] Figure 3 The present invention is a flowchart of setting the connection relationship between a host controller, a power line and each slave controller in a power line-based remote debugging method according to an embodiment of the present invention.

[0073] Figure 4 The present invention is a flowchart of starting power line debugging in a power line-based remote debugging method according to an embodiment of the present invention and setting a current debugging mode according to requirements.

[0074] Figure 5 It is a flowchart of performing near-end debugging through the slave controller when the debugging mode is near-end debugging in a power line-based remote debugging method according to an embodiment of the present invention.

[0075] Figure 6 The present invention is a flowchart of performing remote debugging through the slave controller when the debugging mode is remote debugging in a method for remote debugging based on a power line according to an embodiment of the present invention.

[0076] Figure 7 It is a flowchart of performing cloud debugging through the slave controller when the debugging mode is cloud debugging in a method for remote debugging based on a power line according to an embodiment of the present invention.

[0077] Figure 8 The present invention is a structural diagram of a power line-based remote debugging system according to an embodiment of the present invention.

[0078] Fig. 9 It is a structural diagram of an electronic device in one embodiment of the present invention.

[0079] Fig.10 Debug architecture diagram for slave controller.

[0080] Fig.11This is a diagram of the on-site remote power line debugging system.

[0081] Fig.12 This is a diagram of the cloud-based remote power line debugging system. DETAILED DESCRIPTION

[0082] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0083] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0084] Power line technology is a technology that combines two power lines and two signal lines into two lines to achieve signal and power sharing. It saves construction and cable costs and brings great convenience to on-site construction and later maintenance. It has been widely used in fire protection, instrumentation, sensors, industrial control and other fields. It uses voltage pulse width modulation technology for downlink and current loop modulation technology for uplink.

[0085] Prior to the technology of the present invention, the scenarios in which the existing power line technology was used were usually complex and the environment was harsh. Some scenarios were even not suitable for debugging personnel to debug the slave on site, such as underground pipe corridors, which were difficult for debugging personnel to reach, and the on-site environment was not conducive to setting up a debugging environment and obtaining data. In addition, many times when the slave detection device has a false alarm or a fault, in order to facilitate problem finding and debugging, it is necessary to reproduce the problem on site, and it is necessary to promptly obtain the chip status or internal information of the slave at that time from the on-site slave. If the slave detection device is removed from the site, its fault state may not be maintained, which adds difficulty to problem finding and debugging.

[0086] In an embodiment of the present invention, a method, system, medium and device for remote debugging based on a power line are provided. The solution designs a method that supports both near-end and remote debugging, debugs a chip or a slave controller through the ICP debug line of the slave chip, debugs the corresponding abnormal slave controller on site through the power line of the host controller, and debugs all corresponding abnormal slave controllers remotely through the network (cloud) through the power line controlled by the host.

[0087] According to a first aspect of an embodiment of the present invention, a power line-based remote debugging method is provided.

[0088] Figure 1 The present invention is a flowchart of a method for remote debugging based on a power line according to an embodiment of the present invention.

[0089] In one or more embodiments, preferably, the method for remote debugging based on a power line includes:

[0090] S101, setting a slave controller so that the slave controller has a proximal debugging interface and a remote debugging interface;

[0091] S102, setting a connection relationship between the host controller, the power line and each slave controller;

[0092] S103, start power line debugging, and set the current debugging mode according to requirements;

[0093] S104, when the debugging mode is proximal debugging, performing proximal debugging through the slave controller;

[0094] S105, when the debugging mode is remote debugging, performing remote debugging through the slave controller;

[0095] S106: When the debugging mode is cloud debugging, perform cloud debugging through the slave controller.

[0096] In an embodiment of the present invention, in order to achieve efficient and reliable power debugging and detection at both the remote and near ends, three debugging schemes are carried out. The first scheme is near-end debugging, which is debugged directly through the slave chip. The second scheme is remote debugging, which is remotely accessed directly through the host controller to complete the debugging process. The third scheme is cloud debugging, which completes the debugging through the Internet. Finally, the same configuration and system are used in all three methods, and the three debugging schemes are compatible, so that remote and near power line debugging can be performed without dismantling the equipment.

[0097] Figure 2The present invention is a flowchart of setting a slave controller in a power line-based remote debugging method according to an embodiment of the present invention, so that the slave controller has a proximal debugging interface and a remote debugging interface.

[0098] like Figure 2 As shown, in one or more embodiments, preferably, the slave controller is set so that the slave controller has a proximal debugging interface and a remote debugging interface, specifically including:

[0099] S201, configuring a slave controller, wherein the slave controller includes a two-wire debugging controller, a power bus transceiver, a bus arbiter, an MCU core, an IO device, a memory, and a sensor detector;

[0100] S202, configuring the two-line debugging controller of the slave controller to include an ICP debugging line and a Probe line for data communication with the outside of the slave controller;

[0101] S203, configuring the power bus transceiver of the slave controller to include a positive power line and a negative power line for data communication with the outside of the slave controller;

[0102] S204, the bus arbiter exchanges data with the two-wire debug controller via the proximal debug bus;

[0103] S205, the bus arbiter exchanges data with the power bus transceiver via the remote debugging bus;

[0104] S206, the bus arbiter exchanges data with the MCU core via the functional bus;

[0105] S207, the bus arbiter exchanges data with the IO device, the memory and the sensor detector through the function and debug bus;

[0106] S208. The function and debug bus is directly electrically connected to the power bus transceiver for data transmission.

[0107] In the embodiment of the present invention, the remote and local switching and control of the entire set of information can be realized through the slave controller of this structure.

[0108] Figure 3 The present invention is a flowchart of setting the connection relationship between a host controller, a power line and each slave controller in a power line-based remote debugging method according to an embodiment of the present invention.

[0109] like Figure 3As shown, in one or more embodiments, preferably, the setting of the connection relationship between the host controller, the power line and each slave controller specifically includes:

[0110] S301, setting a host controller to connect to a power line to implement remote power line debugging;

[0111] S302, the power line includes a positive line and a negative line;

[0112] S303, the positive line and the negative line are both electrically connected to the host controller;

[0113] S304, the positive electrode of the power line corresponding to the power bus transceiver of each slave controller is electrically connected to the positive line;

[0114] S305. The negative electrode of the power line corresponding to the power bus transceiver of each slave controller is electrically connected to the negative electrode line.

[0115] In the embodiment of the present invention, the length of the interval is set, and the corresponding slave controllers are arranged at intervals, and the status of the power line in each section is checked by the slave controllers.

[0116] Figure 4 The present invention is a flowchart of starting power line debugging in a power line-based remote debugging method according to an embodiment of the present invention and setting a current debugging mode according to requirements.

[0117] like Figure 4 As shown, in one or more embodiments, preferably, starting the power line debugging and setting the current debugging mode according to the requirements specifically includes:

[0118] S401, obtaining current monitoring requirements, and selecting a corresponding monitoring method according to the monitoring requirements, wherein the monitoring methods include remote, on-site, and cloud;

[0119] S402, under different monitoring modes, the proximal end corresponds to the proximal end debugging mode;

[0120] S403, under different monitoring modes, the remote end corresponds to the debugging mode as remote debugging;

[0121] S404, under different monitoring modes, the cloud corresponds to the debugging mode as cloud debugging;

[0122] S405: directly send the current debugging mode to each debugging personnel.

[0123] In the embodiment of the present invention, before debugging, the corresponding settings are directly made by judging the current debugging mode. Therefore, it is necessary to select the corresponding debugging module type according to the needs to facilitate the call in the subsequent execution process.

[0124] Figure 5 It is a flowchart of performing near-end debugging through the slave controller when the debugging mode is near-end debugging in a power line-based remote debugging method according to an embodiment of the present invention.

[0125] like Figure 5 As shown, in one or more embodiments, preferably, when the debugging mode is proximal debugging, proximal debugging is performed by the slave controller, specifically including:

[0126] S501, sending a debug command sequence to the two-wire debug controller via the ICP debug line;

[0127] S502, converting the debug command sequence into bus read and write commands through the two-wire debug controller;

[0128] S503, passing the bus read / write command to the bus arbiter;

[0129] S504, the bus arbiter sends the addressing space corresponding to the bus read / write command to the corresponding module;

[0130] S505: When the corresponding module receives a write command, it receives a corresponding write operation;

[0131] S506, when the corresponding module receives a read command, it transmits the read data back to the ICP debug line via the function and debug bus, the bus arbiter, and the two-line debug controller module;

[0132] S507. Output to the outside through the Probe line for observation.

[0133] In an embodiment of the present invention, when near-end debugging is convenient, a debugging command sequence is sent through the ICP debugging line, and the two-wire debugging controller can convert the debugging command sequence into a bus read and write command, which is sent to the function and debugging bus through the near-end debugging bus via the bus arbiter, and then distributed to the corresponding modules according to the different addressing spaces of different modules inside the slave chip, which may include a power bus transceiver, a memory, an IO device, and a sensor detection. If the corresponding module transmits a write command, it receives the corresponding write operation; if the read command is transmitted, the corresponding module returns the read data via the function and debugging bus, the bus arbiter, and the two-wire debugging controller module to the ICP debugging line. The power bus transceiver can also transmit the internal signal that needs to be observed through the Probe line.

[0134] Figure 6 The present invention is a flowchart of performing remote debugging through the slave controller when the debugging mode is remote debugging in a method for remote debugging based on a power line according to an embodiment of the present invention.

[0135] like Figure 6 As shown, in one or more embodiments, preferably, when the debugging mode is remote debugging, performing remote debugging through the slave controller specifically includes:

[0136] S601, sending a debugging command with a built-in slave address to all the slave controllers via a power line loop by the host controller;

[0137] S602, the slave controller reads the received slave address number through the power bus transceiver, and performs a remote monitoring procedure if the slave address number is consistent, and does not perform any processing if the slave address number is inconsistent;

[0138] S603, after starting the remote monitoring program, sending a remote bus read and write command to the bus arbiter via the remote debugging bus;

[0139] S604, the bus arbiter sends the remote bus read and write commands to the corresponding modules according to the addressing space corresponding to the remote bus read and write commands;

[0140] S605, when the corresponding module receives a write command, it receives a corresponding write operation;

[0141] S606, when the corresponding module receives a read command, it transmits the read data back to the ICP debug line via the function and debug bus, the bus arbiter, and the two-line debug controller module;

[0142] S607, output to the outside through the Probe line for observation.

[0143] In the embodiment of the present invention, when the on-site environment is very bad and it is impossible or inconvenient to approach, the on-site host controller can send a debugging command with a built-in slave address to all slave chips via the power line loop. The debugging controller in the power line transceiver module of the slave chip parses the corresponding debugging command. If it is found that the received slave address number does not match its own address (that is, it is not its own debugging command), no processing is performed. If it is found that the received slave address number matches its own address, the debugging command is converted into a bus read and write command, which is sent to the function and debugging bus via the remote debugging bus and the bus arbiter, and then distributed to the corresponding modules according to the different addressing spaces of different modules in the slave chip.

[0144] Figure 7It is a flowchart of performing cloud debugging through the slave controller when the debugging mode is cloud debugging in a method for remote debugging based on a power line according to an embodiment of the present invention.

[0145] like Figure 7 As shown, in one or more embodiments, preferably, when the debugging mode is cloud debugging, cloud debugging is performed by the slave controller, specifically including:

[0146] S701. Each host controller corresponds to a fixed IP address;

[0147] S702, directly access the control host controller via the Internet through the unique IP address corresponding to the host controller;

[0148] S703: Send a debugging command of the built-in IP address to the host controller of the corresponding IP address, start the remote debugging, and complete the cloud debugging.

[0149] In an embodiment of the present invention, when the on-site environment is very bad and it is impossible or inconvenient to get close to the on-site host controller or it is inconvenient to travel to the site, the host controller is connected to the Internet. It is not necessary to travel to the site, and the control host controller can be directly accessed through the unique IP address corresponding to the host controller connected to the Internet, and the debugging command of the built-in IP address is sent to the host controller with the corresponding IP address. The corresponding host controller returns the remote debugging command from the cloud similar to the on-site remote debugging process in the remote mode, converting the remote debugging command from the cloud into the on-site remote debugging of the host controller, and also uploading the returned results to the cloud. Thus, cloud remote debugging is realized.

[0150] According to a second aspect of an embodiment of the present invention, a power line-based remote debugging system is provided.

[0151] Figure 8 The present invention is a structural diagram of a power line-based remote debugging system according to an embodiment of the present invention.

[0152] In one or more embodiments, preferably, the power line-based remote debugging system includes:

[0153] The slave configuration module 801 is used to set the slave controller so that the slave controller has a near-end debugging interface and a far-end debugging interface;

[0154] The loop configuration module 802 is used to set the connection relationship between the host controller, the power line and each slave controller;

[0155] The state analysis module 803 is used to start the power line debugging and set the current debugging mode according to the requirements;

[0156] An on-site debugging module 804, configured to perform proximal debugging through the slave controller when the debugging mode is proximal debugging;

[0157] A remote debugging module 805, configured to perform remote debugging via the slave controller when the debugging mode is remote debugging;

[0158] The cloud debugging module 806 is used to perform cloud debugging through the slave controller when the debugging mode is cloud debugging.

[0159] In the embodiment of the present invention, a system suitable for different structures is realized through a series of modular designs. The system can achieve closed-loop, reliable and efficient execution through collection, analysis and control.

[0160] According to a third aspect of an embodiment of the present invention, there is provided a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method as described in any one of the first aspect of the embodiment of the present invention is implemented.

[0161] According to a fourth aspect of an embodiment of the present invention, an electronic device is provided. Fig. 9 It is a structural diagram of an electronic device in one embodiment of the present invention. Fig. 9 The electronic device shown is a universal power line based remote debugging device. Fig. 9 , the electronic device includes a plurality of acquisition devices 901 and a processing device 902; wherein different acquisition devices 901 monitor different areas of a target scene, and the monitoring areas of the plurality of acquisition devices cover the target scene;

[0162] Each acquisition device 901 is used to acquire an image of a target scene and identify the position information of a moving target in the acquired image. The acquisition device may be any type of sensor;

[0163] The processing device 902 includes a processor 903, a communication interface 904, a memory 905 and a communication bus 906, wherein the processor 903, the communication interface 904 and the memory 905 communicate with each other via the communication bus 906.

[0164] Memory 905, used for storing computer programs;

[0165] The processor 903 is configured to implement any of the above-mentioned power line-based remote debugging method steps provided by the embodiments of the present invention when executing the computer program stored in the memory 905 .

[0166] The communication bus 906 mentioned in the above processing device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 906 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0167] The communication interface 904 is used for communication between the above processing device and other devices.

[0168] The memory 905 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory 905 may also be at least one storage device located away from the processor 903 .

[0169] The above-mentioned processor 903 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0170] like Fig.10 This is the slave controller debugging architecture diagram. Fig.10 The power bus transceiver module, memory module, IO device module, sensor detection module, etc. If it is a write command, the corresponding module receives the corresponding write operation; if it is a read command, the corresponding module returns the read data through the function and debug bus, bus arbiter, debug controller in the power line transceiver to the power line, and then to the host controller. If a host controller has multiple power circuits, the host controller needs to be responsible for distributing different debug commands to different power circuits and returning the results of debug commands of different circuits according to different circuit numbers.

[0171] Fig.11This is a diagram of the on-site remote power line debugging system. A debugging controller module is built into the power line transceiver, which allows remote debugging without removing the device.

[0172] Fig.12 This is a diagram of the cloud-based remote power line debugging system. Through remote devices, different host controllers can be accessed through different IP addresses to achieve cloud control.

[0173] The technical solution provided by the embodiments of the present invention may have the following beneficial effects:

[0174] In the scheme of the present invention, a two-wire debugging controller module is built inside the slave chip, through which the slave chip can be debugged proximally, and a debugging controller module is built into the power line transceiver, so that remote debugging can be performed without dismantling the device.

[0175] In the solution of the present invention, a bus arbiter module is added to combine the remote debug bus, the proximal debug bus, and the MCU core function bus arbitration into a debug and function bus, which are shared and do not affect the normal operation of the system during debugging.

[0176] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.

[0177] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0178] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0180] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A remote debugging method based on a power line, characterized in that: The method includes: Setting the slave controller so that the slave controller has a local debugging interface and a remote debugging interface; Set the connection relationship between the host controller, the power line and each slave controller; Start power line debugging and set the current debugging mode according to requirements; When the debugging mode is near-end debugging, near-end debugging is performed through the slave controller; When the debugging mode is remote debugging, remote debugging is performed through the slave controller; When the debugging mode is cloud debugging, cloud debugging is performed through the slave controller; The setting of the slave controller so that the slave controller has a proximal debugging interface and a remote debugging interface specifically includes: Configure a slave controller, the slave controller including a two-wire debugging controller, a power bus transceiver, a bus arbiter, an MCU core, an IO device, a memory, and a sensor detector; The two-wire debug controller configured with the slave controller includes an ICP debug line and a Probe line, and is used for data communication with the outside of the slave controller; The power bus transceiver configured with the slave controller includes a positive power line and a negative power line, and is used for data communication with the outside of the slave controller; The bus arbiter exchanges data with the two-wire debug controller via the proximal debug bus; The bus arbiter exchanges data with the power bus transceiver via the remote debugging bus; The bus arbiter exchanges data with the MCU core via a functional bus; The bus arbiter exchanges data with the IO device, the memory and the sensor detector via the function and debug bus; The function and debug bus is directly electrically connected to the power bus transceiver for data transmission; The setting of the connection relationship between the host controller, the power line and each slave controller specifically includes: A host controller is provided to connect with the power line to realize remote power line debugging; The power line includes a positive line and a negative line; The positive line and the negative line are both electrically connected to the host controller; The positive pole of the power line corresponding to the power bus transceiver of each slave controller is electrically connected to the positive line; The negative pole of the power line corresponding to the power bus transceiver of each slave controller is electrically connected to the negative pole line; When the debugging mode is near-end debugging, performing near-end debugging through the slave controller specifically includes: Sending a debug command sequence to the two-wire debug controller via an ICP debug line; Converting the debug command sequence into bus read and write commands via the two-wire debug controller; Passing the bus read and write commands to the bus arbiter; The bus arbiter sends the bus read and write commands to the corresponding modules according to the addressing space corresponding to the bus read and write commands; When the corresponding module receives a write command, it receives the corresponding write operation; When the corresponding module receives a read command, it transmits the read data back to the ICP debug line via the function and debug bus, bus arbiter, and two-wire debug controller module; Output to the outside through the Probe line for observation; Wherein, when the debugging mode is remote debugging, performing remote debugging through the slave controller specifically includes: Sending a debugging command with a built-in slave address to all the slave controllers via a power line loop by the host controller; The slave controller reads the received slave address number through the power bus transceiver, and performs a remote monitoring procedure if the address number is consistent, and does not process if the address number is inconsistent; After starting the remote monitoring program, sending a remote bus read and write command to the bus arbiter via the remote debugging bus; The bus arbiter sends the remote bus read and write commands to the corresponding modules according to the addressing space corresponding to the remote bus read and write commands; When the corresponding module receives a write command, it receives the corresponding write operation; When the corresponding module receives a read command, it transmits the read data back to the ICP debug line via the function and debug bus, bus arbiter, and two-wire debug controller module; Output to the outside through the Probe line for observation; When the debugging mode is cloud debugging, cloud debugging is performed by the slave controller, specifically including: Each of the host controllers corresponds to a fixed IP address; Directly access the control host controller through the Internet via the unique IP address corresponding to the host controller; Send a debugging command of the built-in IP address to the host controller of the corresponding IP address, start the remote debugging, and complete the cloud debugging.

2. A method for remote debugging based on a power line as claimed in claim 1, characterized in that: The power line debugging is started, and the current debugging mode is set according to the requirements, specifically including: Obtain current monitoring requirements, and select a corresponding monitoring method according to the monitoring requirements, wherein the monitoring methods include remote, on-site, and cloud; In different monitoring modes, the proximal end corresponds to the debugging mode as proximal end debugging; In different monitoring modes, the remote end corresponds to the debugging mode as remote debugging; Under different monitoring modes, the cloud corresponds to the debugging mode as cloud debugging; The current debugging mode is directly sent to each debugging personnel.

3. A remote debugging system based on a power line, characterized in that: The system is used to implement the method according to any one of claims 1 to 2, and the system comprises: A slave configuration module is used to set the slave controller so that the slave controller has a local debugging interface and a remote debugging interface; A loop configuration module is used to set the connection relationship between the host controller, the power line and each slave controller; Status analysis module, used to start power line debugging and set the current debugging mode according to requirements; An on-site debugging module, used for performing near-end debugging through the slave controller when the debugging mode is near-end debugging; A remote debugging module, used for performing remote debugging through the slave controller when the debugging mode is remote debugging; The cloud debugging module is used to perform cloud debugging through the slave controller when the debugging mode is cloud debugging.

4. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 2 when executed by a processor.

5. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Debugging system and debugging method

    CN105550118A

  • Debugging method and device of fire-fighting host and debugging system of fire-fighting host

    CN111913845A