CN105760289A - Debugging method and device of embedded system - Google Patents

Debugging method and device of embedded system Download PDF

Info

Publication number
CN105760289A
CN105760289A CN201410784867.0A CN201410784867A CN105760289A CN 105760289 A CN105760289 A CN 105760289A CN 201410784867 A CN201410784867 A CN 201410784867A CN 105760289 A CN105760289 A CN 105760289A
Authority
CN
China
Prior art keywords
debugging
debugger object
address resolution
address
slave computer
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
CN201410784867.0A
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201410784867.0A priority Critical patent/CN105760289A/en
Priority to PCT/CN2015/088971 priority patent/WO2016095570A1/en
Publication of CN105760289A publication Critical patent/CN105760289A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The invention provides a debugging method and device of an embedded system, relates to the technical field of embedded systems and aims to solve the problem that the debugging efficiency of embedded systems is low in the prior art. The method comprises steps as follows: an address resolution request is sent to an upper computer according to a debugging command input by a user, and the address resolution request carries the name of a debugging object; an address resolution result from the upper computer is received and comprises a storage address of the debugging object in a lower computer; the debugging object is called according to the address resolution result.

Description

The adjustment method of a kind of embedded system and device
Technical field
The present invention relates to field of embedded technology, particularly relate to adjustment method and the device of a kind of embedded system.
Background technology
The MCU (MicroControlUnit, micro-control unit) of the embedded systems such as microwave device, it is common to use some free operating systems of increasing income, such as freeRTOS.Program based on these operating systems, it is necessary to first in host computer (PC) side, program compiled, connect, download on MCU after forming executable file.
Owing to the resource space of MCU is very limited, the symbol table recording the storage address relationship of the function name function in executable file cannot be stored in MCU.So, in the process to the program debugging of MCU, can only writing variable output order at upper pusher side, then to the value that just can view certain variable after routine recompilation connection, programming, operation, debugging efficiency is very low.
Summary of the invention
The technical problem to be solved in the present invention is to provide adjustment method and the device of a kind of embedded system, in order to solve the problem of embedded systems debugging inefficiency in prior art.
On the one hand, the present invention provides the adjustment method of a kind of embedded system, including: the debugging instruction according to user's input, send address resolution request to host computer, described address resolution request carries the title of debugger object;Receiving the address resolution result from described host computer, described address resolution result includes described debugger object storage address in slave computer;According to described address resolution result, call described debugger object.
Optionally, described debugger object includes debugging function or debugging variable.
Optionally, described debugger object is debugging function, and described debugging instruction includes the parameter of described debugging function;Described according to described address resolution result, call described debugger object and specifically include: according to described address resolution result and described parameter, call described debugger object.
On the other hand, the present invention also provides for the adjustment method of a kind of embedded system, including: receive the address resolution request from slave computer;Described address resolution request carries the title of debugger object;The storage address in slave computer of the debugger object described in name resolving according to described debugger object;Described storage address is sent as address resolution result to described slave computer.
Optionally, described debugger object storage address in slave computer according to the name resolving of described debugger object includes: search described debugger object storage address in slave computer in symbol table according to the title of described debugger object.
On the other hand, the present invention also provides for the debugging apparatus of a kind of embedded system, including: the first transmitting element, for the debugging instruction according to user's input, send address resolution request to host computer, described address resolution request carries the title of debugger object;First receives unit, and for receiving the address resolution result from described host computer, described address resolution result includes described debugger object storage address in slave computer;Call unit, for according to described address resolution result, calling described debugger object.
Optionally, described debugger object includes debugging function or debugging variable.
Optionally, described debugger object is debugging function, and described debugging instruction includes the parameter of described debugging function;Described call unit, specifically for according to described address resolution result and described parameter, calling described debugging function.
On the other hand, the present invention also provides for the debugging apparatus of a kind of embedded system, including: second receives unit, for receiving the address resolution request from slave computer;Described address resolution request carries the title of debugger object;Resolution unit, for debugger object storage address in slave computer according to the name resolving of described debugger object;Second transmitting element, for sending described storage address to described slave computer as address resolution result.
Optionally, described resolution unit, specifically for searching described debugger object storage address in slave computer according to the title of described debugger object in symbol table.
The adjustment method of the embedded system that the embodiment of the present invention provides and device, when debugging, address resolution request can be sent to host computer, this Address requests is carried the title of debugger object, after this debugger object being carried out address resolution by host computer, namely the storage address of debugger object directly can be found in slave computer according to analysis result, it is thus possible to realize the debugging to program of lower computer by calling this debugger object, greatly reduce exploitation and debugging time, be effectively increased debugging efficiency.
Accompanying drawing explanation
Fig. 1 is a kind of flow chart of the adjustment method of the embedded system that the embodiment of the present invention provides;
Fig. 2 is the another kind of flow chart of the adjustment method of the embedded system that the embodiment of the present invention provides;
Fig. 3 is a kind of detail flowchart of the adjustment method of the embedded system that the embodiment of the present invention provides;
Fig. 4 is a kind of structural representation of the debugging apparatus of the embedded system that the embodiment of the present invention provides;
Fig. 5 is the another kind of structural representation of the debugging apparatus of the embedded system that the embodiment of the present invention provides.
Detailed description of the invention
Below in conjunction with accompanying drawing, the present invention is described in detail.Should be appreciated that specific embodiment described herein is only in order to explain the present invention, does not limit the present invention.
As it is shown in figure 1, the embodiment of the present invention provides the adjustment method of a kind of embedded system, based on slave computer, the method comprises the steps that
S11, the debugging instruction according to user's input, send address resolution request to host computer, described address resolution request carries the title of debugger object;
S12, receives the address resolution result from described host computer, and described address resolution result includes described debugger object storage address in slave computer;
S13, according to described address resolution result, calls described debugger object.
The adjustment method of the embedded system that the embodiment of the present invention provides, when debugging, address resolution request can be sent to host computer, this Address requests is carried the title of debugger object, after this debugger object being carried out address resolution by host computer, namely directly can find the storage address of debugger object in slave computer according to analysis result such that it is able to realize the debugging to program of lower computer by calling this debugger object, greatly reduce exploitation and debugging time, be effectively increased debugging efficiency.
Concrete, in step s 11, debugger object is the one section of program being stored in slave computer, by individually performing this section of program and checking that the corresponding result that performs realizes debugging.Difference according to type, debugger object specifically can include debugging function or debugging variable, and wherein, debugging function i.e. this section of program is function, and debugging variable i.e. this section of program is variable.
Further, in the debugging instruction inputted according to user, before host computer transmission address resolution request, described method may also include that the debugging instruction being received user's input by serial ports.
Specifically, slave computer is provided with human-computer interaction interface, and user can input debugging instruction in this interactive interface, and this instruction passes through Serial Port Transmission to the MCU of slave computer, thus realizing man-machine interaction.Such as, in an arm slave computer, user wants the execution result having a look one of them recursive function, then can directly the function name of this recursive function be write in debugging instruction, and this instruction is input in the controller of arm by serial ports.
Program owing to being stored in slave computer has been the executable program that compiling connects, it it is a string binary number, the particular location of debugger object only cannot have been determined from this executable program with the title of debugger object, thus performing this program exactly, therefore, after sending address resolution request to the host computer being connected with this slave computer in step s 11, host computer can be transferred to perform address resolution work.
In step s 12, slave computer can receive the address resolution result from host computer, and this address resolution result includes debugger object storage address in slave computer, so, namely according to this storage address, can accurately find the function needing debugging or variable and call in step s 13.
Optionally, if debugger object is debugging variable, then calls this variable and can realize the value to this variable or state is inquired about, if debugger object is debugging function, then call this function and can obtain the execution result of this function, such that it is able to easily program of lower computer is debugged.
Concrete, for some debugging function, itself is without parameter, then user only needs input function name when inputting debugging instruction, for some debugging function, himself also carries some parameters, then when user inputs debugging instruction, except function name, in addition it is also necessary to the parameter that input debugging function is corresponding.Accordingly, in step s 13, according to described address resolution result, call described debugger object and may particularly include: according to described address resolution result and described parameter, call described debugger object.
Accordingly, the embodiment of the present invention also provides for the adjustment method of a kind of embedded system, based on host computer, as in figure 2 it is shown, the method includes:
S21, receives the address resolution request from slave computer;Described address resolution request carries the title of debugger object;
S22, debugger object storage address in slave computer according to the name resolving of described debugger object;
S23, sends described storage address to described slave computer as address resolution result.
The adjustment method of the embedded system that the embodiment of the present invention provides, when debugging, it is able to receive that the address resolution request that slave computer sends, debugger object in address resolution request is carried out address resolution by the resource then utilizing host computer sufficient, and analysis result is sent to slave computer, to make the next function accurately find the storage address of debugger object, perform corresponding debugging routine, thus realizing the debugging to program of lower computer, greatly reduce exploitation and debugging time, be effectively increased debugging efficiency.
Concrete, in step S21, debugger object is the one section of program being stored in slave computer, can pass through to check that program itself is verified thus realizing debugging by the execution result of this program, specifically can include debugging function or debugging variable, namely debugging function calls object is function, and namely debugging variable calls object is variable.
Connecting it should be noted that program is compiled at upper pusher side, during burned slave computer, can generate a symbol table, this symbol table recites all variablees or the function storage address in slave computer of program.Owing to this symbol table data volume is relatively big, usually not with in the burned slave computer of program.But host computer resource relative abundance, it is possible to store this symbol table at host computer place, so, can according to the title of debugger object in step S22, this symbol table finds the storage address of correspondence, and in step S23, this storage address is sent to slave computer as address resolution result.
Below by specific embodiment, the adjustment method of embedded system provided by the invention is described in detail.As it is shown on figure 3, in one embodiment of the invention, operation can be worked in coordination with between master control borad and the video card MCU of slave computer of host computer thus realizing the debugging to slave computer MCU.
First realize a shell task in MCU side, make this task can resolve the character information (such as debugging instruction) of serial ports input, and the character recognition resolving address will be needed out to be transferred to host computer.Host computer receives the MCU address resolution request sended over, and the file of the version elf form by comprising symbol table obtains the address that relevant character is corresponding, and address returns to MCU side.MCU obtains the specific address information that host computer sends over, and combination carries out function call or the variable query work of reality by the relevant parameter information that serial ports obtains, and finally shows result.Specifically can comprise the steps:
301. receive the function name of user's serial ports input, parameter, variable name;
302. become message between different boards to issue master control borad user's input package;
303. master control borad receives message between different boards, resolve the symbol table of line card version;
304. the execution address resolving obtained symbol is returned to line card;
305. line card receives the analysis result that master control is sent, to execution address, call function or read-write variable;
306. returned by serial ports and perform result to user.
The adjustment method of the embedded system that the present embodiment provides, shell is both provided in master control borad side and line card MCU side, can by running the shell technique effect that MCU is debugged, without repeating program compiling, connecting and programming, thus being greatly saved exploitation and the time of debugging, it is effectively increased debugging efficiency.
Accordingly, as shown in Figure 4, embodiments of the invention also provide for the debugging apparatus of a kind of embedded system, including:
First transmitting element 40, for the debugging instruction according to user's input, sends address resolution request to host computer, carries the title of debugger object in described address resolution request;
First receives unit 41, and for receiving the address resolution result from described host computer, described address resolution result includes described debugger object storage address in slave computer;
Call unit 42, for according to described address resolution result, calling described debugger object.
The debugging apparatus of the embedded system that the embodiment of the present invention provides, when debugging, first transmitting element 40 can send address resolution request to host computer, this Address requests is carried the title of debugger object, and the address resolution result of host computer is received by the first reception unit 41, namely call unit 42 directly can find the storage address of debugger object according to analysis result in slave computer, and realize the debugging to program of lower computer by calling this debugger object, greatly reduce exploitation and debugging time, be effectively increased debugging efficiency.
Optionally, described debugger object can include debugging function or debugging variable.
When debugger object is for debugging function, debugging instruction specifically can include the parameter of debugging function;So call unit 42, can specifically for according to described address resolution result and described parameter, calling described debugging function.
Accordingly, as it is shown in figure 5, the present invention also provides for the debugging apparatus of a kind of embedded system, including:
Second receives unit 50, for receiving the address resolution request from slave computer;Described address resolution request carries the title of debugger object;
Resolution unit 51, for debugger object storage address in slave computer according to the name resolving of described debugger object;
Second transmitting element 52, for sending described storage address to described slave computer as address resolution result.
The debugging apparatus of the embedded system that the embodiment of the present invention provides, when debugging, second receives unit 50 is able to receive that the address resolution request that slave computer sends, this Address requests is carried the title of debugger object, then resolution unit 51 utilizes the resource that host computer is sufficient that this debugger object is carried out address resolution, analysis result is sent to slave computer by the second transmitting element 52, to make the next function accurately find the storage address of debugger object, realize the debugging to program of lower computer, thus greatly reducing exploitation and debugging time, it is effectively increased debugging efficiency.
Optionally, resolution unit 51, it is particularly used in the title according to described debugger object in symbol table, searches described debugger object storage address in slave computer.
Although being example purpose, having been disclosed for the preferred embodiments of the present invention, it is also possible for those skilled in the art will recognize various improvement, increase and replacement, and therefore, the scope of the present invention should be not limited to above-described embodiment.

Claims (10)

1. the adjustment method of an embedded system, it is characterised in that including:
Debugging instruction according to user's input, sends address resolution request to host computer, carries the title of debugger object in described address resolution request;
Receiving the address resolution result from described host computer, described address resolution result includes described debugger object storage address in slave computer;
According to described address resolution result, call described debugger object.
2. method according to claim 1, it is characterised in that described debugger object includes debugging function or debugging variable.
3. method according to claim 2, it is characterised in that described debugger object is debugging function, and described debugging instruction includes the parameter of described debugging function;
Described according to described address resolution result, call described debugger object and specifically include:
According to described address resolution result and described parameter, call described debugger object.
4. the adjustment method of an embedded system, it is characterised in that including:
Receive the address resolution request from slave computer;Described address resolution request carries the title of debugger object;
The storage address in slave computer of the debugger object described in name resolving according to described debugger object;
Described storage address is sent as address resolution result to described slave computer.
5. method according to claim 4, it is characterised in that described debugger object storage address in slave computer according to the name resolving of described debugger object includes:
Title according to described debugger object searches described debugger object storage address in slave computer in symbol table.
6. the debugging apparatus of an embedded system, it is characterised in that including:
First transmitting element, for the debugging instruction according to user's input, sends address resolution request to host computer, carries the title of debugger object in described address resolution request;
First receives unit, and for receiving the address resolution result from described host computer, described address resolution result includes described debugger object storage address in slave computer;
Call unit, for according to described address resolution result, calling described debugger object.
7. device according to claim 6, it is characterised in that described debugger object includes debugging function or debugging variable.
8. device according to claim 7, it is characterised in that described debugger object is debugging function, and described debugging instruction includes the parameter of described debugging function;
Described call unit, specifically for according to described address resolution result and described parameter, calling described debugging function.
9. the debugging apparatus of an embedded system, it is characterised in that including:
Second receives unit, for receiving the address resolution request from slave computer;Described address resolution request carries the title of debugger object;
Resolution unit, for debugger object storage address in slave computer according to the name resolving of described debugger object;
Second transmitting element, for sending described storage address to described slave computer as address resolution result.
10. device according to claim 9, it is characterised in that described resolution unit, specifically for searching described debugger object storage address in slave computer according to the title of described debugger object in symbol table.
CN201410784867.0A 2014-12-17 2014-12-17 Debugging method and device of embedded system Pending CN105760289A (en)

Priority Applications (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
PCT/CN2015/088971 WO2016095570A1 (en) 2014-12-17 2015-09-06 Debugging method and apparatus for embedded system, and storage medium

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN105760289A true CN105760289A (en) 2016-07-13

Family

ID=56125842

Family Applications (1)

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

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
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
CN108932171A (en) * 2018-06-15 2018-12-04 中国航发控制系统研究所 Embedded software exchange method
CN115150431A (en) * 2022-06-22 2022-10-04 重庆长安汽车股份有限公司 Finished vehicle MCU remote debugging system, method and storage medium

Families Citing this family (4)

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

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1286431A (en) * 1999-11-30 2001-03-07 深圳市中兴通讯股份有限公司 Embedded software aided debugging method
CN101340314A (en) * 2008-08-11 2009-01-07 中兴通讯股份有限公司 Real-time debugging positioning method of embedded system and apparatus thereof
US20140095931A1 (en) * 2012-09-28 2014-04-03 Sivasakthivel Sadasivam Method and system for automating the process of testing a device

Family Cites Families (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
CN1747472B (en) * 2005-10-17 2011-09-07 浙江大学 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1286431A (en) * 1999-11-30 2001-03-07 深圳市中兴通讯股份有限公司 Embedded software aided debugging method
CN101340314A (en) * 2008-08-11 2009-01-07 中兴通讯股份有限公司 Real-time debugging positioning method of embedded system and apparatus thereof
US20140095931A1 (en) * 2012-09-28 2014-04-03 Sivasakthivel Sadasivam Method and system for automating the process of testing a device

Cited By (5)

* 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
CN108932171A (en) * 2018-06-15 2018-12-04 中国航发控制系统研究所 Embedded software exchange method
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

Also Published As

Publication number Publication date
WO2016095570A1 (en) 2016-06-23

Similar Documents

Publication Publication Date Title
CN105760289A (en) Debugging method and device of embedded system
CN109542399B (en) Software development method and device, terminal equipment and computer readable storage medium
CN108845930B (en) Interface operation test method and device, storage medium and electronic device
CN1752946A (en) Debugging method of embedded system and its system
CN103248711A (en) File uploading method and server
CN111752843B (en) Method, apparatus, electronic device and readable storage medium for determining influence surface
US20210405111A1 (en) Test method and electronic device
US9235389B2 (en) Method of providing embedded software development tool for supporting embedded software development environment based on native building, and apparatus thereof
CN105677329A (en) Controlling method and electronic device
CN104298602A (en) Method and device for debugging application program
CN112615758B (en) Application identification method, device, equipment and storage medium
CN113051514A (en) Element positioning method and device, electronic equipment and storage medium
CN103677814A (en) Procedure acquiring method, procedure acquiring device and procedure acquiring system
CN111078104A (en) Redirection method of multi-point touch equipment on cloud desktop and computer equipment
CN102982217A (en) Processing method and device of screen print
CN111047434A (en) Operation record generation method and device, computer equipment and storage medium
CN114047970A (en) Configuration method and system of AUTOSAR (automotive open system architecture) architecture software
CN104035900A (en) Method and device for sharing input device of PC (personal computer) with Android device
CN102799528B (en) A kind of script debugging method for circuit board level test, device and system thereof
CN104572638A (en) Data reading and writing method and device
CN111831320A (en) Plug-in management method and device, electronic equipment and storage medium
CN104168336A (en) Data acquisition method, mobile equipment, calculation equipment and data acquisition system
CN107357853B (en) Method and device for operating REDIS console and computer system
CN108062223B (en) Method and device for establishing connection relation between Simulink models
CN110377476A (en) Terminal test method, terminal and readable storage medium storing program for executing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160713