KR102030167B1 - Debuging method for embedded device - Google Patents
Debuging method for embedded device Download PDFInfo
- Publication number
- KR102030167B1 KR102030167B1 KR1020170099162A KR20170099162A KR102030167B1 KR 102030167 B1 KR102030167 B1 KR 102030167B1 KR 1020170099162 A KR1020170099162 A KR 1020170099162A KR 20170099162 A KR20170099162 A KR 20170099162A KR 102030167 B1 KR102030167 B1 KR 102030167B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- debugging
- embedded device
- cached
- area
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
Abstract
본 발명은 임베디드 장치의 디버깅 처리시 반복적인 요청이 발생될 수 있는 데이터를 미리 디버깅 컴퓨터에 캐싱하여 디버깅을 수행함으로써, 읽기/쓰기 요청의 과도한 발생을 방지하여 임베디드 기기의 부담을 감소시키도록 한 임베디드 기기를 위한 디버깅 방법에 관한 것이다.The present invention caches the data that may be repeatedly generated in the debugging process of the embedded device to the debugging computer in advance to debug, embedded to reduce the burden on the embedded device by preventing excessive occurrence of read / write requests It is about debugging method for device.
Description
본 발명은 임베디드 기기를 위한 디버깅 방법에 관한 것을 특히, 임베디드 장치의 디버깅 처리시 반복적인 요청이 발생될 수 있는 데이터를 미리 디버깅 컴퓨터에 캐싱하여 디버깅을 수행함으로써, 읽기/쓰기 요청의 과도한 발생을 방지하여 임베디드 기기의 부담을 감소시키도록 한 임베디드 기기를 위한 디버깅 방법에 관한 것이다.The present invention relates to a debugging method for an embedded device, in particular, by caching data that can be repeatedly generated in the debugging process of the embedded device to the debugging computer in advance to prevent the excessive occurrence of read / write requests The present invention relates to a debugging method for an embedded device to reduce the burden on the embedded device.
임베디드 장치 또는 시스템(Embedded device or system 이하에서는 '장치'로 통칭 함)은 기계나 기타 제어가 필요한 시스템 또는 장치에 대해, 제어를 위한 특정 기능을 수행하는 컴퓨터 시스템으로 제어가 필요한 시스템 또는 장치 내에 구성되는 장치를 의미한다. 일반적으로 임베디드 장치는 일반적으로 사용 목적 및 처리 프로세스가 다양한 컴퓨터 시스템, 예를 들어, 개인용 컴퓨터와는 구분되어 특정 목적 또는 기능을 수행하도록 장치 성능, 규모, 프로그램이 마련된다. 이를 위해 임베디드 장치들은 특정 목적 또는 기능에 최적화된 프로그램이 내장되는 메모리에 저장되어 운영된다.An embedded device or system (hereinafter referred to as 'device') is a computer system that performs a specific function for control of a machine or other system or device that requires control. Means a device. In general, an embedded device is generally distinguished from various computer systems, such as a personal computer, for use purposes and processing processes, so that device performance, scale, and programs are provided to perform specific purposes or functions. For this purpose, embedded devices are stored and operated in a memory in which a program optimized for a specific purpose or function is embedded.
이러한 임베디드 장치의 특성상 최소 비용으로 장치를 구현하기 위해 목적 또는 기능으로 구현되는 점에서는 마이크로컨트롤러와 유사하지만, 운영체제 및 목적 또는 기능 실현을 위한 응용프로그램이 실장되어 운영된다는 차이점이 있다. 이 때문에 임베디드 장치에서는 오류(bug)가 발생하는 경우가 빈번하며, 이를 해소하기 위한 디버깅(debugging) 작업이 실행되는 경우가 빈번하다.Due to the characteristics of the embedded device, it is similar to a microcontroller in that it is implemented as a purpose or a function to implement a device at a minimum cost, but there is a difference in that an operating system and an application program for realizing the purpose or function are mounted and operated. For this reason, a bug often occurs in an embedded device, and a debugging task is often executed to solve the problem.
이러한 디버깅 작업은 임베디드 시스템에 의해 직접 수행되는 경우보다, 개인용 컴퓨터와 같이 임베디드 시스템보다 성능이 우수한 장치에 의해 수행되는 것이 일반적이다. 때문에, 임베디드 시스템과 디버깅을 위한 컴퓨터가 통신으로 연결되고, 컴퓨터에서 실행되는 디버거에 의해 디버깅에 필요한 정보를 임베디드 시스템에 요청하여 획득하고 이를 확인하여 처리하는 형태로 디버깅이 이루어지게 된다.Such debugging is generally performed by a device that performs better than an embedded system, such as a personal computer, rather than directly by an embedded system. Therefore, the embedded system and the computer for debugging are connected by communication, and debugging is performed in the form of requesting the embedded system to acquire information necessary for debugging by the debugger running on the computer, and verifying and processing the information.
그러나, 이러한 디버깅 작업이 이루어지는 동안 임베디드 기기의 성능이 저하되거나, 과도한 부하 부담이 발생되는 문제점이 있다. 좀 더 구체적으로 디버깅 작업이 이루어지는 동안, 컴퓨터와 임베디드 장치 간 송수신 되는 데이터 중 레지스터 정보, 메모리 정보의 읽기/쓰기가 주를 이루며, 이러한 작업이 반복적으로 발생된다. 이때, 임베디드 장치는 컴퓨터의 읽기/쓰기 요청에 대한 응답에 성능의 상당부분을 할애하게 됨으로써 본래 동작 목적이 되는 기능의 실행이 지연되거나 열악해지는 문제점이 있다.However, there is a problem that performance of the embedded device is degraded or excessive load is generated while such debugging is performed. More specifically, during debugging, read / write of register information and memory information among data transmitted / received between the computer and the embedded device is mainly performed, and this operation is repeatedly performed. In this case, the embedded device has a problem in that execution of a function originally intended for operation is delayed or worsened by dedicating a large part of performance in response to a read / write request of a computer.
따라서, 본 발명의 목적은 상기한 문제점을 해결하기 위한 것으로 임베디드 장치의 디버깅 처리시 반복적인 요청이 발생될 수 있는 데이터를 미리 디버깅 컴퓨터에 캐싱하여 디버깅을 수행함으로써, 읽기/쓰기 요청의 과도한 발생을 방지하여 임베디드 기기의 부담을 감소시키도록 한 임베디드 기기를 위한 디버깅 방법을 제공하는 것이다.Accordingly, an object of the present invention is to solve the above problems, by caching data that can be repeatedly generated in the debugging process of the embedded device to the debugging computer in advance to debug, thereby causing excessive generation of read / write requests. It provides a debugging method for embedded devices to reduce the burden on embedded devices.
상기 목적을 달성하기 위하여 본 발명에 따른 임베디드 기기를 위한 디버깅 방법은 임베디드 장치에 연결되어 임베디드 장치에 발생되는 오류를 처리하는 디버깅 장치를 이용한 디버깅 방법에 있어서, 상기 디버깅 장치가 상기 임베디드 장치와 통신채널을 형성하는 통신채널 형성 단계; 상기 디버깅 장치가 상기 임베디드 장치의 내부 메모리에 저장된 데이터를 확인하여 데이터 캐싱이 필요한 경우 데이터의 영역을 확인하는 단계; 상기 디버깅 장치가 확인된 상기 데이터의 영역에 기재된 데이터를 캐싱하여 자신의 저장부에 저장하는 데이터 캐싱 단계; 상기 디버깅 장치가 저장부(26)에 캐싱된 데이터를 확인하여, 상기 캐싱된 데이터가 존재하는 경우 상기 캐싱된 데이터를 사용하고, 상기 캐싱된 데이터가 존재하지 않는 경우 상기 임베디드 장치에 데이터를 요청하여, 상기 캐싱된 데이터 또는 상기 요청에 의해 전달되는 데이터를 이용하여 디버깅을 수행하는 디버깅 단계; 및 상기 디버깅 장치가 상기 캐싱된 데이터의 갱신 필요여부를 판단하여, 갱신이 필요한 데이터가 확인되며, 상기 데이터를 폐기하고 새로운 데이터를 캐싱하는 데이터 갱신단계;를 포함하여 구성되는 것을 특징으로 한다.In order to achieve the above object, a debugging method for an embedded device according to the present invention is a debugging method using a debugging device connected to an embedded device to process an error generated in an embedded device, wherein the debugging device communicates with the embedded device. Communication channel forming step of forming; Checking, by the debugging device, data stored in the internal memory of the embedded device to identify an area of data when data caching is necessary; A data caching step in which the debugging device caches the data described in the identified region of data and stores the data in its storage unit; The debugging device checks the cached data in the
상기 데이터의 영역은 코드 영역, 스택 영역 및 공유 영역인 것을 특징으로 한다.The data area may be a code area, a stack area, and a shared area.
상기 디버깅 장치는 스택 영역에 마련되는 스택에 대응되는 스레드의 진행시 상기 스택을 캐싱한 데이터를 갱신하는 것을 특징으로 한다.The debugging device may be configured to update data cached by the stack when a thread corresponding to the stack provided in the stack area is advanced.
상기 디버깅 장치는 상기 임베디드 장치에서 진행되는 어느 하나 이상의 스레드가 확인되는 경우 상기 공유 영역의 데이터를 캐싱한 데이터를 폐기하고, 상기 임베디드 장치에서 진행되는 모든 스레드가 종료된 경우 상기 공유 영역의 데이터를 캐싱하는 것을 특징으로 한다.The debugging device discards data that caches data in the shared area when any one or more threads running in the embedded device are checked, and caches data in the shared area when all threads running in the embedded device are terminated. Characterized in that.
상기 디버깅 장치는 상기 저장부에 상기 캐싱된 데이터를 저장하기 위해 미리 정해지는 크기의 블럭을 할당하는 것을 특징으로 한다.The debugging device may be configured to allocate a block having a predetermined size to store the cached data in the storage unit.
본 발명에 따른 임베디드 기기를 위한 디버깅 방법은 임베디드 장치의 디버깅 처리시 반복적인 요청이 발생될 수 있는 데이터를 미리 디버깅 컴퓨터에 캐싱하여 디버깅을 수행함으로써, 읽기/쓰기 요청의 과도한 발생을 방지하여 디버깅 동안 임베디드 기긱의 부담을 감소시키는 것이 가능해진다.The debugging method for an embedded device according to the present invention performs debugging by caching data that may be repeatedly generated in the debugging process of the embedded device in a debugging computer in advance, thereby preventing excessive occurrence of read / write requests during debugging. It becomes possible to reduce the burden on embedded devices.
도 1은 본 발명에 따른 디버깅 장치의 구성을 개략적으로 도시한 구성 예시도.
도 2는 본 발명에 따른 디버깅 장치에서 캐싱에 따른 데이터 기입을 설명하기 위한 예시도.
도 3은 본 발명에 따른 임베디드 장치를 위한 디버깅 방법을 설명하기 위한 순서도.1 is a configuration example schematically showing a configuration of a debugging apparatus according to the present invention.
2 is an exemplary diagram for describing data writing according to caching in a debugging apparatus according to the present invention.
3 is a flowchart illustrating a debugging method for an embedded device according to the present invention.
이하, 본 발명의 바람직한 실시예를 첨부한 도면을 참조하여 당해 분야의 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 설명하기로 한다. 첨부된 도면들에서 구성에 표기된 도면번호는 다른 도면에서도 동일한 구성을 표기할 때에 가능한 한 동일한 도면번호를 사용하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어서 관련된 공지의 기능 또는 공지의 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고 도면에 제시된 어떤 특징들은 설명의 용이함을 위해 확대 또는 축소 또는 단순화된 것이고, 도면 및 그 구성요소들이 반드시 적절한 비율로 도시되어 있지는 않다. 그러나 당업자라면 이러한 상세 사항들을 쉽게 이해할 것이다.Hereinafter, exemplary embodiments of the present invention will be described with reference to the accompanying drawings so that those skilled in the art may easily implement the present invention. In the accompanying drawings, it should be noted that the same reference numerals are used in the drawings to designate the same configuration in other drawings as much as possible. In addition, in describing the present invention, when it is determined that a detailed description of a related known function or known configuration may unnecessarily obscure the subject matter of the present invention, the detailed description thereof will be omitted. And certain features shown in the drawings are enlarged or reduced or simplified for ease of description, 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 configuration example schematically showing a configuration of a debugging apparatus according to the present invention.
도 1을 참조하면, 본 발명에 따른 디버깅 장치(20)는 처리부(21)와 저장부(26)를 포함하여 구성된다. 이외에도 디버깅 장치(20)는 입력부와 출력부와 같은 컴퓨터 장치의 구성을 부가적으로 더 구비할 수 있으나, 본 발명의 상세한 설명에서는 필수적인 구성요소 위주로 설명을 진행하기로 한다.Referring to FIG. 1, the
임베디드 장치(10)는 제어 또는 특정 기능이 필요한 기계장치나 전자장치(이하 '제어대상 장치'로 통칭함)에 구성되고, 미리 프로그래밍 되어 내부메모리에 저장되는 프로그램에 의해 구동된다. 이러한 임베디드 장치(10)는 응용프로그램과 운영체제가 저장되는 메모리, 이를 실행하기 위한 프로세서 코어, 외부 장치와의 통신을 위한 통신모듈, 제어대상 장치의 구동 또는 제어를 위한 추가적인 구성을 구비할 수 있다. The embedded
이러한 임베디드 장치(10)는 디버깅 장치(20)와 통신채널을 형성하고, 버그 발생에 따른 오류를 디버깅 장치(20)의 요청에 따라 전달하거나, 미리 정해진 조건에 따라 디버깅 장치(20)로 전달하게 된다.The embedded
특히, 임베디드 장치(10)는 디버깅 장치(20)가 디버깅을 수행하는 과정에서 발생되는 메모리의 읽기/쓰기 요청에 따라 내부 메모리에 저장된 데이터를 디버깅 장치(20)로 전달하고, 디버깅 장치(20)로부터 전달되는 정정된 응용프로그램과 같은 오류 정정 데이터를 전달받아 저장 또는 설치하게 된다.In particular, the embedded
구체적으로 임베디드 장치(10)는 메모리에 저장되는 영역별 데이터를 디버깅 장치(20)의 요청 발생시 전달한다. 구체적으로 내부 메모리에 저장되는 영역별 데이터는 코드 영역 데이터, 스레드의 스택 영역 데이터, 공유 영역 데이터를 포함하여 구성될 수 있다. In more detail, the embedded
디버깅 장치(20)는 엠베디드 장치(10)의 버그 발생시 이를 처리하기 위한 디버깅을 수행한다. 이 디버깅 장치(20)는 디버깅의 수행을 위해 임베디드 장치(10)와 통신채널을 형성하여 연결될 수 있으며, 디버깅 과정에서 필요한 데이터를 임베디드 장치(10)에 요청하여 전달받게 된다.The
특히, 디버깅 장치(20)는 디버깅 과정에서 임베디드 장치(10)에 반복적으로 요청하게 되는 데이터를 미리 캐싱하여 저장부(26)에 저장하여, 저장된 데이터를 이용하여 디버깅을 수행하고, 저장부(26)에 저장되지 않은 데이터 또는 갱신이 필요한 데이터가 필요한 경우에만 임베디드 장치(10)에 데이터를 요청하여 전달받게 된다.In particular, the
이러한 디버깅 장치(20)는 처리부(21)와 저장부(26)를 포함하여 구성될 수 있다. 처리부(21)는 디버깅에 관련된 일련의 처리를 수행하며, 저장부(26)는 디버깅을 임베디드 장치의 데이터를 미리 캐싱하여 저장된다.The
좀 더 구체적으로 처리부(21)는 임베디드 장치(10)로부터 캐싱되는 데이터를 영역별로 캐싱 및 갱신하게 된다. 특히, 이를 위해 디버깅 장치(20)는 임베디드 장치(10)의 상황에 따라 영역별로 캐싱된 데이터의 갱신여부를 판단하고, 갱신이 필요하다고 판단되는 경우 해당 영역의 데이터를 갱신하게 된다.More specifically, the
영역 데이터의 갱신을 위해 디버깅 장치(20)는 새로운 데이터가 발생됐을 것으로 예상되는 영역의 데이터를 폐기하고, 새로운 데이터의 기재가 종료된 해당 여역의 데이터를 폐기된 데이터를 대신하여 캐싱한다. 이를 위해 디버깅 장치(20)는 임베디드 장치(10)의 스레드(Thread)를 조회하여 스레드의 운영에 따라 특정 영역의 데이터를 갱신하게 된다. 여기서, 임베디드 장치(10)가 스레드의 실행여부를 판별하는 것으로 기재하고 있으나, 프로세스를 조회하여 프로세스의 진행에 따른 데이터의 갱신 여부를 판단하고 이를 통해 데이터의 갱신 여부를 판단할 수도 있다. 다만, 본 발명에서는 임베디드 장치(10)가 멀티코어로 이루어지는 경우에도 하나의 메모리 또는 동일 영역의 메모리를 공유하는 경우를 위주로 설명하기 때문에 이하에서는 스레드의 진행여부를 조회하여 데이터의 갱신을 판단하는 것으로 가정하여 설명을 진행하기로 한다.In order to update the area data, the
구체적으로 디버깅 장치(20)는 코드 영역, 스택 영역, 공유 영역별로 데이터를 캐싱하며, 각 영역별로 갱신을 판단한다. 좀 더 구체적으로 디버깅 장치(20)는 코드 영역은 디버깅 초기 또는 디버깅 절차가 변경되는 과정에서 1회 캐싱 후 별도의 갱신을 수행하지 않는다. 그리고, 디버깅 장치는 스택 영역의 캐싱은 스레드 별로 수행하게 된다. 구체적으로 스레드 별로 존재하는 스택 중, 스레드의 진행이 종료되는 경우 종료된 스레드의 스택을 캐싱하고, 해당 스레드가 재개되는 경우 캐싱된 스택을 폐기하게 된다. 또한, 디버깅 장치(20)는 모든 스레드가 종료되는 경우에만 공유 영역의 데이터를 캐싱하고, 어느 하나의 스레드라도 동작하는 경우 공유 영역에 해당하는 데이터를 폐기하게 된다.Specifically, the
그리고, 디버깅 장치(20)는 디버깅 과정에서 임베디드 장치(10)에 요청할 데이터 중 캐싱된 데이터가 존재하는 경우 캐싱된 데이터를 이용하여 디버깅 과정을 수행하고, 캐싱된 데이터가 존재하지 않는 데이터만 임베디드 장치(10)에 요청하여 전달받고, 이를 이용하여 디버깅을 수행하게 된다.The
이와 같이 디버깅 장치(20)는 각 영역별로 스레드의 동작 유무를 판별하여 캐싱을 수행함으로써, 데이터 갱신이 이루어졌는지의 여부를 복잡한 과정을 거쳐 판단하지 않고도 디버깅을 위한 데이터를 적절한 시기에 갱신할 수 있게 된다. As described above, the
이를 통해 본 발명의 디버깅 장치(20)는 데이터 요청 즉, 읽기/쓰기에 의해 과도하게 발생되는 트래픽 및 이를 처리하기 위한 임베디드 장치(10)의 부담을 경감시켜, 임베디드 장치(10)가 정상적인 동작을 수행하도록 하면서도 디버깅을 수행하여 오류를 처리하는 것이 용이해진다.Through this, the
도 2는 본 발명에 따른 디버깅 장치에서 캐싱에 따른 데이터 기입을 설명하기 위한 예시도이다.2 is an exemplary diagram for describing 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 allow data to be described in predetermined block units. More specifically, the
그러나, 도 2에 제시된 바와 같이 일정한 블럭단위로 데이터 블럭을 지정하여 블럭단위로 데이터가 기재되도록 할 수도 있고, 연속적으로 데이터가 기입되고 기입된 데이터의 어드레스를 관리하도록 할 수도 있다.However, as shown in FIG. 2, data blocks may be designated in units of blocks so that data may be written in units of blocks, or data may be continuously written and address of the written data may be managed.
블럭단위로 데이터를 기입하는 경우 임베디드 장치(10)에서 많이 사용되는 데이터의 크기들을 고려하여 블럭의 크기를 결정할 수 있으며, 이 경우 데이터들의 크기 중 발생빈도수가 높은 데이터의 크기를 블럭의 크기로 결정할 수 있다. 아울러, 이러한 블럭의 크기는 디버깅 장치(20)의 저장부(26) 용량에 따라 가변될 수 있다.When data is written in units of blocks, the size of a block may be determined in consideration of the sizes of data that are frequently used in the embedded
일례로 도 2에는 블럭이 32바이트(byte)의 크기를 가지도록 한 예가 도시되어 있으나, 블록과는 무관하게 데이터가 순차적으로 기재된 예가 도시되어 있다. 블럭을 이용하는 경우 블럭의 크기를 고려하여 데이터의 크기와 블럭의 크기를 비교하여 데이터가 점유할 블록의 수를 결정할 수 있으며, 블록의 잔여 공간이 남더라도 블록에 기록된 데이터와 다른 데이터는 다른 블록에 기재되도록 할 수 있다.For example, FIG. 2 illustrates an example in which a block has a size of 32 bytes, but an example in which data is sequentially described regardless of the block is illustrated. In the case of using a block, the size of the block can be determined by comparing the size of the data with the size of the block in consideration of the size of the block. May be described.
도 2에는 블럭의 크기가 32바이트로 설정된 예가 도시되어 있으나, 실제 데이터 기재는 연속적으로 이루어진 경우의 예가 도시되어 있다. 이러한 데이터는 비선형(Non-linear), 링크드 리스트(linked-list)로 기재되어 관리될 수 있으나, 블록 단위의 기재나 트리구조의 데이터 관리도 가능하며 제시된 바에 의해 본 발명을 한정하는 것은 아니다. 2 shows an example in which the size of a block is set to 32 bytes, but an example in which the actual data description is made in succession is shown. Such data may be described and managed in a non-linear or linked-list, but may be described in block units or in a tree structure, and the present invention is not limited to the present disclosure.
(a)에서와 같이 캐싱된 데이터는 어드레스가 부여되어, 해당 어드레스로부터 데이터 크기에 해당하는 공간을 점유하게 된다. (a)에는 각각 40바이트, 4바이트, 20바이트의 3개 데이터가 기재된 예가 도시되어 있다.As in (a), the cached data is given an address and occupies a space corresponding to the data size from the address. (a) shows an example in which three pieces of data of 40 bytes, 4 bytes, and 20 bytes are described, respectively.
이와 같이 데이터의 캐싱이 이루어지면, 디버깅을 수행하는 디버깅 장치(20)가 임베디드 장치(10)에 데이터를 요청할 필요가 발생하게 된다. 이때, 디버깅 장치(20)가 임베디드 장치(10)에 데이터를 요청하기에 앞서 캐싱된 데이터가 있는지 먼저 자신의 저장부(26)에서 확인하게 된다. 이때, (b)의 a,b와 같이 자신의 저장부(26)에 해당되는 데이터가 있는 경우 임베디드 장치(10)에 데이터를 요청하지 않고 해당 데이터를 읽어와서 디버깅에 사용하게 된다.When caching of the data is performed as described above, the
반면, (c)의 c에서와 같이 디버깅에 필요한 데이터를 저장부(26)에 조회한 결과 해당 데이터가 존재하지 않는 경우 임베디드 장치(10)에 요청하여 데이터를 전달받게 된다.On the other hand, as shown in c of (c), if the data necessary for debugging is inquired in the
도 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, the 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 an update determining step S50. ) And the data discarding step (S55).
통신채널 형성 단계(S10)는 디버깅을 위해 디버깅 장치(20)와 임베디드 장치(10) 간에 통신채널이 형성되는 단계이다.The communication channel forming step S10 is a step in which a communication channel is formed between the
데이터 확인 단계(S20)는 통신채널을 형성한 디버깅 장치(20)가 디버깅을 위한 제반 사항을 확인하고, 데이터의 캐싱이 필요한지의 여부, 데이터 캐싱이 필요한 한 경우 데이터의 각 영역을 확인하는 단계이다.The data checking step (S20) is a step in which the
데이터 캐싱 단계(S30)는 디버깅 장치가 각각의 데이터 영역에 대해 저장 위치를 지정하고, 영역별로 데이터를 캐싱하여 저장하는 단계이다. 이 데이터 캐싱 단계(S30)에서 디버깅 장치(20)는 임베디드 장치(10)의 내부 저장소에 저장된 데이터를 코드 영역, 스택 영역, 공유 영역별로 구분하여 각각의 영역별로 캐싱하여 저장하게 된다.In the data caching step S30, the debugging apparatus designates a storage location for each data area, and caches and stores data for each area. In this data caching step (S30), the
디버깅 단계(S40)는 디버깅 장치(20)가 임베디드 장치(10)에 대한 오류를 확인하고 디버깅을 수행하는 단계이다. 디버깅 단계(S40)에서 디버깅 장치(20)는 임베디드 장치(10)에 대해 각종 데이터를 요청하여 전달받고, 전달받은 데이터를 이용하여 디버깅을 수행한다. 이러한 과정에서 디버깅 장치(20)는 임베디드 장치(10)에 대한 데이터 요청이 필요한 경우 저장부(26)에 캐싱된 데이터를 우선 확인하고, 캐싱된 데이터 중에 필요로 하는 데이터가 있는 경우 캐싱된 데이터를 사용하며, 필요한 데이터가 없는 경우에만 임베디드 장치(10)에 데이터를 요청하여 획득하게 된다.The debugging step S40 is a step in which the
갱신 판단 단계(S50)는 디버깅 장치(20)가 캐싱된 데이터의 갱신이 필요한지를 판단하는 단계이다. 이 갱신 판단 단계(S50)에서 디버깅 장치(20)는 스택 영역의 각 스택에 해당되는 스레드의 동작여부를 확인하고, 스레드가 진행된 스택이 확인된 경우 또는 스레드 진행의 종료가 확인되는 경우 캐싱된 데이터의 갱신을 진행하게 된다.The update determination step S50 is a step in which the
데이터 폐기 단계(S55)는 미리 캐싱된 데이터 중 스택 영역의 특정 스택 또는 공유영역의 데이터를 폐기하여, 디버깅장치(20)의 저장부(26)를 비우는 단계이다. 스레드가 진행되는 경우 해당 스레드에 해당되는 스택 및 공유 영역의 데이터가 변경되기 때문에 이미 캐싱된 데이터는 불필요한 데이터가 된다. 때문에 데이터 폐기 단계(S55)에서 디버깅장치(20)는 스레드가 동작하는 것으로 확인되면 캐싱된 공유 영역의 데이터를 폐기함과 아울러, 동작하는 스레드에 해당되는 스택영역의 특정 스택을 폐기하여 저장부(26)에서 삭제하게 된다.The data discarding step S55 is a step of emptying the
그리고 데이터 폐기가 이루어지면 디버깅 장치(20)는 데이터 확인(S20) 내지 데이터 캐싱 단계(S30)을 진행하여 폐기된 데이터에 해당되는 스택 데이터 또는 공유 데이터를 재요청하여 캐싱함으로써 데이터 갱신을 수행하게 된다.When the data is discarded, the
이상에서 본 발명의 기술적 사상을 예시하기 위해 구체적인 실시 예로 도시하고 설명하였으나, 본 발명은 상기와 같이 구체적인 실시 예와 동일한 구성 및 작용에만 국한되지 않고, 여러 가지 변형이 본 발명의 범위를 벗어나지 않는 한도 내에서 실시될 수 있다. 따라서, 그와 같은 변형도 본 발명의 범위에 속하는 것으로 간주해야 하며, 본 발명의 범위는 후술하는 특허청구범위에 의해 결정되어야 한다.Although specific embodiments have been shown and described in order to illustrate the technical idea of the present invention, the present invention is not limited to the same configuration and operation as the specific embodiments as described above, and various modifications are not limited to the scope of the present invention. It can be carried out within. Therefore, such modifications should also be regarded as belonging to the scope of the present invention, and the scope of the present invention should be determined by the claims below.
10 : 임베디드 장치
20 : 디버깅 장치
21 : 처리부
26 : 저장부10: embedded device
20: debugging device
21: processing unit
26: storage unit
Claims (5)
상기 디버깅 장치가 상기 임베디드 장치와 통신채널을 형성하는 통신채널 형성 단계;
상기 디버깅 장치가 상기 임베디드 장치의 내부 메모리에 저장된 데이터를 확인하여 데이터 캐싱이 필요한 경우 데이터의 영역을 확인하는 단계;
상기 디버깅 장치가 확인된 상기 데이터의 영역에 기재된 데이터를 캐싱하여 자신의 저장부에 저장하는 데이터 캐싱 단계;
상기 디버깅 장치가 저장부(26)에 캐싱된 데이터를 확인하여, 상기 캐싱된 데이터가 존재하는 경우 상기 캐싱된 데이터를 사용하고, 상기 캐싱된 데이터가 존재하지 않는 경우 상기 임베디드 장치에 데이터를 요청하여, 상기 캐싱된 데이터 또는 상기 요청에 의해 전달되는 데이터를 이용하여 디버깅을 수행하는 디버깅 단계; 및
상기 디버깅 장치가 상기 캐싱된 데이터의 갱신 필요여부를 판단하여, 갱신이 필요한 데이터가 확인되며, 상기 데이터를 폐기하고 새로운 데이터를 캐싱하는 데이터 갱신단계;를 포함하며,
상기 데이터의 영역은
코드 영역, 스택 영역 및 공유 영역이고,
상기 디버깅 장치는
스택 영역에 마련되는 스택에 대응되는 스레드의 진행시 상기 스택을 캐싱한 데이터를 갱신하는 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.In the debugging method using a debugging device that is connected to the embedded device and handles an error occurring in the embedded device,
A communication channel forming step of the debugging device forming a communication channel with the embedded device;
Checking, by the debugging device, data stored in the internal memory of the embedded device to identify an area of data when data caching is necessary;
A data caching step in which the debugging device caches the data described in the identified region of data and stores the data in its storage unit;
The debugging device checks the cached data in the storage unit 26, uses the cached data when the cached data exists, and requests data from the embedded device when 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 determining whether the debugging device needs to update the cached data, and identifying data to be updated, discarding the data and caching new data.
The area of data is
Code area, stack area, and shared area,
The debugging device
And updating data cached by the stack when a thread corresponding to a stack provided in a stack area is advanced.
상기 디버깅 장치는
상기 임베디드 장치에서 진행되는 어느 하나 이상의 스레드가 확인되는 경우 상기 공유 영역의 데이터를 캐싱한 데이터를 폐기하고,
상기 임베디드 장치에서 진행되는 모든 스레드가 종료된 경우 상기 공유 영역의 데이터를 캐싱하는 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.The method of claim 1,
The debugging device
If one or more threads that proceed in the embedded device is identified, discarding the data cached data of the shared area,
And caching data in the shared area when all threads proceeding from the embedded device are terminated.
상기 디버깅 장치는
상기 저장부에 상기 캐싱된 데이터를 저장하기 위해 미리 정해지는 크기의 블럭을 할당하는 것을 특징으로 하는 임베디드 장치를 위한 디버깅 방법.
The method of claim 1,
The debugging device
And assigning a block having a predetermined size to store the cached data in the storage unit.
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 KR20190014964A (en) | 2019-02-13 |
KR102030167B1 true 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) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100252505B1 (en) | 1997-10-31 | 2000-04-15 | 강병호 | A method of managing a disk cache |
KR100992622B1 (en) * | 2008-10-17 | 2010-11-05 | 네무스텍(주) | Method and system for performing automatic test in embedded platform |
KR101400396B1 (en) * | 2012-09-05 | 2014-05-27 | 재단법인대구경북과학기술원 | 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 |
-
2017
- 2017-08-04 KR KR1020170099162A patent/KR102030167B1/en active IP Right Grant
Also Published As
Publication number | Publication date |
---|---|
KR20190014964A (en) | 2019-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9164676B2 (en) | Storing multi-stream non-linear access patterns in a flash based file-system | |
KR102094236B1 (en) | Storage device and computer system | |
EP3796168A1 (en) | Information processing apparatus, information processing method, and virtual machine connection management program | |
US9804965B2 (en) | Virtual machine host server apparatus and method for operating the same | |
KR102212269B1 (en) | Register file for I/O packet compression | |
US20190004959A1 (en) | Methods and devices for managing cache | |
JP2020123038A (en) | Memory system and control method | |
EP3040854A1 (en) | Method, apparatus and storage medium for dynamically patching function | |
US9448845B2 (en) | Extendible input/output data mechanism for accelerators | |
US9104601B2 (en) | Merging direct memory access windows | |
JP5969122B2 (en) | Host bus adapter and system | |
KR102030167B1 (en) | Debuging method for embedded device | |
JP4931711B2 (en) | Kernel update method, information processing apparatus, program, and storage medium | |
CN107766146B (en) | Method for resource reconfiguration and corresponding device | |
JP2016170471A (en) | Electronic control device | |
CN107562648B (en) | Lock-free FTL (fiber to the Home) access method and device | |
US11137995B2 (en) | Updating firmware of a microcontroller | |
US10664418B2 (en) | Peripheral device controlling device, operation method thereof, and operation method of peripheral device controlling device driver | |
US8230198B2 (en) | System for synchronous code retrieval from an asynchronous source | |
US9280485B2 (en) | Efficient cache volume sit scans | |
JP2006235765A (en) | Duplex controller system, and its controller | |
CN107273188B (en) | Virtual machine Central Processing Unit (CPU) binding method and device | |
CN107844262B (en) | Data caching and sending method and device | |
US9158698B2 (en) | Dynamically removing entries from an executing queue | |
KR20190127110A (en) | Apparatus for processing programmable logic controller program |
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 |