CN100416512C - Embedded apparatus debugging method and debugging tool therefor - Google Patents

Embedded apparatus debugging method and debugging tool therefor Download PDF

Info

Publication number
CN100416512C
CN100416512C CNB2004100677210A CN200410067721A CN100416512C CN 100416512 C CN100416512 C CN 100416512C CN B2004100677210 A CNB2004100677210 A CN B2004100677210A CN 200410067721 A CN200410067721 A CN 200410067721A CN 100416512 C CN100416512 C CN 100416512C
Authority
CN
China
Prior art keywords
embedded
debugging
control program
hardware
control
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.)
Expired - Fee Related
Application number
CNB2004100677210A
Other languages
Chinese (zh)
Other versions
CN1770119A (en
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.)
Huanda Computer Shanghai Co Ltd
Original Assignee
Shanghai Huanda Computer 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 Shanghai Huanda Computer Technology Co Ltd filed Critical Shanghai Huanda Computer Technology Co Ltd
Priority to CNB2004100677210A priority Critical patent/CN100416512C/en
Publication of CN1770119A publication Critical patent/CN1770119A/en
Application granted granted Critical
Publication of CN100416512C publication Critical patent/CN100416512C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to a method for debugging an embedded type apparatus. The present invention comprises the following steps: step a, a hardware debugging driver is provided, and accesses a memory and a register through memory images; step b, a control program is provided, and independently controls the hardware debugging driver to read and write the memory and the register; step c, the hardware debugging driver and the control program are connected by adopting a standard application program interface. The present invention can directly control the hardware under the condition without compiling a complete driving frame, and thus, the hardware function verification and testing process can be simplified.

Description

Embedded apparatus debugging method and debugging acid thereof
Technical field
The present invention relates to computer realm, particularly relevant for a kind of embedded apparatus debugging method and debugging acid thereof.
Background technology
Current, the main adjustment method that is applied to PDA embedded devices such as (Personal Digital Assistant, personal digital assistants) is Direct observation Debugging message or the long-range supervision of doing some system operation situations.The software systems of this existing embedded apparatus debugging method as shown in Figure 1, several drivers of the bottom and class driver are responsible for driving equipment separately, these drivers are unified management and control by operating system nucleus, operating system nucleus links to each other with application program by standard application library, thereby constituting one is bottom with the driver, and application program is top complete software systems.Application program receives instruction by its man-machine interface and conveys to operating system nucleus by standard application library, and operating system nucleus conveys to this instruction analysis classification some or several drivers drive this equipment.The feedback of equipment feeds back to operating system nucleus by driver and delivers to application program through operating system nucleus by standard application library again, and shows on its man-machine interface.Like this, the tester can observe device status data on this machine or remote computer, and can continue input instruction and carry out next step debugging.
The shortcoming that above-mentioned existing method of testing exists is, at first needs to write complete driving framework, and application program and driver rely on operating system, only just can debug after having set up complete software systems.For driver, on embedded device, the control of hardware is realized by memory mapping or register access.Usually to different external units, operating system nucleus is integrated into it in corresponding class and goes.The slip-stick artist will develop dissimilar drivers.The dissimilar drivers and the interface of operating system also are not quite similar.
Secondly, driver all adopts built-in mode usually, is included in the system image.The each change all will be recompilated system.Especially in the process of development equipment driver, need repeatedly rewrite program, and then the repeatedly compilation operations components of system as directed of having to.Like this, a large amount of time is spent in the process of compiling, burning, has reduced the efficient of exploitation.This passive adjustment method can not detect the state of problem device immediately, especially is not suitable for developing/debugging operation in the volume production process.
Summary of the invention
The object of the present invention is to provide a kind of embedded apparatus debugging method, overcoming above-mentioned the deficiencies in the prior art, can write under the situation of complete driving framework need not, directly hardware is controlled, thus the process of simplifying the hardware capability checking and detecting.
For achieving the above object, the invention provides a kind of embedded apparatus debugging method, may further comprise the steps: a. provides a hardware debug driver, by memory mapping reference-to storage and register; B. provide a control program, independent control hardware debugging driver read-write memory and register; C. the modular system interface that adopts operating system nucleus to provide connects the interface of this hardware debug driver and this control program; D., a user interface is set, and gives control program and display system state by this user interface input, transmission test instruction.
Wherein, described control program can be arranged on the far-end computer, also can be arranged on this embedded device, can also be divided into that far-end computer end control program and equipment end control program are separately positioned on the far-end computer and embedded device on.
Have under the situation of far-end computer, described embedded apparatus debugging method is further comprising the steps of: the hardware debug driver duplicates the display buffer, in real time image is sent to the control program on the far-end computer, and then is sent to user interface program and is presented in the display window of its establishment; Click and the keyboard input of user interface program intercepting user in window feeds back to embedded device.
Described hardware debug driver adopts the pattern of dynamically installing, and can change the hardware debug driver as required, copies to embedded device and gets on, and dynamically starts reformed hardware debug driver by control program then.The hardware debug driver can also be preserved the action and the corresponding system state of debugging get off by preserving the mode of file.
Described adjustment method adopts the script control mode, and control program reads/analyzes/carry out the script of being correlated with.Described control program triggers hardware interrupts, the state of guiding system in interrupt handling routine when equipment crashes.
Another object of the present invention is to provide embedded apparatus debugging method a kind of and of the present invention corresponding embedded device debugging acid.
For achieving the above object, the invention provides a kind of embedded device debugging acid, comprise the user interface and command analysis and the platform control element that are arranged on this embedded device, it is characterized in that: this equipment also is provided with the hardware debug driver that can pass through memory mapping reference-to storage and register, and the control program of independent control hardware debugging driver read-write memory and register.
Further, described debugging acid also comprises a remote computer, the communication port that this far-end computer is provided with user interface, be responsible for the far-end control element of the parsing of the assembling of control command and command response, communicate with this embedded device; The communication interface that embedded device is provided with on communication port and the far-end computer communicates.
Described hardware debug driver can duplicate the display buffer, in real time image is sent to the control program on the far-end computer, be responsible for creating a display window and intercept click and the keyboard input of user in window by user interface, feed back to embedded device.This hardware debug driver adopts the pattern of dynamically installing, and can change the hardware debug driver as required, copies to embedded device and gets on, and dynamically starts reformed hardware debug driver by control program then.The hardware debug driver can also be preserved the action and the corresponding system state of debugging get off by preserving the mode of file.
Described debugging acid adopts the script control mode, and control program reads/analyzes/carry out the script of being correlated with.Described control program can trigger hardware interrupts, the state of guiding system in interrupt handling routine when equipment crashes.
The present invention can write under the situation of complete driving framework need not, directly hardware controlled, thus the process of having simplified the hardware capability checking and having detected.The present invention adopt non-built-in/dynamic loading design, reduce dependence to operating system, need not repeatedly to recompilate operating system, save the development time; The present invention adopts Log file logging status information, and the derivation of hot key activated equipment state.Making that debugged program is more convenient carries out safely.Under far-end debugging mode of operation, adopt the distal displayed input, even the demonstration of equipment/input block work is undesired, also can finish debugging.
The present invention is further illustrated below in conjunction with accompanying drawing and embodiment.
Description of drawings
Fig. 1 is the software systems synoptic diagram of existing adjustment method.
Fig. 2 is the software systems synoptic diagram of adjustment method of the present invention.
Fig. 3 is for adopting the calcspar of distal displayed input under the far-end debugging mode of operation.
Fig. 4 for an embodiment of debugging acid of the present invention calcspar.
Embodiment
Relevant detailed description of the present invention and technology contents, existing as follows with regard to accompanying drawings:
At first consult Fig. 2, Fig. 2 is the software systems synoptic diagram (equipment end) of adjustment method of the present invention.Software systems of the present invention mainly comprise a hardware debug driver (can independently exist or be programmed in the real driver of hardware), this hardware debug driver is realized the simplest USBDI, by memory mapping reference-to storage and register, monitoring hardware interrupts, and generates the Log file of record field data; A control program is resolved script and manual command, and control hardware debugging driver read-write memory and register are responsible for mutual with the far-end program, forwarding status information under the state of remote debugging.The interface that connects this hardware debug driver and this control program is the modular system interface that kernel provides; A user interface is used to receive user's input, sends control program and display system state to.
On embedded device, the control of hardware is realized by memory mapping or register access.Usually to different external units, operating system is integrated into it in corresponding class and goes.Just need the dissimilar driver of exploitation.The invention provides a special driver, be responsible for reference-to storage and register specially.Thereby provide the functional verification interface of a simplification.This method can need not to write under the situation of complete driving framework, will finish by single driving the general module of directly hardware being controlled, thus the process of having simplified the hardware capability checking and having detected.
In embedded OSs such as Windows CE, application work is in protected mode, thereby can not directly visit specific physical memory and register.By the hardware debug driver that provides to finish the memory mapping function, user program just can be finished the visit of physical memory and register, thereby can realize specifying physical memory/content of registers to check and rewrite.
Hardware debug driver of the present invention adopts the pattern of non-built-in dynamic installation, reduces the dependence to operating system, need not repeatedly to recompilate operating system, saves the development time.Usually the hardware debug driver all adopts built-in mode, is included in the system image.The each change all will be recompilated system.Hardware debug driver of the present invention adopts the pattern of dynamically installing, the developer can change the hardware debug driver as required, copying to embedded device gets on, dynamically start reformed hardware debug driver by control program then, and needn't change the system that all recompilates at every turn.
For the ease of the analysis in later stage, debugged program need be preserved the action and the corresponding system state of debugging.Hardware debug driver of the present invention is preserved the action and the corresponding system state of debugging get off by preserving the mode of file.
Accordingly, control program of the present invention is responsible for the read-write memory of hardware debug driver of the present invention and the process of register are controlled, and the processing of Long-distance Control.
What connect this hardware debug driver and this control program is the system interface of standard.Because what hardware debug driver of the present invention adopted is the simplest driver framework that operating system is supported, so can be connected by the modular system interface.
Control program of the present invention can be arranged on this embedded device, also can be arranged on the far-end computer, can also be divided into that far-end computer end control program and equipment end control program are separately positioned on the far-end computer and embedded device on.
Having under the situation of far-end computer, can also adopt the distal displayed input method, even the work of equipment end demonstration/input block is undesired like this, also can finish debugging.On embedded device, display driving software and keyboard driver are arranged, be responsible for showing output and reporting system user's input respectively.Embedded system utilizes the display buffer to preserve information to be shown usually.Under the situation that viewing hardware does not configure fully, the user can't see normal demonstration.The present invention can utilize the mode of duplicating the display buffer, in real time image is sent to the control program on the principal computer, and then flows to the display window that user interface program is created.Click and the keyboard input of user interface program intercepting user in window feeds back to embedded device, will import reporting system by corresponding program again.
See also Fig. 3, Fig. 3 is for adopting the calcspar of distal displayed input under the far-end debugging mode of operation.For the purpose of clear, the general data that this figure has only described intermodule flows to.In this embodiment, far-end computer is a PC, and it has common PC display and mouse/keyboard, is provided with PC end control program, the i.e. part of aforesaid control program--far-end computer end control program on this PC.The corresponding apparatus end is provided with equipment end display buffer and equipment end control program, and equipment end is done final processing by operating system to input, output in this embodiment.The view data that the equipment end control program obtains the slave unit display buffer is duplicated and is sent PC end control program to.PC end control program is passed to the PC display with this view data and is shown.The mouse/keyboard of PC end can be imported on the other hand, and the incident of input is sent to the equipment end control program by PC end control program, and then sends to operating system.
Because the control of some hardware has strict sequential requirement, for example utilize GPIO to realize the I2C bus transfer.At this moment, the manual mode of wall scroll control execution can't satisfy the demands.Therefore, the invention provides control mode, set up the script file of the instruction of required input in advance based on script.Control program reads/analyzes/carry out relevant script, thus realize the complex time sequence requirement has been satisfied in the support of complex time sequence control.
Usually in the equipment debugging stage, the deadlock situation appears in systematic comparison easily.At this moment, application program can not continue to carry out usually, but the hardware interrupts service can also be triggered.The present invention has defined the hot key that triggers hardware interrupts, utilizes action triggers hardware interrupts of button, thus in interrupt handling routine the state of guiding system, be convenient to analyze the very crux.
Both can be arranged on also can calculate on this machine of embedded device according to debugging acid of the present invention and carry out remote testing by far-end.Be arranged on the debugging acid on this machine of embedded device, comprise the user interface and command analysis and the platform control element that are arranged on this embedded device, its inside is provided with the hardware debug driver that can pass through memory mapping reference-to storage and register, and the control program of independent control hardware debugging driver read-write memory and register.
See also Fig. 4, Fig. 4 for an embodiment of debugging acid of the present invention calcspar.This is one and has the embodiment that far-end computer can carry out the far-end debugging, has equipment end user interface, equipment end control program, hardware debug driver and communication port in equipment end.
At the PC end, the far-end computer here is a PC, has PC end subscriber interface, PC end control program and communication port.Wherein, communication port is responsible for both sides' data communication management, and both sides' information transmission can realize by the multiple mode in wired (as serial data line, USB (universal serial bus) etc.)/wireless (as 802.11, bluetooth etc.).User interface on the PC provides the user interface that operates on the main frame, as controlling selection/controlled plant state demonstration etc., supports two kinds of patterns of graphical interfaces and order line control; The equipment end user interface runs on the Subscriber Interface Module SIM on the controlled plant, can carry out the demonstration of the manual of debug command or script input and debugging mode.They can be any input/display devices.PC end control program is responsible for the assembling of control command and the parsing of command response; The equipment end control program is responsible for resolving the script/manual control command of main frame/this locality, work such as forwarding status information; The hardware debug driver is accepted the upper strata instruction, finishes device access, hot key monitoring, feedback information, tasks such as record Log file.Run on the software module on the controlled plant, be independent of mapping document of operation system, compiling separately, the mode of operation of dynamically installing when adopting debugging.
Above introduce, it only is preferred embodiment of the present invention, can not limit scope of the invention process with this, be the variation of the equalization done according to the present invention of the those skilled in the art in the present technique field, for example each device among the above embodiment carried out function and replace or each step is made up.And the improvement known of those skilled in that art, all should still belong to the scope that patent of the present invention contains.

Claims (16)

1. embedded apparatus debugging method, it is characterized in that may further comprise the steps: a. provides a hardware debug driver, by memory mapping reference-to storage and register; B. provide a control program, independent control hardware debugging driver read-write memory and register; C. the modular system interface that adopts operating system nucleus to provide connects this hardware debug driver and this control program; D., a user interface is set, and gives control program and display system state by this user interface input, transmission test instruction.
2. embedded apparatus debugging method as claimed in claim 1 is characterized in that described control program is arranged on this embedded device.
3. embedded apparatus debugging method as claimed in claim 1 is characterized in that described control program is arranged on the far-end computer.
4. embedded apparatus debugging method as claimed in claim 1, it is characterized in that described control program be divided into far-end computer end control program and equipment end control program be separately positioned on the far-end computer and embedded device on.
5. as claim 3 or 4 each described embedded apparatus debugging methods, it is characterized in that described embedded apparatus debugging method is further comprising the steps of: the hardware debug driver duplicates the display buffer, in real time image is sent to the control program on the far-end computer, is responsible for creating a display window by it; Click and the keyboard input of control program intercepting user in window feeds back to embedded device.
6. embedded apparatus debugging method as claimed in claim 1, it is characterized in that described hardware debug driver adopts the pattern of dynamically installing, change the hardware debug driver as required, copy to embedded device and get on, dynamically start reformed hardware debug driver by control program then.
7. embedded apparatus debugging method as claimed in claim 1 is characterized in that the mode of described hardware debug driver by the preservation file, and the action and the corresponding system state of debugging are preserved.
8. embedded apparatus debugging method as claimed in claim 1 is characterized in that described adjustment method adopts the script control mode, control program reads/analyzes/carry out the script of being correlated with.
9. embedded apparatus debugging method as claimed in claim 1 is characterized in that described control program when equipment crashes, and triggers hardware interrupts, the state of guiding system in interrupt handling routine.
10. embedded device debugging acid, comprise the user interface and command analysis and the platform control element that are arranged on this embedded device, it is characterized in that: this equipment also is provided with the hardware debug driver module that can pass through memory mapping reference-to storage and register, and the control module of independent control hardware debugging driver module read-write memory and register.
11. embedded device debugging acid as claimed in claim 10, it is characterized in that described debugging acid also comprises a far-end computer, the communication port that this far-end computer is provided with user interface, be responsible for the far-end control element of the parsing of the assembling of control command and command response, communicate with this embedded device; The communication interface that embedded device is provided with on communication port and the far-end computer communicates.
12. embedded device debugging acid as claimed in claim 11, it is characterized in that described hardware debug driver module is used to duplicate the display buffer, in real time image being sent to the subscriber interface module on the far-end computer, and be responsible for creating a display window by it; Subscriber interface module is used for intercepting click and the keyboard input of user at window, feeds back to embedded device.
13. as claim 10 or 11 each described embedded device debugging acids, it is characterized in that described hardware debug driver module is used to adopt the pattern of dynamic installation, change the hardware debug driver module as required, copy to embedded device and get on, dynamically start reformed hardware debug driver module by control module then.
14., it is characterized in that described hardware debug driver module is used for by preserving the mode of file the action and the corresponding system state of debugging being preserved as claim 10 or 11 each described embedded device debugging acids.
15. as claim 10 or 11 each described embedded device debugging acids, it is characterized in that described debugging acid adopts the script control mode, control module is used to read/analyzes/carry out the script of being correlated with.
16. as claim 10 or 11 each described embedded device debugging acids, it is characterized in that described control module is used for when equipment crashes, trigger hardware interrupts, the state of guiding system in interruption processing module.
CNB2004100677210A 2004-10-29 2004-10-29 Embedded apparatus debugging method and debugging tool therefor Expired - Fee Related CN100416512C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100677210A CN100416512C (en) 2004-10-29 2004-10-29 Embedded apparatus debugging method and debugging tool therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100677210A CN100416512C (en) 2004-10-29 2004-10-29 Embedded apparatus debugging method and debugging tool therefor

Publications (2)

Publication Number Publication Date
CN1770119A CN1770119A (en) 2006-05-10
CN100416512C true CN100416512C (en) 2008-09-03

Family

ID=36751434

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100677210A Expired - Fee Related CN100416512C (en) 2004-10-29 2004-10-29 Embedded apparatus debugging method and debugging tool therefor

Country Status (1)

Country Link
CN (1) CN100416512C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100433171C (en) * 2006-05-30 2008-11-12 杭州华三通信技术有限公司 Storage device testing method and testing device
CN100454319C (en) * 2007-10-15 2009-01-21 北京航空航天大学 Micro-processor IP nuclear design method for navigation system
CN101739333B (en) * 2008-11-25 2013-10-16 国际商业机器公司 Method, tool and device for debugging application program
CN101447876B (en) * 2008-12-31 2010-12-29 北京工业大学 Identity authentication test method of security operating system
CN101645033A (en) * 2009-05-15 2010-02-10 上海闻泰电子科技有限公司 Debugging method in abnormality of mobile phone software
CN102339248A (en) * 2010-07-20 2012-02-01 上海闻泰电子科技有限公司 On-line debugging system and method for embedded terminal
CN102231128A (en) * 2011-07-06 2011-11-02 青岛海信信芯科技有限公司 Online debugging method and debugging host
CN109753431A (en) * 2018-12-19 2019-05-14 卡斯柯信号有限公司 A kind of integrated test method for testing for hardware capability diagnosis

Citations (4)

* 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
CN1306639A (en) * 1998-04-22 2001-08-01 美商传威股份有限公司 Real time debugger interface for embedded systems
CN1313562A (en) * 2001-05-15 2001-09-19 北京慧讯信息技术有限公司 Architectural structure of embedded open platform
US20020144235A1 (en) * 2001-03-30 2002-10-03 Charles Simmers Debugging embedded systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1306639A (en) * 1998-04-22 2001-08-01 美商传威股份有限公司 Real time debugger interface for embedded systems
CN1286431A (en) * 1999-11-30 2001-03-07 深圳市中兴通讯股份有限公司 Embedded software aided debugging method
US20020144235A1 (en) * 2001-03-30 2002-10-03 Charles Simmers Debugging embedded systems
CN1313562A (en) * 2001-05-15 2001-09-19 北京慧讯信息技术有限公司 Architectural structure of embedded open platform

Also Published As

Publication number Publication date
CN1770119A (en) 2006-05-10

Similar Documents

Publication Publication Date Title
CN100416512C (en) Embedded apparatus debugging method and debugging tool therefor
US9658931B2 (en) Method for monitoring a graphical user interface on a second computer display from a first computer
JP2004227588A (en) Sdio card development system
US20060200701A1 (en) Kernel-mode in-flight recorder tracing mechanism
US6865731B2 (en) Method and computer program product for testing application program software
US20130211812A1 (en) Conveying data from a hardware device to a circuit simulation
US7480905B2 (en) Interface device, and method and computer readable product for updating firmware in the interface device
US20070288937A1 (en) Virtual Device Driver
CN100565472C (en) A kind of adjustment method that is applicable to multiprocessor karyonide system chip
CN106649021B (en) PCIe is from equipment testing device
CN101295255B (en) Firmware updating system and method
US20060265718A1 (en) Injection-based simulation for button automation on button-aware computing platforms
US20100312541A1 (en) Program test device and program
US20020087952A1 (en) Debugger system and method of extending debug functions of a debugger system and debugger program product stored in a computer readable medium
KR100459055B1 (en) Application program developing system and application program developing method and storage medium storing application program developing program
CN101308648B (en) Method of automatic test display apparatus and system thereof
US7818627B2 (en) Systems and methods for gathering debug information
CN102306013A (en) Portable airplane 1553B bus monitoring system based on universal serial bus (USB) interface and control method for portable airplane 1553B bus monitoring system
CN108170494B (en) Application program starting method and starting system for intelligent terminal
Studio Getting Started Guide
CN100403275C (en) Micro processor and method using in firmware program debug
CN110825612A (en) Situation information simultaneous recording type mobile terminal script generation method based on actual use
CN103116495B (en) Based on automatic storage method and the device of the single-chip microcomputer register value of IDE
JP2002132534A (en) Input-output testing system
US20020007254A1 (en) Automated evaluation system and program

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
GR01 Patent grant
C14 Grant of patent or utility model
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20091204

Address after: No. three, 213 Road, Zhabei District, Shanghai

Patentee after: Huanda Computer (Shanghai) Co., Ltd.

Address before: No. 1486, building 2, Nanjing West Road, Shanghai, Zhabei District

Patentee before: Huanda Computer Science-Technology Co., Ltd., Shanghai

ASS Succession or assignment of patent right

Owner name: HUANDA COMPUTER (SHANGHAI) CO., LTD.

Free format text: FORMER OWNER: SHANGHAI HUANDA COMPUTER TECHNOLOGY CO., LTD.

Effective date: 20091204

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080903

Termination date: 20111029