KR20190014964A - Debuging method for embedded device - Google Patents

Debuging method for embedded device Download PDF

Info

Publication number
KR20190014964A
KR20190014964A KR1020170099162A KR20170099162A KR20190014964A KR 20190014964 A KR20190014964 A KR 20190014964A KR 1020170099162 A KR1020170099162 A KR 1020170099162A KR 20170099162 A KR20170099162 A KR 20170099162A KR 20190014964 A KR20190014964 A KR 20190014964A
Authority
KR
South Korea
Prior art keywords
data
debugging
embedded device
area
cached
Prior art date
Application number
KR1020170099162A
Other languages
Korean (ko)
Other versions
KR102030167B1 (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 KR1020170099162A priority Critical patent/KR102030167B1/en
Publication of KR20190014964A publication Critical patent/KR20190014964A/en
Application granted granted Critical
Publication of KR102030167B1 publication Critical patent/KR102030167B1/en

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The present invention relates to a debugging method for an embedded device. The debugging method for an embedded device prevents the excessive generation of a read/write request in order to reduce a burden of the embedded device, by caching data which may generate repetitive requests to a debugging computer in advance and performing debugging, when the debugging of the embedded device is processed. The debugging method for the embedded device comprises the following steps: forming a communication channel; checking a data area; caching data; performing debugging; and renewing data.

Description

임베디드 기기를 위한 디버깅 방법{DEBUGING METHOD FOR EMBEDDED DEVICE}[0001] DEBUGING METHOD FOR EMBEDDED DEVICE [0002]

본 발명은 임베디드 기기를 위한 디버깅 방법에 관한 것을 특히, 임베디드 장치의 디버깅 처리시 반복적인 요청이 발생될 수 있는 데이터를 미리 디버깅 컴퓨터에 캐싱하여 디버깅을 수행함으로써, 읽기/쓰기 요청의 과도한 발생을 방지하여 임베디드 기기의 부담을 감소시키도록 한 임베디드 기기를 위한 디버깅 방법에 관한 것이다.The present invention relates to a debugging method for an embedded device, and more particularly, to a debugging method for debugging an embedded device by caching data that may cause repeated requests in a debugging computer in advance to prevent excessive occurrence of a read / write request To a debugging method for an embedded device that reduces the burden on the embedded device.

임베디드 장치 또는 시스템(Embedded device or system 이하에서는 '장치'로 통칭 함)은 기계나 기타 제어가 필요한 시스템 또는 장치에 대해, 제어를 위한 특정 기능을 수행하는 컴퓨터 시스템으로 제어가 필요한 시스템 또는 장치 내에 구성되는 장치를 의미한다. 일반적으로 임베디드 장치는 일반적으로 사용 목적 및 처리 프로세스가 다양한 컴퓨터 시스템, 예를 들어, 개인용 컴퓨터와는 구분되어 특정 목적 또는 기능을 수행하도록 장치 성능, 규모, 프로그램이 마련된다. 이를 위해 임베디드 장치들은 특정 목적 또는 기능에 최적화된 프로그램이 내장되는 메모리에 저장되어 운영된다.An embedded device or system (collectively referred to as a "device") is a computer system that performs certain functions for the control of a system or device that requires a machine or other control. Means a device that In general, an embedded device is generally provided with device performance, scale, and program so that the purpose of use and the process are distinct from various computer systems, for example, a personal computer, to perform a specific purpose or function. To this end, embedded devices are stored and operated in a memory in which a program optimized for a specific purpose or function is embedded.

이러한 임베디드 장치의 특성상 최소 비용으로 장치를 구현하기 위해 목적 또는 기능으로 구현되는 점에서는 마이크로컨트롤러와 유사하지만, 운영체제 및 목적 또는 기능 실현을 위한 응용프로그램이 실장되어 운영된다는 차이점이 있다. 이 때문에 임베디드 장치에서는 오류(bug)가 발생하는 경우가 빈번하며, 이를 해소하기 위한 디버깅(debugging) 작업이 실행되는 경우가 빈번하다.The characteristics of such an embedded device are similar to those of a microcontroller in that they are implemented as objects or functions in order to implement a device at a minimum cost, but there is a difference in that an operating system and application programs for realizing purposes or functions are implemented and operated. Therefore, in the embedded device, an error (bug) frequently occurs, and a debugging operation is often performed to resolve the bug.

이러한 디버깅 작업은 임베디드 시스템에 의해 직접 수행되는 경우보다, 개인용 컴퓨터와 같이 임베디드 시스템보다 성능이 우수한 장치에 의해 수행되는 것이 일반적이다. 때문에, 임베디드 시스템과 디버깅을 위한 컴퓨터가 통신으로 연결되고, 컴퓨터에서 실행되는 디버거에 의해 디버깅에 필요한 정보를 임베디드 시스템에 요청하여 획득하고 이를 확인하여 처리하는 형태로 디버깅이 이루어지게 된다.Such debugging operations are generally performed by a device superior in performance to an embedded system such as a personal computer, rather than being directly executed by an embedded system. Therefore, the embedded system and the computer for debugging are connected to each other by the communication, and the information required for debugging is requested to the embedded system by the debugger executed by the computer, and the debugging is performed by confirming and acquiring the information.

그러나, 이러한 디버깅 작업이 이루어지는 동안 임베디드 기기의 성능이 저하되거나, 과도한 부하 부담이 발생되는 문제점이 있다. 좀 더 구체적으로 디버깅 작업이 이루어지는 동안, 컴퓨터와 임베디드 장치 간 송수신 되는 데이터 중 레지스터 정보, 메모리 정보의 읽기/쓰기가 주를 이루며, 이러한 작업이 반복적으로 발생된다. 이때, 임베디드 장치는 컴퓨터의 읽기/쓰기 요청에 대한 응답에 성능의 상당부분을 할애하게 됨으로써 본래 동작 목적이 되는 기능의 실행이 지연되거나 열악해지는 문제점이 있다.However, there is a problem that the performance of the embedded device is degraded or an excessive load is burdened during the debugging operation. More specifically, during the debugging operation, the read / write of the register information and the memory information among the data transmitted / received between the computer and the embedded device is mainly performed, and this operation is repeatedly generated. At this time, the embedded device allocates a large amount of performance to the response to the read / write request of the computer, thereby causing the performance of the function as the operation object to be delayed or deteriorated.

한국공개특허 10-1999-0035425(공개일 1999.05.15.)Korean Patent Laid-Open No. 10-1999-0035425 (Publication date May 15, 1999)

따라서, 본 발명의 목적은 상기한 문제점을 해결하기 위한 것으로 임베디드 장치의 디버깅 처리시 반복적인 요청이 발생될 수 있는 데이터를 미리 디버깅 컴퓨터에 캐싱하여 디버깅을 수행함으로써, 읽기/쓰기 요청의 과도한 발생을 방지하여 임베디드 기기의 부담을 감소시키도록 한 임베디드 기기를 위한 디버깅 방법을 제공하는 것이다.Accordingly, an object of the present invention is to solve the above problems, and it is an object of the present invention to provide a debugging method and a debugging method for debugging an embedded device, So as to reduce the burden on the embedded device, thereby providing a debugging method for an embedded device.

상기 목적을 달성하기 위하여 본 발명에 따른 임베디드 기기를 위한 디버깅 방법은 임베디드 장치에 연결되어 임베디드 장치에 발생되는 오류를 처리하는 디버깅 장치를 이용한 디버깅 방법에 있어서, 상기 디버깅 장치가 상기 임베디드 장치와 통신채널을 형성하는 통신채널 형성 단계; 상기 디버깅 장치가 상기 임베디드 장치의 내부 메모리에 저장된 데이터를 확인하여 데이터 캐싱이 필요한 경우 데이터의 영역을 확인하는 단계; 상기 디버깅 장치가 확인된 상기 데이터의 영역에 기재된 데이터를 캐싱하여 자신의 저장부에 저장하는 데이터 캐싱 단계; 상기 디버깅 장치가 저장부(26)에 캐싱된 데이터를 확인하여, 상기 캐싱된 데이터가 존재하는 경우 상기 캐싱된 데이터를 사용하고, 상기 캐싱된 데이터가 존재하지 않는 경우 상기 임베디드 장치에 데이터를 요청하여, 상기 캐싱된 데이터 또는 상기 요청에 의해 전달되는 데이터를 이용하여 디버깅을 수행하는 디버깅 단계; 및 상기 디버깅 장치가 상기 캐싱된 데이터의 갱신 필요여부를 판단하여, 갱신이 필요한 데이터가 확인되며, 상기 데이터를 폐기하고 새로운 데이터를 캐싱하는 데이터 갱신단계;를 포함하여 구성되는 것을 특징으로 한다.According to another aspect of the present invention, there is provided a debugging method for an embedded device, the debugging method comprising: a debugging unit connected to an embedded device to process an error generated in the embedded device, Forming a communication channel; Checking the data stored in the internal memory of the embedded device by the debugging device and checking the data area when data caching is required; A data caching step of caching data stored in the area of the data identified by the debugging device and storing the data in a storage unit of the caching device; The debugging device checks the cached data in the storage unit 26, uses the cached data if the cached data exists, and requests data to the embedded device if the cached data does not exist A debugging step of performing debugging using the cached data or data transmitted by the request; And a data updating step of judging whether the cached data is required to be updated by the debugging device, confirming data requiring updating, discarding the data, and caching new data.

상기 데이터의 영역은 코드 영역, 스택 영역 및 공유 영역인 것을 특징으로 한다.And the area of the data is a code area, a stack area, and a shared area.

상기 디버깅 장치는 스택 영역에 마련되는 스택에 대응되는 스레드의 진행시 상기 스택을 캐싱한 데이터를 갱신하는 것을 특징으로 한다.Wherein the debugging apparatus updates data in which the stack is cached in the course of a thread corresponding to the stack provided in the stack area.

상기 디버깅 장치는 상기 임베디드 장치에서 진행되는 어느 하나 이상의 스레드가 확인되는 경우 상기 공유 영역의 데이터를 캐싱한 데이터를 폐기하고, 상기 임베디드 장치에서 진행되는 모든 스레드가 종료된 경우 상기 공유 영역의 데이터를 캐싱하는 것을 특징으로 한다.Wherein the debugging device discards data in which the data of the shared area is cached when at least one thread in the embedded device is identified, and caches data of the shared area when all the threads in the embedded device are terminated .

상기 디버깅 장치는 상기 저장부에 상기 캐싱된 데이터를 저장하기 위해 미리 정해지는 크기의 블럭을 할당하는 것을 특징으로 한다.The debugging apparatus allocates blocks of a predetermined size to store the cached data in the storage unit.

본 발명에 따른 임베디드 기기를 위한 디버깅 방법은 임베디드 장치의 디버깅 처리시 반복적인 요청이 발생될 수 있는 데이터를 미리 디버깅 컴퓨터에 캐싱하여 디버깅을 수행함으로써, 읽기/쓰기 요청의 과도한 발생을 방지하여 디버깅 동안 임베디드 기긱의 부담을 감소시키는 것이 가능해진다.The debugging method for an embedded device according to the present invention is a method for debugging an embedded device by caching data that may cause repeated requests in a debugging computer in advance in the debugging process of the embedded device to thereby prevent excessive occurrence of read / It becomes possible to reduce the burden on the embedded device.

도 1은 본 발명에 따른 디버깅 장치의 구성을 개략적으로 도시한 구성 예시도.
도 2는 본 발명에 따른 디버깅 장치에서 캐싱에 따른 데이터 기입을 설명하기 위한 예시도.
도 3은 본 발명에 따른 임베디드 장치를 위한 디버깅 방법을 설명하기 위한 순서도.
BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a schematic diagram showing a configuration of a debugging apparatus according to the present invention; Fig.
BACKGROUND OF THE INVENTION 1. Field of the Invention [0001] The present invention relates to a debugging apparatus.
3 is a flowchart for explaining a debugging method for an embedded device according to the present invention;

이하, 본 발명의 바람직한 실시예를 첨부한 도면을 참조하여 당해 분야의 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 설명하기로 한다. 첨부된 도면들에서 구성에 표기된 도면번호는 다른 도면에서도 동일한 구성을 표기할 때에 가능한 한 동일한 도면번호를 사용하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어서 관련된 공지의 기능 또는 공지의 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고 도면에 제시된 어떤 특징들은 설명의 용이함을 위해 확대 또는 축소 또는 단순화된 것이고, 도면 및 그 구성요소들이 반드시 적절한 비율로 도시되어 있지는 않다. 그러나 당업자라면 이러한 상세 사항들을 쉽게 이해할 것이다.Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings so that those skilled in the art can easily carry out the present invention. It should be noted that the drawings denoted by the same reference numerals in the drawings denote the same reference numerals whenever possible, in other drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear. And certain features shown in the drawings are to be enlarged or reduced or simplified for ease of explanation, and the drawings and their components are not necessarily drawn to scale. However, those skilled in the art will readily understand these details.

도 1은 본 발명에 따른 디버깅 장치의 구성을 개략적으로 도시한 구성 예시도이다.1 is a schematic diagram showing a configuration of a debugging apparatus according to the present invention.

도 1을 참조하면, 본 발명에 따른 디버깅 장치(20)는 처리부(21)와 저장부(26)를 포함하여 구성된다. 이외에도 디버깅 장치(20)는 입력부와 출력부와 같은 컴퓨터 장치의 구성을 부가적으로 더 구비할 수 있으나, 본 발명의 상세한 설명에서는 필수적인 구성요소 위주로 설명을 진행하기로 한다.Referring to FIG. 1, a debugging apparatus 20 according to the present invention includes a processing unit 21 and a storage unit 26. In addition, the debugging apparatus 20 may further include a configuration of a computer device such as an input unit and an output unit, but the description will be focused on essential components in the detailed description of the present invention.

임베디드 장치(10)는 제어 또는 특정 기능이 필요한 기계장치나 전자장치(이하 '제어대상 장치'로 통칭함)에 구성되고, 미리 프로그래밍 되어 내부메모리에 저장되는 프로그램에 의해 구동된다. 이러한 임베디드 장치(10)는 응용프로그램과 운영체제가 저장되는 메모리, 이를 실행하기 위한 프로세서 코어, 외부 장치와의 통신을 위한 통신모듈, 제어대상 장치의 구동 또는 제어를 위한 추가적인 구성을 구비할 수 있다. The embedded device 10 is configured by a machine or an electronic device (hereinafter referred to as a " control target device ") requiring control or specific function, and is driven by a program that is preprogrammed and stored in the internal memory. The embedded device 10 may include a memory for storing an application program and an operating system, a processor core for executing the same, a communication module for communicating with an external device, and an additional configuration for driving or controlling the control target device.

이러한 임베디드 장치(10)는 디버깅 장치(20)와 통신채널을 형성하고, 버그 발생에 따른 오류를 디버깅 장치(20)의 요청에 따라 전달하거나, 미리 정해진 조건에 따라 디버깅 장치(20)로 전달하게 된다.The embedded device 10 forms a communication channel with the debugging device 20 and transmits an error according to a bug occurrence to the debugging device 20 according to a predetermined condition or according to a request of the debugging device 20 do.

특히, 임베디드 장치(10)는 디버깅 장치(20)가 디버깅을 수행하는 과정에서 발생되는 메모리의 읽기/쓰기 요청에 따라 내부 메모리에 저장된 데이터를 디버깅 장치(20)로 전달하고, 디버깅 장치(20)로부터 전달되는 정정된 응용프로그램과 같은 오류 정정 데이터를 전달받아 저장 또는 설치하게 된다.In particular, the embedded device 10 transfers data stored in the internal memory to the debugging device 20 according to a read / write request of the memory generated in the process of debugging by the debugging device 20, And receives and stores or installs error correction data such as a corrected application program transmitted from the mobile communication terminal.

구체적으로 임베디드 장치(10)는 메모리에 저장되는 영역별 데이터를 디버깅 장치(20)의 요청 발생시 전달한다. 구체적으로 내부 메모리에 저장되는 영역별 데이터는 코드 영역 데이터, 스레드의 스택 영역 데이터, 공유 영역 데이터를 포함하여 구성될 수 있다. Specifically, the embedded device 10 delivers data for each area stored in the memory when a request for the debugging device 20 is issued. More specifically, the area-specific data stored in the internal memory may include code area data, stack area data of a thread, and shared area data.

디버깅 장치(20)는 엠베디드 장치(10)의 버그 발생시 이를 처리하기 위한 디버깅을 수행한다. 이 디버깅 장치(20)는 디버깅의 수행을 위해 임베디드 장치(10)와 통신채널을 형성하여 연결될 수 있으며, 디버깅 과정에서 필요한 데이터를 임베디드 장치(10)에 요청하여 전달받게 된다.The debugging device 20 performs debugging for processing a bug in the embedded device 10. The debugging apparatus 20 may be connected to the embedded apparatus 10 through a communication channel to perform debugging. The debug apparatus 20 may request the embedded apparatus 10 to receive data necessary for the debugging process.

특히, 디버깅 장치(20)는 디버깅 과정에서 임베디드 장치(10)에 반복적으로 요청하게 되는 데이터를 미리 캐싱하여 저장부(26)에 저장하여, 저장된 데이터를 이용하여 디버깅을 수행하고, 저장부(26)에 저장되지 않은 데이터 또는 갱신이 필요한 데이터가 필요한 경우에만 임베디드 장치(10)에 데이터를 요청하여 전달받게 된다.In particular, the debugging device 20 pre-caches the data to be repeatedly requested to the embedded device 10 during the debugging process, stores the data in the storage unit 26, performs debugging using the stored data, The data is requested to the embedded device 10 and is received only when data that is not stored in the embedded device 10 or data requiring the update is needed.

이러한 디버깅 장치(20)는 처리부(21)와 저장부(26)를 포함하여 구성될 수 있다. 처리부(21)는 디버깅에 관련된 일련의 처리를 수행하며, 저장부(26)는 디버깅을 임베디드 장치의 데이터를 미리 캐싱하여 저장된다.The debugging apparatus 20 may include a processing unit 21 and a storage unit 26. The processing unit 21 performs a series of processes related to debugging, and the storage unit 26 stores debugging by previously caching the data of the embedded device.

좀 더 구체적으로 처리부(21)는 임베디드 장치(10)로부터 캐싱되는 데이터를 영역별로 캐싱 및 갱신하게 된다. 특히, 이를 위해 디버깅 장치(20)는 임베디드 장치(10)의 상황에 따라 영역별로 캐싱된 데이터의 갱신여부를 판단하고, 갱신이 필요하다고 판단되는 경우 해당 영역의 데이터를 갱신하게 된다.More specifically, the processing unit 21 caches and updates data cached from the embedded device 10 by area. In particular, the debugging device 20 determines whether the cached data is updated according to the status of the embedded device 10, and updates the data of the corresponding area when it is determined that the data is cached.

영역 데이터의 갱신을 위해 디버깅 장치(20)는 새로운 데이터가 발생됐을 것으로 예상되는 영역의 데이터를 폐기하고, 새로운 데이터의 기재가 종료된 해당 여역의 데이터를 폐기된 데이터를 대신하여 캐싱한다. 이를 위해 디버깅 장치(20)는 임베디드 장치(10)의 스레드(Thread)를 조회하여 스레드의 운영에 따라 특정 영역의 데이터를 갱신하게 된다. 여기서, 임베디드 장치(10)가 스레드의 실행여부를 판별하는 것으로 기재하고 있으나, 프로세스를 조회하여 프로세스의 진행에 따른 데이터의 갱신 여부를 판단하고 이를 통해 데이터의 갱신 여부를 판단할 수도 있다. 다만, 본 발명에서는 임베디드 장치(10)가 멀티코어로 이루어지는 경우에도 하나의 메모리 또는 동일 영역의 메모리를 공유하는 경우를 위주로 설명하기 때문에 이하에서는 스레드의 진행여부를 조회하여 데이터의 갱신을 판단하는 것으로 가정하여 설명을 진행하기로 한다.In order to update the area data, the debugging device 20 discards the data of the area where new data is expected to be generated, and caches the data of the spare area where the new data has been written instead of the discarded data. To this end, the debugging device 20 inquires the thread of the embedded device 10 and updates data of a specific area according to the operation of the thread. Here, it is described that the embedded device 10 determines whether or not the thread is executed. However, the process may be inquired to determine whether the data is updated according to the progress of the process, and it may be determined whether the data is updated. However, in the present invention, even when the embedded device 10 is multi-core, the case of sharing one memory or the memory of the same area will be mainly described. Let us assume that the explanation is proceeded.

구체적으로 디버깅 장치(20)는 코드 영역, 스택 영역, 공유 영역별로 데이터를 캐싱하며, 각 영역별로 갱신을 판단한다. 좀 더 구체적으로 디버깅 장치(20)는 코드 영역은 디버깅 초기 또는 디버깅 절차가 변경되는 과정에서 1회 캐싱 후 별도의 갱신을 수행하지 않는다. 그리고, 디버깅 장치는 스택 영역의 캐싱은 스레드 별로 수행하게 된다. 구체적으로 스레드 별로 존재하는 스택 중, 스레드의 진행이 종료되는 경우 종료된 스레드의 스택을 캐싱하고, 해당 스레드가 재개되는 경우 캐싱된 스택을 폐기하게 된다. 또한, 디버깅 장치(20)는 모든 스레드가 종료되는 경우에만 공유 영역의 데이터를 캐싱하고, 어느 하나의 스레드라도 동작하는 경우 공유 영역에 해당하는 데이터를 폐기하게 된다.Specifically, the debugging apparatus 20 caches data by a code area, a stack area, and a shared area, and determines an update for each area. More specifically, the debugging device 20 does not perform a separate update after the one-time caching in the initial stage of debugging or in the process of changing the debugging procedure. In addition, the debugging device performs caching of the stack area on a thread-by-thread basis. Specifically, when a thread is terminated, the stack of the terminated thread is cached. If the thread is resumed, the cached stack is discarded. Also, the debugging device 20 caches the data of the shared area only when all the threads are terminated, and discards data corresponding to the shared area when any one of the threads operates.

그리고, 디버깅 장치(20)는 디버깅 과정에서 임베디드 장치(10)에 요청할 데이터 중 캐싱된 데이터가 존재하는 경우 캐싱된 데이터를 이용하여 디버깅 과정을 수행하고, 캐싱된 데이터가 존재하지 않는 데이터만 임베디드 장치(10)에 요청하여 전달받고, 이를 이용하여 디버깅을 수행하게 된다.When there is cached data among the data to be requested to the embedded device 10 during the debugging process, the debugging device 20 performs a debugging process using the cached data, and only the data in which no cached data exists exists in the embedded device 10. [ (10), and performs debugging using the received request.

이와 같이 디버깅 장치(20)는 각 영역별로 스레드의 동작 유무를 판별하여 캐싱을 수행함으로써, 데이터 갱신이 이루어졌는지의 여부를 복잡한 과정을 거쳐 판단하지 않고도 디버깅을 위한 데이터를 적절한 시기에 갱신할 수 있게 된다. In this way, the debugging device 20 can determine whether or not the thread is operated for each area and perform caching, thereby enabling the data for debugging to be updated at an appropriate time without judging whether or not the data update has been performed through a complicated process do.

이를 통해 본 발명의 디버깅 장치(20)는 데이터 요청 즉, 읽기/쓰기에 의해 과도하게 발생되는 트래픽 및 이를 처리하기 위한 임베디드 장치(10)의 부담을 경감시켜, 임베디드 장치(10)가 정상적인 동작을 수행하도록 하면서도 디버깅을 수행하여 오류를 처리하는 것이 용이해진다.Accordingly, the debugging apparatus 20 of the present invention alleviates the traffic generated by the data request, that is, the read / write operation, and the burden of the embedded device 10 for processing the traffic, so that the embedded device 10 performs normal operation It is easy to perform debugging and to handle errors.

도 2는 본 발명에 따른 디버깅 장치에서 캐싱에 따른 데이터 기입을 설명하기 위한 예시도이다.2 is an exemplary diagram illustrating data writing according to caching in the debugging apparatus according to the present invention.

도 2를 참조하면, 본 발명에 따른 디버깅 장치는 데이터를 미리 정해진 블럭 단위로 기재되도록 할 수 있다. 좀 더 구체적으로 디버깅 장치(20)는 임베디드 장치(10)에 비해 저장부(26)의 용량이 매우 크다고 할 수 있다. 때문에 디버깅 장치(20)가 엠비디드 장치(10)의 데이터를 미리 캐싱하는 경우 실제로 디버깅 장치(20)의 저장부(26) 중 일부만을 사용하게 되며, 자유롭게 영역을 할당하여 사용할 수도 있다.Referring to FIG. 2, the debugging apparatus according to the present invention may write data in a predetermined block unit. More specifically, the capacity of the storage unit 26 of the debugging apparatus 20 is much larger than that of the embedded apparatus 10. Therefore, when the debugging apparatus 20 pre-caches the data of the embedding apparatus 10, only a part of the storage units 26 of the debugging apparatus 20 is actually used.

그러나, 도 2에 제시된 바와 같이 일정한 블럭단위로 데이터 블럭을 지정하여 블럭단위로 데이터가 기재되도록 할 수도 있고, 연속적으로 데이터가 기입되고 기입된 데이터의 어드레스를 관리하도록 할 수도 있다.However, as shown in FIG. 2, a data block may be designated by a predetermined block unit so that data may be written on a block-by-block basis, or the addresses of the data in which data is written and written continuously may be managed.

블럭단위로 데이터를 기입하는 경우 임베디드 장치(10)에서 많이 사용되는 데이터의 크기들을 고려하여 블럭의 크기를 결정할 수 있으며, 이 경우 데이터들의 크기 중 발생빈도수가 높은 데이터의 크기를 블럭의 크기로 결정할 수 있다. 아울러, 이러한 블럭의 크기는 디버깅 장치(20)의 저장부(26) 용량에 따라 가변될 수 있다.When the data is written in units of blocks, the size of the block can be determined in consideration of the sizes of data frequently used in the embedded device 10. In this case, the size of data having a high frequency of occurrence among the data sizes is determined as the size of the block . In addition, the size of the block may vary depending on the capacity of the storage unit 26 of the debugging apparatus 20. [

일례로 도 2에는 블럭이 32바이트(byte)의 크기를 가지도록 한 예가 도시되어 있으나, 블록과는 무관하게 데이터가 순차적으로 기재된 예가 도시되어 있다. 블럭을 이용하는 경우 블럭의 크기를 고려하여 데이터의 크기와 블럭의 크기를 비교하여 데이터가 점유할 블록의 수를 결정할 수 있으며, 블록의 잔여 공간이 남더라도 블록에 기록된 데이터와 다른 데이터는 다른 블록에 기재되도록 할 수 있다.For example, FIG. 2 shows an example in which a block has a size of 32 bytes, but an example in which data is sequentially described regardless of a block is shown. When using a block, the number of blocks occupied by the data can be determined by comparing the size of the block with the size of the block considering the size of the block. Even if the remaining space of the block remains, Can be described.

도 2에는 블럭의 크기가 32바이트로 설정된 예가 도시되어 있으나, 실제 데이터 기재는 연속적으로 이루어진 경우의 예가 도시되어 있다. 이러한 데이터는 비선형(Non-linear), 링크드 리스트(linked-list)로 기재되어 관리될 수 있으나, 블록 단위의 기재나 트리구조의 데이터 관리도 가능하며 제시된 바에 의해 본 발명을 한정하는 것은 아니다. FIG. 2 shows an example in which the size of the block is set to 32 bytes, but an actual data description is continuously performed. Such data can be described as non-linear or linked-list management, but data management of a block-based description or a tree structure is also possible, and the present invention is not limited by the presented description.

(a)에서와 같이 캐싱된 데이터는 어드레스가 부여되어, 해당 어드레스로부터 데이터 크기에 해당하는 공간을 점유하게 된다. (a)에는 각각 40바이트, 4바이트, 20바이트의 3개 데이터가 기재된 예가 도시되어 있다.the data cached as shown in FIG. 5A is given an address and occupies a space corresponding to the data size from the corresponding address. (a) shows an example in which three pieces of data of 40 bytes, 4 bytes, and 20 bytes are written.

이와 같이 데이터의 캐싱이 이루어지면, 디버깅을 수행하는 디버깅 장치(20)가 임베디드 장치(10)에 데이터를 요청할 필요가 발생하게 된다. 이때, 디버깅 장치(20)가 임베디드 장치(10)에 데이터를 요청하기에 앞서 캐싱된 데이터가 있는지 먼저 자신의 저장부(26)에서 확인하게 된다. 이때, (b)의 a,b와 같이 자신의 저장부(26)에 해당되는 데이터가 있는 경우 임베디드 장치(10)에 데이터를 요청하지 않고 해당 데이터를 읽어와서 디버깅에 사용하게 된다.When data caching is performed in this way, it is necessary for the debugging device 20 performing debugging to request data from the embedded device 10. At this time, before the debugging device 20 requests the embedded device 10 for data, the storage device 26 first confirms whether there is cached data. At this time, if there is data corresponding to the own storage unit 26 as shown in (a) and (b) of FIG. 5B, the corresponding data is read and used for debugging without requesting data to the embedded device 10.

반면, (c)의 c에서와 같이 디버깅에 필요한 데이터를 저장부(26)에 조회한 결과 해당 데이터가 존재하지 않는 경우 임베디드 장치(10)에 요청하여 데이터를 전달받게 된다.On the other hand, if the data required for debugging is not stored in the storage unit 26 as shown in (c) c, the embedded device 10 receives the data by requesting the embedded device 10.

도 3은 본 발명에 따른 임베디드 장치를 위한 디버깅 방법을 설명하기 위한 순서도이다.3 is a flowchart illustrating a debugging method for an embedded device according to the present invention.

도 3을 참조하면, 본 발명에 따른 임베디드 장치를 위한 디버깅 방법은 통신채널 형성 단계(S10), 데이터 확인 단계(S20), 데이터 캐싱 단계(S30), 디버깅 단계(S40), 갱신 판단 단계(S50) 및 데이터 폐기 단계(S55)를 포함하여 구성된다.Referring to FIG. 3, a debugging method for an embedded device according to the present invention includes a communication channel forming step S10, a data checking step S20, a data caching step S30, a debugging step S40, And a data discard step S55.

통신채널 형성 단계(S10)는 디버깅을 위해 디버깅 장치(20)와 임베디드 장치(10) 간에 통신채널이 형성되는 단계이다.In the communication channel forming step S10, a communication channel is formed between the debugging device 20 and the embedded device 10 for debugging.

데이터 확인 단계(S20)는 통신채널을 형성한 디버깅 장치(20)가 디버깅을 위한 제반 사항을 확인하고, 데이터의 캐싱이 필요한지의 여부, 데이터 캐싱이 필요한 한 경우 데이터의 각 영역을 확인하는 단계이다.In the data checking step S20, the debugging apparatus 20 forming the communication channel confirms all the items for debugging, whether data caching is required, and whether data caching is required, .

데이터 캐싱 단계(S30)는 디버깅 장치가 각각의 데이터 영역에 대해 저장 위치를 지정하고, 영역별로 데이터를 캐싱하여 저장하는 단계이다. 이 데이터 캐싱 단계(S30)에서 디버깅 장치(20)는 임베디드 장치(10)의 내부 저장소에 저장된 데이터를 코드 영역, 스택 영역, 공유 영역별로 구분하여 각각의 영역별로 캐싱하여 저장하게 된다.The data caching step S30 is a step in which the debugging device specifies a storage location for each data area, and caches and stores data for each area. In the data caching step S30, the debugging device 20 categorizes data stored in the internal storage of the embedded device 10 by a code area, a stack area, and a shared area, and stores the data in each area.

디버깅 단계(S40)는 디버깅 장치(20)가 임베디드 장치(10)에 대한 오류를 확인하고 디버깅을 수행하는 단계이다. 디버깅 단계(S40)에서 디버깅 장치(20)는 임베디드 장치(10)에 대해 각종 데이터를 요청하여 전달받고, 전달받은 데이터를 이용하여 디버깅을 수행한다. 이러한 과정에서 디버깅 장치(20)는 임베디드 장치(10)에 대한 데이터 요청이 필요한 경우 저장부(26)에 캐싱된 데이터를 우선 확인하고, 캐싱된 데이터 중에 필요로 하는 데이터가 있는 경우 캐싱된 데이터를 사용하며, 필요한 데이터가 없는 경우에만 임베디드 장치(10)에 데이터를 요청하여 획득하게 된다.The debugging step S40 is a step in which the debugging device 20 confirms an error with respect to the embedded device 10 and performs debugging. In the debugging step S40, the debugging device 20 receives various data from the embedded device 10, receives the data, and performs debugging using the received data. In this process, the debugging device 20 first checks the cached data in the storage unit 26 when the data request for the embedded device 10 is required, and if the cached data contains necessary data, And requests and acquires data from the embedded device 10 only when there is no necessary data.

갱신 판단 단계(S50)는 디버깅 장치(20)가 캐싱된 데이터의 갱신이 필요한지를 판단하는 단계이다. 이 갱신 판단 단계(S50)에서 디버깅 장치(20)는 스택 영역의 각 스택에 해당되는 스레드의 동작여부를 확인하고, 스레드가 진행된 스택이 확인된 경우 또는 스레드 진행의 종료가 확인되는 경우 캐싱된 데이터의 갱신을 진행하게 된다.The update determination step S50 is a step for determining whether the debugging apparatus 20 needs to update the cached data. In this update determination step S50, the debugging device 20 checks whether the thread corresponding to each stack of the stack area is operated. If the stack in which the thread is advanced is confirmed or the end of the thread progress is confirmed, .

데이터 폐기 단계(S55)는 미리 캐싱된 데이터 중 스택 영역의 특정 스택 또는 공유영역의 데이터를 폐기하여, 디버깅장치(20)의 저장부(26)를 비우는 단계이다. 스레드가 진행되는 경우 해당 스레드에 해당되는 스택 및 공유 영역의 데이터가 변경되기 때문에 이미 캐싱된 데이터는 불필요한 데이터가 된다. 때문에 데이터 폐기 단계(S55)에서 디버깅장치(20)는 스레드가 동작하는 것으로 확인되면 캐싱된 공유 영역의 데이터를 폐기함과 아울러, 동작하는 스레드에 해당되는 스택영역의 특정 스택을 폐기하여 저장부(26)에서 삭제하게 된다.The data discarding step S55 is a step of discarding data of a specific stack or a shared area of the stack area among the cached data and emptying the storage unit 26 of the debugging apparatus 20. [ When a thread progresses, the data on the stack and the shared area corresponding to the thread are changed, and the data already cached becomes unnecessary data. Therefore, if it is determined that the thread is operating, the debugging apparatus 20 discards the data of the cached shared area, discards the specific stack of the stack area corresponding to the operating thread, 26).

그리고 데이터 폐기가 이루어지면 디버깅 장치(20)는 데이터 확인(S20) 내지 데이터 캐싱 단계(S30)을 진행하여 폐기된 데이터에 해당되는 스택 데이터 또는 공유 데이터를 재요청하여 캐싱함으로써 데이터 갱신을 수행하게 된다.When the data is discarded, the debugging device 20 performs the data check (S20) and the data caching step (S30) to perform data update by re-requesting and caching the stack data or shared data corresponding to the discarded data .

이상에서 본 발명의 기술적 사상을 예시하기 위해 구체적인 실시 예로 도시하고 설명하였으나, 본 발명은 상기와 같이 구체적인 실시 예와 동일한 구성 및 작용에만 국한되지 않고, 여러 가지 변형이 본 발명의 범위를 벗어나지 않는 한도 내에서 실시될 수 있다. 따라서, 그와 같은 변형도 본 발명의 범위에 속하는 것으로 간주해야 하며, 본 발명의 범위는 후술하는 특허청구범위에 의해 결정되어야 한다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, And the like. Accordingly, such modifications are deemed to be within the scope of the present invention, and the scope of the present invention should be determined by the following claims.

10 : 임베디드 장치
20 : 디버깅 장치
21 : 처리부
26 : 저장부
10: Embedded device
20: Debugging device
21:
26:

Claims (5)

임베디드 장치에 연결되어 임베디드 장치에 발생되는 오류를 처리하는 디버깅 장치를 이용한 디버깅 방법에 있어서,
상기 디버깅 장치가 상기 임베디드 장치와 통신채널을 형성하는 통신채널 형성 단계;
상기 디버깅 장치가 상기 임베디드 장치의 내부 메모리에 저장된 데이터를 확인하여 데이터 캐싱이 필요한 경우 데이터의 영역을 확인하는 단계;
상기 디버깅 장치가 확인된 상기 데이터의 영역에 기재된 데이터를 캐싱하여 자신의 저장부에 저장하는 데이터 캐싱 단계;
상기 디버깅 장치가 저장부(26)에 캐싱된 데이터를 확인하여, 상기 캐싱된 데이터가 존재하는 경우 상기 캐싱된 데이터를 사용하고, 상기 캐싱된 데이터가 존재하지 않는 경우 상기 임베디드 장치에 데이터를 요청하여, 상기 캐싱된 데이터 또는 상기 요청에 의해 전달되는 데이터를 이용하여 디버깅을 수행하는 디버깅 단계; 및
상기 디버깅 장치가 상기 캐싱된 데이터의 갱신 필요여부를 판단하여, 갱신이 필요한 데이터가 확인되며, 상기 데이터를 폐기하고 새로운 데이터를 캐싱하는 데이터 갱신단계;를 포함하여 구성되는 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.
A debugging method using a debugging device connected to an embedded device for handling an error occurring in an embedded device,
A communication channel forming step in which the debugging device forms a communication channel with the embedded device;
Checking the data stored in the internal memory of the embedded device by the debugging device and checking the data area when data caching is required;
A data caching step of caching data stored in the area of the data identified by the debugging device and storing the data in a storage unit of the caching device;
The debugging device checks the cached data in the storage unit 26, uses the cached data if the cached data exists, and requests data to the embedded device if the cached data does not exist A debugging step of performing debugging using the cached data or data transmitted by the request; And
And a data updating step of judging whether or not the cached data needs to be updated by the debugging device, confirming data requiring updating, discarding the data, and caching new data. For debugging.
제 1 항에 있어서,
상기 데이터의 영역은
코드 영역, 스택 영역 및 공유 영역인 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.
The method according to claim 1,
The area of the data
Code area, a stack area, and a shared area.
제 2 항에 있어서,
상기 디버깅 장치는
스택 영역에 마련되는 스택에 대응되는 스레드의 진행시 상기 스택을 캐싱한 데이터를 갱신하는 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.
3. The method of claim 2,
The debugging device
And updating the cached data of the stack when a thread corresponding to the stack provided in the stack area proceeds.
제 2 항에 있어서,
상기 디버깅 장치는
상기 임베디드 장치에서 진행되는 어느 하나 이상의 스레드가 확인되는 경우 상기 공유 영역의 데이터를 캐싱한 데이터를 폐기하고,
상기 임베디드 장치에서 진행되는 모든 스레드가 종료된 경우 상기 공유 영역의 데이터를 캐싱하는 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.
3. The method of claim 2,
The debugging device
When the at least one thread in the embedded device is identified, discarding data cached in the shared area,
And caching data of the shared area when all the threads in the embedded device are terminated.
제 1 항에 있어서,
상기 디버깅 장치는
상기 저장부에 상기 캐싱된 데이터를 저장하기 위해 미리 정해지는 크기의 블럭을 할당하는 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.
The method according to claim 1,
The debugging device
And allocating a block of a predetermined size to store the cached data in the storage unit.
KR1020170099162A 2017-08-04 2017-08-04 Debuging method for embedded device KR102030167B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170099162A KR102030167B1 (en) 2017-08-04 2017-08-04 Debuging method for embedded device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170099162A KR102030167B1 (en) 2017-08-04 2017-08-04 Debuging method for embedded device

Publications (2)

Publication Number Publication Date
KR20190014964A true KR20190014964A (en) 2019-02-13
KR102030167B1 KR102030167B1 (en) 2019-10-08

Family

ID=65366649

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170099162A KR102030167B1 (en) 2017-08-04 2017-08-04 Debuging method for embedded device

Country Status (1)

Country Link
KR (1) KR102030167B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19990035425A (en) 1997-10-31 1999-05-15 유기범 How to operate disk cache
KR20100042825A (en) * 2008-10-17 2010-04-27 네무스텍(주) Method and system for performing automatic test in embedded platform
KR20140032049A (en) * 2012-09-05 2014-03-14 재단법인대구경북과학기술원 Real-time embedded software deburgging method using memory address
KR20150089620A (en) * 2014-01-28 2015-08-05 에스케이플래닛 주식회사 Method and apparatus for checking data in debugging memory

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19990035425A (en) 1997-10-31 1999-05-15 유기범 How to operate disk cache
KR20100042825A (en) * 2008-10-17 2010-04-27 네무스텍(주) Method and system for performing automatic test in embedded platform
KR20140032049A (en) * 2012-09-05 2014-03-14 재단법인대구경북과학기술원 Real-time embedded software deburgging method using memory address
KR20150089620A (en) * 2014-01-28 2015-08-05 에스케이플래닛 주식회사 Method and apparatus for checking data in debugging memory

Also Published As

Publication number Publication date
KR102030167B1 (en) 2019-10-08

Similar Documents

Publication Publication Date Title
US10732905B2 (en) Automatic I/O stream selection for storage devices
US11321079B2 (en) Method and device for updating firmware using a modified delta file
US20090031087A1 (en) Mask usable for snoop requests
KR102331926B1 (en) Operation method of host system including storage device and operation method of storage device controller
US20160224268A1 (en) Extendible input/output data mechanism for accelerators
CN110347614B (en) Storage space mapping algorithm, cache state machine, storage device, and storage medium
US8037468B2 (en) Methods for synchronous code retrieval from an asynchronous source
JP6919156B2 (en) Electronic devices, data evacuation methods, and programs
KR20190014964A (en) Debuging method for embedded device
KR101676175B1 (en) Apparatus and method for memory storage to protect data-loss after power loss
US8230198B2 (en) System for synchronous code retrieval from an asynchronous source
CN109697077B (en) Method, device and equipment for starting hard disk firmware
JP2006202233A (en) Controller and program for same
JP2004206716A (en) Deciding method of code downloaded for run time constitution
CN111651124B (en) Parallel reconstruction method, device, equipment and medium for SSD mapping table multi-core partition
US20200319819A1 (en) Method and Apparatus for Improving Parity Redundant Array of Independent Drives Write Latency in NVMe Devices
US20190163399A1 (en) Information processing system and information processing method
JP4478298B2 (en) Data transfer system
EP1895419A2 (en) Information processing system, information processing board, and method of updating cache tag and snoop tag
JP2014112419A (en) Mobile terminal apparatus, software update method, operation control method, and program
KR20190127110A (en) Apparatus for processing programmable logic controller program
US20230045119A1 (en) Data access method and apparatus
US20230342075A1 (en) Memory system and method of controlling transmission of packets
JP5708228B2 (en) IC card and IC card refresh method
WO2021129048A1 (en) Method, device, and apparatus for writing file data and storage medium

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant