KR102116025B1 - Apparatus and Method Debugging Software of Vehicle's ECU - Google Patents
Apparatus and Method Debugging Software of Vehicle's ECU Download PDFInfo
- Publication number
- KR102116025B1 KR102116025B1 KR1020130053721A KR20130053721A KR102116025B1 KR 102116025 B1 KR102116025 B1 KR 102116025B1 KR 1020130053721 A KR1020130053721 A KR 1020130053721A KR 20130053721 A KR20130053721 A KR 20130053721A KR 102116025 B1 KR102116025 B1 KR 102116025B1
- Authority
- KR
- South Korea
- Prior art keywords
- debugging
- vehicle
- ram buffer
- packet
- error
- 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
- G06F11/366—Software debugging using diagnostics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B60—VEHICLES IN GENERAL
- B60R—VEHICLES, VEHICLE FITTINGS, OR VEHICLE PARTS, NOT OTHERWISE PROVIDED FOR
- B60R16/00—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for
- B60R16/02—Electric or fluid circuits specially adapted for vehicles and not otherwise provided for; Arrangement of elements of electric or fluid circuits specially adapted for vehicles and not otherwise provided for electric constitutive elements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
본 발명은 차량 ECU의 소프트웨어 디버깅 장치 및 방법에 관한 것으로서, 본 발명에 따른 차량 ECU의 소프트웨어 디버깅 장치는 차량 운행 중 생성되어 전달된 디버깅 패킷을 실시간으로 저장하는 메모리 및 상기 메모리와 SPI 또는 I2C 통신으로 상기 디버깅 패킷을 생성하여 전달하는 마이컴을 포함하며, 상기 마이컴의 S/W는 모든 함수가 고유의 ID를 갖도록 설계되고, 상기 차량 운행 중 각 함수가 실행되는 시간을 알 수 있도록 타임 카운트를 갖도록 설계되며, 상기 마이컴의 S/W에서 발생할 수 있는 모든 에러의 종류는 기정의되고, 상기 마이컴은 에러 프레임 저장부를 포함하며, 상기 에러 프레임 저장부는 상기 차량 운행 중 상기 S/W의 모든 함수가 실행될 때마다 상기 디버깅 패킷을 생성하고, 생성된 디버깅 패킷을 특정 크기의 램 버퍼에 저장하며, 저장된 상기 디버깅 패킷에서 에러가 발견될 경우, 상기 램 버퍼에 저장된 디버깅 패킷들을 상기 메모리에 복사한다.The present invention relates to a software debugging device and method for a vehicle ECU, and the software debugging device for a vehicle ECU according to the present invention is a memory that stores and transmits a debugging packet generated and transmitted during vehicle operation in real time and SPI or I2C communication with the memory. It includes a microcomputer that generates and transmits the debugging packet, and the S / W of the microcomputer is designed so that all functions have unique IDs, and a time count is provided so that each function can be executed while the vehicle is running. When, all types of errors that may occur in the S / W of the microcomputer are defined, the microcomputer includes an error frame storage unit, and the error frame storage unit is executed when all functions of the S / W are executed while the vehicle is running. Each time, the debugging packet is generated, the generated debugging packet is stored in a RAM buffer of a specific size, and when an error is found in the stored debugging packet, the debugging packets stored in the RAM buffer are copied to the memory.
Description
본 발명은 차량 ECU의 소프트웨어 디버깅 장치 및 방법에 관한 것으로서, 보다 구체적으로는 차량에 장착된 ECU의 S/W를 효율적으로 디비깅 할 수 있는 장치 및 방법에 관한 것이다.The present invention relates to a software debugging apparatus and method for a vehicle ECU, and more particularly, to an apparatus and method for efficiently debugging S / W of an ECU mounted on a vehicle.
종래에는 차량에 장착된 ECU의 S/W를 디버깅하기 위해 디버거를 이용하거나 UART 통신을 이용하였다.In the related art, a debugger is used to debug S / W of an ECU mounted on a vehicle, or UART communication is used.
먼저 디버거를 이용하는 디버깅 방법은 디버거(JTAG 등)라 불리는 하드웨어 장비를 차량 ECU에 연결하여 소스코드의 모든 실행과정을 Line by Line 으로 모니터링하는 것이고, UART 통신을 이용한 디버깅 방법은 S/W가 실행되면서 오류가 발생할 위치에 특정 코드(로그)를 삽입하여 오류가 발생하면 차량 ECU 외부로 연결된 UART로 오류 정보를 출력하는 것이다.First, the debugging method using a debugger is to connect a hardware device called a debugger (such as JTAG) to the vehicle ECU to monitor all execution processes of the source code by Line by Line, and the debugging method using UART communication is executed by S / W. When an error occurs by inserting a specific code (log) at the location where the error will occur, the error information is output to the UART connected outside the vehicle ECU.
그러나, 디버거를 통한 S/W 디버깅 방법은 완성차 상태에서의 실제 실행속도로 S/W가 실행되지 않음으로 현실과는 차이가 있고, 차가 완전히 조립이 된 상태이기 때문에 차를 분해하지 않고서는 디버거를 연결할 수가 없으며, 소비자에게 인계된 차량에서 발생하는 대부분의 S/W오류는 특정 상황에서 아주 간헐적으로 발생하여 1회성인 경우가 대부분이고 설령 문제 발생 차량이 수배되어 차를 분해하여 디버거를 연결한다 하더라도 문제 상황이 재현되지 않아 디버깅을 하기 어렵다는 문제점이 있다.However, the S / W debugging method through the debugger is different from the reality because the S / W is not executed at the actual execution speed in the finished vehicle state, and since the car is fully assembled, the debugger is not disassembled. It is impossible to connect, and most S / W errors that occur in vehicles that have been handed over to consumers occur very intermittently under certain circumstances, and are most often one-time, even if a problem-prone vehicle is arranged and the debugger is connected by disassembling the vehicle. There is a problem that debugging is difficult because the problem situation is not reproduced.
UART 통신을 통한 S/W 디버깅 방법은 실행속도는 디버거를 통한 방법보다 뛰어나지만 정보량에 한계가 있고 이 또한 차를 분해하여 UART 포트를 연결해야 하며 간헐적으로 발생하는 오류가 재현되지 않을 경우 분석이 어렵다는 문제점이 있다.The S / W debugging method through UART communication is superior to the execution method through the debugger, but there is a limit in the amount of information. Also, it is difficult to analyze if the intermittent error is not reproduced by disassembling the car and connecting the UART port. There is a problem.
본 발명은 상기와 같은 문제점을 감안하여 창출한 것으로서, 적은 용량의 비휘발성 메모리를 가지고 저성능의 마이크로프로세서로 제작된 ECU가 차량에 장착된 상태에서 분해 없이 ECU의 S/W를 디버깅할 수 있는 차량 ECU의 소프트웨어 디버깅 장치 및 방법을 제공하는 데 그 목적이 있다.The present invention was created in view of the above problems, and a small capacity non-volatile memory and an ECU made of a low-performance microprocessor can be used to debug the S / W of the ECU without disassembly while mounted in the vehicle. The aim is to provide a software debugging apparatus and method for a vehicle ECU.
전술한 목적을 달성하기 위하여, 본 발명의 일면에 따른 차량 ECU의 소프트웨어 디버깅 장치는 차량 운행 중 생성되어 전달된 디버깅 패킷을 실시간으로 저장하는 메모리 및 상기 메모리와 SPI 또는 I2C 통신으로 상기 디버깅 패킷을 생성하여 전달하는 마이컴을 포함하며, 상기 마이컴의 S/W는 모든 함수가 고유의 ID를 갖도록 설계되고, 상기 차량 운행 중 각 함수가 실행되는 시간을 알 수 있도록 타임 카운트를 갖도록 설계되며, 상기 마이컴의 S/W에서 발생할 수 있는 모든 에러의 종류는 기정의되고, 상기 마이컴은 에러 프레임 저장부를 포함하며, 상기 에러 프레임 저장부는 상기 차량 운행 중 상기 S/W의 모든 함수가 실행될 때마다 상기 디버깅 패킷을 생성하고, 생성된 디버깅 패킷을 특정 크기의 램 버퍼에 저장하며, 저장된 상기 디버깅 패킷에서 에러가 발견될 경우, 상기 램 버퍼에 저장된 디버깅 패킷들을 상기 메모리에 복사하는 것을 특징으로 한다.
본 발명의 다른 면에 따른 차량 ECU의 소프트웨어 디버깅 방법은 차량 운행 중 상기 차량 ECU에 포함된 마이컴의 소프트웨어 함수가 실행되면 디버깅 패킷을 생성하는 단계, 상기 차량 운행 중 생성된 디버깅 패킷을 램 버퍼에 저장하고, 상기 램 버퍼가 FULL되면, 상기 램 버퍼를 클리어한 후 다시 순차적으로 상기 램 버퍼의 처음 위치부터 생성된 디버깅 패킷을 저장하는 단계, 현재 상기 램 버퍼에 저장한 디버깅 패킷에 에러가 존재하는지 여부를 확인하고, 확인결과, 에러가 존재할 경우, 상기 램 버퍼에 저장된 모든 디버깅 패킷들을 상기 차량 ECU에 포함된 롬(E2PROM)에 순차적으로 복사하는 단계 및 상기 롬(E2PROM)이 FULL되면, 상기 롬(E2PROM)의 처음 위치부터 순차적으로 오버라이트(overwrite)하고, 상기 램 버퍼를 클리어하는 단계를 포함하고, 상기 디버깅 패킷은 상기 차량 운행 중 각 함수가 실행되는 시간을 알 수 있도록 하는 타임 카운트에 대한 정보와 발생한 에러의 종류에 대한 정보를 포함하는 것을 특징으로 한다.In order to achieve the above object, the software debugging apparatus of the vehicle ECU according to an aspect of the present invention generates the debugging packet through SPI or I2C communication with the memory and the memory for storing the debugging packet generated and transmitted in real time during vehicle operation. The microcomputer S / W of the microcomputer is designed to have a unique ID, and is designed to have a time count to know the time each function is executed while the vehicle is running. All kinds of errors that may occur in S / W are predefined, and the microcomputer includes an error frame storage unit, and the error frame storage unit transmits the debugging packet whenever all functions of the S / W are executed while the vehicle is running. It is characterized in that it generates, stores the generated debugging packet in a RAM buffer of a specific size, and when an error is found in the stored debugging packet, the debugging packets stored in the RAM buffer are copied to the memory.
According to another aspect of the present invention, a software debugging method for a vehicle ECU includes generating a debugging packet when a microcomputer software function included in the vehicle ECU is executed during vehicle driving, and storing the debugging packet generated during vehicle driving in a RAM buffer. When the RAM buffer is FULL, clearing the RAM buffer and sequentially storing debugging packets generated from the first position of the RAM buffer again. Whether there are errors in the debugging packets currently stored in the RAM buffer? Check, and if there is an error, in the step of sequentially copying all debugging packets stored in the RAM buffer to the ROM (E2PROM) included in the vehicle ECU, and when the ROM (E2PROM) is FULL, the ROM ( E2PROM) sequentially overwriting from the first position, and clearing the RAM buffer, and the debugging packet is information about a time count that enables to know the time each function is executed while the vehicle is running. And information on the type of error that has occurred.
삭제delete
본 발명에 따르면, 효율적으로 차량 ECU의 소프트웨어를 디버깅할 수 있고, 디버깅 결과에 대한 신뢰성을 향상시킬 수 있는 효과가 있다.According to the present invention, it is possible to efficiently debug the software of the vehicle ECU, and to improve the reliability of the debugging results.
특히 기존의 디버깅 장비를 그대로 사용할 수 있고, 신속한 원인분석으로 고객만족도를 향상시킬 수 있는 이점이 있다.In particular, it is possible to use existing debugging equipment as it is, and has the advantage of improving customer satisfaction through rapid cause analysis.
도 1은 본 발명의 일 실시예에 따른 차량 ECU의 소프트웨어 디버깅 장치를 설명하기 위한 블럭도.
도 2는 E2PROM에 패킷이 저장되는 것을 설명하기 위한 도면.
도 3은 본 발명의 일 실시예에 따른 차량 ECU의 소프트웨어 디버깅 방법에 있어서 에러 프레임 저장을 설명하기 위한 흐름도.
도 4는 E2PROM에 저장된 데이터 송출을 설명하기 위한 흐름도.1 is a block diagram illustrating a software debugging apparatus of a vehicle ECU according to an embodiment of the present invention.
2 is a view for explaining that a packet is stored in the E2PROM.
3 is a flowchart illustrating error frame storage in a software debugging method of a vehicle ECU according to an embodiment of the present invention.
4 is a flow chart for explaining data transmission stored in E2PROM.
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 용이하게 이해할 수 있도록 제공되는 것이며, 본 발명은 청구항의 기재에 의해 정의된다. 한편, 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 또는 "포함하는(comprising)"은 언급된 구성요소, 단계, 동작 및/또는 소자 이외의 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.Advantages and features of the present invention, and methods for achieving them will be clarified with reference to embodiments described below in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but will be implemented in various different forms, and only the embodiments allow the disclosure of the present invention to be complete, and the ordinary knowledge in the technical field to which the present invention pertains. The scope of the invention is provided to a person having ease so that the invention can be easily understood, and the invention is defined by the description of the claims. Meanwhile, the terms used in the present specification are for explaining the embodiments and are not intended to limit the present invention. In the present specification, the singular form also includes the plural form unless otherwise specified in the phrase. As used herein, "comprises" or "comprising" means the presence of one or more other components, steps, operations and / or elements other than the components, steps, operations and / or elements mentioned, or Addition is not excluded.
본 발명은 작은 용량의 비휘발성 메모리와 저성능 마이크로프로세서로 제작된 ECU가 차량에 장착된 상태에서(완성차로 조립된 상태에서) 별도의 분해 없이 ECU의 소프트웨어를 디버깅하는 방법에 관한 것이다.The present invention relates to a method for debugging the software of the ECU without separate disassembly while the ECU made of a small capacity non-volatile memory and a low-performance microprocessor is mounted on a vehicle (assembled as a complete vehicle).
한편, 성능이 뛰어난 마이크로프로세서와 대용량 메모리를 포함하는 멀티미디어 시스템의 경우, SSD(Solid State Drive)나 NAND Flash에 많은 양의 로그 정보를 저장하고 이후 USB를 통해 저장된 로그를 취득할 수 있으나, 대부분의 차량에 장착되는 ECU의 경우, 마이크로프로세서의 성능이 뛰어나지 못하고 비휘발성 메모리를 내장하고 있지 않은 경우가 대부분이기 때문에 오류 발생시 이에 대한 정보를 저장하는 것이 여의치 않으므로, 본 발명은 전술한 바를 고려하여 최소한의 메모리 사용으로 오류 발생시의 정보를 저장하고, 저장된 정보의 출력을 위해 차량을 분해할 필요가 없으며, 발생한 오류 디버깅시 ECU의 소프트웨어 실행속도에 영향을 주지 않도록 하기 위해 창출된 것이다.On the other hand, in the case of a multimedia system including a high-performance microprocessor and a large memory, a large amount of log information can be stored in a solid state drive (SSD) or NAND flash, and then the log stored through USB can be acquired. In the case of an ECU mounted in a vehicle, since the performance of the microprocessor is not excellent and the non-volatile memory is not embedded in most cases, it is difficult to store information on an error, so the present invention is minimized in consideration of the above. It is created to store information when an error occurs due to the use of memory, to disassemble the vehicle to output the stored information, and to avoid affecting the software execution speed of the ECU when debugging the error.
이하, 도 1 및 도 2를 참조하여 본 발명의 일 실시예에 따른 차량 ECU의 소프트웨어 디버깅 장치를 설명한다. 도 1은 본 발명의 일 실시예에 따른 차량 ECU의 소프트웨어 디버깅 장치를 설명하기 위한 블럭도이고, 도 2는 E2PROM에 패킷이 저장되는 것을 설명하기 위한 도면이다.Hereinafter, a software debugging apparatus for a vehicle ECU according to an embodiment of the present invention will be described with reference to FIGS. 1 and 2. 1 is a block diagram for explaining a software debugging apparatus for a vehicle ECU according to an embodiment of the present invention, and FIG. 2 is a diagram for explaining that a packet is stored in an E2PROM.
도 1에 도시된 바와 같이, 본 발명의 차량 ECU의 소프트웨어 디버깅 장치는 마이컴(100), E2PROM(or FRAM, 200), OBD 커넥터(300) 및 CAN장비(400)를 포함한다.As shown in FIG. 1, the software debugging device for the vehicle ECU of the present invention includes a
E2PROM(200) 또는 FRAM은 비휘발성 메모리로서, 저성능 마이컴(100)과 SPI 또는 I2C 통신을 하며, 마이컴(100)으로부터 전달된 디버깅 패킷을 실시간으로 저장한다.The E2PROM 200 or FRAM is a non-volatile memory, performs SPI or I2C communication with the
E2PROM(200) 또는 FRAM은 최대 용량이 1Mbytes를 넘지 않으며, 전원 탈거 전후에 최종 상태를 복구하기 위한 정보 저장 용도로 사용되는 부분을 제외하고, 나머지 용량을 디버깅 패킷 저장용으로 사용한다.The maximum capacity of the E2PROM 200 or FRAM does not exceed 1 Mbytes, and the rest of the capacity is used for debugging packet storage, except for the part used for information storage for restoring the final state before and after power removal.
디버깅 패킷은 총 10Bytes로서 표 1과 같이 구성된다.The debugging packet consists of 10 bytes in total as shown in Table 1.
마이컴(100)의 S/W는 모든 함수가 고유의 32비트(2의 32승 개)의 ID(함수 ID)를 갖도록 설계되고, 각 함수가 실행되는 시간을 알 수 있도록 TIMER COUNT 또는 OS TICK COUNT를 갖도록 설계된다.The S / W of the
여기서 TIMER COUNT나 OS TICK COUNT는 마이컴(100)의 하드웨어 TIMER를 이용하여 1~5ms 간격의 free run timer로 구성되고, COUNT 값은 32비트 값을 갖도록 설계된다(5ms 간격일 경우 5ms×2의 32승 ms만큼 시간을 COUNT할 수 있다).Here, the TIMER COUNT or OS TICK COUNT is composed of a free run timer with an interval of 1 to 5 ms using the hardware TIMER of the
마이컴(100)의 S/W에서 발생할 수 있는 모든 상태 및 에러의 종류(상태 ID)는 하기와 같이 Define된다.All states and types of errors (state ID) that may occur in S / W of the
#define ALL_OK 0 #define ALL_OK 0
#define MEMORY_OVERFLOW 1 #define MEMORY_OVERFLOW 1
#define I2C_ACK_ERROR 2 #define I2C_ACK_ERROR 2
#define TIME_OUT 3 #define TIME_OUT 3
한편, 마이컴(100)은 에러 프레임 저장부(110)와 데이터 송출부(120)를 포함한다.Meanwhile, the
에러 프레임 저장부(110)는 모든 함수의 끝 또는 에러를 만났을 때 상기 디버깅 패킷을 생성한다(에러가 발생하던 발생하지 않던 함수가 실행될 때마다 무조건 상기 디버깅 패킷을 생성한다).The error
에러 프레임 저장부(110)는 함수가 실행될 때마다 생성된 디버깅 패킷을 E2PROM(200) 또는 FRAM에 저장할 경우 상당한 속도 저하가 발생할 수 있으므로, 이를 방지하기 위해 1차적으로 10kbytes 램 버퍼에 디버깅 패킷을 저장한다.The error
여기서는 생성된 디버깅 패킷의 저장을 10kbytes의 램 버퍼에 저장한다고 명시하였으나, 이에 국한되지 않고 하드웨어 리소스에 따라 디버깅 패킷의 저장 사이즈를 조절할 수 있음은 물론이다.Here, although the storage of the generated debugging packet is specified to be stored in a 10kbytes RAM buffer, the storage size of the debugging packet can be adjusted according to hardware resources without being limited thereto.
에러 프레임 저장부(110)는 10kbytes의 램 버퍼가 FULL되는 동안 에러가 발생하지 않을 경우 디버깅 패킷들이 저장된 램 버퍼를 클리어하고, 다시 처음 위치부터 순차적으로 디버깅 패킷을 램 버퍼에 저장하며, 현재 저장된 디버깅 패킷에서 에러가 발견되면 램 버퍼에 저장된 모든 디버깅 패킷들을 E2PROM(200) 또는 FRAM으로 복사한다(10kbytes이면 대략 에러 발생 시점이전 최대 1000개 이상의 어떤 함수가 실행되었는지 그 순서를 파악할 수 있다).The error
예컨대, 에러 프레임 저장부(110)는 램 버퍼에 생성된 디버깅 패킷을 저장한 후 현재 저장된 디버깅 패킷의 상태 ID 값을 확인하고, 확인결과 상태 ID 값이 기정의된 에러 값 중 하나일 경우 램 버퍼에 저장된 모든 디버깅 패킷들을 E2PROM(200) 또는 FRAM으로 복사한다.For example, after storing the generated debugging packet in the RAM buffer, the error
E2PROM(200) 또는 FRAM은 도 2에 도시된 바와 같이, 10kbytes 단위로 블럭을 나눠 에러 프레임 저장부(110)로부터 전달된 디버깅 패킷을 순차적으로 복사(저장)함으로써 복사된 디버깅 패킷을 토대로 이전에 발생한 에러 상황도 파악할 수 있도록 하고, 최대 블럭 수가 초과 되면, 첫 블럭부터 overwrite한다.As shown in FIG. 2, the E2PROM 200 or FRAM is divided into blocks in units of 10 kbytes to sequentially copy (save) debugging packets transmitted from the error
데이터 송출부(120)는 어떤 동작 중에 문제가 발생하였는지 파악할 수 있도록 하기와 같은 방법으로 전원이 탈거되더라도 지워지지 않는, 에러 프레임 저장부(100)에 의해 E2PROM(200) 또는 FRAM에 저장된 데이터를 추출한다.The
OBD커넥터(300)는 일측이 차량 내의 CAN 네트워크, 즉 CAN 장비(400)와 연결되고, 타측이 마이컴(100)과 연결되어 마이컴(100)의 CAN 통신을 지원한다.One side of the
예컨대, OBD 커넥터(300)는 CAN 장비(400)와 연결되고, 또는 단품 세트인 경우 해당 세트의 CAN LINE에 직접 CAN장비(400)가 연결되며, 컴퓨터(500)로부터 CAN을 통해 특정 명령이 전송되면, 이를 마이컴(100)에 전달한다.For example, the
데이터 송출부(120)는 OBD 커넥터(300)로부터 전달된 특정 명령에 따라 E2PROM(200) 또는 FRAM에 저장된 모든 데이터를 TP메시지를 이용해 전송한다.The
전술한 바와 같이, 본 발명에 따르면, E2PROM 또는 FRAM로부터 추출된 데이터를 분석하여 에러 발생 시점과 어떤 과정에 의해서 에러가 발생하였는지 파악함으로써, 효율적으로 차량 ECU의 소프트웨어를 디버깅할 수 있고, 디버깅 결과에 대한 신뢰성을 향상시킬 수 있으며, 특히 기존의 디버깅 장비를 그대로 사용할 수 있고, 신속한 원인분석으로 고객만족도를 향상시킬 수 있다.As described above, according to the present invention, by analyzing the data extracted from the E2PROM or FRAM, it is possible to efficiently debug the software of the vehicle ECU by determining the time of the error and by what process the error occurred, and the debugging result. Reliability can be improved. In particular, existing debugging equipment can be used as it is, and customer satisfaction can be improved through rapid cause analysis.
이상, 도 1 및 도 2를 참조하여 본 발명의 일 실시예에 따른 차량 ECU의 소프트웨어 디버깅 장치를 설명하였고, 이하에서는 도 3 및 도 4를 참조하여 본 발명의 일 실 시예에 따른 차량 ECU의 소프트웨어 디버깅 방법을 설명한다. 도 3은 본 발명의 일 실시예에 따른 차량 ECU의 소프트웨어 디버깅 방법에 있어서 에러 프레임 저장을 설명하기 위한 흐름도이고, 도 4는 E2PROM에 저장된 데이터 송출을 설명하기 위한 흐름도이다.The software debugging apparatus of the vehicle ECU according to an embodiment of the present invention has been described above with reference to FIGS. 1 and 2, and the software of the vehicle ECU according to an embodiment of the present invention will be described below with reference to FIGS. 3 and 4. Describes how to debug. 3 is a flowchart illustrating error frame storage in a software debugging method of a vehicle ECU according to an embodiment of the present invention, and FIG. 4 is a flowchart illustrating data transmission stored in the E2PROM.
도 3에 도시된 바와 같이, 마이컴(100)의 소프트웨어, 즉 함수가 실행되면 디버깅 패킷을 생성한다(S300).As shown in FIG. 3, when the software of the
생성된 디버깅 패킷을 램 버퍼에 저장하고, 램 버퍼가 FULL되면, 램 버퍼를 클리어한 후 다시 순차적으로 램 버퍼의 처음 위치부터 저장한다(S301).The generated debugging packet is stored in the RAM buffer, and when the RAM buffer is FULL, the RAM buffer is cleared and sequentially stored from the first position of the RAM buffer (S301).
램 버퍼에 현재 저장된 디버깅 패킷에 에러가 존재하는지 여부를 확인하고(S302), 확인결과, 에러가 존재할 경우, 램 버퍼에 저장된 모든 디버깅 패킷들을 E2PROM(200)에 순차적으로 복사하며, E2PROM이 FULL되면, 처음 위치부터 순차적으로 overwrite하고(S303), 램 버퍼를 클리어한다(S304).If there is an error in the debugging packet currently stored in the RAM buffer (S302), and if there is an error as a result of verification, all debugging packets stored in the RAM buffer are sequentially copied to the
도 4에 도시된 바와 같이, E2PROM(200)에 저장된 디버깅 패킷들에 대한 전송 명령이 수신되었는지 여부를 확인하고(S401), 확인결과 전송 명령이 수신된 경우, E2PROM(200)에 저장된 모든 디버깅 패킷들을 읽어 CAN TP 메시지를 통해 전송한다(S402).As shown in FIG. 4, it is checked whether or not transmission commands for debugging packets stored in the
이상 바람직한 실시예와 첨부도면을 참조하여 본 발명의 구성에 관해 구체적으로 설명하였으나, 이는 예시에 불과한 것으로 본 발명의 기술적 사상을 벗어나지 않는 범주내에서 여러 가지 변형이 가능함은 물론이다. 그러므로 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 안되며 후술하는 특허청구의 범위뿐만 아니라 이 특허청구의 범위와 균등한 것들에 의해 정해져야 한다.The configuration of the present invention has been described in detail with reference to the preferred embodiments and the accompanying drawings, but this is only an example and various modifications are possible within the scope without departing from the technical spirit of the present invention. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined not only by the scope of the claims described below, but also by the scope and equivalents of the claims.
100 : 마이컴 110 : 에러 프레임 저장부
120 : 데이터 송출부 200 : E2PROM
300 : OBD 커넥터 400 : CAN장비100: micom 110: error frame storage
120: data transmission unit 200: E2PROM
300: OBD connector 400: CAN equipment
Claims (6)
차량 운행 중 생성되어 전달된 디버깅 패킷을 실시간으로 저장하는 메모리; 및
상기 메모리와 SPI 또는 I2C 통신으로 상기 디버깅 패킷을 생성하여 전달하는 마이컴을 포함하며,
상기 마이컴의 S/W는 모든 함수가 고유의 ID를 갖도록 설계되고, 상기 차량 운행 중 각 함수가 실행되는 시간을 알 수 있도록 타임 카운트를 갖도록 설계되며, 상기 마이컴의 S/W에서 발생할 수 있는 모든 에러의 종류는 기정의되고,
상기 마이컴은 에러 프레임 저장부를 포함하며,
상기 에러 프레임 저장부는 상기 차량 운행 중 상기 S/W의 모든 함수가 실행될 때마다 상기 디버깅 패킷을 생성하고, 생성된 디버깅 패킷을 특정 크기의 램 버퍼에 저장하며, 저장된 상기 디버깅 패킷에서 에러가 발견될 경우, 상기 램 버퍼에 저장된 디버깅 패킷들을 상기 메모리에 복사하는 것인 차량 ECU의 소프트웨어 디버깅 장치.In the software debugging device of the vehicle ECU,
A memory for storing in real time the debugging packets generated and transmitted during vehicle operation; And
And a microcomputer that generates and transmits the debugging packet through SPI or I2C communication with the memory,
The S / W of the micom is designed so that all functions have a unique ID, and is designed to have a time count to know the time each function is executed while the vehicle is running, and all that can occur in the S / W of the micom. The type of error is predefined,
The microcomputer includes an error frame storage unit,
The error frame storage unit generates the debugging packet whenever all functions of the S / W are executed while the vehicle is running, stores the generated debugging packet in a RAM buffer of a specific size, and an error is found in the stored debugging packet In case, the software debugging device of the vehicle ECU is to copy the debugging packets stored in the RAM buffer to the memory.
상기 에러 프레임 저장부는 상기 램 버퍼가 풀(FULL)되는 동안 에러가 발생하지 않은 경우, 상기 램 버퍼를 클리어하고, 다시 처음부터 순차적으로 생성된 디버깅 패킷을 저장하며, 저장된 디버깅 패킷에서 에러가 발견되면 현재 램 버퍼에 저장된 디버깅 패킷들을 상기 메모리에 복사하는 것
인 차량 ECU의 소프트웨어 디버깅 장치.According to claim 1,
If no error occurs while the RAM buffer is full, the error frame storage unit clears the RAM buffer, stores debugging packets sequentially generated from the beginning, and when an error is found in the stored debugging packet Copying debugging packets currently stored in RAM buffer to the memory
In-vehicle software debugging device.
상기 에러 프레임 저장부는 램 버퍼에 생성된 디버깅 패킷을 저장한 후 저장된 디버깅 패킷의 상태 ID 값을 확인하고, 확인결과 상태 ID 값이 기정의된 에러의 종류 중 하나일 경우 상기 램 버퍼에 저장된 모든 디버깅 패킷들을 상기 메모리에 복사하는 것
인 차량 ECU의 소프트웨어 디버깅 장치.According to claim 1,
The error frame storage unit stores the debugging packet generated in the RAM buffer and checks the status ID value of the stored debugging packet, and when the result of the verification is that the status ID value is one of the predefined errors, all debugging stored in the RAM buffer Copying packets into the memory
In-vehicle software debugging device.
상기 마이컴은 데이터 송출부를 더 포함하고,
상기 데이터 송출부는 CAN 통신으로 전달된 특정 명령에 따라 상기 메모리에 저장된 모든 디버깅 패킷들을 TP메시지를 이용해 전송하는 것
인 차량 ECU의 소프트웨어 디버깅 장치.According to claim 1,
The micom further includes a data transmission unit,
The data transmission unit transmits all debugging packets stored in the memory using a TP message according to a specific command transmitted through CAN communication.
In-vehicle software debugging device.
차량 운행 중 상기 차량 ECU에 포함된 마이컴의 소프트웨어 함수가 실행되면 디버깅 패킷을 생성하는 단계;
상기 차량 운행 중 생성된 디버깅 패킷을 램 버퍼에 저장하고, 상기 램 버퍼가 FULL되면, 상기 램 버퍼를 클리어한 후 다시 순차적으로 상기 램 버퍼의 처음 위치부터 생성된 디버깅 패킷을 저장하는 단계;
현재 상기 램 버퍼에 저장한 디버깅 패킷에 에러가 존재하는지 여부를 확인하고, 확인결과, 에러가 존재할 경우, 상기 램 버퍼에 저장된 모든 디버깅 패킷들을 상기 차량 ECU에 포함된 롬(E2PROM)에 순차적으로 복사하는 단계; 및
상기 롬(E2PROM)이 FULL되면, 상기 롬(E2PROM)의 처음 위치부터 순차적으로 오버라이트(overwrite)하고, 상기 램 버퍼를 클리어하는 단계를 포함하고,
상기 디버깅 패킷은 상기 차량 운행 중 각 함수가 실행되는 시간을 알 수 있도록 하는 타임 카운트에 대한 정보와 발생한 에러의 종류에 대한 정보를 포함하는 차량 ECU의 소프트웨어 디버깅 방법.In the vehicle ECU software debugging method,
Generating a debugging packet when a software function of the microcomputer included in the vehicle ECU is executed while the vehicle is running;
Storing the debugging packet generated while the vehicle is running in a RAM buffer, and when the RAM buffer is FULL, clearing the RAM buffer and sequentially storing the debugging packet generated from the first position of the RAM buffer;
It is checked whether an error exists in the debugging packet currently stored in the RAM buffer, and if an error exists as a result of verification, all debugging packets stored in the RAM buffer are sequentially copied to the ROM (E2PROM) included in the vehicle ECU. To do; And
When the ROM (E2PROM) is FULL, sequentially overwriting from the first position of the ROM (E2PROM), and clearing the RAM buffer,
The debugging packet is a software debugging method of a vehicle ECU that includes information on a time count and information on a type of an error that enables each function to know when the vehicle is running.
상기 롬(E2PROM)에 저장된 디버깅 패킷들에 대한 전송 명령이 수신되었는지 여부를 확인하는 단계; 및
확인결과, 상기 전송 명령이 수신된 경우, 상기 롬(E2PROM)에 저장된 모든 디버깅 패킷들을 읽어 CAN TP 메시지를 통해 전송하는 단계
를 더 포함하는 차량 ECU의 소프트웨어 디버깅 방법.The method of claim 5,
Checking whether a transmission command for debugging packets stored in the ROM (E2PROM) has been received; And
As a result of checking, when the transmission command is received, reading all the debugging packets stored in the ROM (E2PROM) and transmitting them through a CAN TP message
Software debugging method of a vehicle ECU further comprising a.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020130053721A KR102116025B1 (en) | 2013-05-13 | 2013-05-13 | Apparatus and Method Debugging Software of Vehicle's ECU |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020130053721A KR102116025B1 (en) | 2013-05-13 | 2013-05-13 | Apparatus and Method Debugging Software of Vehicle's ECU |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20140134066A KR20140134066A (en) | 2014-11-21 |
KR102116025B1 true KR102116025B1 (en) | 2020-05-28 |
Family
ID=52455303
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020130053721A KR102116025B1 (en) | 2013-05-13 | 2013-05-13 | Apparatus and Method Debugging Software of Vehicle's ECU |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102116025B1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102572300B1 (en) * | 2016-11-09 | 2023-08-29 | 현대모비스 주식회사 | Apparatus and method for debugging with secure connecting function |
KR102154279B1 (en) | 2018-11-27 | 2020-09-09 | 현대오트론 주식회사 | Operating method in debugging system for vehicle |
CN111309651A (en) * | 2020-01-19 | 2020-06-19 | 苏州浪潮智能科技有限公司 | Method, device and equipment for outputting serial port debugging information and readable medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101174716B1 (en) * | 2011-04-20 | 2012-08-17 | 국방과학연구소 | Apparatus and system for verifying of equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120126873A (en) * | 2011-05-13 | 2012-11-21 | 현대자동차주식회사 | System for Dynamic Analysis of Embedded Software of Vehicle using UDS |
-
2013
- 2013-05-13 KR KR1020130053721A patent/KR102116025B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101174716B1 (en) * | 2011-04-20 | 2012-08-17 | 국방과학연구소 | Apparatus and system for verifying of equipment |
Also Published As
Publication number | Publication date |
---|---|
KR20140134066A (en) | 2014-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102622253B (en) | A kind of method of single-chip microcomputer and online upgrading thereof | |
WO2020134634A1 (en) | Program debugging method, program debugging apparatus, terminal device, and storage medium | |
CN102760090B (en) | Debugging method and computer system | |
US20180210811A1 (en) | Debugging method, multi-core processor and debugging device | |
CN106227572A (en) | A kind of frequency converter control system programme upgrade method | |
US20150154028A1 (en) | Methods for accessing baseboard management controller | |
KR102116025B1 (en) | Apparatus and Method Debugging Software of Vehicle's ECU | |
CN110351281B (en) | Universal data frame analysis method, device and equipment | |
CN102945173A (en) | User program on-line upgrading system and method | |
CN104049996A (en) | Method for carrying out software updating of missile-borne computer based on serial port | |
CN110704228A (en) | Solid state disk exception handling method and system | |
TW200615746A (en) | Trace, debug method and system for a processor | |
TW201504650A (en) | SAS expander, system and method for controlling maintenance of SAS expander | |
CN106919479B (en) | Real-time log recording method of embedded device controller | |
CN107357682A (en) | A kind of method and device for recovering to go back original system | |
CN1306411C (en) | Device, method and system for processing events in processor | |
CN103677919A (en) | Airborne software updating method based on serial port | |
CN102929647B (en) | Mainboard method of upgrading integrated with front panel and device in digital hard disc video recorder | |
CN105260257A (en) | Method and device for solving response stopping of program during operation | |
GB2504496A (en) | Removing code instrumentation based on the comparison between collected performance data and a threshold | |
CN116662050A (en) | Error injection support function verification method, device, terminal and medium | |
US9141511B2 (en) | Method and system for verifying sleep wakeup protocol by computing state transition paths | |
CN205375453U (en) | Debug system | |
CN112445508B (en) | ARM application program online upgrading method based on CAN bus | |
TW200636446A (en) | A method for debugging a firmware program and a debugging microprocessor |
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 |