KR20060133399A - Apparatus for debugging of embedded system - Google Patents

Apparatus for debugging of embedded system Download PDF

Info

Publication number
KR20060133399A
KR20060133399A KR1020050053222A KR20050053222A KR20060133399A KR 20060133399 A KR20060133399 A KR 20060133399A KR 1020050053222 A KR1020050053222 A KR 1020050053222A KR 20050053222 A KR20050053222 A KR 20050053222A KR 20060133399 A KR20060133399 A KR 20060133399A
Authority
KR
South Korea
Prior art keywords
driver
debugging
embedded system
buffer
debugging information
Prior art date
Application number
KR1020050053222A
Other languages
Korean (ko)
Other versions
KR100745244B1 (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 KR1020050053222A priority Critical patent/KR100745244B1/en
Publication of KR20060133399A publication Critical patent/KR20060133399A/en
Application granted granted Critical
Publication of KR100745244B1 publication Critical patent/KR100745244B1/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
    • G06F11/3648Software debugging using additional hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software

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)
  • Debugging And Monitoring (AREA)

Abstract

A device for debugging an embedded system is provided to debug software independently developed in the embedded system by sharing a serial port through one UART(Universal Asynchronous Receiver/Transmitter) port and switching the serial port in case of need. A UART driver(112) transceives debugging information. A terminal driver(108) inputs/outputs host debugging information between a processor(102) of the embedded system(100) and the UART driver. A Digi driver(110) inputs/outputs program guide-related debugging information between the processor and the UART driver. A multiplexer(114) selectively controls a debugging information transceiving path between the UART driver and multiple different ports. The multiplexer makes the debugging information transmitted to an RS(Recommended Standard)-232C line driver chip in the case of the host debugging information and makes the debugging information transmitted to a G-link in the case of the program guide-related information.

Description

임베디드 시스템 디버깅 장치{Apparatus for debugging of embedded system}Apparatus for debugging of embedded system}

도 1은 본 발명에 따른 호스트와 서로 다른 소프트웨어간의 시리얼 포트 공유가 가능한 임베디드 시스템 디버깅 장치의 구성을 개략적으로 나타낸 블럭도.1 is a block diagram schematically illustrating a configuration of an embedded system debugging apparatus capable of sharing a serial port between a host and different software according to the present invention.

도 2는 도 1에 도시된 임베디드 시스템을 설명하기 위한 도면. 2 is a view for explaining the embedded system shown in FIG.

도 3은 본 발명에 따른 사용자 단말기로부터 디버깅 명령을 수신한 경우의 임베디드 시스템 동작을 나타낸 흐름도. 3 is a flowchart illustrating an embedded system operation when a debugging command is received from a user terminal according to the present invention.

도 4는 본 발명에 따른 임베디드 시스템이 사용자 단말기에 디버그 메시지를 전송하는 방법을 나타낸 흐름도.4 is a flowchart illustrating a method for transmitting a debug message to a user terminal by an embedded system according to the present invention.

도 5는 본 발명에 따른 사용자 단말기에 출력되는 EPG 관련 디버그 메시지 예시도.5 illustrates an EPG-related debug message output to a user terminal according to the present invention.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

100 : 임베디드 시스템 102 : 프로세서100: embedded system 102: processor

104 : 소프트웨어 모듈 106 : 에이전트 모듈104: software module 106: agent module

108 : 터미널 드라이버 110 : DIGI 드라이버108: Terminal Driver 110: DIGI Driver

112 : UART 드라이버 114 : 먹스112: UART driver 114: mux

200 : 사용자 단말기200: user terminal

본 발명은 임베디드 시스템에서 서로 독립적으로 개발된 소프트웨어를 디버깅하기위해 하나의 UART(Universal Asynchronous Receiver/Transmitter)포트를 사용하여 시리얼 포트를 공유하고 필요에 따라 전환할 수 있는 임베디드 시스템 디버깅 장치에 관한 것이다. The present invention relates to an embedded system debugging apparatus that can share a serial port and switch as needed by using one Universal Asynchronous Receiver / Transmitter (UART) port for debugging software developed independently of each other in an embedded system.

최근 가전기기는 단순한 마이크로 컴퓨터에 의해 제어되는 것이 아닌 RTOS(Real Time Operating System)이 장착될 수 있는 16비트 혹은 32비트 프로세서를 장착하고 있다. Recently, home appliances are equipped with 16-bit or 32-bit processors that can be equipped with a Real Time Operating System (RTOS), rather than being controlled by a simple microcomputer.

상기 프로세스의 장착에 의해 더 많은 사용자의 요구에 부합하는 기기를 제공할 수 있으며, 여러가지 소프트웨어 모듈을 제공하고 있다. 이러한 모듈들이 정상적으로 연동하여 작동하기 위해서는 오랜시간동안 테스트하는 것이 필요하게 되며 이러한 테스트를 통해 버그가 발생하지 않는 기기를 제조할 수 있게 된다.By mounting the above process, it is possible to provide a device that meets the needs of more users, and various software modules are provided. In order for these modules to work properly, they need to be tested for a long time, and these tests can be used to manufacture devices that do not cause bugs.

이와 같은 테스트에서는 그 프로세서 및 각 모듈에 대한 버그를 검출할 수 있는 장치가 필요하며 디버깅을 수행하기 위해서는 디버깅 메시지의 종류와 어떤 태스크가 어떤 상태로 동작하고 있는지 검출하는 것이 중요하게 작용한다.Such a test requires a device that can detect bugs for the processor and each module. In order to perform debugging, it is important to detect the types of debugging messages and which tasks are operating in which states.

일반적인 임베디드 시스템에서 사용하고 있는 MCU(Microprocessor Control Unit)에는 최소 하나 이상의 시리얼 포트를 제공하고 있다. 이를 UART 장치라고 하는데, 대부분의 경우 1개 이상을 갖고 있다.Microprocessor Control Units (MCUs) used in typical embedded systems provide at least one serial port. This is called a UART device and in most cases has more than one.

일반적으로 최소한 하나의 시리얼 포트는 셀프 프로그래밍을 위하여 제공한다. 셀프 프로그램밍을 하기 위해서는 어떤 호스트에 필요한 동작을 할수 있도록 개발자에게 메뉴를 제공해야 한다. 개발자는 작성한 프로그램을 컴파일하여 다운로드할 수 있도록 가공된 이미지로 만들게 되는데, 이때 만들어진 프로그램을 다운로드 할수 있도록 어떤 메뉴를 가지고 있는 프로그램이 있다. Typically at least one serial port is provided for self programming. Self-programming requires you to provide a menu to the developer to do what the host needs. The developer compiles the program and creates a processed image for download. At this time, there is a program that has a menu for downloading the created program.

이런 메뉴를 제공하는 프로그램을 부트 코드라고 하고, MCU의 특정 메모리 영역에 혹은 외부 메모리의 특정 영역에 초기에 다운로드해야한다.A program that provides such a menu is called boot code and must be initially downloaded to a specific memory area of the MCU or to a specific area of external memory.

부트 코드는 사실 이런 기능외에도 개발 환경을 설정하고 부팅시에 시스템을 초기화하여 어플리케이션 주소 영역으로 MCU가 잘 동작할 수 있는 기능을 모두 가지고 있다. 이와 같이 셀프 프로그래밍 기능은 부트 코드의 많은 기능중에 하나라고 할수 있다. In addition to these functions, the boot code has all the functions to set the development environment and initialize the system at boot time so that the MCU can work well in the application address area. As such, self-programming is one of the many features of boot code.

또한 시리얼 포트로 디버깅 기능도 지원한다. 대부분의 MCU 등에서 사용하고 있는 임베디드 시스템에서는 기본적인 에러 메시지 출력이 시리얼 포트로 한다. 따라서 문제가 있거나 혹은 현재 칩의 상태를 보기 위해서 혹은 개발자가 자신의 모듈에 임의대로 넣어둔 디버깅을 위한 메시지등을 모두 시리얼로 출력하게 된다. It also supports debugging through the serial port. In an embedded system used in most MCUs, the basic error message output is a serial port. Therefore, it prints out all the messages for debugging, debugging, etc., in order to see the status of the current chip or to the developer's own module.

그러나 종래의 임베디드 시스템에서는 서로 독립적으로 개발된 소프트웨어(예를들면, EPG(Electronic Program Guides) 정보 관리 프로그램)를 위해서는 개별적인 디버깅 환경을 제공해야 하므로 여러개의 시리얼 포트(UART)가 있어야 하는 단점이 있다.However, the conventional embedded system has a disadvantage in that multiple serial ports (UART) are required because a separate debugging environment is provided for software developed independently of each other (for example, an EPG information management program).

따라서, 본 발명의 목적은 임베디드 시스템에서 서로 독립적으로 개발된 소프트웨어를 디버깅하기위해 하나의 UART포트를 사용하여 시리얼 포트를 공유하고 필요에 따라 전환할 수 있는 임베디드 시스템 디버깅 장치를 제공하는데 있다.Accordingly, an object of the present invention is to provide an embedded system debugging apparatus that can share a serial port and switch as needed by using one UART port for debugging software developed independently from each other in an embedded system.

상기 목적들을 달성하기 위하여 본 발명의 일 측면에 따르면, 서로 다른 소프트웨어 디버깅을 위한 임베디드 시스템에 있어서, 디버깅 정보를 송수신하기 위한 단일개의 범용 비동기 송수신 드라이버, 상기 시스템 내의 프로세서 및 상기 범용 비동기 송수신 드라이버 사이에서 호스트 디버깅 정보를 입출력하는 터미널 드라이버, 상기 시스템내의 프로세서 및 상기 범용 비동기 송수신 드라이버사이에서 프로그램 가이드 관련 디버깅 정보를 입출력하는 디지 드라이버, 상기 범용 비동기 송수신 드라이버 및 복수개의 서로 다른 포트 사이에서 디버깅 정보의 송수신 경로를 선택적으로 제어하기 위한 멀티플렉서를 포함하는 것을 특징으로 하는 임베디드 시스템 디버깅 장치가 제공된다. According to an aspect of the present invention to achieve the above object, in an embedded system for debugging different software, a single general purpose asynchronous transmit and receive driver for transmitting and receiving debugging information, between the processor in the system and the general purpose asynchronous transmit and receive driver A terminal driver for inputting / outputting host debugging information, a digital driver for inputting / outputting program guide related debugging information between the processor in the system and the general-purpose asynchronous transmit / receive driver, the general-purpose asynchronous transmit / receive driver, and a plurality of different ports. Provided is an embedded system debugging apparatus, comprising a multiplexer for selectively controlling the multiplexer.

상기 멀티플렉서는 디버깅 정보가 호스트 디버깅 정보이면, RS232C 라인 드라이버칩으로 전송되도록 제어하고, 프로그램 가이드 관련 디버깅 정보이면, G-Link로 전송되도록 제어한다. The multiplexer controls the debugging information to be transmitted to the RS232C line driver chip if the debugging information is host debugging information, and transmits the information to the G-Link if the debugging information is related to the program guide.

상기 디지 드라이버에는 송신 버퍼와 수신 버퍼가 존재하고, 상기 송신 버퍼와 수신 버퍼는 원형이다. The digital driver has a transmit buffer and a receive buffer, and the transmit buffer and the receive buffer are circular.

이하 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 호스트와 서로 다른 소프트웨어간의 시리얼 포트 공유가 가능한 임베디드 시스템 디버깅 장치의 구성을 개략적으로 나타낸 블럭도, 도 2는 도 1에 도시된 임베디드 시스템을 설명하기 위한 도면이다. 1 is a block diagram schematically illustrating a configuration of an embedded system debugging apparatus capable of sharing a serial port between a host and different software according to the present invention, and FIG. 2 is a diagram for describing the embedded system illustrated in FIG. 1.

도 1을 참조하면, 호스트와 서로 다른 소프트웨어간의 시리얼 포트 공유가 가능한 임베디드 시스템 디버깅 장치는 사용자에 의해 입력된 디버깅 명령어를 처리하는 임베디드 시스템(100), 상기 사용자와 상기 임베디드 시스템(100)의 소프트웨어 에이전트를 인터페이스하는 에이전트 모니터 소프트웨어를 구비하는 사용자 단말기(200)를 포함한다. Referring to FIG. 1, an embedded system debugging apparatus capable of sharing a serial port between a host and different software includes an embedded system 100 processing a debugging command input by a user, a software agent of the user and the embedded system 100. It includes a user terminal 200 having an agent monitor software to interface the.

상기 임베디드 시스템(100)은 임베디드 시스템의 동작을 제어하는 프로세서(102), 소프트웨어 모듈(104), 에이전트 모듈(106), 터미널 드라이버(108), DIGI 드라이버(110), UART 드라이버(112), 먹스(MUX)(114)를 포함한다.The embedded system 100 may include a processor 102, a software module 104, an agent module 106, a terminal driver 108, a DIGI driver 110, a UART driver 112, and a mux that control the operation of an embedded system. (MUX) 114.

상기 프로세서(102)는 사용자의 요청등에 부합하는 레지스터에 의해 임베디드 시스템(100)을 구성하는 하드웨어를 제어하여 태스크를 수행한다. The processor 102 performs a task by controlling hardware constituting the embedded system 100 by a register corresponding to a user's request.

또한, 상기 프로세서(102)는 소프트웨어 에이전트를 시행하여 상기 임베디드 시스템(100)의 상태를 검출한다. 여기서, 상기 소프트웨어 에이전트는 임베디드 시 스템(100)에서 발생하는 오류를 검출하여 전송하며 사용자 단말기(200)에서 전송되는 데이터 및 제어를 인가 받어 처리하는 주체이다.In addition, the processor 102 detects a state of the embedded system 100 by executing a software agent. Here, the software agent is a subject that detects and transmits an error occurring in the embedded system 100 and receives and processes data and control transmitted from the user terminal 200.

상기 소프트웨어 모듈(104)은 상기 프로세서(102)의 제어에 의해 해당 태스크가 실행되도록 한다. 상기 소프트웨어 모듈(104)은 호스트 디버그 메뉴, EPG 정보 관리 소트트웨어 등을 포함한다. The software module 104 causes the task to be executed under the control of the processor 102. The software module 104 includes a host debug menu, EPG information management software, and the like.

상기 에이전트 모듈(106)은 임베디드 시스템(100)에서 발생하는 오류를 검출하는 소프트웨어 에이전트를 실행되게 한다. The agent module 106 causes a software agent to be executed to detect errors that occur in the embedded system 100.

상기 터미널 드라이버(108)는 상기 소프트웨어 모듈(104)중에서 호스트 디버그 메뉴에 해당하는 디버깅 명령어와 디버깅 수행 결과의 송수신을 수행한다. 즉, 상기 터미널 드라이버(108)는 셀프 프로그래밍을 위하여 제공되는 것이다. The terminal driver 108 transmits and receives a debugging command and a debugging result corresponding to a host debug menu in the software module 104. That is, the terminal driver 108 is provided for self programming.

상기 DIGI 드라이버(110)는 디지털 티브이에서 EPG(Electronic Program Guides)정보의 디버깅을 수행하는 역할을 한다. 상기 DIGI 드라이버(110)는 출력을 위한 출력버퍼, 입력을 위한 수신 버퍼를 모두 가지고 있으며 이를 관리할 수 있는 능력이 있다.The DIGI driver 110 serves to debug electronic program guides (EPG) information in a digital TV. The DIGI driver 110 has both an output buffer for output and a receive buffer for input, and has the capability to manage them.

상기 송신 버퍼와 수신 버퍼는 원형 버퍼로 설계되고, 그 크기는 고정적으로 설정할 수 있다. 이것은 두 태스크의 우선순위에 따라서 조정되어야 하는데, 이 두 태스크가 동작하기 어려운 상황이되면, 버퍼에 저장할 수 있도록 해야 하기 때문이다. 상기 버퍼를 너무 작게 설정하면, 버퍼 오버플로우가 발생하게 된다. The transmit buffer and the receive buffer are designed as circular buffers, and their sizes can be fixed. This should be adjusted according to the priority of the two tasks, because if these two tasks are difficult to operate, they should be stored in a buffer. If the buffer is set too small, a buffer overflow will occur.

상기 DIGI 드라이버(110)는 매번 1024 바이트가 전송될때마다 버퍼를 플러시하고, 일정 시간 내에 1024바이트가 입력되지 않을 경우에는 가지고 있던 데이터를 모두 상기 소프트웨어 모듈중에서 EPG 정보 관련 소프트웨어에 전송한다.The DIGI driver 110 flushes the buffer every time 1024 bytes are transmitted, and transmits all the data to EPG information related software in the software module when 1024 bytes are not input within a predetermined time.

상기 UART 드라이버(112)는 상기 터미널 드라이버(108)와 상기 DIGI 드라이버(110)로부터 전송된 데이터를 상기 먹스(114)에 전송하고, 상기 먹스(114)로부터 전송된 데이터를 상기 터미널 드라이버(108) 또는 DIGI 드라이버(110)로 전송한다. The UART driver 112 transmits data transmitted from the terminal driver 108 and the DIGI driver 110 to the mux 114, and transmits data transmitted from the mux 114 to the terminal driver 108. Or transmits to the DIGI driver 110.

상기 먹스(114)는 상기 터미널 드라이버(108)와 상기 DIGI 드라이버(110)로부터 전송된 데이터를 구분하여 시리얼 포트의 출력을 RS232C 라인 드라이버칩에 보낼지 아니면, 바로 통과 시킬지의 여부를 제어한다.The MUX 114 classifies the data transmitted from the terminal driver 108 and the DIGI driver 110 to control whether the serial port output is sent to the RS232C line driver chip or immediately passed.

즉, 상기 먹스(114)는 상기 터미널 드라이버(108)를 통하여 전송된 호스트 디버그 메시지를 RS232C 라인 드라이버칩을 통하여 상기 사용자 단말기(200)에 전송되도록 하고, 상기 DIGI 드라이버(110)로부터 전송된 EPG 관련 디버그 메시지는 G-Link를 통하여 상기 사용자 단말기(200)에 전송되도록 한다. That is, the MUX 114 causes the host debug message transmitted through the terminal driver 108 to be transmitted to the user terminal 200 through an RS232C line driver chip, and related to the EPG transmitted from the DIGI driver 110. The debug message is transmitted to the user terminal 200 through the G-Link.

상기 사용자 단말기(200)에는 에이전트 모니터 소프트웨어가 설치되어 있으며, 이를 통해 관리자는 상기 임베디드 시스템(100)에서 전송되어지는 정보를 확인할 수 있으며, 디버깅시 그 에이전트 모니터 소프트웨어를 조작하여 상기 임베디드 시스템(100)에 포함되는 레지스터를 변경하는 작업을 할 수 있다.Agent monitor software is installed in the user terminal 200. Through this, the administrator can check the information transmitted from the embedded system 100, and when the debugger operates the agent monitor software, the embedded system 100 You can change the registers contained in the.

상기와 같이 구성된 임베디드 시스템(100)의 동작에 도 2를 참조하여 설명하기로 한다. An operation of the embedded system 100 configured as described above will be described with reference to FIG. 2.

도 2를 참조하면, 임베디드 시스템(100)에서 호스트 디버그 정보는 상기 터미널 드라이버(108), UART 드라이버(112), 먹스(114)를 통해 시리얼 통신으로 상기 사용자 단말기(200)에 전송된다. 2, in the embedded system 100, host debug information is transmitted to the user terminal 200 through serial communication through the terminal driver 108, the UART driver 112, and the mux 114.

또한, 임베디드 시스템(100)에서 EPG 정보 디버그 데이터는 상기 DIGI 드라이버(110), UART 드라이버(112), 먹스(114)를 통해 시리얼 통신으로 상기 사용자 단말기(200)에 전송된다. In the embedded system 100, EPG information debug data is transmitted to the user terminal 200 through serial communication through the DIGI driver 110, the UART driver 112, and the MUX 114.

즉, 상기 DIGI 드라이버(110)는 먹스(114)를 이용하여 시리얼 포트의 출력을 RS232C 라인 드라이버칩에 보낼지 아니면, 바로 통과 시킬지의 여부를 제어한다. That is, the DIGI driver 110 uses the MUX 114 to control whether to send the output of the serial port to the RS232C line driver chip or to pass it directly.

즉, 상기 먹스(114)는 상기 UART 드라이버(112)로부터 전송된 데이터가 호스트 디버그 메시지이면, '0'으로 설정하여, 호스트 디버그 메시지를 상기 RS232C로 출력하고, 상기 UART 드라이버(112)로부터 전송된 데이터가 EPG 관련 디버그 메시지이면, '1'로 설정하여, 상기 EPG 관련 디버그 메시지를 G-Link 포트로 출력되게 한다. 이때는 RS232C칩을 통과하지 않으므로 반드시 외부에 특수하게 만들어진 GLink2PC박스를 연결해야 시리얼 메시지를 볼수 있다.That is, when the data transmitted from the UART driver 112 is a host debug message, the MUX 114 sets '0' to output a host debug message to the RS232C and transmits the data from the UART driver 112. If the data is an EPG related debug message, it is set to '1' so that the EPG related debug message is output to the G-Link port. At this time, it does not pass through RS232C chip, so you need to connect GLink2PC box specially made in order to see serial message.

상기 DIGI 드라이버(112)는 수신을 위해서 하나의 스래드(thread)가 동작하고, 송신을 위해서 또 다른 스래드(thread)가 동작한다. 이 두 스레드는 EPG 정보의 시리얼을 사용하고자 할때만 동작하게 된다.The DIGI driver 112 operates with one thread for reception and another thread for transmission. These two threads only work if you want to use a serial of EPG information.

상기와 같은 구성을 가진 임베디드 시스템을 이용하면, 호스트의 하나의 시리얼 포트를 이용하여 호스트용과 EPG정보 용으로 사용할 수 있다.If the embedded system having the above configuration is used, one serial port of the host can be used for the host and EPG information.

또한, 서로 독립적으로 개발된 소프트웨어에서 두개의 UART가 필요하지만, 하나의 UART 드라이버를 사용하여 시리얼 포트를 공유하여 필요에 따라서 전환할수 있다.In addition, two UARTs are required for software developed independently of each other, but a single UART driver can be used to share serial ports and switch as needed.

도 3은 본 발명에 따른 사용자 단말기로부터 디버깅 명령을 수신한 경우의 임베디드 시스템 동작을 나타낸 흐름도이다. 3 is a flowchart illustrating an embedded system operation when a debugging command is received from a user terminal according to the present invention.

도 3을 참조하면, 임베디드 시스템은 사용자 단말기로부터 디버깅 명령이 수신되면(S300), 상기 디버깅 명령이 EPG 관련 디버깅 명령인지는 판단한다(S302).Referring to FIG. 3, when a debugging command is received from a user terminal (S300), the embedded system determines whether the debugging command is an EPG related debugging command (S302).

단게 302의 판단결과 상기 디버깅 명령이 EPG 관련 디버깅 명령이면, 상기 임베디드 시스템은 상기 EPG 관련 디버깅 명령을 UART 드라이버 버퍼에 저장한다(S304). If it is determined in step 302 that the debugging command is an EPG related debugging command, the embedded system stores the EPG related debugging command in a UART driver buffer (S304).

단계 304의 수행후, 상기 임베디드 시스템은 DIGI 드라이버 버퍼가 초기화되어 있는지를 판단한다(S306). 즉, 상기 UART 드라이버는 사용자단말기로부터 데이터가 수신되면, 상기 수신된 데이터를 버퍼에 저장한다. 그러면, 상기 DIGI 드라이버는 상기 버퍼에 저장된 데이터를 수신하기 위하여 수신 버퍼가 데이터를 받을 준비가 되어 있는지를 판단하고, 비어 있지 않은 경우에는 수신 버퍼를 초기화한다. After performing step 304, the embedded system determines whether the DIGI driver buffer is initialized (S306). That is, when data is received from the user terminal, the UART driver stores the received data in a buffer. The DIGI driver then determines whether the receive buffer is ready to receive data in order to receive the data stored in the buffer, and initializes the receive buffer if it is not empty.

단계 306의 판단결과 상기 수신 버퍼가 초기화되어 있으면, 상기 임베디드 시스템은 상기 UART 드라이버 버퍼에 저장된 데이터가 상기 DIGI 수신 버퍼의 크기보다 작은지를 판단한다(S308).If the reception buffer is initialized as a result of the determination in step 306, the embedded system determines whether data stored in the UART driver buffer is smaller than the size of the DIGI reception buffer (S308).

단계 308의 판단결과 상기 UART 드라이버 버퍼에 저장된 데이터가 상기 DIGI 수신 버퍼의 크기보다 작으면, 상기 임베디드 시스템은 상기 UART 버퍼에 저장된 데이터를 복사하여 상기 DIGI 드라이버 수신 버퍼에 저장한다(S310).If the data stored in the UART driver buffer is smaller than the size of the DIGI receiving buffer, the embedded system copies the data stored in the UART buffer and stores the data stored in the DIGI driver receiving buffer (S310).

단계 310의 수행후, 상기 DIGI 드라이버는 상기 수신 버퍼에 저장된 데이터를 프로세서에 전송한다(S312). After performing step 310, the DIGI driver transmits data stored in the reception buffer to a processor (S312).

그러면, 상기 프로세서는 EPG 정보의 디버깅을 수행하여 시스템 상태를 검출 한다(S314). 그런다음 상기 검출된 EPG 관련 디버그 메시지는 상기 DIGI 드라이버를 통하여 상기 사용자 단말기에 전송된다. Then, the processor detects a system state by performing debugging of the EPG information (S314). The detected EPG related debug message is then sent to the user terminal via the DIGI driver.

만약, 단계 308의 판단결과 상기 UART 드라이버 버퍼에 저장된 데이터가 상기 DIGI 수신 버퍼의 크기보다 작지 않으면, 상기 임베디드 시스템은 상기 UART 드라이버 버퍼에 저장된 데이터를 일정 크기의 조각으로 나눈후(S316), 상기 일정 크기로 나누어진 데이터를 복사하여 DIGI 드라이버 수신 버퍼에 저장한다(S318).If the data stored in the UART driver buffer is not smaller than the size of the DIGI receiving buffer, the embedded system divides the data stored in the UART driver buffer into pieces of a predetermined size (S316). Copy the data divided by the size and store in the DIGI driver reception buffer (S318).

단계 318의 수행후, 상기 임베디드 시스템은 상기 DIGI 드라이버 버퍼에 저장된 데이터를 프로세서에 전송하여 버퍼 초기화를 수행하고(S320), 상기 UART 드라이버 버퍼에 데이터가 남아있으면(S214), 상기 큐에 데이터가 남아있으면, 상기 UART 드라이버 버퍼에 데이터가 없어질때까지 단계 318부터 다시 수행한다. After performing step 318, the embedded system transmits the data stored in the DIGI driver buffer to the processor to perform buffer initialization (S320). If data remains in the UART driver buffer (S214), the data remains in the queue. If so, the process is performed again from step 318 until there is no data in the UART driver buffer.

만약, 단계 306의 판단결과 상기 DIGI 드라이버 버퍼가 초기화되어 있지 않으면, 상기 임베디드 시스템은 상기 DIGI 드라이버 버퍼를 초기화시킨다(S324).If the DIGI driver buffer is not initialized as a result of the determination of step 306, the embedded system initializes the DIGI driver buffer (S324).

만약, 단계 302의 판단결과 상기 디버깅 명령이 EPG 관련 디버깅 명령이 아니면, 상기 임베디드 시스템은 해당 데이터를 UART 드라이버와 터미널 드라이버를 통하여 프로세서에 전송한다(S326).If it is determined in step 302 that the debugging command is not an EPG related debugging command, the embedded system transmits the corresponding data to the processor through the UART driver and the terminal driver (S326).

그러면, 상기 프로세서는 상기 디버깅 명령에 해당하는 태스크를 실행하여 시스템 상태를 검출한다(S328).Then, the processor detects a system state by executing a task corresponding to the debugging command (S328).

도 4는 본 발명에 따른 임베디드 시스템이 사용자 단말기에 디버그 메시지를 전송하는 방법을 나타낸 흐름도, 도 5는 본 발명에 따른 사용자 단말기에 출력되는 EPG 관련 디버그 메시지 예시도이다.4 is a flowchart illustrating a method of transmitting a debug message to a user terminal by an embedded system according to the present invention, and FIG. 5 is a diagram illustrating an EPG-related debug message output to a user terminal according to the present invention.

도 4를 참조하면, 임베디드 시스템은 사용자 단말기로부터 전송된 디버깅 명령에 해당하는 태스크를 실행시키기 위하여 소프트웨어 모듈을 동작시켜 시스템 상태를 검출한다(S400).Referring to FIG. 4, the embedded system detects a system state by operating a software module to execute a task corresponding to a debugging command transmitted from a user terminal (S400).

그런다음 상기 임베디드 시스템은 상기 검출된 시스템 상태가 EPG 관련 디버그 메시지인지를 판단한다(S402).The embedded system then determines whether the detected system state is an EPG related debug message (S402).

단계 402의 판단결과 상기 검출된 시스템 상태가 EPG 관련 디버그 메시지이면, 상기 임베디드 시스템은 DIGI 드라이버의 송신 버퍼가 초기화 상태인지를 판단한다(S404). 즉, 임베디드 시스템의 프로세서는 EPG 정보 제공업체로부터 EPG 정보가 수신되면, EPG 정보가 수신되었다는 이벤트 정보를 DIGI 드라이버에 전송한다. 그러면, 상기 DIGI 드라이버는 상기 이벤트 정보를 수신하기 이하여 송신 버퍼가 비어있는 초기화상태인지를 판단한다. If it is determined in step 402 that the detected system state is an EPG related debug message, the embedded system determines whether the transmission buffer of the DIGI driver is in an initial state (S404). That is, when the EPG information is received from the EPG information provider, the processor of the embedded system transmits event information indicating that the EPG information has been received to the DIGI driver. Then, the DIGI driver determines whether the transmission buffer is empty or initialized after receiving the event information.

단계 404의 판단결과 상기 송신 버퍼가 초기화 상태이면, 상기 임베디드 시스템은 상기 EPG 관련 디버그 메시지가 상기 DIGI 드라이버 송신 버퍼의 크기보다 작은지를 판단한다(S406).If the transmission buffer is initialized as a result of the determination in step 404, the embedded system determines whether the EPG related debug message is smaller than the size of the DIGI driver transmission buffer (S406).

단계 406의 판단결과 상기 EPG 관련 디버그 메시지가 상기 DIGI 드라이버 송신 버퍼의 크기보다 작으면, 상기 DIGI 드라이버가 상기 EPG 관련 디버그 메시지를 버퍼에 저장한후, UART 드라이버를 통하여 사용자 단말기에 전송한다(S408). If it is determined in step 406 that the EPG-related debug message is smaller than the size of the DIGI driver transmission buffer, the DIGI driver stores the EPG-related debug message in a buffer and transmits the EPG-related debug message to the user terminal through the UART driver (S408).

그러면, 상기 사용자 단말기에는 도 5와 같은 EPG 관련 디버그 메시지가 출력된다. Then, the EPG related debug message shown in FIG. 5 is output to the user terminal.

만약, 단계 406의 판단결과 상기 EPG 관련 디버그 메시지가 상기 DIGI 드라 이버 송신 버퍼의 크기보다 작지 않으면, 상기 임베디드 시스템은 상기 EPG 관련 디버그 메시지를 일정 크기의 조각으로 나누고(S410), 상기 일정 크기로 나누어진 EPG 관련 디버그 메시지를 상기 DIGI 드라이버 버퍼에 저장한 후, UART 드라이버를 통하여 상기 사용자 단말기에 전송한다(S412).If it is determined in step 406 that the EPG related debug message is not smaller than the size of the DIGI driver transmission buffer, the embedded system divides the EPG related debug message into pieces of a predetermined size (S410), and divides the predetermined size. The binary EPG related debug message is stored in the DIGI driver buffer and then transmitted to the user terminal through a UART driver (S412).

단계 412의 수행후, 상기 임베디드 시스템은 상기 DIGI 드라이버 버퍼에 EPG 관련 디버그 메시지가 남아있으면 상기 버퍼에 데이터가 없어질때까지 단계 412부터 다시 수행한다.After performing step 412, if the EPG-related debug message remains in the DIGI driver buffer, the embedded system executes again from step 412 until there is no data in the buffer.

만약, 단계 404의 판단결과 상기 DIGI 드라이버 버퍼가 초기화되어 있지 않으면, 상기 임베디드 시스템은 상기 DIGI 드라이버 버퍼를 초기화시킨다(S416).If it is determined in step 404 that the DIGI driver buffer is not initialized, the embedded system initializes the DIGI driver buffer (S416).

만약, 단계 402의 판단결과 상기 검출된 시스템 상태가 EPG 관련 디버그 메시지가 아니면, 상기 임베디드 시스템은 해당 데이터를 터미널 드라이버와 UART 드라이버를 통하여 상기 사용자 단말기에 전송한다(S418).If it is determined in step 402 that the detected system state is not an EPG-related debug message, the embedded system transmits the corresponding data to the user terminal through a terminal driver and a UART driver (S418).

발명은 상기 실시예에 한정되지 않으며, 많은 변형이 본 발명의 사상 내에서 당 분야에서 통상의 지식을 가진 자에 의하여 가능함은 물론이다.The invention is not limited to the above embodiments, and many variations are possible by those of ordinary skill in the art within the spirit of the invention.

상술한 바와 같이 본 발명에 따르면, 임베디드 시스템에서 하나의 UART포트를 사용하여 서로 독립적으로 개발된 소프트웨어를 디버깅할 수 있으므로, 막대한 비용을 절감할 수 있는 임베디드 시스템 디버깅 장치를 제공할 수 있다. As described above, according to the present invention, since an embedded system can debug software developed independently of each other by using one UART port, an embedded system debugging apparatus capable of reducing enormous costs can be provided.

Claims (4)

서로 다른 소프트웨어 디버깅을 위한 임베디드 시스템에 있어서,In an embedded system for debugging different software, 디버깅 정보를 송수신하기 위한 단일개의 범용 비동기 송수신 드라이버;A single general purpose asynchronous transmit and receive driver for sending and receiving debugging information; 상기 시스템 내의 프로세서 및 상기 범용 비동기 송수신 드라이버 사이에서 호스트 디버깅 정보를 입출력하는 터미널 드라이버;A terminal driver for inputting and outputting host debugging information between a processor in the system and the general purpose asynchronous transmit / receive driver; 상기 시스템내의 프로세서 및 상기 범용 비동기 송수신 드라이버사이에서 프로그램 가이드 관련 디버깅 정보를 입출력하는 디지 드라이버;및A digital driver for inputting / outputting program guide related debugging information between a processor in the system and the general purpose asynchronous transmit / receive driver; and 상기 범용 비동기 송수신 드라이버 및 복수개의 서로 다른 포트 사이에서 디버깅 정보의 송수신 경로를 선택적으로 제어하기 위한 멀티플렉서Multiplexer for selectively controlling the transmission and reception path of debugging information between the general purpose asynchronous transmission and reception driver and a plurality of different ports 를 포함하는 것을 특징으로 하는 임베디드 시스템 디버깅 장치.Embedded system debugging apparatus comprising a. 제1항에 있어서, The method of claim 1, 상기 멀티플렉서는 디버깅 정보가 호스트 디버깅 정보이면, RS232C 라인 드라이버칩으로 전송되도록 제어하고, 프로그램 가이드 관련 디버깅 정보이면, G-Link로 전송되도록 제어하는 것을 특징으로 하는 임베디드 시스템 디버깅 장치.The multiplexer, if the debugging information is the host debugging information, the control to be transmitted to the RS232C line driver chip, and if the debugging information related to the program guide, embedded system debugging apparatus characterized in that the control to be transmitted to the G-Link. 제1항에 있어서, The method of claim 1, 상기 디지 드라이버에는 송신 버퍼와 수신 버퍼가 존재하는 것을 특징으로 하는 임베디드 시스템 디버깅 장치.And a transmit buffer and a receive buffer in the digital driver. 제3항에 있어서, The method of claim 3, 상기 송신 버퍼와 수신 버퍼는 원형인 것을 특징으로 하는 임베디드 시스템 디버깅 장치.And the transmit buffer and the receive buffer are circular.
KR1020050053222A 2005-06-20 2005-06-20 Apparatus for debugging of embedded system KR100745244B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050053222A KR100745244B1 (en) 2005-06-20 2005-06-20 Apparatus for debugging of embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050053222A KR100745244B1 (en) 2005-06-20 2005-06-20 Apparatus for debugging of embedded system

Publications (2)

Publication Number Publication Date
KR20060133399A true KR20060133399A (en) 2006-12-26
KR100745244B1 KR100745244B1 (en) 2007-08-01

Family

ID=37812297

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050053222A KR100745244B1 (en) 2005-06-20 2005-06-20 Apparatus for debugging of embedded system

Country Status (1)

Country Link
KR (1) KR100745244B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856411A (en) * 2012-12-03 2014-06-11 上海斐讯数据通信技术有限公司 Switching system connected with UART interface of router

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09134296A (en) * 1995-11-09 1997-05-20 Nec Eng Ltd Process tracer
CN1165172C (en) 1999-07-06 2004-09-01 英戴克系统公司 Compound series and infrared terminal for consumer electronic device
KR20010064761A (en) * 1999-12-18 2001-07-11 서평원 apparatus and method for UART interface
KR100347753B1 (en) * 2000-08-18 2002-08-09 주식회사 하이닉스반도체 Serial interface device for universal asynchronous receiving and transmitting
KR100479508B1 (en) * 2000-12-27 2005-03-25 엘지전자 주식회사 Apparatus of Controlling to Communicate with Other Boards using One Communication Port
KR100505700B1 (en) * 2003-08-12 2005-08-02 삼성전자주식회사 Retargetable emulation apparatus providing for target system verifying using micro-control unit, micro-computer development system having it, and method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856411A (en) * 2012-12-03 2014-06-11 上海斐讯数据通信技术有限公司 Switching system connected with UART interface of router
CN103856411B (en) * 2012-12-03 2017-05-24 上海斐讯数据通信技术有限公司 Switching system connected with UART interface of router

Also Published As

Publication number Publication date
KR100745244B1 (en) 2007-08-01

Similar Documents

Publication Publication Date Title
US8010843B2 (en) System and method for debugging a target computer using SMBus
US6378064B1 (en) Microcomputer
US4392208A (en) Data processing system and diagnostic unit
ES2206957T3 (en) ACTUATOR FOR MULTIMEDIA ADAPTATION BOX DEVICE FOR IEEE1394.
CN107077435B (en) Device driver registration apparatus and device driver registration method using the same
CN108804313B (en) Method and device for remotely debugging program and server
US6665737B2 (en) Microprocessor chip includes an addressable external communication port which connects to an external computer via an adapter
CN109086175B (en) Board card testing method and device
EP0942374A1 (en) Method and device to simulate interruptions for the emulation of a processor
KR100762576B1 (en) Method and system for dumping flash memory of embedded system
KR100745244B1 (en) Apparatus for debugging of embedded system
KR19980076203A (en) Asynchronous Serial Data Transmission / Reception Method of Digital Signal Processor
US7296187B1 (en) Hardware debug device having script-based host interface
Moon et al. Embedded Linux implementation on a commercial digital TV system
EP0942371B1 (en) Debugging method for a microcomputer
KR20070118042A (en) Driving of a multifunction device
US20140298111A1 (en) Controller, sata system and method of operation therefor
US11573913B2 (en) Device proxy and control method
KR100777568B1 (en) High-speed real-time monitoring method for embedded systems
CN110442548B (en) System on chip and interface data processing method and device thereof
KR940000453B1 (en) Low-hevel processor loading method in electronic exchange
JPH10326203A (en) Debugging devices capable of taking over operation from each other between hardware environments while running programs therein
CN113341907B (en) System and debugging method of general Debug card
KR930004425B1 (en) Computer system with debugging function and method therefor
KR100273280B1 (en) Debugging logic control circuit

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
G170 Publication of correction
FPAY Annual fee payment

Payment date: 20130624

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20140624

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee