[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113641577A - Method and device for debugging application program of terminal product - Google Patents

Method and device for debugging application program of terminal product Download PDF

Info

Publication number
CN113641577A
CN113641577A CN202110911888.4A CN202110911888A CN113641577A CN 113641577 A CN113641577 A CN 113641577A CN 202110911888 A CN202110911888 A CN 202110911888A CN 113641577 A CN113641577 A CN 113641577A
Authority
CN
China
Prior art keywords
debugging
target board
development environment
hardware
ide
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.)
Pending
Application number
CN202110911888.4A
Other languages
Chinese (zh)
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.)
Holley Technology Co Ltd
Original Assignee
Holley Technology 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 Holley Technology Co Ltd filed Critical Holley Technology Co Ltd
Priority to CN202110911888.4A priority Critical patent/CN113641577A/en
Publication of CN113641577A publication Critical patent/CN113641577A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本申请涉及一种终端产品应用程序的调试方法、系统。所述方法包括:开发环境IDE终端,向目标板的MQTT Broker发送带有预设信息结构的调试指令;所述MQTT Broker将所述调试指令转发至目标板的调试服务程序,所述调试服务程序解析所述调试指令中的硬件对象编号和指令类型编号;所述调试服务程序根据所述硬件对象编号,向目标板的硬件对象发送指令类型编号;硬件对象根据所述指令类型编号获取指令并进行调试,并向开发环境IDE终端返回调试结果。采用本方法完整的模拟应用程序的运行环境,应用程序在开发环境IDE终端里运行,不仅可以对软件流程仿真调试,而且可以对目标版各种硬件对象也能仿真调试,大大提高目标板的开发调试效率。

Figure 202110911888

The present application relates to a debugging method and system for an application program of a terminal product. The method includes: the IDE terminal of the development environment sends a debugging instruction with a preset information structure to the MQTT Broker of the target board; the MQTT Broker forwards the debugging instruction to the debugging service program of the target board, and the debugging service program Analyze the hardware object number and instruction type number in the debugging instruction; the debugging service program sends the instruction type number to the hardware object of the target board according to the hardware object number; the hardware object obtains the instruction according to the instruction type number and performs Debug and return the debugging results to the IDE terminal of the development environment. This method completely simulates the running environment of the application program, and the application program runs in the IDE terminal of the development environment, which can not only simulate and debug the software process, but also simulate and debug various hardware objects of the target version, which greatly improves the development of the target board. Debugging efficiency.

Figure 202110911888

Description

Debugging method and device for terminal product application program
Technical Field
The present application relates to the field of program debugging technologies, and in particular, to a method and an apparatus for debugging an application program of a terminal product.
Background
The terminal product runs an embedded Linux system, the application program development can not use an integrated development environment IDE (such as Keil) to finish code editing, compiling and online debugging like the development of a singlechip program, and the application program development can not use the integrated development environment IDE (such as Microsoft Visual Studio) to finish code editing, compiling, running and debugging like the application program on a PC. The method includes the steps of firstly using an editing tool to complete source code editing, then placing the source code into a Linux operating system to be compiled by using a cross compiler, and then uploading a generated executable file into a target board to run and viewing a running result. A plurality of software tools are needed in the whole development process, the operation process is complicated, the problem is difficult to find when the application program runs abnormally, the development efficiency is very low, and the development cost is increased.
Disclosure of Invention
Therefore, it is necessary to provide a debugging method and apparatus capable of improving the debugging efficiency of the embedded Linux application in order to solve the above technical problems.
A method of debugging an end product application, the method comprising:
the method comprises the following steps that a development environment IDE terminal sends a debugging instruction with a preset information structure to an MQTT Broker of a target board;
the MQTT Broker sends the debugging instruction to a debugging service program of a target board, and the debugging service program analyzes a hardware object number and an instruction type number in the debugging instruction;
the debugging service program calls a corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function;
after the target board executes the hardware operation function, the operation result is organized into a preset information structure and is forwarded to the IDE terminal of the development environment through the MQTT Broker.
In one embodiment, the sending, by the development environment IDE terminal, a debugging instruction with a preset information structure to the MQTT Broker of the target board includes: in a source code compiling stage, calling a peripheral hardware operating function corresponding to an operating system according to the compiling environment of different operating systems at present by an application program; when the application program runs on the target version, the hardware operation function directly operates the corresponding hardware object; when the application program runs on the IDE terminal of the development environment, the hardware operation functions are subjected to object numbering according to different hardware objects, instruction numbering is carried out in different operation steps to form a debugging instruction with a preset information structure, and the IDE terminal of the development environment sends the debugging instruction with the preset information structure to the MQTT browser of the target board.
In one embodiment, a plurality of development environment IDEs are deployed in the development environment IDE terminal, and each development environment IDE is used for correspondingly debugging a target board; or, a plurality of development environment IDE terminals are connected with one target board to debug different hardware objects in the same target board.
In one embodiment, the method for debugging the application program of the terminal product further comprises the following steps: in an IDE terminal of a development environment, finishing source code editing, compiling, simulating and debugging, and finishing all required function development of an application program; in an IDE terminal of a development environment, cross compiling is carried out on source codes which finish all required functions, and executable files on a target board are generated; and uploading the execution file on the target board to complete development.
In one embodiment, the debugging instruction with the preset information structure is used for controlling turning-on or turning-off of an LED, the hardware object number is a number of the LED, and the instruction type number is a parameter for controlling turning-on or turning-off of the LED. After the target board executes the hardware operation function, organizing the operation result into a preset information structure, and forwarding the operation result to the IDE terminal of the development environment through the MQTT Broker, wherein the method comprises the following steps: the target board executes a hardware operation function corresponding to the serial number of the LED to obtain a debugging result of successful or failed operation of the LED, organizes the debugging result into a preset information structure, and forwards the debugging result to the IDE terminal of the development environment through the MQTT Broker; and the parameter for controlling the LED to be turned on or off is used as a hardware operating function parameter.
A debugging system of terminal product application program comprises a development environment IDE terminal, an MQTT Broker, a debugging service program of a target board and a hardware object; the development environment IDE terminal sends a debugging instruction with a preset information structure to the MQTT Broker of the target board; the MQTT Broker sends the debugging instruction to a debugging service program of a target board, and the debugging service program analyzes a hardware object number and an instruction type number in the debugging instruction; the debugging service program calls a corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function; after the target board executes the hardware operation function, the operation result is organized into a preset information structure and is forwarded to the IDE terminal of the development environment through the MQTT Broker.
In one embodiment, a plurality of development environment IDEs are deployed in the development environment IDE terminal, and each development environment IDE is used for correspondingly debugging a target board; or, a plurality of development environment IDE terminals are connected with one target board to debug different hardware objects in the same target board.
In one embodiment, the development environment IDE terminal completes source code editing, and completes all required function development of the application program after compiling, simulation and debugging; the development environment IDE terminal carries out cross compilation on the source codes which finish all the required functions to generate an executable file on a target board; and the development environment IDE terminal uploads the execution file on the target board to complete development.
In one embodiment, the hardware object includes one or more of an I/O port-class peripheral, a serial port-class peripheral, an SPI-class peripheral, an I2C-class peripheral, an a/D conversion peripheral, and the like.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
the method comprises the following steps that a development environment IDE terminal sends a debugging instruction with a preset information structure to an MQTT Broker of a target board;
the MQTT Broker sends the debugging instruction to a debugging service program of a target board, and the debugging service program analyzes a hardware object number and an instruction type number in the debugging instruction;
the debugging service program calls a corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function;
after the target board executes the hardware operation function, the operation result is organized into a preset information structure and is forwarded to the IDE terminal of the development environment through the MQTT Broker.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
the method comprises the following steps that a development environment IDE terminal sends a debugging instruction with a preset information structure to an MQTT Broker of a target board;
the MQTT Broker sends the debugging instruction to a debugging service program of a target board, and the debugging service program analyzes a hardware object number and an instruction type number in the debugging instruction;
the debugging service program calls a corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function;
after the target board executes the hardware operation function, the operation result is organized into a preset information structure and is forwarded to the IDE terminal of the development environment through the MQTT Broker.
According to the debugging method and device of the terminal product application program, the computer equipment and the storage medium, the IDE terminal in the development environment is connected with the target board through the MQTT Broker, and various debugging instructions are sent to the corresponding hardware objects through the debugging service program of the target board, so that online simulation debugging of the hardware objects can be realized at the terminals such as a computer, and the debugging efficiency is improved.
Drawings
FIG. 1 is a diagram of an application environment for a method for debugging an application program in an embodiment of an end product;
FIG. 2 is a flowchart illustrating a method for debugging an application program of an end product according to an embodiment;
FIG. 3 is a block diagram of a system for debugging an application of an end product in one embodiment;
FIG. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The debugging method of the terminal product application program can be applied to the application environment shown in fig. 1. The IDE terminal 100 and the target board 200 communicate with each other through an MQTT Broker, the MQTT Broker is a middle party of message transmission and is used for storing and forwarding messages, the MQTT Broker serves as a message center role in the IDE terminal to complete message forwarding, and a one-to-many message publishing mode is used for releasing application program coupling; for example, MQTT Broker is mosquitto. The development environment IDE terminal 100 sends a debugging instruction with a preset information structure to the MQTT Broker of the target board 200; the MQTT Broker sends the debugging instruction to a debugging service program of the target board 200, and the debugging service program analyzes the hardware object number and the instruction type number in the debugging instruction; the debugging service program calls a corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function; after the target board 200 executes the hardware operation function, the operation result is organized into a preset information structure and forwarded to the development environment IDE terminal 100 via MQTT Broker. The development environment IDE terminal 100 may be, but is not limited to, various personal computers and notebook computers, and the target board 200 is a terminal with a linux system.
In one embodiment, as shown in fig. 2, there is provided a debugging method of an application program of an end product, comprising the steps of:
and S110, the development environment IDE terminal sends a debugging instruction with a preset information structure to the MQTT Broker of the target board.
The terminal product is a power consumption information acquisition terminal, and the target board can be an energy controller and runs a Linux operating system. The development environment IDE terminal is a terminal with an integrated development environment IDE, comprises a notebook computer, a desktop computer and the like, and runs a Windows operating system. The MQTT Broker is an intermediate party of message transmission and is used for storing and forwarding messages, the MQTT Broker plays a role of a message center in the MQTT Broker to complete message forwarding, and a one-to-many message publishing mode is provided by using a publishing/subscribing message mode to release application program coupling.
The preset information structure refers to the 3 rd part of the energy controller software and interface technical specification of the Chinese intelligent measurement industry technical innovation strategy alliance standard T/SMI 1017.3-2021 issued by the national grid metering center: APP function and interface. The preset information structure comprises a name of a message sending party, a name of a message receiving party, a hardware object number and an instruction type number.
S120, the MQTT Broker sends the debugging instruction to a debugging service program of a target board, and the debugging service program analyzes the hardware object number and the instruction type number in the debugging instruction.
The debugging service program is a debugging service module of the target board and is used for analyzing and forwarding the information received in the debugging process of the target board.
S130, the debugging service program calls a corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function.
And S140, after the target board executes the hardware operation function, organizing the operation result into a preset information structure, and forwarding the operation result to the IDE terminal of the development environment through the MQTT Broker.
In the debugging method of the application program of the terminal product, the IDE terminal of the development environment is connected with the target board through the MQTT Broker, and various debugging instructions are sent to the corresponding hardware objects through the debugging service program of the target board, so that online simulation debugging of the hardware objects can be realized at the terminals such as a computer, and the debugging efficiency is improved.
In one embodiment, the sending, by the development environment IDE terminal, a debugging instruction with a preset information structure to the MQTT Broker of the target board includes:
in a source code compiling stage, calling a peripheral hardware operating function corresponding to an operating system according to the compiling environment of different operating systems at present by an application program; when the application program runs on the target version, the hardware operation function directly operates the corresponding hardware object; when the application program runs on the IDE terminal of the development environment, the hardware operation functions are subjected to object numbering according to different hardware objects, instruction numbering is carried out in different operation steps to form a debugging instruction with a preset information structure, and the IDE terminal of the development environment sends the debugging instruction with the preset information structure to the MQTT browser of the target board.
The operating system function is a system function running on an operating system such as Linux and Windows. The operating system (Linux, Windows) functions related in the application program are packaged and layered, and the application program automatically matches and calls the corresponding system functions according to different compilers in the source code compiling stage. For example: the method comprises the steps of enabling a process or a thread to Sleep for 1 second, using a self-defined encapsulation function of Sleep (1) in an application program, enabling a calling system function in a Linux system to be Sleep (1), enabling a calling function in a Windows system to be Sleep (1000), encapsulating and layering functions related to an operating system, and facilitating the application program to have cross-platform performance.
The debugging instruction input by the peripheral terminal is input by the peripheral terminal such as a mouse, a keyboard and the like, and the debugging instruction selects a debugging target board, a hardware object of the debugging target board, a function needing debugging and the like.
The preset information structure refers to the 3 rd part of the software and interface technical specification of the energy controller of the Chinese intelligent measurement industry technical innovation strategy alliance standard T/SMI 1017.3-2021 issued by the national grid metering center: APP function and interface. Specifically, in the MQTT information driver, the MQTT theme rule is that, a message sender name/a message receiver name, and the receiver name "Broadcast" indicates Broadcast, the preset information mechanism is as shown in the following table:
Figure BDA0003204054070000071
wherein, PRM: a start flag bit (PRM ═ 1, indicating start);
PRIORITY: priority (the smaller the value, the higher the priority, 0 is the highest priority);
INDEX: message sequence number (increment from 0 cycle, response message is consistent with request message);
LABEL: message tag (sender add tag, bring back in response);
SOURCE: message sender name, string, ending with 0;
DESTINATION: message recipient name, string, ending with 0;
MSG's-TAG: a message interface ID;
MSG's-Length: message payload length, using variable length coding (A-XDR);
MSG's — Payload: payload, i.e. message data unit.
The basic unit of the message frame is 8-bit byte, and the transmission sequence is that the low bit is before, the high bit is after, the low byte is before and the high byte is after.
In one embodiment, a plurality of development environment IDEs are deployed in the development environment IDE terminal, and each development environment IDE is used for correspondingly debugging a target board; alternatively, multiple development environment IDE terminals are connected to one target board to debug different hardware objects in the same target board.
For example, a plurality of development environment IDEs can be simultaneously opened on the same computer, each development environment IDE is used for debugging an application program, and the MQTT Broker connected to the same target board subscribes to different topics according to different application program names, so that a plurality of application programs can be simultaneously debugged. A plurality of project members may also share a target board, the project members connect to the MQTT Broker of the target board through the internet and subscribe to respective topics, thereby completing operations on hardware objects and information interaction between respective applications, which are run in the development environment IDE in an emulation manner, for example, the application 1 (business process) reads or stores data, and needs to transmit the data to the application 2 (database) for processing. The application program interacts information with other application programs, a plurality of application programs (running in a host and running in a container) running on the target board use MQTT to carry out information interaction, and the application program running on the computer and the plurality of application programs running in the target board can carry out other information interaction due to the fact that a uniform information interaction protocol is followed.
In this embodiment, a computer with a development environment IDE can simultaneously open multiple IDEs to connect to the same target board, and different applications running in different development environment IDEs can forward information via MQTT Broker in the target board to complete information interaction of the respective IDE applications, and can also perform information interaction with multiple applications in the target board. Different application programs in the IDE subscribe corresponding topics to the MQTT Broker on the target board according to respective program names, so that not only can different application programs run in a plurality of IDE to realize information interaction mutually, but also information interaction can be carried out with the plurality of application programs in the target board. The simulation of the application program in the development environment IDE completely simulates the running environment of the program, not only can simulate the software flow, but also can simulate the operation hardware object, and greatly improves the development and debugging efficiency of the program by using various simulation debugging tools of the IDE.
In one embodiment, a method for debugging an application program of a terminal product further includes: in an IDE terminal of a development environment, finishing source code editing, compiling, simulating and debugging, and finishing all required function development of an application program; in an IDE terminal of a development environment, cross compiling is carried out on source codes which finish all required functions, and executable files on a target board are generated; and uploading the execution file on the target board to complete development.
In one embodiment, the debugging instruction with the preset information structure is used for controlling turning-on or turning-off of an LED, the hardware object number is a number of the LED, and the instruction type number is a parameter for controlling turning-on or turning-off of the LED. After the target board executes the hardware operation function, organizing the operation result into a preset information structure, and forwarding the operation result to the IDE terminal of the development environment through the MQTT Broker, wherein the method comprises the following steps: the target board executes a hardware operation function corresponding to the serial number of the LED to obtain a debugging result of successful or failed operation of the LED, organizes the debugging result into a preset information structure, and forwards the debugging result to the IDE terminal of the development environment through the MQTT Broker; and the parameter for controlling the LED to be turned on or off is used as a hardware operating function parameter.
For example, operating the LED to light up, the development environment IDE terminal sending a debugging instruction with a preset information structure to the MQTT Broker of the target board is:
01 64 00 68 00 4D 2D 68 61 6C 43 6C 69 65 6E 74 00 4D 2D 68 61 6C 53 65 72 76 65 72 00 0C 00 00 5F 02 01 01
wherein 01-priority 0, PRM 1;
6400-serial No. 100;
6800 — message tag 104;
4D 2D 68616C 436C 69656E 7400 — message sender — M-halClient (application);
4D 2D 68616C 53657276657200 — message recipient — M-halServer debug service);
0C 00005 f — MSG's TAG 5f00000C (LED operation);
02——MSG’s Length=2;
——MSG’s Payload;
01-LED number;
01-light up.
The LED is turned off, and the debugging instruction with the preset information structure is sent to the MQTT breaker of the target board by the IDE terminal in the development environment:
01 67 00 68 00 4D 2D 68 61 6C 43 6C 69 65 6E 74 00 4D 2D 68 61 6C 53 65 72 76 65 72 00 0C 00 00 5F 02 01 00
wherein 01-priority 0, PRM 1;
6400-serial No. 100;
6800 — message tag 104;
4D 2D 68616C 436C 69656E 7400 — message sender — M-halClient (application);
4D 2D 68616C 53657276657200 — message recipient — M-halServer debug service);
0C 00005 f — MSG's TAG 5f00000C (LED operation);
02——MSG’s Length=2;
——MSG’s Payload;
01-LED number;
00-extinction.
And after the LED is debugged according to the instruction, returning a debugging result that the LED operation is successful to the IDE terminal of the development environment, wherein the debugging result is as follows:
00 67 00 68 00 4D 2D 68 61 6C 53 65 72 76 65 72 00 4D 2D 68 61 6C 43 6C 69 65 6E 74 00 0C 00 00 5F 04 00 00 00 00
wherein 01-priority 0, PRM 1;
6700-serial No. 100;
6800 — message tag 104;
4D 2D 68616C 53657276657200 — message sender — M-halServer debug service);
4D 2D 68616C 436C 69656E 7400 — message recipient — M-halClient (application);
0C 00005 f — MSG's TAG 5f00000C (LED operation);
04——MSG’s Length=4;
——MSG’s Payload;
00000000 — operation result (0 represents success).
In this embodiment, the debugging result is also organized into a preset information structure and forwarded to the development environment IDE terminal via the MQTT Broker, so that consistency of the back-and-forth transmission paths can be ensured.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in FIG. 3, there is provided a debugging system for an end product application, comprising: development environment IDE terminal 210, MQTT Broker220, target board's debugging service 230 and hardware object 240, where:
the development environment IDE terminal 210 sends a debugging instruction with a preset information structure to the MQTT Broker220 of the target board; the MQTT Broker220 sends the debug instruction to a debug service program 230 of a target board, and the debug service program 230 analyzes a hardware object number and an instruction type number in the debug instruction; the debugging service program 230 calls a corresponding hardware operation function according to the number of the hardware object 240, and the instruction type number is used as a parameter of the hardware operation function; after the target board executes the hardware operation function, the operation result is organized into a preset information structure and forwarded to the development environment IDE terminal 210 via MQTT Broker.
When the hardware object 240 returns a result to the development environment IDE terminal 210, the result is forwarded through the debug service 230 and the MQTT Broker 220.
In one embodiment, a plurality of development environment IDEs are deployed in the development environment IDE terminal, and each development environment IDE is used for correspondingly debugging a target board; alternatively, multiple development environment IDE terminals are connected to one target board to debug different hardware objects in the same target board.
In one embodiment, the development environment IDE terminal completes source code editing, and completes all required function development of the application program after compiling, simulation and debugging; the development environment IDE terminal carries out cross compilation on the source codes which finish all the required functions to generate an executable file on a target board; and the development environment IDE terminal uploads the execution file on the target board to complete development.
In one embodiment, the hardware object includes one or more of an I/O port-class peripheral, a serial port-class peripheral, an SPI-class peripheral, an I2C-class peripheral, an a/D conversion peripheral, and the like.
For specific limitations of the debugging system of the end product application program, reference may be made to the above limitations of the debugging method of the end product application program, which are not described herein again. The modules in the debugging system of the terminal product application program can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a development environment IDE terminal, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of debugging an end product application. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1.一种终端产品应用程序的调试方法,其特征在于,所述方法包括:1. a debugging method of terminal product application program, is characterized in that, described method comprises: 开发环境IDE终端,向目标板的MQTT Broker发送带有预设信息结构的调试指令;The IDE terminal of the development environment sends a debugging command with a preset information structure to the MQTT Broker of the target board; 所述MQTT Broker将所述调试指令发送至目标板的调试服务程序,所述调试服务程序解析所述调试指令中的硬件对象编号和指令类型编号;The MQTT Broker sends the debugging instruction to the debugging service program of the target board, and the debugging service program parses the hardware object number and the instruction type number in the debugging instruction; 所述调试服务程序根据所述硬件对象编号调用对应硬件操作函数,指令类型编号作为硬件操作函数的参数;The debugging service program calls the corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function; 目标板执行硬件操作函数后,将操作结果组织到预设信息结构里,经由MQTT Broker转发给开发环境IDE终端。After the target board executes the hardware operation function, it organizes the operation result into a preset information structure and forwards it to the IDE terminal of the development environment via the MQTT Broker. 2.根据权利要求1所述的方法,其特征在于,所述开发环境IDE终端,向目标板的MQTTBroker发送带有预设信息结构的调试指令,包括:2. method according to claim 1, is characterized in that, described development environment IDE terminal, sends the debugging instruction with preset information structure to the MQTTBroker of target board, comprises: 应用程序在源代码编译阶段,根据当前所处不同操作系统的编译环境,调用与所述操作系统对应的外设硬件操作函数;应用程序运行于目标版上时硬件操作函数直接操作对应硬件对象;应用程序运行于开发环境IDE终端上时,将硬件操作函数按不同硬件对象进行对象编号,不同操作步骤进行指令编号,组成预设信息结构的调试指令,开发环境IDE终端向目标板的MQTT Broker发送带有预设信息结构的调试指令。In the source code compilation stage, the application program calls the peripheral hardware operation function corresponding to the operating system according to the current compilation environment of different operating systems; when the application program runs on the target version, the hardware operation function directly operates the corresponding hardware object; When the application runs on the IDE terminal of the development environment, the hardware operation functions are numbered according to different hardware objects, and the instructions are numbered according to different operation steps to form the debugging instructions of the preset information structure. The IDE terminal of the development environment sends the MQTT Broker of the target board. Debug commands with preset message structures. 3.根据权利要求1所述的方法,其特征在于,所述开发环境IDE终端中可以同时打开多个开发环境IDE,每个开发环境IDE各自对应连接调试一个目标板;或者,多个开发环境IDE终端与同一个目标板连接,以调试同一目标板中不同硬件对象。3. method according to claim 1, is characterized in that, can open multiple development environment IDEs simultaneously in described development environment IDE terminal, and each development environment IDE correspondingly connects and debugs a target board respectively; Or, multiple development environments The IDE terminal is connected to the same target board to debug different hardware objects in the same target board. 4.根据权利要求1所述的方法,其特征在于,还包括:4. The method of claim 1, further comprising: 在开发环境IDE终端里,完成源代码编辑,进行编译、仿真调试后,完成应用程序所有需求功能开发;In the IDE terminal of the development environment, complete the source code editing, compile, simulate and debug, and complete the development of all required functions of the application; 开发环境IDE终端里,对已完成所有需求功能的源代码进行交叉编译,生成目标板上可执行文件;In the IDE terminal of the development environment, cross-compile the source code that has completed all required functions to generate executable files on the target board; 将所述目标板上执行文件上传至目标板上,完成开发。Upload the execution file on the target board to the target board to complete the development. 5.根据权利要求1所述的方法,其特征在于,所述带有预设信息结构的调试指令为控制LED点亮或熄灭,所述硬件对象编号为LED的编号,所述指令类型编号为控制LED点亮或熄灭;5. The method according to claim 1, wherein the debugging instruction with a preset information structure is to control the LED to turn on or off, the hardware object number is the number of the LED, and the instruction type number is Control the LED to turn on or off; 所述目标板执行硬件操作函数后,将操作结果组织到预设信息结构里,经由MQTTBroker转发给开发环境IDE终端,包括:After the target board executes the hardware operation function, the operation result is organized into a preset information structure, and forwarded to the development environment IDE terminal via the MQTTBroker, including: 目标板执行LED的编号对应的硬件操作函数,获得LED操作成功或失败的调试结果,将调试结果组织到预设信息结构里,经由MQTT Broker转发给开发环境IDE终端;其中,所述控制LED点亮或熄灭的参数作为硬件操作函数参数。The target board executes the hardware operation function corresponding to the number of the LED, obtains the debugging result of the success or failure of the LED operation, organizes the debugging result into a preset information structure, and forwards it to the IDE terminal of the development environment through the MQTT Broker; wherein, the control LED point The parameters that are on or off are used as hardware operation function parameters. 6.一种终端产品应用程序的调试系统,其特征在于,包括开发环境IDE终端、MQTTBroker、目标板的调试服务程序和硬件对象;其中,6. a debugging system of a terminal product application program, is characterized in that, comprises the debugging service program and the hardware object of development environment IDE terminal, MQTTBroker, target board; Wherein, 开发环境IDE终端,向目标板的MQTT Broker发送带有预设信息结构的调试指令;The IDE terminal of the development environment sends a debugging command with a preset information structure to the MQTT Broker of the target board; 所述MQTT Broker将所述调试指令发送至目标板的调试服务程序,所述调试服务程序解析所述调试指令中的硬件对象编号和指令类型编号;The MQTT Broker sends the debugging instruction to the debugging service program of the target board, and the debugging service program parses the hardware object number and the instruction type number in the debugging instruction; 所述调试服务程序根据所述硬件对象编号调用对应硬件操作函数,指令类型编号作为硬件操作函数的参数;The debugging service program calls the corresponding hardware operation function according to the hardware object number, and the instruction type number is used as a parameter of the hardware operation function; 目标板执行硬件操作函数后,将操作结果组织到预设信息结构里,经由MQTT Broker转发给开发环境IDE终端。After the target board executes the hardware operation function, it organizes the operation result into a preset information structure and forwards it to the IDE terminal of the development environment via the MQTT Broker. 7.根据权利要求6所述的系统,其特征在于,所述开发环境IDE终端中部署多个开发环境IDE,每个开发环境IDE对应调试一个目标板;或者,7. The system according to claim 6, wherein a plurality of development environment IDEs are deployed in the development environment IDE terminal, and each development environment IDE corresponds to debug a target board; or, 多个开发环境IDE终端与一个目标板连接,以调试同一目标板中不同硬件对象。Multiple development environment IDE terminals are connected to one target board to debug different hardware objects in the same target board. 8.根据权利要求6所述的系统,其特征在于,所述开发环境IDE终端,完成源代码编辑,进行编译、仿真调试后,完成应用程序所有需求功能开发;所述开发环境IDE终端,对已完成所有需求功能的源代码进行交叉编译,生成目标板上可执行文件;开发环境IDE终端,将所述目标板上执行文件上传至目标板上,完成开发。8. The system according to claim 6, wherein, the IDE terminal of the development environment, completes source code editing, and after compiling, emulation debugging, completes the development of all required functions of the application; the IDE terminal of the development environment, to The source codes that have completed all required functions are cross-compiled to generate executable files on the target board; the IDE terminal of the development environment uploads the executable files on the target board to the target board to complete the development. 9.根据权利要求6所述的系统,其特征在于,所述硬件对象包括I/O端口类外设、串口类外设、SPI类外设、I2C类外、A/D转换等外设中一种或多种。9. system according to claim 6, is characterized in that, described hardware object comprises in peripherals such as I/O port class peripheral device, serial port class peripheral device, SPI class peripheral device, I2C class outside, A/D conversion etc. one or more. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至5中任一项所述的方法的步骤。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
CN202110911888.4A 2021-08-10 2021-08-10 Method and device for debugging application program of terminal product Pending CN113641577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110911888.4A CN113641577A (en) 2021-08-10 2021-08-10 Method and device for debugging application program of terminal product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110911888.4A CN113641577A (en) 2021-08-10 2021-08-10 Method and device for debugging application program of terminal product

Publications (1)

Publication Number Publication Date
CN113641577A true CN113641577A (en) 2021-11-12

Family

ID=78420352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110911888.4A Pending CN113641577A (en) 2021-08-10 2021-08-10 Method and device for debugging application program of terminal product

Country Status (1)

Country Link
CN (1) CN113641577A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114490220A (en) * 2022-01-29 2022-05-13 重庆长安汽车股份有限公司 Remote debugging method and debugging system for vehicle-mounted entertainment system based on MQTT
CN114489000A (en) * 2021-12-30 2022-05-13 青岛鼎信通讯股份有限公司 Automatic detection system applied to energy controller
CN116016214A (en) * 2022-12-31 2023-04-25 国网辽宁省电力有限公司电力科学研究院 MQTT-based power distribution intelligent terminal simulation system and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751331A (en) * 2008-08-15 2010-06-23 北京北大众志微系统科技有限责任公司 Network computer platform board-level debugging on-line load monitoring method and system thereof
US20110154295A1 (en) * 2009-12-23 2011-06-23 Microsoft Corporation Design Time Debugging
CN109884978A (en) * 2019-04-02 2019-06-14 浙江捷诺电器股份有限公司 A kind of remote system and its method for PLC device debugging
CN110471845A (en) * 2019-07-16 2019-11-19 腾讯科技(深圳)有限公司 Smart machine on-line debugging method, apparatus and system, electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751331A (en) * 2008-08-15 2010-06-23 北京北大众志微系统科技有限责任公司 Network computer platform board-level debugging on-line load monitoring method and system thereof
US20110154295A1 (en) * 2009-12-23 2011-06-23 Microsoft Corporation Design Time Debugging
CN109884978A (en) * 2019-04-02 2019-06-14 浙江捷诺电器股份有限公司 A kind of remote system and its method for PLC device debugging
CN110471845A (en) * 2019-07-16 2019-11-19 腾讯科技(深圳)有限公司 Smart machine on-line debugging method, apparatus and system, electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无: "ESP8266程序加上MQTT调试工具", pages 1, Retrieved from the Internet <URL:https://download.csdn.net/download/weixin_43262746/10683079> *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489000A (en) * 2021-12-30 2022-05-13 青岛鼎信通讯股份有限公司 Automatic detection system applied to energy controller
CN114490220A (en) * 2022-01-29 2022-05-13 重庆长安汽车股份有限公司 Remote debugging method and debugging system for vehicle-mounted entertainment system based on MQTT
CN116016214A (en) * 2022-12-31 2023-04-25 国网辽宁省电力有限公司电力科学研究院 MQTT-based power distribution intelligent terminal simulation system and method

Similar Documents

Publication Publication Date Title
CN113641577A (en) Method and device for debugging application program of terminal product
CN106843869B (en) Front-end development engineering system and method
CN109800173B (en) Program debugging method, device and storage medium
CN113722020B (en) Interface calling method, device and computer readable storage medium
CN100403258C (en) Embedded device integrated development system and using method thereof
CN104050080B (en) User space debugs the method and system of linux kernel
KR20150063514A (en) Development, compiling and debugging method and device for application
Anwaarullah et al. RTOS based home automation system using Android
CN103595770B (en) Method and device for achieving file downloading through SDK
CN110531962A (en) Development process method, equipment and the computer readable storage medium of small routine
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
CN101667134A (en) Method for constructing compiling system, compiling system and constructing device thereof
CN105740139B (en) A kind of debugging embedded software method based on virtual environment
CN107577609A (en) A kind of embedded system dynamic module adjustment method of Intrusion Detection based on host end dynamic link
CN113434154B (en) Android application packaging method, device, storage medium and electronic device
CN112486492A (en) Page generation method and device, storage medium and electronic equipment
KR20110080448A (en) Application building system and method
CN108038241A (en) Integrated WEB visual workflows method, apparatus, readable storage medium storing program for executing and system
CN116308990A (en) Simulation and integration method and system of GPU supporting OpenGL
CN113127361A (en) Application program development method and device, electronic equipment and storage medium
CN103051728B (en) Remote-procedure calling method
CN106569972A (en) USB interface-based JTAG one-chip microcomputer wireless emulator and method
CN111625221B (en) Version control method, device, equipment and medium applied to integrated development environment
JP2013242629A (en) Control device, control method and instruction set
CN101364200A (en) A Breakpoint Realization Method of Embedded MIDlet Debugging Software

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination