KR100316584B1 - Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory - Google Patents

Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory Download PDF

Info

Publication number
KR100316584B1
KR100316584B1 KR1019990057536A KR19990057536A KR100316584B1 KR 100316584 B1 KR100316584 B1 KR 100316584B1 KR 1019990057536 A KR1019990057536 A KR 1019990057536A KR 19990057536 A KR19990057536 A KR 19990057536A KR 100316584 B1 KR100316584 B1 KR 100316584B1
Authority
KR
South Korea
Prior art keywords
flash memory
execution program
program
dram
memory
Prior art date
Application number
KR1019990057536A
Other languages
Korean (ko)
Other versions
KR20010056103A (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 KR1019990057536A priority Critical patent/KR100316584B1/en
Publication of KR20010056103A publication Critical patent/KR20010056103A/en
Application granted granted Critical
Publication of KR100316584B1 publication Critical patent/KR100316584B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

본 발명은 하나의 플래시 메모리를 부팅 프로그램 영역과 갱신 가능한 수행 프로그램 영역으로 분할하여 사용함으로써, 해당 시스템 크기를 줄임과 동시에 시스템 가격을 인하할 수 있도록 한 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 및 그 메모리 갱신 방법에 관한 것으로, 종래의 시스템에서는 부트 메모리와 플래시 메모리를 별도로 구현하여 해당되는 프로그램을 각각 저장하고 있으므로, 별도의 부트 메모리 및 플래시 메모리 구현으로 인해 시스템 가격이 상승하고, 해당 시스템의 크기가 큰 단점이 있었다.The present invention divides and uses a single flash memory into a bootable program area and an updateable execution program area, thereby reducing the size of the system and simultaneously reducing the system price. The present invention relates to a memory updating method. In the conventional system, boot memory and flash memory are implemented separately to store corresponding programs, and thus, the system price increases due to the implementation of separate boot memory and flash memory, and the size of the corresponding system. There was a big downside.

따라서, 본 발명은 부팅 프로그램을 저장하기 위한 별도의 부트 메모리를 사용하지 않고, 해당 부팅 프로그램을 수행 프로그램이 저장되는 플래시 메모리에 공유하도록 해당 플래시 메모리를 분할 사용함으로써, 메모리 칩 숫자를 줄여 시스템의 크기를 줄일 수 있게 됨과 동시에 시스템 가격을 인하할 수 있게 되고, 이로 인해 해당 시스템의 외형도 수려하게 설계할 수 있게 된다.Therefore, the present invention does not use a separate boot memory for storing a booting program, and divides the flash memory so that the booting program is shared with the flash memory in which the executing program is stored, thereby reducing the number of memory chips, thereby reducing the size of the system. The system price can be reduced, and the system price can be lowered, thereby allowing the design of the system to be beautifully designed.

또한, 본 발명은 부팅 프로그램과 수행 프로그램을 공유하는 플래시 메모리의 수행 프로그램 갱신시 부팅 프로그램 영역에 존재하는 플래시 메모리 삭제 및 기록 루틴을 DRAM(Dynamic Random Access Memory)으로 이동시켜 수행함으로써, 해당 부팅 프로그램을 보호한 상태에서 수행 프로그램만을 갱신할 수 있게 된다.In addition, the present invention by moving the flash memory erase and write routine in the boot program area to the DRAM (Dynamic Random Access Memory) when updating the execution program of the flash memory sharing the boot program and the execution program, thereby performing the corresponding boot program Only protected programs can be updated while protected.

Description

시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 및 그 메모리 갱신 방법{Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory}Flash memory to share with booting and main operation program in system and upgrade method in that memory}

본 발명은 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 및 그 메모리 갱신 방법에 관한 것으로, 특히 하나의 플래시 메모리를 부팅 프로그램 영역과 갱신 가능한 수행 프로그램 영역으로 분할하여 사용함으로써, 해당 시스템 크기를 줄임과 동시에 시스템 가격을 인하할 수 있도록 한 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 및 그 메모리 갱신 방법에 관한 것이다.The present invention relates to a flash memory sharing a booting and executing program in a system, and a method of updating the memory thereof. In particular, by using one flash memory divided into a bootable program area and an updateable execution program area, The present invention relates to a flash memory and a method of updating the memory that share a booting and executing program in a system so that the system price can be lowered at the same time.

일반적으로, 전자적인 제어에 따라 소정 기능을 수행하는 각종 시스템은 모든 동작을 제어 및 처리하여 소정 기능을 수행하기 위한 수행 프로그램(Main Operating Program)과, 초기 부팅과 수행 프로그램의 갱신 및 갱신에 따른 재부팅을 위한 부팅 프로그램(Booting Program)이 필요하며, 이러한 수행 프로그램과 부팅 프로그램은 각각 별도의 메모리에 저장된다.In general, various systems performing a predetermined function according to electronic control are a main operating program for performing a predetermined function by controlling and processing all operations, and initial booting and rebooting according to updating and updating of the executing program. Booting program for the (Booting Program) is required, and these execution programs and booting programs are stored in separate memory.

이를 첨부된 도면 도 1을 참조하여 상세하게 설명하면, 해당 시스템은 모든 동작을 제어 및 처리하는 중앙처리장치(11)와, 부팅 프로그램을 저장하기 위한 부트 메모리(12)와, 수행 프로그램을 저장하기 위한 플래시 메모리(Flash Memory, 13) 및 해당 플래시 메모리(13)에 저장된 수행 프로그램을 실행하기 위해 필요한 DRAM(Dynamic Random Access Memory, 14)을 구비하여 이루어지는데, 해당 부트 메모리(12)와 플래시 메모리(13)는 비휘발성 메모리로 구현되고, 해당 DRAM(14)은 휘발성 메모리로 구현된다.This will be described in detail with reference to FIG. 1, the system includes a central processing unit 11 for controlling and processing all operations, a boot memory 12 for storing a boot program, and a program for storing Flash memory 13 and a DRAM (Dynamic Random Access Memory) 14 required to execute the execution program stored in the flash memory 13, the boot memory 12 and the flash memory ( 13 is implemented with nonvolatile memory, and the corresponding DRAM 14 is implemented with volatile memory.

여기서, 해당 부트 메모리(12)는 시스템이 양산된 이후에 갱신(Upgrade)되는 경우가 거의 없으므로, 재기록이 불가능한 PROM(Programmable Read Only Memory)이나 전기적으로 삭제하고 다시 기록할 수 있는 EPROM(Erasable and PROM)을 주로 사용하며, 초기 전원 공급시의 부팅 기능과 플래시 메모리(13)의 수행 프로그램 갱신을 위한 플래시 메모리 액세스 기능 및 수행 프로그램 갱신에 따른 재부팅 기능을 수행하는 부팅 프로그램 외에 시스템의 고장 진단을 위한 진단 프로그램을 포함한다.In this case, the boot memory 12 is rarely upgraded after the system is mass-produced. Therefore, a programmable read only memory (PROM) that is not rewritable or erasable and PROM that can be electrically erased and rewritten. ), Which is used for the initial power supply, the flash memory access function for updating the execution program of the flash memory 13, and the boot program for performing the reboot function according to the update of the execution program. Include the program.

그리고, 해당 플래시 메모리(13)는 DRAM(14)에서 실행되는 수행 프로그램을 저장하되, 해당 수행 프로그램의 갱신이 가능하도록 명령에 의한 삭제(Erase) 및 프로그램이 가능한 메모리로 구현된다.The flash memory 13 stores an execution program executed in the DRAM 14 and is implemented as a memory that can be erased by a command and a programmable memory so that the execution program can be updated.

이와 같이 구성된 시스템에서 초기 전원이 공급되면, 중앙처리장치(11)는 최초 동작으로 부트 메모리(12)에 저장된 부팅 프로그램을 판독하여 부팅을 수행하게 되는데, 이때, 해당 부트 메모리(12)에 저장된 부팅 프로그램과 진단 프로그램을 DRAM(14)으로 이동시킴과 동시에 플래시 메모리(13)에 저장된 수행 프로그램을 DRAM(14)으로 이동시킨 후, 링크 포인터를 DRAM(14)으로 이동시켜 수행 프로그램이실행될 수 있도록 함으로써, 해당 시스템이 정상적으로 동작하는 상태로 부팅이 완료된다.When the initial power is supplied in the system configured as described above, the CPU 11 reads a booting program stored in the boot memory 12 as an initial operation and performs booting. In this case, the booting stored in the boot memory 12 is performed. By moving the program and the diagnostic program to the DRAM 14 and simultaneously moving the execution program stored in the flash memory 13 to the DRAM 14, the link pointer is moved to the DRAM 14 so that the execution program can be executed. The booting is completed with the system operating normally.

이때, 해당 시스템에서 부트 메모리의 부팅 프로그램에 의한 플래시 메모리 액세스 절차를 첨부된 도면 도 2에 도시된 부트 메모리 및 플래시 메모리 구조를 참조하여 살펴보면, 시스템 양산시에 롬 라이터(ROM Writer)에 의해 부트 메모리(12)에만 부팅 프로그램이 퓨징되고, 해당 플래시 메모리(13)는 비어있는 상태이므로, 해당 시스템에 대한 하드웨어 테스트가 완료되면 플래시 메모리(13)에 저장될 수행 프로그램을 외부 시스템으로부터 소정의 인터페이스를 통해 다운로드 받게 된다.In this case, referring to a boot memory and a flash memory structure of FIG. 2 attached to a flash memory by a boot program of a boot memory in a corresponding system, a boot memory (ROM Writer) may be used by a ROM writer during system mass production. 12) Only the boot program is fused, and the corresponding flash memory 13 is empty. Therefore, when the hardware test for the corresponding system is completed, the execution program to be stored in the flash memory 13 is downloaded from the external system through a predetermined interface. Will receive.

이때, 다운로드 받은 수행 프로그램은 중앙처리장치(11)에 의해 임시로 DRAM(14)에 저장되고, 해당 중앙처리장치(11)는 부트 메모리(12)의 부팅 프로그램을 실행시켜 플래시 메모리(13)를 삭제한 후, DRAM(14)에 저장되어 있는 수행 프로그램을 해당 플래시 메모리(13)에 바이트(Byte) 또는 워드(Word) 단위로 기록하고, 기록이 완료되면 해당 시스템을 재부팅하여 다운로드 받은 수행 프로그램으로 정상 동작시키게 된다.In this case, the downloaded execution program is temporarily stored in the DRAM 14 by the central processing unit 11, and the central processing unit 11 executes a boot program of the boot memory 12 to execute the flash memory 13. After the deletion, the execution program stored in the DRAM 14 is recorded in the corresponding flash memory 13 in bytes or words, and when the recording is completed, the relevant system is rebooted to the downloaded execution program. It will operate normally.

그리고, 해당 시스템을 실제 필드(Field)에 설치한 이후, 수행 프로그램의 갱신 필요성이 있는 경우 전술한 동작과 동일한 방법으로 부팅 프로그램을 이용하여 갱신될 수행 프로그램을 다운로드 받아 현재 플래시 메모리(13)의 수행 프로그램을 삭제하고, 갱신될 수행 프로그램을 해당 플래시 메모리(13)에 기록한 후, 해당 시스템을 재부팅하여 갱신된 수행 프로그램으로 정상 동작하게 된다.After the system is installed in the actual field, if there is a need to update the execution program, the execution program to be updated is downloaded by using the boot program in the same manner as the above-described operation, and the current execution of the flash memory 13 is performed. After the program is deleted, the execution program to be updated is recorded in the flash memory 13, and the system is rebooted to operate normally with the updated execution program.

한편, 전술한 바와 같이 수행 프로그램에 대한 갱신이 가능한 종래의 시스템에서는 부트 메모리와 플래시 메모리를 별도로 구현하여 해당되는 프로그램을 각각 저장하고 있으므로, 별도의 부트 메모리 및 플래시 메모리 구현으로 인해 시스템 가격이 상승하고, 해당 시스템의 크기가 큰 단점이 있었다.On the other hand, in the conventional system that can update the execution program as described above, since the boot memory and the flash memory are implemented separately to store the corresponding programs, the system price increases due to the implementation of a separate boot memory and the flash memory. However, the size of the system was a big disadvantage.

본 발명은 전술한 바와 같은 문제점을 해결하기 위한 것으로 그 목적은, 부팅 프로그램을 저장하기 위한 별도의 부트 메모리를 사용하지 않고, 해당 부팅 프로그램을 수행 프로그램이 저장되는 플래시 메모리에 공유하도록 해당 플래시 메모리를 분할 사용함으로써, 메모리 칩 숫자를 줄여 시스템의 크기를 줄임과 동시에 시스템 가격을 인하할 수 있도록 하고, 이로 인해 해당 시스템의 외형도 수려하게 설계할 수 있도록 하는데 있다.The present invention has been made to solve the above-mentioned problems, and an object thereof is not to use a separate boot memory for storing a booting program, but to share the corresponding flash memory so that the booting program is shared with the flash memory in which the execution program is stored. By dividing, the number of memory chips can be reduced to reduce the size of the system and at the same time reduce the price of the system, thereby allowing the design of the system to be beautifully designed.

본 발명의 다른 목적은, 부팅 프로그램과 수행 프로그램을 공유하는 플래시 메모리의 수행 프로그램 갱신시 부팅 프로그램 영역에 존재하는 플래시 메모리 삭제 및 기록 루틴을 DRAM으로 이동시켜 수행함으로써, 해당 부팅 프로그램을 보호한 상태에서 수행 프로그램만을 갱신할 수 있도록 하는데 있다.Another object of the present invention is to move the flash memory erase and write routines present in the boot program area to the DRAM when updating the execution program of the flash memory sharing the boot program and the execution program to the DRAM, thereby protecting the boot program. It is to be able to update only the execution program.

도 1은 부팅 프로그램과 수행 프로그램을 각각 별도의 메모리에 저장하는 시스템의 개략적인 구성 블록도.1 is a schematic structural block diagram of a system for storing a booting program and an executing program in separate memories.

도 2는 도 1에 있어, 부트 메모리의 부팅 프로그램에 의한 플래시 메모리 액세스 절차를 설명하기 위한 메모리 구조를 도시한 도면.FIG. 2 is a diagram illustrating a memory structure for explaining a flash memory access procedure by a boot program of a boot memory in FIG. 1; FIG.

도 3은 본 발명에 따른 부팅 프로그램과 갱신 가능한 수행 프로그램을 공유하는 플래시 메모리를 갖는 시스템의 개략적인 구성 블록도.3 is a schematic structural block diagram of a system having a flash memory sharing a bootable program and an updateable executable program according to the present invention;

도 4는 도 3에 있어, 플래시 메모리의 상세한 구조를 도시한 도면.FIG. 4 is a diagram showing the detailed structure of a flash memory in FIG.

도 5는 본 발명에 따른 시스템에서 플래시 메모리의 수행 프로그램 삭제 동작 순서도.5 is a flowchart of a program executing operation of a flash memory in the system according to the present invention.

도 6은 본 발명에 따른 시스템에서 플래시 메모리의 수행 프로그램 기록 동작 순서도.6 is a flowchart of a program performing operation for writing a flash memory in a system according to the present invention.

도 7은 본 발명에 따른 부팅 프로그램과 갱신 가능한 수행 프로그램을 공유하는 플래시 메모리를 갖는 라우터의 개략적인 구성 블록도.7 is a schematic structural block diagram of a router having a flash memory sharing a bootable program and an updateable executable program according to the present invention.

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

31 : 중앙처리장치 32 : 플래시 메모리31: central processing unit 32: flash memory

33 : DRAM33: DRAM

상술한 바와 같은 목적을 해결하기 위한 본 발명의 특징은, 소정 갯수의 섹터를 기준으로 부팅 및 진단 프로그램을 저장하기 위한 부팅 프로그램 영역과 갱신가능한 수행 프로그램 영역으로 구분하되, 상기 부팅 프로그램 영역은 갱신될 수행 프로그램을 다운로드 받는 부분과, 다운로드 받은 수행 프로그램을 기록하는 플래시 액세스 함수를 호출하는 부분과, 어셈블리 코드로 프로그램된 플래시 액세스 함수와, DRAM으로 이동되어 플래시 메모리 삭제 및 기록 루틴을 수행하는 부분을 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리를 구현하는데 있다.A feature of the present invention for solving the above object is divided into a boot program area for storing boot and diagnostic programs and an updateable execution program area based on a predetermined number of sectors, and the boot program area is to be updated. It includes a part that downloads the execution program, a part that calls the flash access function to record the downloaded execution program, a flash access function programmed by the assembly code, and a part that is moved to the DRAM to perform flash memory erase and write routines. In the system, characterized in that for implementing a flash memory sharing boot and execution program.

본 발명의 다른 특징은, 외부 시스템으로부터 갱신될 수행 프로그램을 다운로드 받는 과정과; 어셈블리 코드를 이용하여 플래시 메모리의 부팅 프로그램 영역에 존재하는 플래시 메모리 삭제 및 기록 루틴을 DRAM으로 이동시키는 과정과; 상기 DRAM으로 이동된 플래시 메모리 삭제 및 기록 루틴에 따라 상기 플래시 메모리의 수행 프로그램 영역에 대한 삭제 및 기록을 수행하여 해당되는 수행 프로그램을 갱신하는 과정을 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 갱신 방법을 제공하는데 있다.Another aspect of the invention, the process of downloading the execution program to be updated from the external system; Moving the flash memory erase and write routines existing in the boot program area of the flash memory to the DRAM using the assembly code; Booting and executing a program in the system, wherein the erase and write operation is performed on the execution program area of the flash memory and the corresponding execution program is updated according to the flash memory erase and write routine moved to the DRAM. The present invention provides a method of updating a shared flash memory.

그리고, 상기 플래시 메모리 삭제 및 기록 루틴을 DRAM으로 이동시키기 전에 수행 프로그램 삭제 및 기록후에 링크 포인터가 부팅 프로그램 영역으로 복귀될 주소를 저장하는 과정을 더 포함하는 것을 특징으로 한다.The method may further include storing an address where the link pointer returns to the booting program area after deleting and writing the execution program before moving the flash memory erasing and writing routine to the DRAM.

나아가, 상기 DRAM으로 이동된 플래시 메모리 삭제 및 기록 루틴에 따라 해당되는 수행 프로그램을 갱신하기 위해 링크 포인터를 상기 DRAM으로 이동된 플래시 메모리 삭제 및 기록 루틴의 시작번지로 이동시키는 과정과; 상기 수행 프로그램을 갱신한 후에 상기 부팅 프로그램 영역으로 링크 포인터를 복귀시키는 과정을더 포함하는 것을 특징으로 한다.Furthermore, moving the link pointer to a start address of the flash memory erase and write routine moved to the DRAM to update a performance program corresponding to the flash memory erase and write routine moved to the DRAM; And returning a link pointer to the booting program area after updating the execution program.

또한, 상기 플래시 메모리의 수행 프로그램을 갱신하는 과정은, 상기 DRAM으로 이동된 플래시 메모리 삭제 루틴에 따라 상기 수행 프로그램 영역을 섹터 단위로 삭제하는 단계와; 상기 DRAM으로 이동된 플래시 메모리 기록 루틴에 따라 상기 수행 프로그램 영역에 다운로드 받은 수행 프로그램을 바이트 단위로 기록하는 단계를 더 포함하는 것을 특징으로 한다.The updating of the execution program of the flash memory may include deleting the execution program area in sector units according to a flash memory erase routine moved to the DRAM; According to the flash memory write routine moved to the DRAM, characterized in that it further comprises the step of recording the execution program downloaded to the execution program area by byte unit.

여기서, 상기 수행 프로그램 영역을 섹터 단위로 삭제하는 단계는, 상기 플래시 메모리 삭제 루틴에 따라 수행 프로그램 영역의 섹터 삭제 명령을 내리는 단계와; 데이터 폴링 방법을 이용하여 상기 섹터 삭제가 완료되었는지를 확인하는 단계와; 섹터 삭제가 완료된 경우 다음 섹터를 선택하여 상기 수행 프로그램 영역의 마지막 섹터가 삭제되기까지 섹터 삭제를 반복하는 단계를 더 포함하는 것을 특징으로 하며, 상기 수행 프로그램 영역에 다운로드 받은 수행 프로그램을 바이트 단위로 기록하는 단계는, 상기 플래시 메모리 기록 루틴에 따라 수행 프로그램의 바이트 기록 명령을 내리는 단계와; 데이터 폴링 방법을 이용하여 상기 바이트 기록이 완료되었는지를 확인하는 단계와; 바이트 기록이 완료된 경우 바이트 단위의 다음 주소 영역을 선택하여 상기 수행 프로그램 영역의 마지막 주소가 기록되기까지 상기 수행 프로그램의 바이트 기록을 반복하는 단계를 더 포함하는 것을 특징으로 한다.The deleting of the execution program area in sector units may include: issuing a sector delete command of the execution program area according to the flash memory erasing routine; Checking whether the sector deletion is completed by using a data polling method; And if the sector deletion is completed, selecting the next sector and repeating sector deletion until the last sector of the execution program area is deleted. The execution program downloaded to the execution program area is recorded in byte units. The method may include: issuing a byte write command of an execution program according to the flash memory write routine; Checking whether the byte write is completed using a data polling method; And if the byte recording is completed, selecting the next address area in units of bytes and repeating the byte recording of the execution program until the last address of the execution program area is recorded.

이하, 본 발명에 따른 실시예를 첨부한 도면을 참조하여 상세하게 설명하면다음과 같다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

본 발명에 따른 시스템 즉, 부팅 프로그램과 갱신 가능한 수행 프로그램을 공유하는 플래시 메모리를 갖는 시스템은 첨부한 도면 도 3에 도시한 바와 같이, 모든 동작을 제어 및 처리하는 중앙처리장치(31)와, 부팅 프로그램과 수행 프로그램을 공유하기 위한 플래시 메모리(32) 및 해당 플래시 메모리(32)에 저장된 수행 프로그램을 실행하거나 해당 수행 프로그램에 대한 갱신 기능을 수행하기 위해 필요한 DRAM(33)을 구비하여 이루어진다. 즉, 별도의 부트 메모리를 사용하지 않고, 해당 플래시 메모리(32)의 일부 영역을 부팅 프로그램 영역으로 사용하게 된다.The system according to the present invention, that is, a system having a flash memory sharing an updatable execution program and a bootable program, includes a central processing unit 31 for controlling and processing all operations, as shown in FIG. A flash memory 32 for sharing a program and an execution program, and a DRAM 33 necessary for executing the execution program stored in the flash memory 32 or performing an update function for the execution program. That is, instead of using a separate boot memory, a part of the flash memory 32 is used as a boot program area.

이때, 해당 부팅 프로그램과 수행 프로그램을 공유하는 플래시 메모리(32)는 첨부한 도면 도 4에 도시한 바와 같이, 소정 갯수의 섹터(Sector)를 기준으로 부팅 프로그램 영역과 수행 프로그램 영역으로 구분된다.In this case, the flash memory 32 sharing the booting program and the execution program is divided into a booting program area and an execution program area based on a predetermined number of sectors, as shown in FIG. 4.

예를 들어, 2Mbyte의 크기를 갖는 플래시 메모리(32)의 경우 각 섹터가 64Kbyte의 크기를 갖는 총 32개의 섹터를 포함하며, 해당 섹터 '0~7'까지의 8개 섹터는 부팅 프로그램 영역으로 사용되고, 해당 섹터 '8~31'까지의 24개 섹터는 수행 프로그램 영역으로 사용된다.For example, in the case of the flash memory 32 having a size of 2 Mbyte, each sector includes a total of 32 sectors having a size of 64 Kbyte, and eight sectors up to the corresponding sector '0 to 7' are used as the booting program areas. The 24 sectors of the sectors '8 to 31' are used as execution program areas.

이때, 해당 플래시 메모리에 대한 어드레스 맵(Address Map)은 16진수 '0x20000000'으로 시작하는 번지를 갖게 된다.At this time, the address map for the flash memory has a address starting with hexadecimal '0x20000000'.

한편, 해당 부팅 프로그램 영역은 부팅 및 진단 프로그램을 포함하되, 갱신될 수행 프로그램을 다운로드 받는 부분과, 다운로드 받은 수행 프로그램을 플래시 메모리(32)에 기록하는 플래시 액세스 함수를 호출(Function Call)하는 부분과, 어셈블리 코드로 프로그램된 플래시 액세스 함수(Flash Access Function)와, 실제 DRAM(33)으로 이동되어 플래시 메모리 삭제 및 기록 루틴을 수행하는 부분으로 구성된다.Meanwhile, the booting program area includes a booting and diagnostic program, and includes a part for downloading an execution program to be updated, a part for calling a flash access function that records the downloaded execution program in the flash memory 32, and , A flash access function programmed with assembly code, and a portion which is moved to the actual DRAM 33 to perform a flash memory erase and write routine.

이와 같이 구성된 본 발명에 따른 시스템에서 플래시 메모리 갱신 방법 즉, 부팅 프로그램 영역과 갱신 가능한 수행 프로그램 영역으로 분할하여 사용하는 방법을 설명하면 다음과 같은데, 본 발명에서는 부팅 프로그램과 수행 프로그램을 하나의 플래시 메모리(32)에 공유할 때 발생될 수 있는 문제점의 해결 방안과, 해당 부팅 프로그램을 저장하기 위한 별도의 부트 메모리를 사용하지 않음에 따라 PCB(Printed Circuit Board)의 크기를 줄여서 시스템 가격을 낮춤과 동시에 시스템 크기를 줄이는 부분에 중점을 두고 설명하기로 한다.A flash memory update method, that is, a method of dividing and using a bootable program area and an updateable execution program area in a system according to the present invention configured as described above is as follows. The solution to the problems that may occur when sharing to (32) and the size of the printed circuit board (PCB) by reducing the size of the printed circuit board (PCB) by not using a separate boot memory to store the boot program, The discussion focuses on reducing system size.

해당 시스템의 양산 시점이나 그 이후에 수행 프로그램 갱신시 외부 시스템으로부터 다운로드 받은 수행 프로그램을 플래시 메모리(32)에 직접 기록할 수 없고, 해당 플래시 메모리(32)에 기저장된 수행 프로그램에 대한 삭제를 선행해야 하는데, 이는 해당 플래시 메모리(32)를 삭제 및 기록하는 루틴이 플래시 메모리(32)의 부팅 프로그램 영역에 존재하기 때문에 중앙처리장치(31)에서 삭제 명령을 플래시 메모리(32)에 내린 이후에는 해당 플래시 메모리(32)의 부팅 프로그램 영역에서 다음 명령을 수행하기 위한 코드를 판독할 수 없기 때문이다.When the execution program is updated at the time of mass production of the system or later, the execution program downloaded from the external system cannot be directly recorded in the flash memory 32, and the deletion of the execution program previously stored in the flash memory 32 must be preceded. This is because the routine for deleting and writing the corresponding flash memory 32 exists in the boot program area of the flash memory 32, and after the CPU 31 issues the delete command to the flash memory 32, This is because the code for performing the next command cannot be read in the boot program area of the memory 32.

또한, 플래시 메모리(32)에 기저장된 수행 프로그램 삭제를 수행한 이후에 다운로드 받은 수행 프로그램을 해당 플래시 메모리(32)에 실제로 기록하는 경우에도 상술한 이유 때문에 명령을 수행할 수 없게 된다.In addition, even when the downloaded execution program is actually recorded in the flash memory 32 after the execution program previously stored in the flash memory 32 is deleted, the command cannot be executed.

따라서, 본 발명에 따른 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리(32)의 수행 프로그램을 갱신하기 위해서는 해당 플래시 메모리(32)의 부팅 프로그램에 존재하는 플래시 메모리 삭제 및 기록 루틴을 DRAM(33)으로 이동시켜 해당되는 플래시 메모리(32)의 수행 프로그램 삭제 및 기록 동작을 수행하게 되는데, 먼저, 해당 시스템에서 플래시 메모리(32)에 저장된 수행 프로그램 삭제 동작을 첨부한 도면 도 5를 참조하여 설명하면 다음과 같다.Therefore, in order to update the execution program of the flash memory 32 sharing the booting and execution program in the system according to the present invention, the DRAM 33 deletes and writes the flash memory erasing and writing routine existing in the boot program of the flash memory 32. The execution program deleting and writing operations of the corresponding flash memory 32 are performed by moving to. First, the execution program deleting operation stored in the flash memory 32 in the corresponding system will be described with reference to FIG. 5. Same as

해당 시스템의 중앙처리장치(31)는 외부 시스템으로부터 갱신될 수행 프로그램을 다운로드 받게 되면(스텝 S51), 이를 플래시 메모리(32)에 기록하기 위해 기저장된 수행 프로그램을 삭제하게 되는데, 이를 위해 먼저, 플래시 메모리(32)의 수행 프로그램 삭제가 종료되는 경우에 해당 중앙처리장치(31)의 링크 포인터가 본래의 부팅 프로그램 영역으로 복귀(Return)될 주소를 스택에 저장한 후(스텝 S52), 해당 플래시 메모리(32)의 부팅 프로그램 영역에 존재하는 플래시 메모리 삭제 루틴을 DRAM(33)으로 이동시키게 된다(스텝 S53).When the central processing unit 31 of the corresponding system receives the execution program to be updated from the external system (step S51), it deletes the execution program stored in advance in order to record it in the flash memory 32. When the deletion of the execution program of the memory 32 ends, the link pointer of the central processing unit 31 stores the address to be returned to the original boot program area on the stack (step S52), and then the flash memory. The flash memory erasing routine existing in the boot program area of 32 is moved to the DRAM 33 (step S53).

그리고, 다음 명령을 DRAM(33)에서 판독하여 수행할 수 있도록 해당 중앙처리장치(31)의 링크 포인터를 현재의 플래시 메모리(32)에서 DRAM(33)의 플래시 메모리 삭제 루틴의 시작번지로 이동시키게 된다(스텝 S54).Then, the link pointer of the central processing unit 31 is moved from the current flash memory 32 to the start address of the flash memory erase routine of the DRAM 33 so that the next command can be read and executed by the DRAM 33. (Step S54).

이때, 해당 중앙처리장치(31)의 링크 포인터를 이동시키기 위해서는 해당 링크 포인터를 일시 저장하는 스택을 제어해야 하므로, C 언어에서는 구현이 어려워 어셈블리 코드를 이용해서 코딩한다.At this time, in order to move the link pointer of the CPU 31, the stack for temporarily storing the link pointer must be controlled. Therefore, in the C language, implementation is difficult, and coding is performed using assembly code.

그리고, 해당 플래시 메모리 삭제를 수행하기 전에 중앙처리장치(31)의 모든인터럽트를 디스에이블(Disable)시키게 되는데, 그 이유는 해당 플래시 메모리 삭제 명령이 내려진 이후에 중앙처리장치(31)로 인터럽트가 발생하게 되면, 해당 중앙처리장치(31)는 인터럽트에 대한 서비스를 수행하기 위해 부팅 프로그램 영역의 인터럽트 벡터 테이블(Interrupt Vector Table)을 판독하려고 잘못된 명령을 수행하기 때문이다. 즉, 해당 플래시 메모리 삭제 명령이 내려진 이후에는 데이터 폴링(Data Polling) 이외에는 판독 명령을 수행할 수 없기 때문이다.Then, all interrupts of the central processing unit 31 are disabled before the flash memory deletion is performed. The reason for this is that an interrupt is generated to the central processing unit 31 after the corresponding flash memory deletion command is issued. This is because the CPU 31 performs an incorrect command to read the interrupt vector table of the booting program area in order to service the interrupt. That is, after the corresponding flash memory erase command is issued, the read command cannot be performed except for data polling.

여기서, 데이터 폴링이란 플래시 메모리 삭제 또는 기록 명령 이후에 해당되는 삭제 또는 기록의 완료 여부를 나타내는 특정 데이터 비트를 판독하여 해당 플래시 메모리 삭제 또는 기록의 완료 여부를 판단하는 방법을 의미한다.Here, data polling refers to a method of determining whether the corresponding flash memory is erased or written by reading a specific data bit indicating whether the corresponding erase or write is completed after the flash memory erase or write command.

한편, 스텝 S54에서 해당 중앙처리장치(31)의 링크 포인터를 DRAM(33)으로 이동된 플래시 메모리 삭제 루틴의 시작번지로 이동시킴에 따라 해당 플래시 메모리 삭제 루틴은 DRAM(33)에서 수행하게 된다.On the other hand, as the link pointer of the central processing unit 31 is moved to the start address of the flash memory erasing routine moved to the DRAM 33 in step S54, the flash memory erasing routine is performed by the DRAM 33.

따라서, 해당 플래시 메모리(32)의 부팅 프로그램 영역을 보호한 상태에서 해당 중앙처리장치(31)는 플래시 메모리 삭제 루틴에 따라 수행 프로그램 영역의 섹터 삭제 명령을 내린 후(스텝 S55), 데이터 폴링 방법을 이용하여 해당 섹터 삭제가 완료되었는지를 주기적으로 확인하게 된다(스텝 S56, S57).Therefore, in the state where the boot program area of the flash memory 32 is protected, the CPU 31 issues a sector delete command of the execution program area according to the flash memory erase routine (step S55), and then executes the data polling method. It periodically checks whether or not the corresponding sector deletion is completed (steps S56 and S57).

이때, 해당 섹터 삭제가 완료된 경우 해당 중앙처리장치(31)는 플래시 메모리(32)의 수행 프로그램 영역에 포함되는 모든 섹터에 대한 삭제가 완료되었는지 즉, 현재 삭제된 섹터가 수행 프로그램 영역의 마지막 섹터인지를 확인하게 되는데(스텝 S58), 만약, 현재 삭제된 섹터가 수행 프로그램 영역의 마지막 섹터가아닌 경우 해당 섹터 번호를 '1'증가시켜 다음 섹터를 선택한 후(스텝 S59), 해당되는 섹터 삭제 명령을 내리는 스텝 S55로 귀환하여 반복 동작을 수행함으로써, 해당 플래시 메모리(32)의 수행 프로그램 영역에 포함되는 모든 섹터를 차례로 삭제할 수 있게 된다.At this time, when the sector deletion is completed, the CPU 31 determines whether the deletion of all sectors included in the execution program area of the flash memory 32 is completed, that is, whether the currently deleted sector is the last sector of the execution program area. (Step S58), if the currently deleted sector is not the last sector in the execution program area, the sector number is increased by '1' to select the next sector (step S59), and the corresponding sector delete command is executed. By returning to step S55 to perform the repetitive operation, all sectors included in the execution program area of the flash memory 32 can be deleted in sequence.

한편, 스텝 S58에서 현재 삭제된 섹터가 수행 프로그램 영역의 마지막 섹터인 경우 즉, 해당 플래시 메모리(32)의 수행 프로그램 영역에 포함되는 모든 섹터를 삭제한 경우 해당 DRAM(33)에서의 플래시 메모리 삭제 루틴이 종료되고, 해당 중앙처리장치(31)의 링크 포인터는 본래의 부팅 프로그램 영역으로 복귀하게 된다(스텝 S60).On the other hand, when the sector currently deleted in step S58 is the last sector of the execution program area, that is, when all sectors included in the execution program area of the flash memory 32 are deleted, the flash memory erasing routine in the DRAM 33 is performed. Then, the link pointer of the central processing unit 31 returns to the original boot program area (step S60).

상술한 동작에 의해 플래시 메모리(32)의 수행 프로그램 삭제 동작이 완료되면, 해당 중앙처리장치(31)는 다운로드 받은 수행 프로그램을 해당 플래시 메모리(32)에 바이트 단위로 기록하게 되는데, 해당 플래시 메모리(32)의 수행 프로그램 기록 동작을 첨부한 도면 도 6을 참조하여 상세하게 설명하면 다음과 같다.When the execution program deleting operation of the flash memory 32 is completed by the above-described operation, the CPU 31 writes the downloaded execution program to the corresponding flash memory 32 in byte units. The execution program recording operation of 32) will be described in detail with reference to FIG. 6 as follows.

해당 시스템의 중앙처리장치(31)는 플래시 메모리(32)의 수행 프로그램 삭제가 완료된 후, 먼저, 외부 시스템으로부터 다운로드 받은 수행 프로그램을 플래시 메모리(32)에 바이트 단위로 기록하는 플래시 메모리 기록 루틴이 종료되는 경우에 해당 중앙처리장치(31)의 링크 포인터가 본래의 부팅 프로그램 영역으로 복귀(Return)될 주소를 스택에 저장한 후(스텝 S61), 해당 플래시 메모리(32)의 부팅 프로그램 영역에 존재하는 플래시 메모리 기록 루틴을 DRAM(33)으로 이동시키게 된다(스텝 S62).After the CPU 31 deletes the execution program of the flash memory 32, the flash memory writing routine for writing the execution program downloaded from the external system to the flash memory 32 in byte units ends. If the link pointer of the central processing unit 31 stores the address to be returned to the original boot program area on the stack (step S61), the link pointer of the central processing unit 31 exists in the boot program area of the corresponding flash memory 32. The flash memory writing routine is moved to the DRAM 33 (step S62).

그리고, 다음 명령을 DRAM(33)에서 판독하여 수행할 수 있도록 해당 중앙처리장치(31)의 링크 포인터를 현재의 플래시 메모리(32)에서 DRAM(33)의 플래시 메모리 기록 루틴의 시작번지로 이동시키게 된다(스텝 S63).Then, the link pointer of the central processing unit 31 is moved from the current flash memory 32 to the start address of the flash memory write routine of the DRAM 33 so that the next command can be read and executed by the DRAM 33. (Step S63).

이후, 해당 플래시 메모리 기록을 수행하기 전에 중앙처리장치(31)의 모든 인터럽트를 디스에이블시켜 해당 플래시 메모리 기록 명령이 내려진 이후에는 데이터 폴링 이외에는 판독 명령을 수행할 수 없도록 한다.After that, all interrupts of the central processing unit 31 are disabled before performing the flash memory write so that the read command cannot be performed except for data polling after the flash memory write command is issued.

한편, 스텝 S63에서 해당 중앙처리장치(31)의 링크 포인터를 DRAM(33)으로 이동된 플래시 메모리 기록 루틴의 시작번지로 이동시킴에 따라 해당 플래시 메모리 기록 루틴은 DRAM(33)에서 수행하게 된다.On the other hand, as the link pointer of the central processing unit 31 is moved to the start address of the flash memory write routine moved to the DRAM 33 in step S63, the flash memory write routine is executed by the DRAM 33.

따라서, 해당 플래시 메모리(32)의 부팅 프로그램 영역을 보호한 상태에서 해당 중앙처리장치(31)는 플래시 메모리 기록 루틴에 따라 다운로드 받은 수행 프로그램을 바이트 단위로 기록하기 위해 바이트 기록 명령을 내린 후(스텝 S64), 데이터 폴링 방법을 이용하여 해당 바이트 기록이 완료되었는지를 주기적으로 확인하게 된다(스텝 S65, S66).Therefore, in a state in which the boot program area of the flash memory 32 is protected, the CPU 31 issues a byte write command to write the downloaded program in bytes according to the flash memory write routine (step). In step S64), it is periodically checked whether the corresponding byte recording is completed by using the data polling method (steps S65 and S66).

이때, 해당 바이트 기록이 완료된 경우 해당 중앙처리장치(31)는 플래시 메모리(32)의 수행 프로그램 영역 크기에 해당되는 모든 바이트 기록이 완료되었는지, 즉, 현재 바이트 기록된 주소가 수행 프로그램 영역의 마지막 주소인지를 확인하게 되는데(스텝 S67), 만약, 현재 바이트 기록된 주소가 수행 프로그램 영역의 마지막 주소가 아닌 경우 해당 바이트 단위의 주소값을 '1'증가시켜 다음 주소 영역을 선택한 후(스텝 S68), 해당되는 바이트 기록 명령을 내리는 스텝 S64로 귀환하여 반복 동작을 수행함으로써, 해당 플래시 메모리(32)에 다운로드 받은 수행 프로그램을 바이트 단위로 차례로 기록하여 갱신할 수 있게 된다.At this time, when the byte recording is completed, the CPU 31 checks whether all the byte recording corresponding to the size of the execution program area of the flash memory 32 have been completed, that is, the address where the current byte is written is the last address of the execution program area. If the address written in the current byte is not the last address of the execution program area, the address value of the corresponding byte unit is increased by '1' to select the next address area (step S68). By performing a repetitive operation by returning to step S64 for giving a corresponding byte write command, the execution program downloaded to the flash memory 32 can be sequentially recorded and updated in byte units.

한편, 스텝 S67에서 현재 바이트 기록된 주소가 수행 프로그램 영역의 마지막 주소인 경우 즉, 해당 플래시 메모리(32)의 수행 프로그램 영역 크기에 해당되는 모든 바이트 기록이 완료된 경우 해당 DRAM(33)에서의 플래시 메모리 기록 루틴이 종료되고, 해당 중앙처리장치(31)의 링크 포인터는 본래의 부팅 프로그램 영역으로 복귀됨으로써(스텝 S69), 해당 시스템을 재부팅시켜 갱신된 수행 프로그램을 실행할 수 있게 된다.On the other hand, when the address written in the current byte in step S67 is the last address of the execution program area, that is, when all the byte writing corresponding to the execution program area size of the corresponding flash memory 32 is completed, the flash memory in the DRAM 33 is completed. The recording routine is terminated, and the link pointer of the central processing unit 31 returns to the original boot program area (step S69), whereby the system can be rebooted to execute the updated execution program.

본 발명의 다른 실시예에 따른 라우터는 첨부한 도면 도 7에 도시한 바와 같이, 모든 동작을 제어 및 처리하는 중앙처리장치(71)와, 부팅 및 수행 프로그램을 공유하는 플래시 메모리(72)와, 중앙처리장치(71)에서 각종 프로토콜을 수행하기 위한 셋업 정보와 통계 정보 및 라우터 대한 구성 정보를 저장하는 구성 메모리(73)와, 구동 전원을 공급하는 전원 공급부(74)와, PC(Personal Computer) 등의 모니터에 연결되어 사용자나 관리자에게 필요한 메시지 및 관리 정보를 표시해 주는 콘솔부(75)와, LAN(Local Area Network)에 접속되어 데이터를 송수신하는 LAN 인터페이스부(76)와, 외부 통신망과 접속되어 데이터를 송수신하는 WAN(Wide Area Network) 인터페이스부(77)와, 기타 필요한 입력 및 출력 기능이 필요한 경우에 사용되는 입출력 인터페이스부(78)와, 플래시 메모리(72)에 저장된 수행 프로그램을 실행하고, 각 인터페이스부(76~78)를 통해 수신되는 데이터를 임시 저장하기 위한 DRAM(79)을 구비하여 이루어진다.As shown in FIG. 7, a router according to another embodiment of the present invention includes a central processing unit 71 for controlling and processing all operations, a flash memory 72 sharing a booting and executing program, A configuration memory 73 for storing setup information, statistical information, and configuration information for a router for performing various protocols in the central processing unit 71, a power supply unit 74 for supplying driving power, and a personal computer (PC). A console unit 75 connected to a monitor such as a display unit for displaying messages and management information required by a user or an administrator, a LAN interface unit 76 connected to a local area network (LAN) to transmit and receive data, and an external communication network. Wide area network (WAN) interface unit 77 for transmitting and receiving data, input / output interface unit 78 used when other necessary input and output functions are required, and flash memory 72. Executing a program operation, and is achieved by having the DRAM (79) for temporarily storing data received via a respective interface unit (76 ~ 78).

여기서, 해당 플래시 메모리(72)가 2Mbyte의 크기를 갖는 경우 해당 플래시 메모리(72)에 대한 어드레스 맵(Address Map)은 아래 표 1에 설명한 디바이스(Device)와 메모리 액세스를 위한 어드레스 맵과 같이, 16진수 '0x20000000'으로 시작하는 번지를 갖게 되고, 각각 64Kbyte의 크기를 갖는 총 32개의 섹터를 포함하며, 해당 섹터 '0~7'까지의 8개 섹터는 부팅 프로그램 영역으로 사용되고, 해당 섹터 '8~31'까지의 24개 섹터는 수행 프로그램 영역으로 사용된다.In this case, when the flash memory 72 has a size of 2 Mbytes, the address map for the flash memory 72 may be 16 as shown in Table 1 below. It has address starting with '0x20000000' and contains 32 sectors each with 64Kbyte size, 8 sectors up to sector '0 ~ 7' are used as boot program area, and sector '8 ~' 24 sectors up to 31 'are used as the execution program area.

시작 번지Start address 디바이스device 설 명Explanation 0x000000000x00000000 DRAMDRAM 수행 프로그램 실행용For running executable programs 0x100000000x10000000 구성 메모리Configuration memory 구성 및 통계 정보 저장용For storing configuration and statistical information 0x200000000x20000000 플래시 메모리Flash memory 부팅 프로그램 및 수행 프로그램 저장용For storing boot and executable programs 0x900000000x90000000 시스템 식별자System identifier 시스템 및 보드에 대한 정보 저장용For storing information about the system and board 예약(Reserved)Reserved 예약(Reserved)Reserved 예약(Reserved)Reserved

또한, 해당 플래시 메모리(72)의 부팅 프로그램 영역 내부에는 부팅 및 진단 프로그램과, 각 인터페이스부를 활성화시켜 수행 프로그램을 다운로드 받는 부분과, 다운로드 이후에 플래시 메모리에 기록하기 위한 플래시 액세스 함수를 호출하는 부분과, 어셈블리 코드로 프로그램된 플래시 액세스 함수와, 실제 DRAM으로 이동되어 플래시 메모리 삭제 및 기록 루틴을 수행하는 부분으로 구성된다.In addition, the boot program area of the flash memory 72 includes a booting and diagnostic program, a part for activating each interface unit to download an execution program, and a part for calling a flash access function for writing to the flash memory after downloading. A flash access function programmed in assembly code, and a portion which is moved to a real DRAM to perform flash memory erase and write routines.

한편, 해당 라우터는 수행 프로그램 갱신시 LAN 인터페이스부(76)나 WAN 인터페이스부(77)를 통해 해당 수행 프로그램을 다운로드 받게 되고, 이후에 해당 수행 프로그램을 갱신하기 위한 플래시 메모리(72)의 수행 프로그램 삭제 및 기록 동작은 상술한 동작과 동일한 방법으로 수행된다.On the other hand, the router receives the execution program through the LAN interface unit 76 or the WAN interface unit 77 when the execution program is updated, and subsequently deletes the execution program of the flash memory 72 for updating the execution program. And the recording operation is performed in the same manner as the above-described operation.

여기서, 해당 플래시 메모리(72)의 수행 프로그램 삭제시 해당 플래시 메모리(72)의 부팅 프로그램이 저장된 섹터 '0~7'까지는 보호한 상태에서 섹터 '8~31'까지 삭제하고, 다운로드 받은 수행 프로그램을 바이트 단위로 해당 플래시 메모리(72)에 기록하기 위해 해당 플래시 메모리 삭제 및 기록 동작은 DRAM(79)에서 수행하게 된다.In this case, when the execution program of the flash memory 72 is deleted, the sectors 0 to 7 stored in the boot program of the flash memory 72 are deleted to the sectors 8 to 31 in a protected state, and the downloaded execution program is deleted. The flash memory erase and write operations are performed by the DRAM 79 to write to the flash memory 72 in units of bytes.

또한, 본 발명에 따른 실시예는 상술한 것으로 한정되지 않고, 본 발명과 관련하여 통상의 지식을 가진자에게 자명한 범위내에서 여러 가지의 대안, 수정 및 변경하여 실시할 수 있다.In addition, the embodiments according to the present invention are not limited to the above-described embodiments, and various alternatives, modifications, and changes can be made within the scope apparent to those skilled in the art.

이상과 같이, 본 발명은 부팅 프로그램을 저장하기 위한 별도의 부트 메모리를 사용하지 않고, 해당 부팅 프로그램을 수행 프로그램이 저장되는 플래시 메모리에 공유하도록 해당 플래시 메모리를 분할 사용함으로써, 메모리 칩 숫자를 줄여 시스템의 크기를 줄일 수 있게 됨과 동시에 시스템 가격을 인하할 수 있게 되고, 이로 인해 해당 시스템의 외형도 수려하게 설계할 수 있게 된다.As described above, the present invention does not use a separate boot memory for storing a boot program, and divides the flash memory so that the boot program is shared with the flash memory where the execution program is stored, thereby reducing the number of memory chips. The size of the system can be reduced and the price of the system can be lowered, thereby allowing the design of the system to be beautifully designed.

또한, 본 발명은 부팅 프로그램과 수행 프로그램을 공유하는 플래시 메모리의 수행 프로그램 갱신시 부팅 프로그램 영역에 존재하는 플래시 메모리 삭제 및 기록 루틴을 DRAM으로 이동시켜 수행함으로써, 해당 부팅 프로그램을 보호한 상태에서 수행 프로그램만을 갱신할 수 있게 된다.In addition, the present invention is performed by moving the flash memory erase and write routines present in the boot program area to the DRAM when updating the execution program of the flash memory sharing the boot program and the execution program to the DRAM, thereby protecting the execution program in the state of protecting the boot program Only update is possible.

Claims (7)

소정 갯수의 섹터를 기준으로 부팅 및 진단 프로그램을 저장하기 위한 부팅 프로그램 영역과 갱신 가능한 수행 프로그램 영역으로 구분하되, 상기 부팅 프로그램 영역은 갱신될 수행 프로그램을 다운로드 받는 부분과, 다운로드 받은 수행 프로그램을 기록하는 플래시 액세스 함수를 호출하는 부분과, 어셈블리 코드로 프로그램된 플래시 액세스 함수와, DRAM으로 이동되어 플래시 메모리 삭제 및 기록 루틴을 수행하는 부분을 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리.Based on a predetermined number of sectors, a booting program area for storing booting and diagnostic programs and an updateable execution program area are divided, and the booting program area records a part for downloading the execution program to be updated and a downloaded execution program. A flash sharing function, comprising: calling a flash access function; a flash access function programmed in assembly code; and a part moved to DRAM to perform flash memory erase and write routines. Memory. 외부 시스템으로부터 갱신될 수행 프로그램을 다운로드 받는 과정과; 어셈블리 코드를 이용하여 플래시 메모리의 부팅 프로그램 영역에 존재하는 플래시 메모리 삭제 및 기록 루틴을 DRAM으로 이동시키는 과정과; 상기 DRAM으로 이동된 플래시 메모리 삭제 및 기록 루틴에 따라 상기 플래시 메모리의 수행 프로그램 영역에 대한 삭제 및 기록을 수행하여 해당되는 수행 프로그램을 갱신하는 과정을 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 갱신 방법.Downloading a performance program to be updated from an external system; Moving the flash memory erase and write routines existing in the boot program area of the flash memory to the DRAM using the assembly code; Booting and executing a program in the system, wherein the erase and write operation is performed on the execution program area of the flash memory and the corresponding execution program is updated according to the flash memory erase and write routine moved to the DRAM. How to update a shared flash memory. 제 2항에 있어서,The method of claim 2, 상기 플래시 메모리 삭제 및 기록 루틴을 DRAM으로 이동시키기 전에 수행 프로그램 삭제 및 기록후에 링크 포인터가 부팅 프로그램 영역으로 복귀될 주소를 저장하는 과정을 더 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 갱신 방법.And storing the address where the link pointer is returned to the boot program area after deleting and writing the execution program before moving the flash memory deletion and writing routine to the DRAM. How to update flash memory. 제 2항에 있어서,The method of claim 2, 상기 DRAM으로 이동된 플래시 메모리 삭제 및 기록 루틴에 따라 해당되는 수행 프로그램을 갱신하기 위해 링크 포인터를 상기 DRAM으로 이동된 플래시 메모리 삭제 및 기록 루틴의 시작번지로 이동시키는 과정과; 상기 수행 프로그램을 갱신한 후에 상기 부팅 프로그램 영역으로 링크 포인터를 복귀시키는 과정을 더 포함하는 것을 특징으로 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 갱신 방법.Moving a link pointer to a start address of a flash memory erase and write routine moved to the DRAM to update a corresponding execution program according to the flash memory erase and write routine moved to the DRAM; And returning a link pointer to the booting program area after updating the execution program. 제 2항에 있어서,The method of claim 2, 상기 플래시 메모리의 수행 프로그램을 갱신하는 과정은, 상기 DRAM으로 이동된 플래시 메모리 삭제 루틴에 따라 상기 수행 프로그램 영역을 섹터 단위로 삭제하는 단계와; 상기 DRAM으로 이동된 플래시 메모리 기록 루틴에 따라 상기 수행프로그램 영역에 다운로드 받은 수행 프로그램을 바이트 단위로 기록하는 단계를 더 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 갱신 방법.The updating of the execution program of the flash memory may include deleting the execution program area in sector units according to a flash memory erase routine moved to the DRAM; And writing a downloaded execution program in the unit of byte in the execution program area according to a flash memory write routine moved to the DRAM in a unit of byte. 제 5항에 있어서,The method of claim 5, 상기 수행 프로그램 영역을 섹터 단위로 삭제하는 단계는, 상기 플래시 메모리 삭제 루틴에 따라 수행 프로그램 영역의 섹터 삭제 명령을 내리는 단계와; 데이터 폴링 방법을 이용하여 상기 섹터 삭제가 완료되었는지를 확인하는 단계와; 섹터 삭제가 완료된 경우 다음 섹터를 선택하여 상기 수행 프로그램 영역의 마지막 섹터가 삭제되기까지 섹터 삭제를 반복하는 단계를 더 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 갱신 방법.The deleting of the execution program area by sector may include: issuing a sector delete command of the execution program area according to the flash memory erasing routine; Checking whether the sector deletion is completed by using a data polling method; And if the sector deletion is completed, selecting a next sector and repeating sector deletion until the last sector of the execution program area is deleted. 제 5항에 있어서,The method of claim 5, 상기 수행 프로그램 영역에 다운로드 받은 수행 프로그램을 바이트 단위로 기록하는 단계는, 상기 플래시 메모리 기록 루틴에 따라 수행 프로그램의 바이트 기록 명령을 내리는 단계와; 데이터 폴링 방법을 이용하여 상기 바이트 기록이 완료되었는지를 확인하는 단계와; 바이트 기록이 완료된 경우 바이트 단위의 다음 주소 영역을 선택하여 상기 수행 프로그램 영역의 마지막 주소가 기록되기까지 상기수행 프로그램의 바이트 기록을 반복하는 단계를 더 포함하는 것을 특징으로 하는 시스템에서 부팅 및 수행 프로그램을 공유하는 플래시 메모리 갱신 방법.The recording of the execution program downloaded in the execution area by the byte unit may include: issuing a byte write command of the execution program according to the flash memory write routine; Checking whether the byte write is completed using a data polling method; Selecting a next address area in bytes and repeating the byte recording of the execution program until the last address of the execution program area is recorded when the byte recording is completed. How to update a shared flash memory.
KR1019990057536A 1999-12-14 1999-12-14 Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory KR100316584B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019990057536A KR100316584B1 (en) 1999-12-14 1999-12-14 Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019990057536A KR100316584B1 (en) 1999-12-14 1999-12-14 Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory

Publications (2)

Publication Number Publication Date
KR20010056103A KR20010056103A (en) 2001-07-04
KR100316584B1 true KR100316584B1 (en) 2001-12-12

Family

ID=19625708

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019990057536A KR100316584B1 (en) 1999-12-14 1999-12-14 Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory

Country Status (1)

Country Link
KR (1) KR100316584B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100572668B1 (en) * 2004-06-11 2006-04-24 에스케이 텔레콤주식회사 Method for storing mobile commerce application on a terminal memory
KR100634436B1 (en) 2004-09-23 2006-10-16 삼성전자주식회사 Multi chip system and its boot code fetch method
KR101987144B1 (en) 2012-10-10 2019-06-11 삼성전자주식회사 Main memory system storing Operating System program and computer system including the same
CN117170753B (en) * 2023-08-18 2024-04-09 新汽有限公司 Program processing method, program processing device, vehicle, and storage medium

Also Published As

Publication number Publication date
KR20010056103A (en) 2001-07-04

Similar Documents

Publication Publication Date Title
US6148441A (en) Method for reprogramming flash ROM in a personal computer implementing an EISA bus system
US5933846A (en) Rewritable ROM file device having read/write buffer access control via copy of rewritable area
US7089549B2 (en) Updating flash memory
JP4668416B2 (en) Protecting boot block code when enabling write access to the boot block
US5802549A (en) Method and apparatus for patching pages of ROM
US5479639A (en) Computer system with a paged non-volatile memory
KR100388949B1 (en) Flash Memory Partitioning for Read-While-Write Operation
US6745278B2 (en) Computer capable of rewriting an area of a non-volatile memory with a boot program during self mode operation of the computer
JPH03141447A (en) Method and apparatus for updating farm ware residing in electrically reloadable programmable read-only memory
US6009500A (en) Replacement of erroneous firmware in a redundant non-volatile memory system
US20040039872A1 (en) Control system and method for rewriting data in a flash memory and a data storage medium in which a program is stored for rewriting data in a flash memory
KR101555210B1 (en) Apparatus and method for downloadin contents using movinand in portable terminal
KR20010006749A (en) Storing system-level mass storage configuration data in non-volatile memory on each mass storage device to allow for reboot/power-on reconfiguration of all installed mass storage devices to the same configuration as last use
JP2002099441A (en) Communication terminal apparatus and its operating method
US5940627A (en) User selectable feature set for a flash ROM based peripheral
JP2000293367A (en) Nonvolatile-memory built-in microcomputer
KR100316584B1 (en) Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory
US5956480A (en) Terminal and online system for tracking version of data and program
KR100223844B1 (en) Option circuit
MXPA02002529A (en) Entertainment device, data processing device and portable storage device.
JPH113287A (en) Storage device and storage area management method used for the device
US6301709B1 (en) Circuit pack system with semi-or fully-automatic upgrade capability
KR20000033437A (en) Apparatus for implementing function of bootstrap loader
KR100622816B1 (en) System software update method and system in mobile terminal
KR100308251B1 (en) Integrated management method of runtime backup information and its system

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20081031

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee