TW202141272A - Debug device and operation method thereof - Google Patents

Debug device and operation method thereof Download PDF

Info

Publication number
TW202141272A
TW202141272A TW109112946A TW109112946A TW202141272A TW 202141272 A TW202141272 A TW 202141272A TW 109112946 A TW109112946 A TW 109112946A TW 109112946 A TW109112946 A TW 109112946A TW 202141272 A TW202141272 A TW 202141272A
Authority
TW
Taiwan
Prior art keywords
debugging
debug
memory
interface
electronic device
Prior art date
Application number
TW109112946A
Other languages
Chinese (zh)
Other versions
TWI802792B (en
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 新唐科技股份有限公司
Priority to TW109112946A priority Critical patent/TWI802792B/en
Priority to CN202011022170.1A priority patent/CN113535490B/en
Publication of TW202141272A publication Critical patent/TW202141272A/en
Application granted granted Critical
Publication of TWI802792B publication Critical patent/TWI802792B/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/2215Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test error correction or detection circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

Landscapes

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

Abstract

A debug device and an operation method thereof are disclosed. The debug device is used to connect an electronic device with a serial wire debug (SWD) interface. The debug device includes a memory, a processing unit, a serial wire debug (SWD) connector and a universal serial bus (USB) connector. The SWD connector is connected to the SWD interface. When the USB connector is connected to a computer, debug instructions are sent to the electronic device by the processing unit. When the USB connector is disconnected to the computer, the memory becomes an external storage device of the electronic device.

Description

偵錯裝置及其操作方法Error detection device and its operation method

本發明是關於一種偵錯裝置及其操作方法,特別是利用偵錯裝置的記憶體在未執行偵錯程序時作為電子裝置的外部儲存裝置及其對應之操作方法。The present invention relates to a debugging device and an operating method thereof, in particular to using the memory of the debugging device as an external storage device of an electronic device when the debugging program is not executed, and a corresponding operating method thereof.

在產品開發過程中,對於新開發的產品,都會進行各種測試或檢驗,在這些測試的過程中,會產生各種偵錯資料或者異常狀況的記錄,這些資料都必須將其儲存以供開發者做進一步的分析,來調整或變更現有的設計。現有的資料保存方式,大多是將其儲存在裝置內部原有的快閃記憶體空間當中,也就是在儲存相關測試程式等資料外的剩餘空間當中。對此,若需要進行長時間的電性測試或是溫濕度環境可靠度測試,原有的剩餘記憶體空間恐不足以儲存長時間測試所產生大量的偵錯資料。In the process of product development, various tests or inspections are carried out for newly developed products. During these tests, various debugging data or records of abnormal conditions will be generated, and these data must be stored for developers to do Further analysis, to adjust or change the existing design. Most of the existing data storage methods are to store them in the original flash memory space inside the device, that is, in the remaining space outside the storage of relevant test programs and other data. In this regard, if a long-term electrical test or temperature and humidity environment reliability test is required, the original remaining memory space may not be enough to store a large amount of debugging data generated by the long-term test.

為解決上述偵錯資料儲存的問題,就必須尋求外部的儲存空間,現有的解決手段是通過有線或無線的方式將偵錯資料傳送到外部的儲存空間,以避免資料遺失。然而,在進行上述可靠度測試的同時,待測試裝置可能無法連接其他資料傳輸線,亦即無法通過有線方式將資料送出。若是要透過無線方式傳輸,原本開發的裝置上勢必要加裝額外的無線傳輸裝置,增加操作上之困難度,且並非所有產品都能適用。In order to solve the above-mentioned problem of debugging data storage, it is necessary to seek external storage space. The existing solution is to transmit the debugging data to the external storage space through wired or wireless means to avoid data loss. However, while performing the above reliability test, the device under test may not be able to connect to other data transmission lines, that is, it may not be able to send data through a wired method. If it is to be transmitted wirelessly, it is necessary to install an additional wireless transmission device on the originally developed device, which increases the difficulty of operation, and not all products are applicable.

綜觀前所述,習知的偵錯資料保存方式仍然具有相當之改進空間,因此,本發明藉由設計一種偵錯裝置及其操作方法,針對現有技術之缺失加以改善,進而增進產業上之實施利用。In summary, the conventional method for storing error detection data still has considerable room for improvement. Therefore, the present invention addresses the shortcomings of the existing technology by designing a debugging device and its operating method, thereby improving the implementation in the industry. use.

有鑑於上述習知技術之問題,本發明之目的就是在提供一種偵錯裝置及其操作方法,藉由偵錯裝置的記憶體在未執行偵錯程序時作為電子裝置之外部儲存裝置,解決儲存空間不足之問題。In view of the above-mentioned problems of the prior art, the purpose of the present invention is to provide a debugging device and an operating method thereof, by using the memory of the debugging device as an external storage device of the electronic device when the debugging process is not executed, the storage is solved The problem of insufficient space.

根據本發明之一目的,提出一種偵錯裝置,用以連接具有序列線偵錯(Serial wire debug, SWD)介面的電子裝置。偵錯裝置包含記憶體、處理單元、序列線偵錯接口以及通用序列匯流排(Universal serial bus, USB)接口,處理單元連接於記憶體,序列線偵錯接口連接至序列線偵錯介面,當通用序列匯流排接口連接至電腦,處理單元將電腦之偵錯指令傳送至電子裝置,當通用序列匯流排接口斷開時,記憶體成為電子裝置之外部儲存裝置。According to one objective of the present invention, a debug device is provided for connecting an electronic device with a serial wire debug (SWD) interface. The debugging device includes a memory, a processing unit, a serial line debugging interface, and a universal serial bus (Universal serial bus, USB) interface. The processing unit is connected to the memory, and the serial line debugging interface is connected to the serial line debugging interface. The universal serial bus interface is connected to the computer, and the processing unit transmits the computer's debugging instructions to the electronic device. When the universal serial bus interface is disconnected, the memory becomes an external storage device of the electronic device.

較佳地,記憶體可包含快閃記憶體(Flash)或靜態隨機存取記憶體(Static random access memory, SRAM)。Preferably, the memory may include flash memory (Flash) or static random access memory (SRAM).

較佳地,偵錯裝置可進一步包含發光二極體(Light Emitting diode, LED)以及計數器(Counter)之至少一者。Preferably, the error detection device may further include at least one of a light emitting diode (LED) and a counter (Counter).

較佳地,外部儲存裝置之儲存資料可包含電子裝置之偵錯資料或異常記錄。Preferably, the storage data of the external storage device may include the error detection data or the abnormality record of the electronic device.

較佳地,記憶體之儲存資料可包含偵錯指令或偵錯指令之轉換程式。Preferably, the data stored in the memory may include a debug command or a conversion program of the debug command.

較佳地,記憶體之儲存資料可包含電子裝置之離線測試指令。Preferably, the stored data of the memory may include offline test commands of the electronic device.

根據本發明之另一目的,提出一種偵錯裝置之操作方法,其包含以下步驟:設置偵錯裝置,偵錯裝置包含記憶體、處理單元、序列線偵錯接口以及通用序列匯流排接口;將序列線偵錯接口連接至電子裝置之序列線偵錯介面,並將通用序列匯流排接口連接至電腦之通用序列匯流排介面,藉由處理單元將電腦之偵錯指令傳送至電子裝置;以及斷開通用序列匯流排接口,將記憶體作為電子裝置之外部儲存裝置。According to another object of the present invention, an operating method of a debug device is provided, which includes the following steps: setting a debug device, the debug device includes a memory, a processing unit, a serial line debug interface, and a universal serial bus interface; The serial line debug interface is connected to the serial line debug interface of the electronic device, and the universal serial bus interface is connected to the universal serial bus interface of the computer, and the computer's debug command is sent to the electronic device through the processing unit; and Open the universal serial bus interface and use the memory as the external storage device of the electronic device.

較佳地,記憶體可包含快閃記憶體或靜態隨機存取記憶體。Preferably, the memory may include flash memory or static random access memory.

較佳地,偵錯裝置可包含發光二極體以及計數器之至少一者。Preferably, the error detection device may include at least one of a light emitting diode and a counter.

較佳地,外部儲存裝置可儲存電子裝置之偵錯資料或異常記錄。Preferably, the external storage device can store the error detection data or abnormal records of the electronic device.

較佳地,記憶體可儲存偵錯指令或偵錯指令之轉換程式。Preferably, the memory can store the debug command or the conversion program of the debug command.

較佳地,記憶體可儲存電子裝置之離線測試指令。Preferably, the memory can store offline test commands of the electronic device.

承上所述,依本發明之偵錯裝置及其操作方法,其可具有一或多個下述優點:In summary, according to the debug device and its operating method of the present invention, it can have one or more of the following advantages:

(1)此偵錯裝置及其操作方法可利用偵錯裝置在斷開通用序列匯流排接口時切換成電子裝置之外部儲存裝置,增加保存電子裝置偵錯資料或異常記錄等資料的儲存空間,避免資料遺失也同時增加資料存取的便利性。(1) This debugging device and its operating method can use the debugging device to switch to the external storage device of the electronic device when the universal serial bus interface is disconnected, thereby increasing the storage space for storing the electronic device debugging data or abnormal records, etc. Avoid data loss and increase the convenience of data access at the same time.

(2)此偵錯裝置及其操作方法能在電子裝置的偵錯過程中以原本連接的偵錯裝置提供外部儲存空間,無須連接額外傳輸線或無線傳輸裝置來傳輸資料,降低硬體設置成本,也避免影響偵錯流程的環境設定。(2) This debugging device and its operating method can provide external storage space with the originally connected debugging device during the debugging process of the electronic device, without the need to connect additional transmission lines or wireless transmission devices to transmit data, reducing hardware setup costs, Also avoid affecting the environment settings of the debugging process.

(3)此偵錯裝置及其操作方法能利用偵錯裝置本身元件所具備之功能來提供電子裝置的偵錯流程所需之軟硬體支援,例如計數器、發光二極體等,提升電子裝置進行偵錯時之操作效率。(3) This debugging device and its operating method can use the functions of the debugging device's own components to provide software and hardware support for the debugging process of electronic devices, such as counters, light-emitting diodes, etc., to upgrade electronic devices Operational efficiency during debugging.

為利貴審查委員瞭解本發明之技術特徵、內容與優點及其所能達成之功效,茲將本發明配合附圖,並以實施例之表達形式詳細說明如下,而其中所使用之圖式,其主旨僅為示意及輔助說明書之用,未必為本發明實施後之真實比例與精準配置,故不應就所附之圖式的比例與配置關係解讀、侷限本發明於實際實施上的權利範圍,合先敘明。In order to facilitate the reviewers to understand the technical features, content and advantages of the present invention and the effects that can be achieved, the present invention is described in detail with the accompanying drawings and in the form of embodiment expressions as follows, and the diagrams used therein are The subject matter is only for the purpose of illustration and auxiliary description, and may not be the true proportions and precise configuration after the implementation of the invention. Therefore, it should not be interpreted in terms of the proportions and configuration relationships of the attached drawings, and should not limit the scope of rights of the present invention in actual implementation. Hexian stated.

請參閱第1圖,第1圖係為本發明實施例之偵錯裝置之方塊圖。如圖所示, 偵錯裝置11包含記憶體111、處理單元112、序列線偵錯接口113以及通用序列匯流排接口114,處理單元112可為微處理器,連接於記憶體111以存取記憶體111當中之程式或資料。序列線偵錯接口113與通用序列匯流排接口114連接於處理單元112,兩種不同接口可連接於不同之資料傳輸介面。在本實施例中,序列線偵錯接口113連接電子裝置12的序列線偵錯介面121,而通用序列匯流排接口114則是連接至電腦13的通用序列匯流排介面131。Please refer to Figure 1. Figure 1 is a block diagram of a debug device according to an embodiment of the present invention. As shown in the figure, the debugging device 11 includes a memory 111, a processing unit 112, a serial line debugging interface 113, and a universal serial bus interface 114. The processing unit 112 may be a microprocessor and is connected to the memory 111 to access the memory. Program or data in body 111. The serial line error detection interface 113 and the universal serial bus interface 114 are connected to the processing unit 112, and two different interfaces can be connected to different data transmission interfaces. In this embodiment, the serial line debugging interface 113 is connected to the serial line debugging interface 121 of the electronic device 12, and the universal serial bus interface 114 is connected to the universal serial bus interface 131 of the computer 13.

電子裝置12包含晶片122,晶片122可為新開發的系統晶片、驅動晶片或控制晶片等,其可安裝於各種裝置內之主機板、印刷電路板上。晶片122在測試時必須將接腳連接至電路板或測試板上之線路,並進一步連接至序列線偵錯介面121,才能進行相關的偵錯程序。序列線偵錯介面121是用來進行晶片偵錯程序的操作介面,相較於聯合測試行動小組(Joint test action group, JTAG)協議的偵錯模式,序列線偵錯介面121需要的接腳較少,且適用於高速及大資料量的偵錯程序。另一方面,電腦13包含處理器132及儲存裝置133,處理器132可為桌上型電腦、筆記型電腦的中央處理器,連接至硬碟等儲存裝置133來存取各種偵錯或測試程式,並通過電腦13的通用序列匯流排介面131傳送至偵錯裝置11。The electronic device 12 includes a chip 122. The chip 122 may be a newly developed system chip, a driver chip, or a control chip, etc., which can be mounted on a main board or a printed circuit board in various devices. During the test, the chip 122 must connect its pins to the circuit board or the circuit on the test board, and further connect to the serial line debug interface 121, in order to perform related debug procedures. The serial line debugging interface 121 is an operating interface for chip debugging. Compared with the debugging mode of the Joint test action group (JTAG) protocol, the serial line debugging interface 121 requires fewer pins. Less, and suitable for high-speed and large amount of data debugging procedures. On the other hand, the computer 13 includes a processor 132 and a storage device 133. The processor 132 can be a central processing unit of a desktop computer or a notebook computer, and is connected to a storage device 133 such as a hard disk to access various debugging or test programs. , And sent to the debugging device 11 through the universal serial bus interface 131 of the computer 13.

偵錯裝置11的設置是為了將電腦13當中所編輯的偵錯程序,轉換成晶片122能讀取的偵錯指令,因此在偵錯裝置11當中的記憶體111,可儲存偵錯指令的轉換程式,當偵錯裝置11由通用序列匯流排接口114連接至電腦13時,電腦13可將偵錯程序傳送到偵錯裝置11,通過轉換程式轉換成晶片122可執行之偵錯指令,再通過序列線偵錯接口113將偵錯指令直接傳送至電子裝置12,對晶片122進行偵錯程序。在另一實施例中,偵錯指令也可預先儲存於偵錯裝置11的記憶體111當中,待偵錯裝置11連接至電子裝置12後再對晶片122進行偵錯程序。The debugging device 11 is set up to convert the debugging program edited in the computer 13 into debugging commands that can be read by the chip 122. Therefore, the memory 111 in the debugging device 11 can store the conversion of the debugging commands When the debugging device 11 is connected to the computer 13 by the universal serial bus interface 114, the computer 13 can send the debugging program to the debugging device 11, and convert the debugging program into the debugging command executable by the chip 122 through the conversion program. The serial line debugging interface 113 directly transmits the debugging command to the electronic device 12 to perform the debugging procedure on the chip 122. In another embodiment, the debug command can also be pre-stored in the memory 111 of the debug device 11, and the debug program is performed on the chip 122 after the debug device 11 is connected to the electronic device 12.

如同先前技術所述,晶片122在進行這些偵錯程序的測試時,會產生相關的偵錯資料及異常狀態記錄,當原本晶片122內部所具有的儲存空間不足以儲存上述的偵錯資料時,就需要進一步尋找額外的儲存空間。在本實施例中,當偵錯裝置11的通用序列匯流排接口114斷開與電腦13的連接時,也就是偵錯裝置11不再接收電腦13傳送的資料時,偵錯裝置11本身之記憶體111即可成為電子裝置12之外部儲存裝置。當晶片122在執行偵錯指令後,產生之相關資料,可通過序列線偵錯介面121傳送至偵錯裝置11保存,當偵錯程序完成後,操作者可將偵錯裝置11連接至電腦13或儲存資料之伺服器,將偵錯資料或異常記錄等儲存資料傳送至電腦13,讓開發者能檢視這些資料,進而調整或修改產品開發的相關軟硬體設置。As described in the prior art, the chip 122 will generate related debugging data and abnormal status records when performing the testing of these debugging procedures. When the original storage space inside the chip 122 is insufficient to store the above-mentioned debugging data, You need to find additional storage space. In this embodiment, when the universal serial bus interface 114 of the debugging device 11 is disconnected from the computer 13, that is, when the debugging device 11 no longer receives data from the computer 13, the memory of the debugging device 11 itself The body 111 can become an external storage device of the electronic device 12. When the chip 122 executes the debug command, the relevant data generated can be sent to the debug device 11 through the serial line debug interface 121 for storage. When the debug process is completed, the operator can connect the debug device 11 to the computer 13 Or the server that stores the data will send the stored data such as debugging data or abnormal records to the computer 13, so that the developer can view the data, and then adjust or modify the relevant software and hardware settings for product development.

除此之外,偵錯裝置11還可包含發光二極體115及計數器116,分別連接至處理單元112,當偵錯裝置11通過通用序列匯流排接口114連接至電腦13時,發光二極體115可作為資料傳輸時的指示燈號,而計數器116可協助處理單元112控制傳輸量。當偵錯裝置11斷開通用序列匯流排接口114的連線時,偵錯裝置11的記憶體111可作為電子裝置12的外部儲存裝置,此時發光二極體115可作為偵錯程序時之指示燈號,而計時器116也可作為偵錯程序當中的計數裝置,提供偵錯程序所需之軟硬體支援。In addition, the debug device 11 may also include a light emitting diode 115 and a counter 116, which are respectively connected to the processing unit 112. When the debug device 11 is connected to the computer 13 through the universal serial bus interface 114, the light emitting diode 115 can be used as an indicator number during data transmission, and the counter 116 can assist the processing unit 112 to control the transmission volume. When the debugging device 11 is disconnected from the universal serial bus interface 114, the memory 111 of the debugging device 11 can be used as an external storage device of the electronic device 12. At this time, the light-emitting diode 115 can be used as a debugging program. The indicator light, and the timer 116 can also be used as a counting device in the debugging process, providing hardware and software support required by the debugging process.

請參閱第2圖,第2圖係為本發明實施例之偵錯裝置之示意圖。如圖所示,偵錯裝置21具備適用於兩種不同連接介面之接口,分別為序列線偵錯接口211以及通用序列匯流排接口212。上述接口可分別為對應不同傳輸介面的接頭,序列線偵錯接口211對應於序列線偵錯介面221,通用序列匯流排接口212對應於通用序列匯流排介面231。晶片222可設置在測試基板223上,測試基板223可為類似電子裝置的主機板或印刷電路板,包含相關的被動元件,通過測試基板223上之線路,可將晶片222連接至序列線偵錯介面221,進而連接至偵錯裝置21進行偵錯程序。序列線偵錯介面221為延伸至電子裝置或測試板外之插槽,其可對應於偵錯裝置21的序列線偵錯接口211,由於偵錯裝置21包含此序列線偵錯(SWD)的傳輸介面,與一般的通用序列匯流排(USB)外接裝置有所不同。Please refer to Figure 2. Figure 2 is a schematic diagram of the error detection device according to an embodiment of the present invention. As shown in the figure, the debugging device 21 has interfaces suitable for two different connection interfaces, namely a serial line debugging interface 211 and a universal serial bus interface 212. The aforementioned interfaces may be connectors corresponding to different transmission interfaces. The serial line debug interface 211 corresponds to the serial line debug interface 221, and the universal serial bus interface 212 corresponds to the universal serial bus interface 231. The chip 222 can be set on the test substrate 223. The test substrate 223 can be a motherboard or a printed circuit board similar to an electronic device, including related passive components. The chip 222 can be connected to the serial line for debugging through the circuit on the test substrate 223 The interface 221 is further connected to the debugging device 21 for debugging procedures. The serial wire debug interface 221 is a slot that extends outside the electronic device or the test board, and it can correspond to the serial wire debug interface 211 of the debug device 21, because the debug device 21 includes this serial wire debug (SWD) The transmission interface is different from the general universal serial bus (USB) external device.

在本實施例中,通用序列匯流排介面231可為電腦23之通用序列匯流排插槽,這裡所述的電腦23可為筆記型電腦、桌上型電腦或是測試工作站上之相關測試裝置,操作者可於電腦23上編輯偵錯程序後,將偵錯程序傳送至偵錯裝置21,偵錯裝置21進一步將偵錯程序轉換成晶片222可執行的偵錯指令,再經由序列線偵錯介面221將偵錯指令傳送至晶片222執行,藉此執行上述偵錯程序。當偵錯裝置21的通用序列匯流排接口212斷開與電腦23的連接時,也就是通用序列匯流排接口212不再供電時,偵錯裝置21可產生一支援碼,並將支援碼傳送至晶片222,藉此讓晶片222將偵錯裝置21作為外接的儲存裝置。例如,偵錯裝置21可將記憶體的儲存空間容量或者預先規劃的儲存位置等資訊傳送至晶片222,提供晶片222上傳資料時所需的訊息。In this embodiment, the universal serial bus interface 231 can be a universal serial bus slot of the computer 23. The computer 23 described here can be a notebook computer, a desktop computer, or a related test device on a test workstation. After editing the debug program on the computer 23, the operator can transfer the debug program to the debug device 21, and the debug device 21 further converts the debug program into the debug command executable by the chip 222, and then debugs through the serial line The interface 221 transmits the debugging command to the chip 222 for execution, thereby executing the above-mentioned debugging procedure. When the universal serial bus interface 212 of the debugging device 21 is disconnected from the computer 23, that is, when the universal serial bus interface 212 is no longer powered, the debugging device 21 can generate a support code and send the support code to The chip 222 allows the chip 222 to use the debug device 21 as an external storage device. For example, the debugging device 21 can transmit information such as the storage space capacity of the memory or the pre-planned storage location to the chip 222, and provide the information required by the chip 222 when uploading data.

設定通用序列匯流排接口212斷開電腦23為切換機制的設定,主要是當晶片222在進行偵錯程序時,其測試的環境需要考量靜電、溫溼度等設定,難以在連線於電腦23之狀態下進行,因此在偵錯裝置21一端斷開電腦23的情況下,即可讓記憶體當中儲存的離線測試指令繼續進行晶片222的偵錯程序,而偵錯裝置21剩餘的記憶體空間則成為晶片222的外部儲存裝置,增加儲存空間但不影響偵錯程序的設定及進行。當完成偵錯程序後,儲存於偵錯裝置21當中的偵錯資料及異常記錄,可再次連接至電腦23,藉由電腦23來存取上述儲存的資料,並進一步將這些偵錯資料及異常記錄上傳到伺服器24的資料庫中儲存,或者當偵錯裝置21直接連接至伺服器24的裝置介面時,直接將偵錯裝置21當中儲存的資料上傳至資料庫中,以保存該晶片222於偵錯程序中產生的偵錯資料或異常記錄。Set the universal serial bus interface 212 to disconnect the computer 23 as the switching mechanism. The main reason is that when the chip 222 is in the debugging process, the test environment needs to consider the static electricity, temperature and humidity settings, and it is difficult to connect to the computer 23. Therefore, when the computer 23 is disconnected at the end of the debugging device 21, the offline test command stored in the memory can continue the debugging process of the chip 222, and the remaining memory space of the debugging device 21 is It becomes the external storage device of the chip 222, which increases the storage space but does not affect the setting and execution of the debugging process. After the debugging process is completed, the debugging data and exception records stored in the debugging device 21 can be connected to the computer 23 again, and the computer 23 can access the above-mentioned stored data, and further combine these debugging data and exceptions. The record is uploaded to the database of the server 24 for storage, or when the debugging device 21 is directly connected to the device interface of the server 24, the data stored in the debugging device 21 is directly uploaded to the database to save the chip 222 Debugging data or exception records generated in the debugging process.

請參閱第3圖,第3圖係為本發明實施例之偵錯裝置之示意圖。如圖所示,偵錯裝置31的兩端分別包含序列線偵錯接口311及通用序列匯流排接口312,其接口如同前述實施例,是分別對應於序列線偵錯(SWD)介面及通用序列匯流排(USB)介面,相同內容不再重複描述。在偵錯裝置31當中,設有控制基板313,控制基板313可為印刷電路板,且控制基板313可設置在偵錯裝置31的外殼314當中,控制基板313上之線路分別連接至序列線偵錯接口311及通用序列匯流排接口312。控制基板313上包含微處理器315以及記憶體裝置,在本實施例當中,記憶體裝置可包含快閃記憶體316或靜態隨機存取記憶體317,但本揭露不以此為限,記憶體裝置也可為其他類型之儲存裝置。除此之外,控制基板313上可進一步設置一或多個發光二極體318,作為偵錯裝置31操作時的狀態顯示燈號。Please refer to FIG. 3, which is a schematic diagram of the error detection device according to an embodiment of the present invention. As shown in the figure, both ends of the debug device 31 respectively include a serial line debug interface 311 and a universal serial bus interface 312, the interfaces of which are the same as the previous embodiment, respectively corresponding to the serial wire debug (SWD) interface and the universal serial For the USB interface, the same content will not be repeated. In the debug device 31, a control board 313 is provided. The control board 313 can be a printed circuit board. The control board 313 can be set in the housing 314 of the debug device 31. The lines on the control board 313 are respectively connected to the serial line detection. Wrong interface 311 and universal serial bus interface 312. The control board 313 includes a microprocessor 315 and a memory device. In this embodiment, the memory device may include flash memory 316 or static random access memory 317, but the present disclosure is not limited to this. The device can also be other types of storage devices. In addition, one or more light-emitting diodes 318 can be further provided on the control substrate 313 to serve as a status display light signal when the error detection device 31 is operating.

如同前述實施例所述,當偵錯裝置31的通用序列匯流排接口312斷開與電腦的連線時,偵錯裝置31當中的快閃記憶體316或靜態隨機存取記憶體317可作為晶片偵錯程序進行時的外部儲存裝置,儲存偵錯資料及異常記錄。除此之外,當作為外部儲存裝置時,偵錯裝置31當中的微處理器315也可提供晶片測試時所需之硬體支援,例如於控制基板313上設置計數器,讓微處理器315連接至計數器,在偵錯程序中可提供計數功能。原本作為偵錯裝置31操作狀態顯示燈號之發光二極體318,也可作為晶片偵錯程序當中,顯示操作狀態的燈號。As described in the foregoing embodiment, when the universal serial bus interface 312 of the debug device 31 is disconnected from the computer, the flash memory 316 or the static random access memory 317 in the debug device 31 can be used as a chip The external storage device during the debugging process, storing the debugging data and abnormal records. In addition, when used as an external storage device, the microprocessor 315 in the debug device 31 can also provide hardware support for chip testing, such as setting a counter on the control board 313 to connect the microprocessor 315 To the counter, the counting function can be provided in the debugging program. The light-emitting diode 318 originally used as the operating state indicator of the debug device 31 can also be used as the indicator of the operating state in the chip debugging program.

請參閱第4圖,第4圖係為本發明實施例之偵錯裝置操作方法之流程圖。此操作方法適用於前述實施例之偵錯裝置,相關裝置架構及連接關係請參閱前述實施例之說明。如圖所示,偵錯裝置操作方法包含以下步驟(S1~S3):Please refer to FIG. 4, which is a flowchart of the method of operating the error detection device according to an embodiment of the present invention. This operation method is applicable to the debug device of the foregoing embodiment, and the relevant device architecture and connection relationship please refer to the description of the foregoing embodiment. As shown in the figure, the operation method of the debugging device includes the following steps (S1~S3):

步驟S1:設置偵錯裝置。設置偵錯裝置,藉由偵錯裝置連接電子裝置與編輯偵錯程式的電腦,其中,偵錯裝置包含記憶體、處理單元、序列線偵錯接口以及通用序列匯流排接口。這裡所述之記憶體可包含快閃記憶體或靜態隨機存取記憶體。Step S1: Set up the error detection device. A debug device is set up, and the debug device is connected to the electronic device and the computer editing the debug program. The debug device includes a memory, a processing unit, a serial line debug interface, and a universal serial bus interface. The memory described here may include flash memory or static random access memory.

步驟S2:將序列線偵錯接口連接至電子裝置之序列線偵錯介面,並將通用序列匯流排接口連接至電腦之通用序列匯流排介面,藉由處理單元將電腦之偵錯指令傳送至電子裝置。將偵錯裝置的序列線偵錯接口連接至晶片測試基板上之序列線偵錯插槽,而偵錯裝置的通用序列匯流排接口則連接電腦的通用序列匯流排插槽,使得電腦中的偵錯程式能通過記憶體中儲存的偵錯指令轉換程式,將偵錯指令轉換成晶片可執行之指令格式,再將偵錯指令傳送至包含晶片之電子裝置中以進行偵錯程序。在另一實施例中,記憶體也可預先儲存晶片的偵錯指令或是離線測試指令,將其傳送至電子裝置來進行偵錯程序。Step S2: Connect the serial line debug interface to the serial line debug interface of the electronic device, and connect the universal serial bus interface to the universal serial bus interface of the computer, and send the computer's debug command to the electronic device through the processing unit Device. Connect the serial line debug interface of the debug device to the serial line debug slot on the chip test board, and the universal serial bus interface of the debug device is connected to the universal serial bus slot of the computer, so that the detection in the computer The error program can convert the debug instruction into a chip executable instruction format through the debug instruction conversion program stored in the memory, and then send the debug instruction to the electronic device containing the chip for the debug process. In another embodiment, the memory can also pre-store the chip's debug command or offline test command, and send it to the electronic device for the debug process.

步驟S3: 斷開通用序列匯流排接口,將記憶體作為電子裝置之外部儲存裝置。當偵錯裝置的通用序列匯流排接口斷開與電腦的連接時,偵錯裝置可傳送支援碼至晶片,使晶片將偵錯裝置作為電子裝置的外部儲存裝置,當電子裝置中的晶片進行偵錯程序時,各個偵錯資料或異常狀態的記錄,都能儲存於偵錯裝置的記憶體中,藉此增加儲存資料的空間,且電子裝置無需增加額外的硬體連接。Step S3: Disconnect the universal serial bus interface, and use the memory as an external storage device of the electronic device. When the universal serial bus interface of the debug device is disconnected from the computer, the debug device can send a support code to the chip so that the chip uses the debug device as an external storage device of the electronic device. When the chip in the electronic device performs detection When the program is wrong, each debug data or abnormal state record can be stored in the memory of the debug device, thereby increasing the data storage space, and the electronic device does not need to add additional hardware connections.

在本實施例中,偵錯裝置當中的處理單元,也能將其他硬體資源分享給電子裝置使用,例如藉由計數器提供計數的功能,或者將發光二極體轉為偵錯程序中的狀態顯示燈號,皆能提供電子裝置更佳的操作功效。In this embodiment, the processing unit in the debug device can also share other hardware resources for use by the electronic device. For example, a counter provides a counting function, or the light-emitting diode is turned into a state in the debug program. The display lights can provide better operation efficiency of the electronic device.

以上所述僅為舉例性,而非為限制性者。任何未脫離本發明之精神與範疇,而對其進行之等效修改或變更,均應包含於後附之申請專利範圍中。The above description is only illustrative, and not restrictive. Any equivalent modifications or alterations that do not depart from the spirit and scope of the present invention shall be included in the scope of the appended patent application.

11、21、31:偵錯裝置 12:電子裝置 13、23:電腦 24:伺服器 111:記憶體 112:處理單元 113、211、311:序列線偵錯接口 114、212、312:通用序列匯流排接口 115、318:發光二極體 116:計數器 121、221:序列線偵錯介面 122、222:晶片 131、231:通用序列匯流排介面 132:處理器 133:儲存裝置 223:測試基板 313:控制基板 314:外殼 315:微處理器 316:快閃記憶體 317:靜態隨機存取記憶體 S1~S3:步驟11, 21, 31: Debugging device 12: Electronic device 13, 23: Computer 24: server 111: Memory 112: Processing Unit 113, 211, 311: serial line debug interface 114, 212, 312: universal serial bus interface 115, 318: LED 116: counter 121, 221: serial line debugging interface 122, 222: chip 131, 231: Universal serial bus interface 132: Processor 133: storage device 223: test substrate 313: control board 314: Shell 315: Microprocessor 316: flash memory 317: Static random access memory S1~S3: steps

第1圖係為本發明實施例之偵錯裝置之方塊圖。 第2圖係為本發明實施例之偵錯裝置之示意圖。 第3圖係為本發明另一實施例之偵錯裝置之示意圖。 第4圖係為本發明實施例之偵錯裝置操作方法之流程圖。Fig. 1 is a block diagram of a debugging device according to an embodiment of the present invention. Figure 2 is a schematic diagram of the error detection device according to an embodiment of the present invention. FIG. 3 is a schematic diagram of a debugging device according to another embodiment of the present invention. FIG. 4 is a flowchart of the method of operating the error detection device according to an embodiment of the present invention.

11:偵錯裝置11: Debugging device

12:電子裝置12: Electronic device

13:電腦13: Computer

111:記憶體111: Memory

112:處理單元112: Processing Unit

113:序列線偵錯接口113: Serial line debug interface

114:通用序列匯流排接口114: Universal serial bus interface

115:發光二極體115: LED

116:計數器116: counter

121:序列線偵錯介面121: Serial line debugging interface

122:晶片122: chip

131:通用序列匯流排介面131: Universal Serial Bus Interface

132:處理器132: Processor

133:儲存裝置133: storage device

Claims (12)

一種偵錯裝置,用以連接具有一序列線偵錯介面的一電子裝置,該偵錯裝置包含: 一記憶體; 一處理單元,連接於該記憶體; 一序列線偵錯接口,連接至該序列線偵錯介面; 一通用序列匯流排接口,當該通用序列匯流排接口連接至一電腦,該處理單元將該電腦之一偵錯指令傳送至該電子裝置,當該通用序列匯流排接口斷開時,該記憶體成為該電子裝置之一外部儲存裝置。A debugging device for connecting an electronic device with a serial line debugging interface, the debugging device includes: A memory; A processing unit connected to the memory; A serial line debugging interface, connected to the serial line debugging interface; A universal serial bus interface. When the universal serial bus interface is connected to a computer, the processing unit transmits a debugging command of the computer to the electronic device. When the universal serial bus interface is disconnected, the memory Become an external storage device of the electronic device. 如申請專利範圍第1項所述之偵錯裝置,其中該記憶體包含快閃記憶體或靜態隨機存取記憶體。In the debug device described in the first item of the scope of patent application, the memory includes flash memory or static random access memory. 如申請專利範圍第1項所述之偵錯裝置,進一步包含一發光二極體以及一計數器之至少一者。The error detection device described in item 1 of the scope of patent application further includes at least one of a light-emitting diode and a counter. 如申請專利範圍第1項所述之偵錯裝置,其中該外部儲存裝置之一儲存資料包含該電子裝置之一偵錯資料或一異常記錄。For the debugging device described in item 1 of the scope of patent application, the stored data of one of the external storage devices includes a debugging data of the electronic device or an abnormal record. 如申請專利範圍第1項所述之偵錯裝置,其中該記憶體之一儲存資料包含該偵錯指令或該偵錯指令之一轉換程式。For the debug device described in item 1 of the scope of patent application, one of the stored data in the memory includes the debug command or a conversion program of the debug command. 如申請專利範圍第1項所述之偵錯裝置,其中該記憶體之一儲存資料包含該電子裝置之一離線測試指令。As for the debugging device described in the first item of the scope of patent application, one of the stored data of the memory includes an offline test command of the electronic device. 一種偵錯裝置之操作方法,其包含以下步驟: 設置一偵錯裝置,該偵錯裝置包含一記憶體、一處理單元、一序列線偵錯接口以及一通用序列匯流排接口; 將該序列線偵錯接口連接至一電子裝置之一序列線偵錯介面,並將該通用序列匯流排接口連接至一電腦之通用序列匯流排介面,藉由該處理單元將該電腦之一偵錯指令傳送至該電子裝置;以及 斷開該通用序列匯流排接口,將該記憶體作為該電子裝置之一外部儲存裝置。An operating method of a debugging device, which includes the following steps: Set up a debug device, the debug device includes a memory, a processing unit, a serial line debug interface and a universal serial bus interface; Connect the serial line debug interface to a serial line debug interface of an electronic device, and connect the universal serial bus interface to a universal serial bus interface of a computer, and use the processing unit to detect one of the computers The wrong command is transmitted to the electronic device; and Disconnect the universal serial bus interface, and use the memory as an external storage device of the electronic device. 如申請專利範圍第7項所述之偵錯裝置之操作方法,其中該記憶體包含快閃記憶體或靜態隨機存取記憶體。According to the operating method of the debug device described in item 7 of the scope of patent application, the memory includes flash memory or static random access memory. 如申請專利範圍第7項所述之偵錯裝置之操作方法,其中該偵錯裝置包含一發光二極體以及一計數器之至少一者。The operating method of the debug device described in item 7 of the scope of patent application, wherein the debug device includes at least one of a light-emitting diode and a counter. 如申請專利範圍第7項所述之偵錯裝置之操作方法,其中該外部儲存裝置儲存該電子裝置之一偵錯資料或一異常記錄。Such as the operating method of the debugging device described in item 7 of the scope of patent application, wherein the external storage device stores a debugging data or an abnormality record of the electronic device. 如申請專利範圍第7項所述之偵錯裝置之操作方法,其中該記憶體儲存該偵錯指令或該偵錯指令之一轉換程式。Such as the operating method of the debugging device described in item 7 of the scope of patent application, wherein the memory stores the debugging command or a conversion program of the debugging command. 如申請專利範圍第7項所述之偵錯裝置之操作方法,其中該記憶體儲存該電子裝置之一離線測試指令。As for the operating method of the debug device described in item 7 of the scope of patent application, the memory stores an offline test command of the electronic device.
TW109112946A 2020-04-17 2020-04-17 Debug device and operation method thereof TWI802792B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW109112946A TWI802792B (en) 2020-04-17 2020-04-17 Debug device and operation method thereof
CN202011022170.1A CN113535490B (en) 2020-04-17 2020-09-25 Error detecting device and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109112946A TWI802792B (en) 2020-04-17 2020-04-17 Debug device and operation method thereof

Publications (2)

Publication Number Publication Date
TW202141272A true TW202141272A (en) 2021-11-01
TWI802792B TWI802792B (en) 2023-05-21

Family

ID=78094257

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109112946A TWI802792B (en) 2020-04-17 2020-04-17 Debug device and operation method thereof

Country Status (2)

Country Link
CN (1) CN113535490B (en)
TW (1) TWI802792B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7401257B2 (en) * 2003-08-28 2008-07-15 Renesas Technology Corp. Microcomputer and method for developing system program
CN101634964A (en) * 2008-07-23 2010-01-27 佛山市顺德区顺达电脑厂有限公司 Debugging information processing system and method thereof
CN102479126A (en) * 2010-11-23 2012-05-30 英业达股份有限公司 Startup debugging device and method thereof
CN103246586B (en) * 2013-04-19 2014-12-10 福州瑞芯微电子有限公司 Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
TWI514145B (en) * 2013-10-21 2015-12-21 Univ Nat Sun Yat Sen Processor and cache, control method thereof for data trace storage
TWI546660B (en) * 2015-09-22 2016-08-21 新唐科技股份有限公司 Debugging system and method
US20170286254A1 (en) * 2016-03-30 2017-10-05 Intel Corporation Method and apparatus for using target or unit under test (uut) as debugger
TWI615708B (en) * 2017-03-17 2018-02-21 致伸科技股份有限公司 Embedded device debugging system and method thereof
CN108710554B (en) * 2018-05-21 2023-06-06 格兰菲智能科技有限公司 Processor debugging system and method
CN110955566B (en) * 2018-09-27 2023-08-08 佛山市顺德区顺达电脑厂有限公司 Error detecting method

Also Published As

Publication number Publication date
CN113535490B (en) 2023-12-26
TWI802792B (en) 2023-05-21
CN113535490A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
KR20190131445A (en) Traffic capture and debugging tools for identifying root causes of device failure during automated testing
TW202032144A (en) Automated test equipment (ate) support framework for solid state device (ssd) odd sector sizes and protection modes
JP5022262B2 (en) Test system and method capable of using tools during debugging
KR20190107183A (en) Techniques for capturing traffic in real time on failure for protocol debug
CN109508279A (en) A kind of server monitoring device, method and its system
CN106649021B (en) PCIe is from equipment testing device
TW201341811A (en) Adapter module and motherboard testing device using the same
TWI480731B (en) Adapter and debug method using the same
JP2014157505A (en) Controller, information processing device, and program
CN117012258B (en) Analysis device, method and medium for storing chip state data
CN114064458A (en) JTAG debugging method and system with extensible interface and universality
US9916273B2 (en) Sideband serial channel for PCI express peripheral devices
JP2008507025A (en) Emulation and debug interface for integrated circuit testing
WO2020087956A1 (en) Method, apparatus, device and system for capturing trace of nvme hard disc
TWI393003B (en) Remote hardware inspection system and method
TWI802792B (en) Debug device and operation method thereof
CN112685212A (en) Debugging and tracking method, device and system for processor exception
CN116049015A (en) Universal debugger, debugging system and debugging method of computing equipment
TW202004501A (en) Memory inspecting system, memory inspecting method, and error mapping table building method for memory inspecting
CN111008098A (en) Monitoring system and method
US10216525B1 (en) Virtual disk carousel
CN100533401C (en) Emulation and debug interfaces for testing an integrated circuit with an asynchronous microcontroller
TWI234705B (en) Detecting method for PCI system
TWI773140B (en) Graphical user interface for traffic capture and debugging tool
US20240070092A1 (en) Input/output expansion emulation with a programmable device