WO2016095570A1 - Debugging method and apparatus for embedded system, and storage medium - Google Patents

Debugging method and apparatus for embedded system, and storage medium Download PDF

Info

Publication number
WO2016095570A1
WO2016095570A1 PCT/CN2015/088971 CN2015088971W WO2016095570A1 WO 2016095570 A1 WO2016095570 A1 WO 2016095570A1 CN 2015088971 W CN2015088971 W CN 2015088971W WO 2016095570 A1 WO2016095570 A1 WO 2016095570A1
Authority
WO
WIPO (PCT)
Prior art keywords
debugging
debug
address resolution
address
computer
Prior art date
Application number
PCT/CN2015/088971
Other languages
French (fr)
Chinese (zh)
Inventor
刘立伟
吴国峰
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2016095570A1 publication Critical patent/WO2016095570A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • step 306 the execution result is returned to the user through the serial port.
  • the first receiving unit 41 is configured to receive an address resolution result from the upper computer, where the address resolution result includes a storage address of the debugging object in a lower computer;
  • the debugging instruction may specifically include a parameter of the debugging function; then the calling unit 42 may be specifically configured to call the location according to the address resolution result and the parameter. Debug function.

Abstract

Disclosed are a debugging method and apparatus for an embedded system, and a storage medium. The method comprises: sending an address resolution request to an upper computer according to a debugging instruction input by a user, the address resolution request carrying the name of a debugged object (S11); receiving an address resolution result from the upper computer, the address resolution result comprising a storage address of the debugged object in a lower computer (S12); and according to the address resolution result, invoking the debugged object (S13).

Description

一种嵌入式系统的调试方法及装置、存储介质Method, device and storage medium for debugging embedded system 技术领域Technical field
本发明涉及嵌入式技术领域,特别是涉及一种嵌入式系统的调试方法及装置、存储介质。The present invention relates to the field of embedded technologies, and in particular, to a method and device for debugging an embedded system, and a storage medium.
背景技术Background technique
微波系统设备等嵌入式系统的MCU(Micro Control Unit,微控制单元),通常使用一些开源免费的操作系统,如freeRTOS。基于这些操作系统的程序,需要首先在上位机(PC)侧将程序编译、链接,形成可执行文件后下载到MCU上。MCU (Micro Control Unit) of embedded systems such as microwave system equipment usually uses some open source free operating systems, such as freeRTOS. Based on the programs of these operating systems, it is necessary to first compile and link the program on the host computer (PC) side to form an executable file and download it to the MCU.
由于MCU的资源空间非常有限,记载可执行文件中的函数名与函数存储地址关系的符号表无法存储在MCU中。这样,在对MCU的程序调试的过程中,只能在上位机侧编写变量输出指令,然后对程序重新编译链接、烧写、运行后才能查看到某个变量的值,调试效率很低。Since the resource space of the MCU is very limited, the symbol table describing the relationship between the function name and the function storage address in the executable file cannot be stored in the MCU. In this way, in the process of debugging the program of the MCU, the variable output instruction can only be written on the host computer side, and then the value of a variable can be viewed after the program is recompiled, burned, and run, and the debugging efficiency is very low.
发明内容Summary of the invention
本发明要解决的技术问题是提供一种嵌入式系统的调试方法及装置、存储介质,用以解决现有技术中嵌入式系统调试效率低下的问题。The technical problem to be solved by the present invention is to provide a debugging method and device for an embedded system, and a storage medium, which are used to solve the problem of low efficiency of debugging of the embedded system in the prior art.
本发明实施例提供的技术方案:The technical solution provided by the embodiment of the invention:
第一方面,本发明实施例提供一种嵌入式系统的调试方法,包括:根据用户输入的调试指令,向上位机发送地址解析请求,所述地址解析请求中携带调试对象的名称;接收来自所述上位机的地址解析结果,所述地址解析结果包括所述调试对象在下位机中的存储地址;根据所述地址解析结果,调用所述调试对象。 In a first aspect, an embodiment of the present invention provides a method for debugging an embedded system, including: sending an address resolution request to a host computer according to a debugging instruction input by a user, where the address resolution request carries a name of a debugging object; The result of the address resolution of the host computer, the address resolution result includes a storage address of the debug object in the lower computer; and the debug object is invoked according to the address resolution result.
在本发明的一种实施例中,所述调试对象包括调试函数或调试变量。In one embodiment of the invention, the debug object includes a debug function or a debug variable.
可选的,所述调试对象为调试函数,所述调试指令包括所述调试函数的参数;所述根据所述地址解析结果,调用所述调试对象具体包括:根据所述地址解析结果和所述参数,调用所述调试对象。Optionally, the debugging object is a debugging function, and the debugging instruction includes a parameter of the debugging function; and the calling the debugging object according to the address resolution result specifically includes: according to the address resolution result and the The parameter that calls the debug object.
第二方面,本发明实施例还提供一种嵌入式系统的调试方法,包括:接收来自下位机的地址解析请求;所述地址解析请求中携带调试对象的名称;根据所述调试对象的名称解析所述调试对象在下位机中的存储地址;将所述存储地址作为地址解析结果向所述下位机发送。In a second aspect, the embodiment of the present invention further provides a debugging method for an embedded system, including: receiving an address resolution request from a lower computer; the address resolution request carries a name of the debugging object; and parsing according to the name of the debugging object The storage address of the debug object in the lower computer; the storage address is sent to the lower computer as an address resolution result.
在本发明的一种实施例中,所述根据所述调试对象的名称解析所述调试对象在下位机中的存储地址包括:根据所述调试对象的名称在符号表中查找所述调试对象在下位机中的存储地址。In an embodiment of the present invention, the parsing the storage address of the debug object in the lower computer according to the name of the debug object comprises: searching for the debug object in the symbol table according to the name of the debug object The storage address in the lower computer.
第三方面,本发明实施例还提供一种嵌入式系统的调试装置,包括:In a third aspect, an embodiment of the present invention further provides an apparatus for debugging an embedded system, including:
第一发送单元,配置为根据用户输入的调试指令,向上位机发送地址解析请求,所述地址解析请求中携带调试对象的名称;The first sending unit is configured to send an address resolution request to the host computer according to the debugging instruction input by the user, where the address resolution request carries the name of the debugging object;
第一接收单元,配置为接收来自所述上位机的地址解析结果,所述地址解析结果包括所述调试对象在下位机中的存储地址;a first receiving unit, configured to receive an address resolution result from the upper computer, where the address resolution result includes a storage address of the debugging object in a lower computer;
调用单元,配置为根据所述地址解析结果,调用所述调试对象。The calling unit is configured to invoke the debugging object according to the address resolution result.
在本发明的一种实施例中,所述调试对象包括调试函数或调试变量。In one embodiment of the invention, the debug object includes a debug function or a debug variable.
在本发明的一种实施例中,所述调试对象为调试函数,所述调试指令包括所述调试函数的参数;所述调用单元,配置为根据所述地址解析结果和所述参数,调用所述调试函数。In an embodiment of the present invention, the debugging object is a debugging function, the debugging instruction includes a parameter of the debugging function, and the calling unit is configured to call the location according to the address resolution result and the parameter. Debug function.
第四方面,本发明实施例还提供一种嵌入式系统的调试装置,包括:In a fourth aspect, the embodiment of the present invention further provides an apparatus for debugging an embedded system, including:
第二接收单元,配置为接收来自下位机的地址解析请求;所述地址解析请求中携带调试对象的名称;a second receiving unit, configured to receive an address resolution request from the lower computer; the address resolution request carries a name of the debugging object;
解析单元,配置为根据所述调试对象的名称解析所述调试对象在下位 机中的存储地址;a parsing unit configured to parse the debug object according to a name of the debug object Storage address in the machine;
第二发送单元,配置为将所述存储地址作为地址解析结果向所述下位机发送。The second sending unit is configured to send the storage address to the lower computer as an address resolution result.
在本发明的一种实施例中,所述解析单元,配置为根据所述调试对象的名称在符号表中查找所述调试对象在下位机中的存储地址。In an embodiment of the present invention, the parsing unit is configured to search, in the symbol table, the storage address of the debug object in the lower computer according to the name of the debug object.
第五方面,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明第一方面实施例提供的嵌入式系统的调试方法。In a fifth aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform debugging of the embedded system provided by the first aspect of the present invention. method.
第六方面,本发明实施例提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明第二方面实施例提供的嵌入式系统的调试方法。In a sixth aspect, an embodiment of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to perform debugging of the embedded system provided by the second aspect of the present invention. method.
本发明实施例提供的嵌入式系统的调试方法及装置、存储介质,当进行调试时,能够向上位机发送地址解析请求,在该请求中携带调试对象的名称,通过上位机对该调试对象进行地址解析后,即可以根据解析结果直接在下位机中找到调试对象的存储地址,将该存储地址发送到下位机后,下位机能够通过调用该调试对象实现对下位机程序的调试,大大减少了开发和调试时间,有效提高了调试效率。The debugging method and device and the storage medium of the embedded system provided by the embodiment of the present invention can send an address resolution request to the host computer when performing debugging, and carry the name of the debugging object in the request, and perform the debugging object on the debugging object through the host computer. After address resolution, the storage address of the debug object can be found directly in the lower computer according to the analysis result. After the storage address is sent to the lower computer, the lower computer can debug the lower computer program by calling the debug object, which greatly reduces the number of instructions. Development and debugging time, effectively improve debugging efficiency.
附图说明DRAWINGS
图1是本发明实施例提供的嵌入式系统的调试方法的一种流程图;1 is a flowchart of a method for debugging an embedded system according to an embodiment of the present invention;
图2是本发明实施例提供的嵌入式系统的调试方法的另一种流程图;2 is another flowchart of a method for debugging an embedded system according to an embodiment of the present invention;
图3是本发明实施例提供的嵌入式系统的调试方法的一种详细流程图;3 is a detailed flowchart of a method for debugging an embedded system according to an embodiment of the present invention;
图4是本发明实施例提供的嵌入式系统的调试装置的一种结构示意图;4 is a schematic structural diagram of a debugging apparatus of an embedded system according to an embodiment of the present invention;
图5是本发明实施例提供的嵌入式系统的调试装置的另一种结构示意图。 FIG. 5 is another schematic structural diagram of a debugging apparatus of an embedded system according to an embodiment of the present invention.
具体实施方式detailed description
以下结合附图对本发明进行详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明的技术方案,并不限定本发明的保护范围。The invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of the invention and are not intended to limit the scope of the invention.
如图1所示,本发明实施例提供一种嵌入式系统的调试方法,基于下位机,该方法可包括:As shown in FIG. 1 , an embodiment of the present invention provides a debugging method for an embedded system, which is based on a lower computer, and the method may include:
步骤S11,根据用户输入的调试指令,向上位机发送地址解析请求,所述地址解析请求中携带调试对象的名称;Step S11, sending an address resolution request to the host computer according to the debugging instruction input by the user, where the address resolution request carries the name of the debugging object;
步骤S12,接收来自所述上位机的地址解析结果,所述地址解析结果包括所述调试对象在下位机中的存储地址;Step S12, receiving an address resolution result from the upper computer, where the address resolution result includes a storage address of the debugging object in a lower computer;
步骤S13,根据所述地址解析结果,调用所述调试对象。Step S13, the debug object is called according to the address resolution result.
本发明实施例提供的嵌入式系统的调试方法,当进行调试时,能够向上位机发送地址解析请求,在该地址请求中携带调试对象的名称,通过上位机对该调试对象进行地址解析后,即可以根据解析结果直接在下位机中找到调试对象的存储地址,从而能够通过调用该调试对象实现对下位机程序的调试,大大减少了开发和调试时间,有效提高了调试效率。The debugging method of the embedded system provided by the embodiment of the present invention can send an address resolution request to the host computer when the debugging is performed, and carry the name of the debugging object in the address request, and perform address resolution on the debugging object by the host computer. That is, the storage address of the debug object can be found directly in the lower computer according to the analysis result, so that the debugging of the lower computer program can be realized by calling the debug object, the development and debugging time is greatly reduced, and the debugging efficiency is effectively improved.
具体的,在步骤S11中,调试对象为存储在下位机中的一段程序,通过单独执行该段程序并查看相应的执行结果实现调试。根据类型的不同,调试对象具体可以包括调试函数或调试变量,其中,调试函数即该段程序为函数,调试变量即该段程序为变量。Specifically, in step S11, the debugging object is a program stored in the lower computer, and the debugging is realized by separately executing the segment program and checking the corresponding execution result. Depending on the type, the debug object may specifically include a debug function or a debug variable, wherein the debug function means that the program is a function, and the debug variable is a variable.
进一步地,在根据用户输入的调试指令,向上位机发送地址解析请求之前,所述方法还可包括:通过串口接收用户输入的调试指令。Further, before the address resolution request is sent to the host computer according to the debugging instruction input by the user, the method may further include: receiving, by using a serial port, a debugging instruction input by the user.
具体而言,下位机上设有人机交互界面,用户可以在该交互界面中输入调试指令,该指令通过串口传输至下位机的MCU中,从而实现人机交互。例如,在一个arm下位机中,用户想看一下其中一个递归函数的执行结果,则可以直接将该递归函数的函数名写到调试指令中,该指令通过串口输入 到arm的控制器中。Specifically, the lower computer is provided with a human-computer interaction interface, and the user can input a debugging instruction in the interactive interface, and the instruction is transmitted to the MCU of the lower computer through the serial port, thereby realizing human-computer interaction. For example, in an arm lower computer, if the user wants to see the execution result of one of the recursive functions, the function name of the recursive function can be directly written into the debug instruction, and the instruction is input through the serial port. Go to the arm controller.
由于存储在下位机中的程序已经是编译链接好的可执行程序,是一串二进制数,仅凭调试对象的名称已经无法从该可执行程序中确定调试对象的具体位置,从而准确地执行该程序,因此,在步骤S11中向与该下位机相连的上位机发送地址解析请求后,即可将地址解析工作交由上位机执行。Since the program stored in the lower computer is already a compiled executable program, which is a string of binary numbers, the specific location of the debug object cannot be determined from the executable program only by the name of the debug object, thereby accurately executing the program. Therefore, after the address resolution request is sent to the host computer connected to the lower computer in step S11, the address resolution work can be performed by the host computer.
在步骤S12中,下位机可以接收来自上位机的地址解析结果,该地址解析结果包括调试对象在下位机中的存储地址,这样,在步骤S13中即可以根据该存储地址,准确找到需要调试的函数或变量并进行调用。In step S12, the lower computer can receive the address resolution result from the upper computer, and the address resolution result includes the storage address of the debugging object in the lower computer, so that in step S13, the storage address can be accurately found according to the storage address. A function or variable is called.
可选地,如果调试对象为调试变量,则调用该变量可以实现对该变量的值或状态进行查询,如果调试对象为调试函数,则调用该函数可以获得该函数的执行结果,从而可以非常方便地对下位机程序进行调试。Optionally, if the debugging object is a debugging variable, the variable may be invoked to query the value or state of the variable. If the debugging object is a debugging function, calling the function may obtain the execution result of the function, which is very convenient. Debug the lower computer program.
具体地,对于有些调试函数,其本身不带参数,则用户输入调试指令时只需输入函数名即可,对于有些调试函数,其自身还携带若干参数,那么在用户输入调试指令时,除了函数名外,还需要输入调试函数对应的参数。相应的,在步骤S13中,根据所述地址解析结果,调用所述调试对象可具体包括:根据所述地址解析结果和所述参数,调用所述调试对象。Specifically, for some debugging functions, which do not have parameters themselves, the user only needs to input the function name when inputting the debugging instruction. For some debugging functions, it also carries several parameters, then when the user inputs the debugging instruction, in addition to the function. In addition to the name, you also need to enter the parameters corresponding to the debug function. Correspondingly, in step S13, the calling the debug object according to the address resolution result may specifically include: calling the debug object according to the address resolution result and the parameter.
相应地,本发明实施例还提供一种嵌入式系统的调试方法,基于上位机,如图2所示,该方法包括:Correspondingly, the embodiment of the present invention further provides a debugging method for an embedded system, which is based on a host computer, as shown in FIG. 2, the method includes:
步骤S21,接收来自下位机的地址解析请求;所述地址解析请求中携带调试对象的名称;Step S21: Receive an address resolution request from a lower computer; the address resolution request carries a name of the debugging object;
步骤S22,根据所述调试对象的名称解析所述调试对象在下位机中的存储地址;Step S22, parsing a storage address of the debugging object in the lower computer according to the name of the debugging object;
步骤S23,将所述存储地址作为地址解析结果向所述下位机发送。Step S23, the storage address is sent to the lower computer as an address resolution result.
本发明实施例提供的嵌入式系统的调试方法,当进行调试时,能够接收下位机发送的地址解析请求,然后利用上位机充足的资源对地址解析请 求中的调试对象进行地址解析,并将解析结果发送给下位机,以便使下位机能准确找到调试对象的存储地址,执行相应的调试程序,从而实现对下位机程序的调试,大大减少了开发和调试时间,有效提高了调试效率。The debugging method of the embedded system provided by the embodiment of the present invention can receive the address resolution request sent by the lower computer when debugging, and then use the sufficient resources of the upper computer to analyze the address. The debug object in the search performs address resolution, and sends the parsing result to the lower computer, so that the lower computer can accurately find the storage address of the debug object, execute the corresponding debug program, thereby realizing debugging of the lower computer program, greatly reducing development and The debugging time effectively improves the debugging efficiency.
具体的,步骤S21中,调试对象为存储在下位机中的一段程序,可以通过查看该程序的执行结果对程序本身进行验证从而实现调试,具体可以包括调试函数或调试变量,调试函数即调用对象为函数,调试变量即调用对象为变量。Specifically, in step S21, the debugging object is a program stored in the lower computer, and the program itself can be verified by checking the execution result of the program, thereby specifically including a debugging function or a debugging variable, and the debugging function is a calling object. For functions, the debug variable calls the object as a variable.
需要说明的是,程序在上位机侧被编译链接后会同时生成一个符号表,烧入下位机时,该符号表记载着程序的所有变量或函数在下位机中的存储地址。由于该符号表数据量较大,通常没有随程序一起烧入下位机中。但上位机资源相对丰富,可以在上位机处存储该符号表,这样,在步骤S22中即可根据调试对象的名称,在该符号表中查找到对应的存储地址,并在步骤S23中,将该存储地址作为地址解析结果向下位机发送。It should be noted that, when the program is compiled and linked on the host computer side, a symbol table is generated at the same time. When burning into the lower computer, the symbol table records the storage addresses of all the variables or functions of the program in the lower computer. Due to the large amount of data in the symbol table, it is usually not burned into the lower computer with the program. However, the upper computer resources are relatively rich, and the symbol table can be stored in the upper computer. In this way, in step S22, the corresponding storage address can be found in the symbol table according to the name of the debugging object, and in step S23, The storage address is sent to the lower computer as an address resolution result.
下面通过具体实施例对本发明提供的嵌入式系统的调试方法进行详细说明。如图3所示,在本发明的一个实施例中,上位机的主控板和下位机的显卡MCU之间可以协同操作从而实现对下位机MCU的调试。The debugging method of the embedded system provided by the present invention will be described in detail below through specific embodiments. As shown in FIG. 3, in an embodiment of the present invention, the main control board of the upper computer and the video card MCU of the lower computer can cooperate to realize debugging of the lower computer MCU.
首先在MCU侧实现一个shell任务,使该任务可以解析串口输入的字符信息(如调试指令),并将需要解析地址的字符识别出来以便传输给上位机。上位机收到MCU发送过来的地址解析请求,通过包含符号表的版本elf格式的文件得到相关字符对应的地址,并将地址回传给MCU侧。MCU得到上位机发送过来的具体地址信息,并结合通过串口得到的相关参数信息进行实际的函数调用或者变量查询工作,最后显示结果。具体可包括如下步骤:First, implement a shell task on the MCU side, so that the task can parse the character information input by the serial port (such as debugging instructions), and identify the characters that need to be resolved to be transmitted to the host computer. The upper computer receives the address resolution request sent by the MCU, obtains the address corresponding to the relevant character through the file containing the version of the symbol table elf format, and returns the address to the MCU side. The MCU obtains the specific address information sent by the host computer, and combines the relevant parameter information obtained through the serial port to perform the actual function call or variable query work, and finally displays the result. Specifically, the method may include the following steps:
步骤301,接收用户串口输入的函数名,参数,变量名;Step 301, receiving a function name, a parameter, and a variable name input by the user serial port;
步骤302,将用户输入封装成板间消息发给主控板; Step 302: The user input is encapsulated into an inter-board message and sent to the main control board.
步骤303,主控板接收板间消息,解析线卡版本的符号表;Step 303: The main control board receives the inter-board message and parses the symbol table of the line card version.
步骤304,将解析所得到的符号的执行地址返回给线卡;Step 304, returning an execution address of the obtained symbol to the line card;
步骤305,线卡接收主控发来的解析结果,到执行地址上调用函数或读写变量;Step 305, the line card receives the parsing result sent by the main control, and calls the function or the read/write variable to the execution address;
步骤306,通过串口返回执行结果给用户。In step 306, the execution result is returned to the user through the serial port.
本实施例提供的嵌入式系统的调试方法,在主控板侧和线卡MCU侧都提供了shell,可以通过运行shell对MCU进行调试的技术效果,无需重复进行程序编译、链接和烧写,从而大大节省了开发和调试的时间,有效提高了调试效率。The debugging method of the embedded system provided in this embodiment provides a shell on the main control board side and the line card MCU side, and can perform the technical effect of debugging the MCU by running the shell, without repeating program compilation, linking, and programming. This greatly saves development and debugging time and effectively improves debugging efficiency.
相应的,如图4所示,本发明的实施例还提供一种嵌入式系统的调试装置,包括:Correspondingly, as shown in FIG. 4, an embodiment of the present invention further provides an apparatus for debugging an embedded system, including:
第一发送单元40,配置为根据用户输入的调试指令,向上位机发送地址解析请求,所述地址解析请求中携带调试对象的名称;The first sending unit 40 is configured to send an address resolution request to the host computer according to the debugging instruction input by the user, where the address resolution request carries the name of the debugging object;
第一接收单元41,配置为接收来自所述上位机的地址解析结果,所述地址解析结果包括所述调试对象在下位机中的存储地址;The first receiving unit 41 is configured to receive an address resolution result from the upper computer, where the address resolution result includes a storage address of the debugging object in a lower computer;
调用单元42,配置为根据所述地址解析结果,调用所述调试对象。The calling unit 42 is configured to invoke the debug object according to the address resolution result.
本发明实施例提供的嵌入式系统的调试装置,当进行调试时,第一发送单元40能够向上位机发送地址解析请求,在该地址请求中携带调试对象的名称,并通过第一接收单元41,配置为接收上位机的地址解析结果,调用单元42即可以根据解析结果直接在下位机中找到调试对象的存储地址,并通过调用该调试对象实现对下位机程序的调试,大大减少了开发和调试时间,有效提高了调试效率。The debugging device of the embedded system provided by the embodiment of the present invention, when performing debugging, the first sending unit 40 can send an address resolution request to the host computer, and carry the name of the debugging object in the address request, and pass the first receiving unit 41. , configured to receive the address resolution result of the upper computer, the calling unit 42 can directly find the storage address of the debugging object in the lower computer according to the analysis result, and realize debugging of the lower computer program by calling the debugging object, thereby greatly reducing development and The debugging time effectively improves the debugging efficiency.
可选的,所述调试对象可包括调试函数或调试变量。Optionally, the debug object may include a debug function or a debug variable.
当调试对象为调试函数时,调试指令具体可包括调试函数的参数;那么调用单元42,可具体配置为根据所述地址解析结果和所述参数,调用所 述调试函数。When the debugging object is a debugging function, the debugging instruction may specifically include a parameter of the debugging function; then the calling unit 42 may be specifically configured to call the location according to the address resolution result and the parameter. Debug function.
相应地,如图5所示,本发明还提供一种嵌入式系统的调试装置,包括:第二接收单元50,配置为接收来自下位机的地址解析请求;所述地址解析请求中携带调试对象的名称;Correspondingly, as shown in FIG. 5, the present invention further provides an apparatus for debugging an embedded system, comprising: a second receiving unit 50 configured to receive an address resolution request from a lower computer; and the address resolution request carries a debugging object The name;
解析单元51,配置为根据所述调试对象的名称解析所述调试对象在下位机中的存储地址;The parsing unit 51 is configured to parse the storage address of the debugging object in the lower computer according to the name of the debugging object;
第二发送单元52,配置为将所述存储地址作为地址解析结果向所述下位机发送。The second sending unit 52 is configured to send the storage address to the lower computer as an address resolution result.
本发明实施例提供的嵌入式系统的调试装置,当进行调试时,第二接收单元50能够接收下位机发送的地址解析请求,在该地址请求中携带调试对象的名称,然后解析单元51利用上位机充足的资源对该调试对象进行地址解析,第二发送单元52将解析结果发送给下位机,以便使下位机能准确找到调试对象的存储地址,实现对下位机程序的调试,从而大大减少了开发和调试时间,有效提高了调试效率。The debugging device of the embedded system provided by the embodiment of the present invention, when performing debugging, the second receiving unit 50 can receive the address resolution request sent by the lower computer, carry the name of the debugging object in the address request, and then the parsing unit 51 utilizes the upper position. The sufficient resources are used for address resolution of the debug object, and the second sending unit 52 sends the parsing result to the lower computer, so that the lower computer can accurately find the storage address of the debug object, thereby realizing debugging of the lower computer program, thereby greatly reducing development. And debugging time, effectively improve the debugging efficiency.
可选地,解析单元51,具体可配置为根据所述调试对象的名称在符号表中查找所述调试对象在下位机中的存储地址。Optionally, the parsing unit 51 is specifically configured to search, in the symbol table, the storage address of the debug object in the lower computer according to the name of the debug object.
本发明实施例提供的嵌入式系统的调试装置中的第一发送单元、第一接收单元和调用单元,都可以通过计算设备中处理器来实现;本发明实施例提供的嵌入式系统的调试装置中的第二接收单元、解析单元、第二发送单元,都可以通过计算设备中处理器来实现。在具体实施例的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。The first sending unit, the first receiving unit, and the calling unit in the debugging device of the embedded system provided by the embodiment of the present invention can be implemented by the processor in the computing device; the debugging device of the embedded system provided by the embodiment of the present invention The second receiving unit, the parsing unit, and the second sending unit may all be implemented by a processor in the computing device. In a particular embodiment, the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA).
需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的嵌入式系统的调试方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技 术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present invention, if the debugging method of the embedded system described above is implemented in the form of a software function module, and is sold or used as an independent product, it may also be stored in a computer readable storage medium. . Based on such understanding, the technique of the embodiment of the present invention The portion of the program that contributes in essence or to the prior art may be embodied in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer) , a server, or a network device, etc.) performs all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read only memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
相应地,本发明实施例再提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行本发明实施例中的嵌入式系统的调试方法。Correspondingly, the embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the debugging method of the embedded system in the embodiment of the present invention.
尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above.
工业实用性Industrial applicability
本发明实施例中,当进行调试时,能够向上位机发送地址解析请求,在该地址请求中携带调试对象的名称,通过上位机对该调试对象进行地址解析后,即可以根据解析结果直接在下位机中找到调试对象的存储地址,从而能够通过调用该调试对象实现对下位机程序的调试,大大减少了开发和调试时间,有效提高了调试效率。 In the embodiment of the present invention, when debugging, the address resolution request can be sent to the host computer, and the name of the debugging object is carried in the address request. After the address resolution of the debugging object is performed by the host computer, the analysis result can be directly based on the analysis result. The storage address of the debug object is found in the lower computer, so that the debugging of the lower computer program can be realized by calling the debug object, the development and debugging time is greatly reduced, and the debugging efficiency is effectively improved.

Claims (12)

  1. 一种嵌入式系统的调试方法,包括:A method for debugging an embedded system, comprising:
    根据用户输入的调试指令,向上位机发送地址解析请求,所述地址解析请求中携带调试对象的名称;Sending an address resolution request to the host computer according to the debugging instruction input by the user, where the address resolution request carries the name of the debugging object;
    接收来自所述上位机的地址解析结果,所述地址解析结果包括所述调试对象在下位机中的存储地址;Receiving an address resolution result from the upper computer, where the address resolution result includes a storage address of the debug object in a lower computer;
    根据所述地址解析结果,调用所述调试对象。The debug object is called according to the address resolution result.
  2. 根据权利要求1所述的方法,其中,所述调试对象包括调试函数或调试变量。The method of claim 1 wherein the debug object comprises a debug function or a debug variable.
  3. 根据权利要求2所述的方法,其中,所述调试对象为调试函数,所述调试指令包括所述调试函数的参数;The method of claim 2, wherein the debug object is a debug function, the debug instruction including parameters of the debug function;
    所述根据所述地址解析结果,调用所述调试对象具体包括:The invoking the debugging object according to the address resolution result specifically includes:
    根据所述地址解析结果和所述参数,调用所述调试对象。The debug object is called according to the address resolution result and the parameter.
  4. 一种嵌入式系统的调试方法,包括:接收来自下位机的地址解析请求;所述地址解析请求中携带调试对象的名称;A method for debugging an embedded system, comprising: receiving an address resolution request from a lower computer; and carrying the name of the debugging object in the address resolution request;
    根据所述调试对象的名称解析所述调试对象在下位机中的存储地址;Parsing a storage address of the debug object in the lower computer according to the name of the debug object;
    将所述存储地址作为地址解析结果向所述下位机发送。The storage address is sent to the lower computer as an address resolution result.
  5. 根据权利要求4所述的方法,其中,所述根据所述调试对象的名称解析所述调试对象在下位机中的存储地址包括:The method according to claim 4, wherein the parsing the storage address of the debug object in the lower computer according to the name of the debug object comprises:
    根据所述调试对象的名称在符号表中查找所述调试对象在下位机中的存储地址。Searching, in the symbol table, the storage address of the debug object in the lower computer according to the name of the debug object.
  6. 一种嵌入式系统的调试装置,包括:A debugging device for an embedded system, comprising:
    第一发送单元,配置为根据用户输入的调试指令,向上位机发送地址解析请求,所述地址解析请求中携带调试对象的名称; The first sending unit is configured to send an address resolution request to the host computer according to the debugging instruction input by the user, where the address resolution request carries the name of the debugging object;
    第一接收单元,配置为接收来自所述上位机的地址解析结果,所述地址解析结果包括所述调试对象在下位机中的存储地址;a first receiving unit, configured to receive an address resolution result from the upper computer, where the address resolution result includes a storage address of the debugging object in a lower computer;
    调用单元,配置为根据所述地址解析结果,调用所述调试对象。The calling unit is configured to invoke the debugging object according to the address resolution result.
  7. 根据权利要求6所述的装置,其中,所述调试对象包括调试函数或调试变量。The apparatus of claim 6 wherein the debug object comprises a debug function or a debug variable.
  8. 根据权利要求7所述的装置,其中,所述调试对象为调试函数,所述调试指令包括所述调试函数的参数;The apparatus of claim 7, wherein the debug object is a debug function, the debug instruction including parameters of the debug function;
    所述调用单元,具体配置为根据所述地址解析结果和所述参数,调用所述调试函数。The calling unit is specifically configured to invoke the debugging function according to the address resolution result and the parameter.
  9. 一种嵌入式系统的调试装置,包括:A debugging device for an embedded system, comprising:
    第二接收单元,配置为接收来自下位机的地址解析请求;所述地址解析请求中携带调试对象的名称;a second receiving unit, configured to receive an address resolution request from the lower computer; the address resolution request carries a name of the debugging object;
    解析单元,配置为根据所述调试对象的名称解析所述调试对象在下位机中的存储地址;The parsing unit is configured to parse the storage address of the debugging object in the lower computer according to the name of the debugging object;
    第二发送单元,配置为将所述存储地址作为地址解析结果向所述下位机发送。The second sending unit is configured to send the storage address to the lower computer as an address resolution result.
  10. 根据权利要求9所述的装置,其中,所述解析单元,配置为根据所述调试对象的名称在符号表中查找所述调试对象在下位机中的存储地址。The apparatus according to claim 9, wherein the parsing unit is configured to look up a storage address of the debug object in the lower computer in the symbol table according to the name of the debug object.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至3任一项所述的嵌入式系统的调试方法。A computer storage medium storing computer executable instructions for performing the debugging method of the embedded system according to any one of claims 1 to 3.
  12. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求4或5所述的嵌入式系统的调试方法。 A computer storage medium storing computer executable instructions for executing the debugging method of the embedded system of claim 4 or 5.
PCT/CN2015/088971 2014-12-17 2015-09-06 Debugging method and apparatus for embedded system, and storage medium WO2016095570A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410784867.0A CN105760289A (en) 2014-12-17 2014-12-17 Debugging method and device of embedded system
CN201410784867.0 2014-12-17

Publications (1)

Publication Number Publication Date
WO2016095570A1 true WO2016095570A1 (en) 2016-06-23

Family

ID=56125842

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/088971 WO2016095570A1 (en) 2014-12-17 2015-09-06 Debugging method and apparatus for embedded system, and storage medium

Country Status (2)

Country Link
CN (1) CN105760289A (en)
WO (1) WO2016095570A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144849A (en) * 2018-07-23 2019-01-04 武汉虹信通信技术有限责任公司 A kind of embedded software adjusting, measuring method
CN109738870A (en) * 2019-01-24 2019-05-10 山东超越数控电子股份有限公司 A kind of method and device for transmitting Radar Signal Processing software
CN111176694A (en) * 2019-12-31 2020-05-19 无锡矽杰微电子有限公司 Multi-paging burning method for OTP type MCU
CN112035346A (en) * 2020-08-25 2020-12-04 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Automatic testing method, system and medium based on embedded DSP operating system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106354637A (en) * 2016-08-29 2017-01-25 青岛海信宽带多媒体技术有限公司 Method and device for debugging system
CN107770261A (en) * 2017-10-13 2018-03-06 郑州云海信息技术有限公司 A kind of computational methods and relevant apparatus based on distributed memory system
CN108932171B (en) * 2018-06-15 2022-04-01 中国航发控制系统研究所 Embedded software interaction method
CN115150431A (en) * 2022-06-22 2022-10-04 重庆长安汽车股份有限公司 Finished vehicle MCU remote debugging system, method and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030074650A1 (en) * 2001-10-17 2003-04-17 Tankut Akgul Debugger operating system for embedded systems
CN1747472A (en) * 2005-10-17 2006-03-15 浙江大学 Universal embedded marker and marking method based on CCP
CN103136107A (en) * 2011-12-03 2013-06-05 南京南瑞继保电气有限公司 Variable debugging method of embedded program dynamic storage allocation

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1139876C (en) * 1999-11-30 2004-02-25 深圳市中兴通讯股份有限公司 Embedded software aided debugging method
CN101340314A (en) * 2008-08-11 2009-01-07 中兴通讯股份有限公司 Real-time debugging positioning method of embedded system and apparatus thereof
US8984349B2 (en) * 2012-09-28 2015-03-17 Hcl Technologies Limited Method and system for automating the process of testing a device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030074650A1 (en) * 2001-10-17 2003-04-17 Tankut Akgul Debugger operating system for embedded systems
CN1747472A (en) * 2005-10-17 2006-03-15 浙江大学 Universal embedded marker and marking method based on CCP
CN103136107A (en) * 2011-12-03 2013-06-05 南京南瑞继保电气有限公司 Variable debugging method of embedded program dynamic storage allocation

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144849A (en) * 2018-07-23 2019-01-04 武汉虹信通信技术有限责任公司 A kind of embedded software adjusting, measuring method
CN109738870A (en) * 2019-01-24 2019-05-10 山东超越数控电子股份有限公司 A kind of method and device for transmitting Radar Signal Processing software
CN111176694A (en) * 2019-12-31 2020-05-19 无锡矽杰微电子有限公司 Multi-paging burning method for OTP type MCU
CN111176694B (en) * 2019-12-31 2023-09-08 无锡矽杰微电子有限公司 Multi-paging burning method for OTP MCU
CN112035346A (en) * 2020-08-25 2020-12-04 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Automatic testing method, system and medium based on embedded DSP operating system

Also Published As

Publication number Publication date
CN105760289A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
WO2016095570A1 (en) Debugging method and apparatus for embedded system, and storage medium
US10990367B2 (en) Application development method, tool, and device, and storage medium
CN109885311B (en) Application program generation method and device
CN109918055B (en) Application program generation method and device
US8434057B2 (en) Optimized implementation of breakpoint in java debugger agent
US9176848B2 (en) Program debugger and program debugging
US9436449B1 (en) Scenario-based code trimming and code reduction
US10540262B2 (en) Using edit and continue to dynamically set and unset optimizations in source code while debugging
WO2016196701A1 (en) Natural language engine for coding and debugging
US9772862B2 (en) Integration project center
US10078510B1 (en) Late-stage software feature reduction tool for security and performance
US8572579B2 (en) Break on next called function or method in java debugger agent
WO2016054880A1 (en) Apk file application expanding method and device
US8930923B2 (en) Generating debugging extension source code utilizing debugging information
WO2017020459A1 (en) Method and apparatus for configuring plugin package for host
CN111209001A (en) Method, system, equipment and medium for batch generation of APKs of android channels
WO2023213263A1 (en) Program compiling method, program starting method, and device and storage medium
US9116714B2 (en) Methods and systems for file processing
TW201715398A (en) Method and system for filtering system information in an operating system for enhancing the efficiency in searching for a system log in the operation system
WO2018001041A1 (en) Interface implementation method and device, set-top box, and storage medium
US9244982B2 (en) Static analysis of PL/SQL objects and SQL queries
CN110795353A (en) Debugging method, device and equipment for fast application and storage medium
CN106610845B (en) Information management method, device, server and system
TW201502985A (en) Method and device for processing file
CN111782239B (en) Method, device and storage medium for software packaging and source code version information acquisition

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15869081

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15869081

Country of ref document: EP

Kind code of ref document: A1