KR20030044266A - Method for changing program and storing medium recorded changing program - Google Patents
Method for changing program and storing medium recorded changing program Download PDFInfo
- Publication number
- KR20030044266A KR20030044266A KR1020010074964A KR20010074964A KR20030044266A KR 20030044266 A KR20030044266 A KR 20030044266A KR 1020010074964 A KR1020010074964 A KR 1020010074964A KR 20010074964 A KR20010074964 A KR 20010074964A KR 20030044266 A KR20030044266 A KR 20030044266A
- Authority
- KR
- South Korea
- Prior art keywords
- program
- main program
- main
- specific
- recorded
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
Abstract
Description
본 발명은 CPU와 프로그램 저장용 메모리를 사용하는 장치를 동작시키는 방법 및 그 메모리에 관한 것으로, 보다 상세하게는 메모리에 저장된 메인 프로그램의 변경 방법 및 변경된 프로그램이 저장된 저장 매체에 관한 것이다.The present invention relates to a method of operating a device using a CPU and a memory for storing a program, and more particularly, to a method of changing a main program stored in a memory and a storage medium storing a changed program.
CPU를 사용하는 장치는 내부의 EPROM 혹은 Flash 메모리에 저장되어 있는 프로그램에 의해 동작된다. 제조 업체는 새로운 기능이 추가되는 등의 이유로 새로운 프로그램을 제공하게 되는데, Flash 메모리를 사용하는 장치에서는 새로운 프로그램을 사용자가 네트워크, 병렬 또는 직렬 인터페이스를 사용하여 장치로 전송하면, 장치 내부의 프로그램을 의해 Flash 메모리에 저장된 프로그램을 변경한다. 즉, 장치의 전원을 온 시키면 Flash 메모리에 저장된 프로그램을 실행하며, 프로그램을 변경하고자 할 경우에는 설정된 인터페이스로 프로그램을 장치로 전송한다. 장치는 Flash 메모리에 저장되어 있는 특정 코드를 수행하여 Flash 메모리를 이레이즈(Erase)하고 새로운 프로그램을 라이트(Write) 한다.A device using a CPU is operated by a program stored in an internal EPROM or Flash memory. Manufacturers offer new programs, for example because they add new features. On devices that use Flash memory, when a user sends a new program to the device using a network, parallel, or serial interface, the program inside the device Change the program stored in Flash memory. That is, when the device is turned on, the program stored in the flash memory is executed. When the program is to be changed, the program is transmitted to the device through the set interface. The device performs specific code stored in Flash memory to erase Flash memory and write a new program.
종래 기술에서는 Flash 메모리의 프로그램을 변경하는 동안 장치의 전원이 오프되는 등의 비정상적인 상황이 발생하는 경우가 있다. 이러한 경우가 발생되면, Flash 메모리의 프로그램이 손상을 입게되어 장치를 사용할 수 없게 된다. 이를 해결하기 위해 장치를 분해하여 Flash 메모리를 정상적인 프로그램이 라이트 되어 있는 Flash 메모리로 교체해야 하는 불편한 문제점이 있었다.In the prior art, an abnormal situation such as a power off of the device occurs while changing a program of the flash memory. If this happens, the program in the Flash memory may be damaged, making the device unusable. In order to solve this problem, it was inconvenient to disassemble the device and replace the flash memory with a flash memory in which a normal program was written.
본 발명이 이루고자 하는 기술적인 과제는 종래 기술의 문제점을 해결하기 위해 비정상적인 상황이 발생하더라도 Flash 메모리가 손상을 입지 않도록 하는 프로그램 변경 방법을 제공하는데 있다.The technical problem to be achieved by the present invention is to provide a program change method that does not damage the flash memory even if an abnormal situation occurs to solve the problems of the prior art.
본 발명이 이루고자 하는 다른 기술적인 과제는 종래 기술의 문제점을 해결하기 위해 변경된 프로그램이 기록된 저장 매체를 제공하는데 있다.Another technical problem to be solved by the present invention is to provide a storage medium in which a changed program is recorded in order to solve the problems of the prior art.
도 1은 본 발명에 따른 변경된 프로그램이 저장된 기록 매체를 설명하기 위한 프린터의 구성을 보이는 블록도 이다.1 is a block diagram showing the configuration of a printer for explaining a recording medium storing a changed program according to the present invention.
도 2는 본 발명에 따른 프로그램 변경 방법의 동작을 보이는 흐름도 이다.2 is a flowchart showing the operation of the program change method according to the present invention.
본 발명이 이루고자 하는 기술적인 과제를 해결하기 위한 변경된 프로그램이 저장된 기록 매체는 제1 영역에 장치를 구동하는 메인 프로그램이 정상적인 동작이 가능한지 판단하는 프로그램이, 제2 영역에 새로운 메인 프로그램을 업데이트 할 수 있도록 지원하는 프로그램이, 제3 영역에 장치를 구동하는 메인 프로그램이 기록되어 있는 것을 특징으로 한다.The recording medium in which the changed program is stored to solve the technical problem to be solved by the present invention may be a program for determining whether the main program for driving the device in the first area is capable of normal operation, and update the new main program in the second area. The main program for driving the device is recorded in the third area.
본 발명에 있어서, 상기 제3 영역에 저장된 메인 프로그램의 특정 위치에 정상적인 동작 판단을 가능하게 하는 인식 코드가 기록되어 있고, 상기 제3 영역에 기록되어 있는 메인 프로그램만이 삭제 및 기록이 가능하며, 상기 메인 프로그램의 특정 위치에 정상적인 동작 판단을 가능하게 하는 인식 코드가 기록되어 있는 것을 특징으로 한다.In the present invention, a recognition code for enabling normal operation determination is recorded at a specific position of the main program stored in the third area, and only the main program recorded in the third area can be deleted and recorded. Recognition code for recording a normal operation can be recorded in a specific position of the main program.
본 발명이 이루고자 하는 다른 기술적인 과제를 해결하기 위한 프로그램 변경 방법은 (a) 전원이 인가되면, 제1 특정 프로그램을 실행하여 장치를 동작시키는 메인 프로그램의 정상적인 동작이 가능한지 판단하는 단계; 및 (b) 정상 적인 동작이 가능한 상기 메인 프로그램을 실행시키거나, 상기 메인 프로그램이 비정상적인 동작을 하는 것으로 판단되면 제2 특정 프로그램을 실행하여 외부로터 새로운 메인 프로그램을 다운로드 할 수 있도록 지원하는 단계를 포함하는 것이 바람직하다.According to another aspect of the present invention, there is provided a program change method, comprising: (a) determining whether normal operation of a main program for operating a device by executing a first specific program when power is applied; And (b) executing the main program capable of normal operation or executing a second specific program to download a new main program from an external device when it is determined that the main program is abnormally operated. It is desirable to.
본 발명에 있어서, 상기 메인 프로그램의 특정 위치에 정상적인 동작 판단을 가능하게 하는 인식 코드가 기록되어 있고, 상기 메인 프로그램에 의해 동작되는 상기 장치를 리셋하는 경우에 상기 제1 및 제2 특정 프로그램은 삭제되지 않고 남아있는 것을 특징으로 하며, 상기 제2 특정 프로그램 및 상기 메인 프로그램의 시작 어드레스는 상기 제1 특정 프로그램에 설정되어 있는 것을 특징으로 한다.In the present invention, an identification code for enabling a normal operation determination is recorded at a specific position of the main program, and when the device operated by the main program is reset, the first and second specific programs are deleted. And the start address of the second specific program and the main program is set in the first specific program.
본 발명에 있어서, 상기 메인 프로그램의 정상 동작 유/무에 관계없이 상기 장치를 구동할 새로운 메인 프로그램을 업데이트 하고자 하는 경우, (a-1) 메인 프로그램 변경 모드를 선택하는 단계; 및 (b-1) 상기 제2 특정 프로그램을 실행하여 외부로터 새로운 메인 프로그램을 다운로드 하는 단계를 포함하는 것을 특징으로하고, 사익 새로운 메인 프로그램의 특정 영역에 업데이트 될 데이터가 새로운 메인 프로그램임을 나타내는 특수한 인식코드가 기록되어 있는 것을 특징으로 한다.In the present invention, if you want to update a new main program to drive the device regardless of whether or not the main program normal operation, (a-1) selecting the main program change mode; And (b-1) executing the second specific program to download a new main program from an external rotor, wherein the special recognition indicates that the data to be updated in a specific area of the new main program is a new main program. A code is recorded.
이하, 첨부된 도면을 참조하여 본 발명을 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described in detail the present invention.
도 1은 본 발명에 따른 변경된 프로그램이 저장된 기록 매체를 설명하기 위한 프린터의 구성을 보이는 블록도로서, 메모리(100), 인터페이스(101), 제어부(102), 신호처리부(103), 문서 출력부(104)로 구성된다.1 is a block diagram showing a configuration of a printer for explaining a recording medium in which a changed program is stored according to the present invention, and includes a memory 100, an interface 101, a control unit 102, a signal processing unit 103, and a document output unit. It consists of 104.
도 2는 본 발명에 따른 프로그램 변경 방법의 동작을 보이는 흐름도로서, Bootloader 프로그램 실행 단계(200), 메인 프로그램에 오류가 발생되었는지 검색하는 단계(201), Download Utility 프로그램 실행 단계(202), 인터페이스 초기화 단계(203), 메인 프로그램 전송단계(204), 메모리에 기록 단계(205), 장치 리셋 단계(206), 메인 프로그램 실행 단계(207), 장치 Running 단계(208)로 구성된다.2 is a flowchart showing the operation of the program change method according to the present invention, the bootloader program execution step 200, the step (201) of detecting whether an error occurs in the main program, the Download Utility program execution step 202, the interface initialization Step 203, main program transfer step 204, write to memory step 205, device reset step 206, main program run step 207, and device Running step 208.
이어서, 도 1 및 도 2를 참조하여 본 발명을 상세히 설명한다.Next, the present invention will be described in detail with reference to FIGS. 1 and 2.
메모리(100)는 예를 들어 Flash 메모리로서, 두 영역으로 나누고 처음 영역은 다시 제1 영역 및 제2 영역으로 분리되어 Bootloader와 Download Utility 프로그램을 라이트하고, 나머지 영역에는 메인 프로그램을 라이트 한다. 메인 프로그램의 특정 위치에는 메인 프로그램의 특정 위치에 정상적인 동작 판단을 가능하게 하는 인식 코드가 기록되어 있다. 이대 제어부(102)의 리셋 벡터(Reset Vector)에 해당하는 위치에 Bootloader 프로그램이 있어야 하고, Download Utility 프로그램과 메인 프로그램의 시작 어드레스는 Bootloader 프로그램에 설정되어 있는 위치이어야 한다.The memory 100 is, for example, a flash memory. The memory 100 is divided into two regions, and the first region is divided into a first region and a second region to write a bootloader and a download utility program, and to write a main program to the remaining regions. At a specific position of the main program, a recognition code is recorded at a specific position of the main program to enable normal operation determination. The bootloader program should be located at the position corresponding to the reset vector of the controller 102, and the start addresses of the download utility program and the main program should be the positions set in the bootloader program.
메모리의 Bootloader 프로그램은 제어부(102)의 리셋벡터에서 수행되는 프로그램, 즉 장치의 전원 온 시에 최초로 수행되는 프로그램이다. Bootloader 프로그램은 메인 프로그램의 득정한 위치에 기록되어 있는 인식 코드를 검색하여 메인 프로그램이 유효한 프로그램, 즉 실행 가능한 프로그램인지를 판단한 후 정상적인 프로그램이면, 메인 프로그램의 시작 어드레스로 점프하여 메임 프로그램이 실행되도록 한다. 그러나, 오류가 있는 프로그램으로 판단하게 되면, Download Utility 프로그램의 시작어드레스로 점프하여 Download Utility 프로그램이 실행되도록 한다.The bootloader program of the memory is a program performed by the reset vector of the controller 102, that is, a program that is first executed when the device is powered on. The bootloader program searches the recognition code recorded in the correct position of the main program to determine whether the main program is a valid program, that is, an executable program. . However, if it is determined that the program is in error, the program jumps to the start address of the Download Utility program to execute the Download Utility program.
Download Utility 프로그램은 네트워크, 병렬 또는 직렬 인터페이스를 초기화하고 이 인터페이스(101)를 통하여 외부로부터 프로그램을 다운로드받아 메모리(100)에 라이트 한다. 이때 메모리(100)에 저장된 이전의 메인 프로그램을 이레이즈 한다. 즉, Download Utility 프로그램은 메모리(100)를 이레이즈 하고 라이트 할 수 있는 기능을 가진 프로그램이다.The Download Utility program initializes a network, parallel or serial interface and downloads the program from the outside via the interface 101 and writes the program to the memory 100. At this time, the previous main program stored in the memory 100 is erased. That is, the Download Utility program is a program having a function of erasing and writing the memory 100.
메인 프로그램은 장치를 구동하는 프로그램으로 새로운 프로그램으로 업그레이드하는 경우, 메모리(100)에 저장된 프로그램이 업데이트 된다. 메인 프로그램은 특정 위치에 인식 코드가 라이트 되어 있는데, 메인 프로그램의 시작 및 종료 지점, 또는 메인 프로그램 중간 중간에 인식 코드가 라이트 될 수 있다. 인식코드는 Bootloader 프로그램이 실행 시에 메인 프로그램이 유효한 프로그램인지 검색하기 위해 메인 프로그램에 라이트 된다.When the main program is a program for driving the device and upgraded to a new program, the program stored in the memory 100 is updated. In the main program, the recognition code is written at a specific position. The recognition code may be written at the start and end points of the main program or in the middle of the main program. The identification code is written to the main program to find out if the bootloader program is a valid program at run time.
장치에 전원이 인가되면 제어부(102)는 리셋 벡터에서부터 Bootloader 프로그램을 실행한다(200단계).When power is applied to the device, the controller 102 executes the bootloader program from the reset vector (step 200).
Bootloader 프로그램을 실행하여 메인 프로그램의 특정 위치에 기록되어 있는 인식 코드를 리드하여 메인 프로그램이 유효한 프로그램인지, 즉 메인 프로그램에 오류가 발생되었는지 검색한다(201단계).The bootloader program is executed to read an identification code recorded at a specific location of the main program to search whether the main program is a valid program, that is, whether an error occurs in the main program (step 201).
메인 프로그램의 인식 코드를 리드하여 오류가 발생된 경우, Download Utility 프로그램 시작 어드레스로 점프하여 Download Utility 프로그램 실행한단(202단계).If an error occurs by reading the recognition code of the main program, jump to the Download Utility program start address and execute the Download Utility program (step 202).
Download Utility 프로그램이 실행되면 인터페이스(101)를 초기화하고, 이 인터페이스(101)를 통해 새로운 메인 프로그램을 다운로드받아 메모리(100)의 메인 프로그램 저장 영역에 라이트 한다(202∼205단계). Download Utility 프로그램은 메모리(100) 업데이트를 위해 메모리(100)를 이레이즈 할 때 Bootloader 프로그램 및 Download Utility 프로그램이 저장되어 있는 영역은 이레이즈 하지 않고, 메인 프로그램이 저장되어 있는 영역만 이레이즈 한다.When the Download Utility program is executed, the interface 101 is initialized, a new main program is downloaded through the interface 101, and written to the main program storage area of the memory 100 (steps 202 to 205). When the Download Utility program erases the memory 100 for updating the memory 100, the Download Utility program does not erase the area in which the Bootloader program and the Download Utility program are stored, but only the area in which the main program is stored.
메모리(100)에 새로운 메인 프로그램의 업데이트가 완료되면, 장치를 리셋한다(206단계).When the update of the new main program in the memory 100 is completed, the device is reset (step 206).
메인 프로그램의 인식 코드를 리드하여 오류가 발생하지 않은 정상적인 프로그램으로 판단되면, 메인 프로그램을 실행하고, 장치를 동작시킨다(207, 208단계).If it is determined that the normal program does not generate an error by reading the recognition code of the main program, the main program is executed and the device is operated (steps 207 and 208).
정상적으로 장치를 사용하고 있는 상황에서 사용자가 기존의 메인 프로그램을 새로운 메인 프로그램으로 변경하고자 할 때, 새로운 메인 프로그램을 설정되어 있는 인터페이스(101)를 통해 장치로 전송한다. 이때 사용자는 프로그램을 변경하는 모드로 장치의 설정을 변경하거나, 혹은 전송할 프로그램의 특정 위치에 특수한인식 코드를 넣어 장치가 전송 받은 데이터가 새로운 프로그램임을 판단할 수 있도록 한다.When a user wants to change an existing main program to a new main program in a situation where the device is normally used, the new main program is transmitted to the device through the set interface 101. At this time, the user can change the setting of the device in a mode for changing a program or insert a special recognition code at a specific location of the program to be transmitted so that the device can determine that the received data is a new program.
장치는 전송된 프로그램을 메모리(100)의 메인 프로그램 영역에 라이트 하여 새로운 프로그램을 사용할 수 있도록 한다. 새로운 프로그램이 메모리(100)에 라이트 되거나 혹은 메모리(100)를 이레이즈 하고 있는 중간에 장치의 전원이 꺼지는 등의 비정상적인 상황이 발생하게 되면, 장치의 전원을 OFF한 후 다시 ON 한다. 이때 Bootloader 프로그램은 메인 프로그램의 오류를 검색하게 되고, Downloder Utility 프로그램에 의해 다시 메인 프로그램을 라이트 할 수 있는 상태로 된다.The device writes the transferred program to the main program area of the memory 100 so that a new program can be used. When a new program is written to the memory 100 or an abnormal situation such as the device is turned off while the memory 100 is being erased, the device is turned off and then turned on again. At this time, the bootloader program searches for errors in the main program, and the downloader utility program is ready to write the main program again.
본 발명은 상술한 실시 예에 한정되지 않으며 본 발명의 사상 내에서 당업자에 의한 변형이 가능함은 물론이다.The present invention is not limited to the above-described embodiments and can be modified by those skilled in the art within the spirit of the invention.
상술한 바와 같이 본 발명에 따르면, 장치의 메인 프로그램을 업데이트 하는 과정에서 발생할 수 있는 에러로 인해 장치를 사용하지 못하게 되는 것을 막을 수 있는 효과가 있다.As described above, according to the present invention, it is possible to prevent the device from being used due to an error that may occur in the process of updating the main program of the device.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020010074964A KR20030044266A (en) | 2001-11-29 | 2001-11-29 | Method for changing program and storing medium recorded changing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020010074964A KR20030044266A (en) | 2001-11-29 | 2001-11-29 | Method for changing program and storing medium recorded changing program |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20030044266A true KR20030044266A (en) | 2003-06-09 |
Family
ID=29572062
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020010074964A KR20030044266A (en) | 2001-11-29 | 2001-11-29 | Method for changing program and storing medium recorded changing program |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20030044266A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08194622A (en) * | 1995-01-17 | 1996-07-30 | Hitachi Ltd | Program starting method using memory card |
JPH114451A (en) * | 1997-04-14 | 1999-01-06 | Lg Electron Inc | Downloading device for digital broadcast receiver and its method |
JPH11203060A (en) * | 1998-01-12 | 1999-07-30 | Brother Ind Ltd | Printer system |
JP2001273145A (en) * | 2000-03-27 | 2001-10-05 | Mitsubishi Electric Corp | Information processor and download processing method |
-
2001
- 2001-11-29 KR KR1020010074964A patent/KR20030044266A/en not_active Application Discontinuation
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08194622A (en) * | 1995-01-17 | 1996-07-30 | Hitachi Ltd | Program starting method using memory card |
JPH114451A (en) * | 1997-04-14 | 1999-01-06 | Lg Electron Inc | Downloading device for digital broadcast receiver and its method |
JPH11203060A (en) * | 1998-01-12 | 1999-07-30 | Brother Ind Ltd | Printer system |
JP2001273145A (en) * | 2000-03-27 | 2001-10-05 | Mitsubishi Electric Corp | Information processor and download processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6317827B1 (en) | Method and apparatus for fault tolerant flash upgrading | |
KR100778293B1 (en) | Digital tv and upgrade method of bootloader for the same | |
KR100415371B1 (en) | Computer | |
JP3372964B2 (en) | Computer system | |
US20040083469A1 (en) | Method for updating firmware of optical disk system | |
US7908469B2 (en) | Method for executing power on self test on a computer system and updating SMBIOS information partially | |
US20090113196A1 (en) | Method and systems for advanced reprogrammable boot codes and in-application programming of embedded microprocessor systems | |
KR100507884B1 (en) | System for controlling rewrite in memory, method for controlling rewrite in memory, and information recording media for storing programs which excute each steps in method for controlling rewrite in memory | |
US20060282558A1 (en) | Control chip for optical disk drive and method for updating firmware in the control chip | |
US20080184072A1 (en) | Firmware ROM Patch Method | |
US20040225873A1 (en) | Method and system for recovering program code in a computer system | |
US20080270685A1 (en) | Information processing apparatus and firmware updating method | |
JP2010198252A (en) | Non-volatile memory device, write-in method for nonvolatile memory, and nonvolatile memory write-in program | |
US20020083427A1 (en) | Embedded system capable of rapidly updating software and method for rapidly updating software of embedded system | |
US7096351B2 (en) | Single-chip microcomputer and boot region switching method thereof | |
US6925522B2 (en) | Device and method capable of changing codes of micro-controller | |
CN116185299A (en) | Flash memory controller and related device and method | |
KR20030044266A (en) | Method for changing program and storing medium recorded changing program | |
JP2001117766A (en) | Information processor with patch function of mask rom | |
KR20090021695A (en) | System for roll back of flash memory and method there of | |
KR100734303B1 (en) | Method for down-loading a system program | |
JP2002007152A (en) | Download method and download device | |
JP2008003668A (en) | System and method of rewriting control program, rewriting program, information processor, and program and method of controlling the same | |
JP2007069514A (en) | Ink-jet recording device | |
JP2001273143A (en) | Electronic controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E902 | Notification of reason for refusal | ||
E601 | Decision to refuse application |