CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority to Chinese Application No. CN201910967794.1, entitled “Wireless Debugger and Wireless Debugging System” filed on Oct. 12, 2019, the application of which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

Embodiments of the present disclosure relate to the field of electronics and information technology, and more specifically to a wireless debugger and a wireless debugging system.

BACKGROUND

During the R&D and design of an electronic device, after the engineer writes a program code, he/she needs to download the program to a target board and then perform simulation debugging to find and solve program running abnormal points. As technology develops, many electronic devices are mobile, such as small drones, wearable devices, or cluster networking devices. These electronic devices all need to be debugged in motion. However, in related technology, when debugging an electronic device, it is necessary to connect to the target board for debugging throughan wired transmission interface. The debugging is very inconvenient, and the reliability of debugging in motion is low.

SUMMARY

In view of this, one of the technical problems addressed by embodiments of the present disclosure is to provide a wireless debugger and a wireless debugging system to overcome the above defects.

In a first aspect, an embodiment of the present disclosure provides a wireless debugger, including: a processor, a wireless communication module, and a first peripheral interface; the processor is electrically connected to the wireless communication module and the first peripheral interface, respectively;

the processor, is configured to receive debugging instructions through the wireless communication module, and the debugging instructions are used to instruct debugging/stop debugging a target board;

the processor, is further configured to parse the debugging instructions and convert the parsed debugging instructions so that the debugging instructions are adapted to a protocol of the first peripheral interface; and

the processor, is further configured to transmit the converted debugging instructions to the to-be-debugged target board through the first peripheral interface.

Alternatively, in an embodiment of the present disclosure, the wireless communication module includes at least one of a Bluetooth module, a Wi-Fi module, or a 2.4G module.

Alternatively, in an embodiment of the present disclosure, the Bluetooth module includes a BLE (Bluetooth low energy) chip and an antenna, and the BLE chip is electrically connected to the antenna.

Alternatively, in an embodiment of the present disclosure, the first peripheral interface includes at least one of the following interfaces: a Serial Wire Debugging (SWD) interface, a Serial Peripheral Interface (SPI), an Inter-Integrated Circuit (I2C) interface, an Integrate-Interface Circuit (IIS) interface, a General-Purpose Input/Output (GPIO) interface, or a Pulse Width Modulation (PWM) interface.

Alternatively, in an embodiment of the present disclosure, the first peripheral interface is the SWD interface; and

the wireless debugger, is specifically configured to parse the debugging instructions and convert the parsed debugging instructions into a format of an SWD interface protocol.

Alternatively, in an embodiment of the present disclosure, the first peripheral interface is the GPIO general-purpose input/output interface, and the GPIO interface is configured with an SWD protocol as the SWD interface simulated.

The apparatus according to claim1, wherein,

the processor, is specifically configured to transmit the converted debugging instructions to the target board through the first peripheral interface, when the debugging instructions instructs the target board to debug, to control the target board to debug; transmit the converted debugging instructions to the target board through the first peripheral interface, when the debugging instructions instructs the target board to suspend debugging, to control the target board to suspend debugging; and transmit the converted debugging instructions to the target board through the first peripheral interface, when the debugging instructions instructs the target board to perform single-step debugging, to control the target board to perform single-step debugging.

Alternatively, in an embodiment of the present disclosure, the wireless debugger further includes a second peripheral interface; and

the processor, is further configured to receive log information transmitted by the target board through the second peripheral interface.

Alternatively, in an embodiment of the present disclosure, the second peripheral interface is a Universal Asynchronous Receiver/Transmitter (UART) universal asynchronous receiver transmitter interface.

Alternatively, in an embodiment of the present disclosure, the wireless debugger further includes a memory, and the memory is electrically connected to the processor; and

the memory, is configured to store data and a program executed by the processor.

In a first aspect, an embodiment of the present disclosure provides a wireless debugging system, including: a wireless debugger, a target board, and a control device, the wireless debugger is the wireless debugger described according to any one of claims1-10, the wireless debugger is wirelessly connected to the control device, the target board and the wireless debugger perform data transmission through at least one peripheral interface, and the at least one peripheral interface includes a first peripheral interface;

the control device, is configured to send debugging instructions to the wireless debugger through a wireless communication link, and the debugging instructions are used to instruct debugging/stop debugging the target board;

the wireless debugger, is configured to parse the debugging instructions and convert the parsed debugging instructions so that the debugging instructions are adapted to a protocol of the first peripheral interface; and

the wireless debugger, is further configured to transmit the converted debugging instructions to the to-be-debugged target board through the first peripheral interface.

Alternatively, in an embodiment of the present disclosure, the wireless debugging system further includes a wireless bridging device, and the wireless bridging device is connected to the control device through a USB general-purpose serial bus interface;

the control device, is specifically configured to transmit the debugging instructions to the wireless bridging device through the USB interface; and

the wireless bridging device, is configured to send the debugging instructions to the wireless debugger through the wireless communication link.

Alternatively, in an embodiment of the present disclosure, the control device, is specifically configured to send the debugging instructions to the wireless debugger by Bluetooth transmission.

Alternatively, in an embodiment of the present disclosure, the first peripheral interface is an SWD Serial Wire Debugging interface; and

the wireless debugger, is specifically configured to parse the debugging instructions and convert the parsed debugging instructions into a format of an SWD interface protocol.

Alternatively, in an embodiment of the present disclosure, the wireless debugger, is specifically configured to transmit the converted debugging instructions to the target board through the first peripheral interface, when the debugging instructions instructs the target board to debug, to control the target board to debug; transmit the converted debugging instructions to the target board through the first peripheral interface, when the debugging instructions instructs the target board to suspend debugging, to control the target board to suspend debugging; and transmit the converted debugging instructions to the target board through the first peripheral interface, when the debugging instructions instructs the target board to perform single-step debugging, to control the target board to perform single-step debugging.

Alternatively, in an embodiment of the present disclosure, the at least one peripheral interface further includes a second peripheral interface; the target board, is further configured to transmit log information to the wireless debugger through the second peripheral interface; and the wireless debugger, is further configured to transmit the log information to the control device through the wireless communication link.

In the embodiments of the present disclosure, the wireless debugger receives the debugging instructions through the wireless communication module, transmits the debugging instructions to the target board through the peripheral interface, and debugs the target board. For a target board that needs to be debugged in motion, debugging control is more convenient and more reliable.

