JP2000305771A - Method for loading software to microcomputer incorporating nonvolatile memory - Google Patents

Method for loading software to microcomputer incorporating nonvolatile memory

Info

Publication number
JP2000305771A
JP2000305771A JP11110752A JP11075299A JP2000305771A JP 2000305771 A JP2000305771 A JP 2000305771A JP 11110752 A JP11110752 A JP 11110752A JP 11075299 A JP11075299 A JP 11075299A JP 2000305771 A JP2000305771 A JP 2000305771A
Authority
JP
Japan
Prior art keywords
program
loader program
microcomputer
code
loader
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP11110752A
Other languages
Japanese (ja)
Inventor
Shoji Nagata
昭二 永田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP11110752A priority Critical patent/JP2000305771A/en
Publication of JP2000305771A publication Critical patent/JP2000305771A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To reduce the size of a loader program by loading an application program by means of the execution of the second loader program after loading the second loader program by means of the execution of the first loader program. SOLUTION: The first loader program receives the code of the second loader program from a host side after the initialization setting processing of a register or the like in a microcomputer and the initialization setting processing of a communication device and stores the code in an external SRAM 106. A host side computer 101 reads the code of the second loader program from a hard disk 102 after the initialization processing of a communication interface 103 and transmits it to the side of the microcomputer. A microcomputer side receives the code of the application program from the host side computer 101 and stores it in a flash memory 105 incorporated in the microcomputer. Then the host side transmits the code of the application program to the microcomputer side by linkage.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、プログラムのダウ
ンロード方法に関し、特に不揮発性メモリ内蔵マイコン
へのソフトウェアローディング方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of downloading a program, and more particularly, to a method of loading software into a microcomputer with built-in nonvolatile memory.

【0002】[0002]

【従来の技術】従来のフラッシュメモリなどの不揮発性
メモリ内蔵マイコンにおけるソフトウェアダウンロード
方法は、特平6−44064号公報に記載のように、フ
ラッシュメモリに書き込むアプリケーションプログラム
のコードを一時的にSRAMに格納し、フラッシュメモ
リを一括消去した後、SRAM内のコードをフラッシュ
メモリへ移して格納するものである。
2. Description of the Related Art A conventional software download method for a microcomputer with a built-in nonvolatile memory such as a flash memory is disclosed in Japanese Patent Application Laid-Open No. 6-44064, in which an application program code to be written to a flash memory is temporarily stored in an SRAM. Then, after the flash memory is collectively erased, the code in the SRAM is moved to the flash memory and stored.

【0003】[0003]

【発明が解決しようとする課題】しかしながら前記のソ
フトウェアローディング方法は、アプリケーションプロ
グラムのコードをSRAMに格納し、フラッシュメモリ
を一括消去の後、SRAM内のコードをフラッシュメモ
リに格納する一連の処理手順(ローダープログラム)を
外部ROMに格納しておくよう構成するものであった。
近年、フラッシュメモリを内蔵するマイコンが普及し、
このような外部ROMにローダープログラムを格納する
構成に代えて、フラッシュメモリの特定のブロックをロ
ーダープログラム格納のため確保する構成が用いられる
ようになったが、そのためにアプリケーションプログラ
ムを格納するサイズが大きく減少してしまうという問題
があった。
However, the above-mentioned software loading method stores a code of an application program in an SRAM, erases the flash memory at a time, and then stores the code in the SRAM in the flash memory. Loader program) is stored in an external ROM.
In recent years, microcomputers with built-in flash memory have become widespread,
Instead of storing the loader program in the external ROM, a configuration in which a specific block of the flash memory is reserved for storing the loader program has been used, but the size of storing the application program is large. There was a problem that it would decrease.

【0004】従って本発明は上記問題点に鑑み、その目
的はローダープログラムのサイズを小さく構成せしめる
ローディング方法を提供するものである。
Accordingly, the present invention has been made in view of the above problems, and has as its object to provide a loading method for reducing the size of a loader program.

【0005】[0005]

【課題を解決するための手段】前記の目的を達成するた
め、本発明は、ローダープログラムはアプリケーション
プログラムのコードをフラッシュメモリに書き込むプロ
グラム(第二のローダープログラム)と、該第二のロー
ダープログラムのコードをフラッシュメモリ内蔵マイコ
ンに内蔵されるRAMもしくは外部のRAMへローディ
ングするプログラム(第一のローダープログラム)とを
備え、前記第一のローダープログラムによる第二のロー
ダープログラムのローディングの後に、第二のローダー
プログラムによるアプリケーションプログラムのローデ
ィングを行う手順を有するものである。
In order to achieve the above object, the present invention provides a loader program that writes a code of an application program into a flash memory (a second loader program), and a program that executes the second loader program. A program (first loader program) for loading the code into a RAM built in the microcomputer with built-in flash memory or an external RAM, and after loading the second loader program by the first loader program, It has a procedure for loading an application program by a loader program.

【0006】[0006]

【発明の実施の形態】本発明は、ローダープログラムは
アプリケーションプログラムのコードをフラッシュメモ
リに書き込むプログラム(第二のローダープログラム)
と、該第二のローダープログラムのコードをフラッシュ
メモリ内蔵マイコンに内蔵されるRAMもしくは外部の
RAMへローディングするプログラム(第一のローダー
プログラム)とを備え、前記第一のローダープログラム
による第二のローダープログラムのローディングの後
に、第二のローダープログラムによるアプリケーション
プログラムのローディングを行う手順を有するものであ
り、この方法によれば、第一のローダープログラムのみ
を予めROMに格納しておけば良く、第二のローダープ
ログラムはRAMにローディングされて実行されるため
ROMに格納するローダープログラムの全体のサイズと
しては従来技術による場合と比較して格段に小さく構成
できるという作用を有する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS According to the present invention, a loader program is a program for writing code of an application program to a flash memory (a second loader program).
And a program (a first loader program) for loading the code of the second loader program into a RAM built in the microcomputer with a built-in flash memory or an external RAM (second loader program). It has a procedure for loading the application program by the second loader program after loading the program. According to this method, only the first loader program needs to be stored in the ROM in advance, and Since the loader program is loaded into the RAM and executed, the size of the loader program stored in the ROM can be made much smaller than that of the prior art.

【0007】以下、本発明の実施の形態について、図面
を参照しながら説明する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.

【0008】図1は本発明の第1の実施の形態における
フラッシュメモリへのローディング装置の構成図であ
る。101はパソコン等ホスト側のコンピュータであ
り、102のハードディスクにはアプリケーションプロ
グラムのコードを格納したファイルが記憶されている。
103、104、105はマイコンチップを構成するそ
れぞれ通信インタフェース、CPUコア、フラッシュメ
モリの各回路ブロックである。ここで、通信インタフェ
ースはシリアルインタフェースやパラレルインタフェー
ス等、マイコン外部とのデータ交換のできる通信インタ
フェースであれば良く、特にその仕様が規定されるもの
ではない。106はSRAM等の書き換え可能なメモリ
である。
FIG. 1 is a configuration diagram of a flash memory loading device according to a first embodiment of the present invention. Reference numeral 101 denotes a host computer such as a personal computer, and a hard disk of 102 stores a file storing application program codes.
Reference numerals 103, 104, and 105 denote circuit blocks of a communication interface, a CPU core, and a flash memory, respectively, which constitute the microcomputer chip. Here, the communication interface may be any communication interface such as a serial interface or a parallel interface capable of exchanging data with the outside of the microcomputer, and its specifications are not particularly defined. Reference numeral 106 denotes a rewritable memory such as an SRAM.

【0009】図2に示すメモリマップは第一のローダー
プログラムを格納するメモリブロック201と、アプリ
ケーションプログラムを格納するフラッシュメモリのブ
ロック202と、外部メモリとして配置される203の
メモリ領域は第二のローダープログラムを格納するため
使用される。第一のローダープログラムはROMであっ
てもフラッシュメモリの1ないし複数ブロックを使用し
て格納しても構わない。フラッシュメモリの1ないし複
数ブロックを使用して格納する場合は、予めLSIテス
タ等を用いて書き込まれる。ここで図示する配置はソフ
トウェアの構成要素の配置を示す一例に過ぎないが、通
常、各要素のサイズは第一のローダープログラムに対し
て第二のローダープログラムのサイズが大きいことに注
意する。これは、第二のローダープログラムがフラッシ
ュメモリへの書き込み手続きを有するため、複雑な処理
手続きを含むためである。
The memory map shown in FIG. 2 includes a memory block 201 for storing a first loader program, a flash memory block 202 for storing an application program, and a memory area 203 arranged as an external memory. Used to store programs. The first loader program may be stored in a ROM or by using one or more blocks of a flash memory. When storing data using one or more blocks of the flash memory, the data is written in advance using an LSI tester or the like. Although the arrangement shown here is merely an example showing the arrangement of the components of the software, it should be noted that the size of each element is generally larger in the second loader program than in the first loader program. This is because the second loader program includes a procedure for writing to the flash memory, and thus includes a complicated processing procedure.

【0010】次に、図3のフローチャートを用いて第
一、第二のローダープログラムの処理手順と、あわせて
ホストコンピュータ側の制御ソフトウェアの処理とを詳
細に説明する。通常、フラッシュメモリ内蔵マイコンは
外部ピンの設定によるモード設定の後、リセット解除に
よってローダープログラムは起動される。ローダープロ
グラムは前述の通り、大きく第一のローダープログラム
201と、第二のローダープログラム203とに分割し
て構成されるが、第一のローダープログラム201は、
まず、マイコンのレジスタ等の初期化設定処理S301
と通信デバイスの初期化設定処理S302とを行った
後、第二のローダープログラム203のコードをホスト
側より受信し、外部のSRAM106に格納する(S3
03)。一方、ホスト側コンピュータ101では通信イ
ンタフェース103の初期化処理S305の後、ハード
ディスク102より第二のローダープログラム203の
コードを読み込みマイコン側に送信する(S306)。
S303の処理とS306の処理は互いに連携動作する
処理であるが、既知の技術であるため、詳細な説明を省
略する。マイコン側は次にS304でアプリケーション
プログラム202のコードをホスト側コンピュータ10
1より受信し、マイコン内蔵のフラッシュメモリ105
に格納する。ホスト側は連携してS307でアプリケー
ションプログラム202のコードをマイコン側に送信す
る。フラッシュメモリ105に格納する処理方法は、複
雑な処理手続きで実現されるが、例えば特平10−10
5533号公報に記載のような方法を用いて行う。な
お、このS304の処理コードのサイズは、その複雑さ
のため、一般的に相当に大きなものになる。
Next, the processing procedure of the first and second loader programs and the processing of the control software of the host computer will be described in detail with reference to the flowchart of FIG. Normally, the microcomputer with built-in flash memory starts the loader program by releasing the reset after setting the mode by setting external pins. As described above, the loader program is configured to be largely divided into a first loader program 201 and a second loader program 203.
First, initialization setting processing of microcomputer registers and the like S301
After performing the communication device initialization setting process S302, the code of the second loader program 203 is received from the host and stored in the external SRAM 106 (S3).
03). On the other hand, after the initialization processing S305 of the communication interface 103, the host computer 101 reads the code of the second loader program 203 from the hard disk 102 and transmits it to the microcomputer side (S306).
The process of S303 and the process of S306 are processes that cooperate with each other. However, since they are known technologies, detailed description will be omitted. Next, the microcomputer transmits the code of the application program 202 to the host computer 10 in S304.
1 and the flash memory 105 built in the microcomputer.
To be stored. In S307, the host transmits the code of the application program 202 to the microcomputer in cooperation with the host. The processing method of storing data in the flash memory 105 is realized by a complicated processing procedure.
This is performed using a method as described in US Pat. The size of the processing code in S304 is generally considerably large due to its complexity.

【0011】以上のような処理を行うことで、フラッシ
ュメモリへのアプリケーションプログラムのダウンロー
ドを行うことができる。
By performing the above processing, the application program can be downloaded to the flash memory.

【0012】[0012]

【発明の効果】以上説明したように、本発明に係るダウ
ンロードの方法によれば、最初にマイコンのROMまた
はフラッシュメモリの1ないし複数のブロックを使って
格納すべきローダープログラムは、複雑な処理手続きを
含まなくて良くなり、サイズを小さくする効果が得られ
る。
As described above, according to the downloading method according to the present invention, the loader program to be stored first using one or more blocks of the ROM or the flash memory of the microcomputer has a complicated processing procedure. And the effect of reducing the size can be obtained.

【0013】さらに、フラッシュメモリに格納を行う複
雑な処理をROMまたはフラッシュメモリの特定ブロッ
クに格納せずホストコンピュータのハードディスクに格
納しておけることから、変更が容易となり、フラッシュ
メモリの書き込み条件のパラメタ変更やアルゴリズム変
更も容易になるという効果も得ることができる。
Furthermore, since complicated processing for storing data in the flash memory can be stored in the hard disk of the host computer without being stored in the ROM or a specific block of the flash memory, it is easy to make changes, and parameters for writing conditions of the flash memory can be easily changed. It is possible to obtain an effect that the change and the algorithm can be easily changed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態によるフラッシュメモリロ
ーダー装置の構成図
FIG. 1 is a configuration diagram of a flash memory loader device according to an embodiment of the present invention.

【図2】本発明の実施の形態による、フラッシュメモリ
およびRAMのメモリマップを示す図
FIG. 2 is a diagram showing a memory map of a flash memory and a RAM according to the embodiment of the present invention;

【図3】本発明の実施の形態による、ローディング方法
の流れ図
FIG. 3 is a flowchart of a loading method according to an embodiment of the present invention;

【符号の説明】[Explanation of symbols]

101 ホストコンピュータ 102 ハードディスク 103 通信インタフェース 104 CPUコア 105 フラッシュメモリ 106 RAM 201 第一のローダープログラム 202 アプリケーションプログラム 203 第二のローダープログラム Reference Signs List 101 host computer 102 hard disk 103 communication interface 104 CPU core 105 flash memory 106 RAM 201 first loader program 202 application program 203 second loader program

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 不揮発性メモリ内蔵マイコンの不揮発性
メモリにアプリケーションプログラムをローディングす
る方法であって、アプリケーションプログラムのコード
を不揮発性メモリに書き込むプログラム(第二のローダ
ープログラム)と、該第二のローダープログラムのコー
ドを不揮発性メモリ内蔵マイコンに内蔵されるRAMも
しくは外部のRAMへローディングするプログラム(第
一のローダープログラム)とについて、 前記第一のローダープログラムの実行による第二のロー
ダープログラムのローディングの後に、第二のローダー
プログラムの実行によるアプリケーションプログラムの
ローディングを行うことを特徴とする不揮発性メモリ内
蔵マイコンへのソフトウェアローディング方法。
1. A method for loading an application program into a nonvolatile memory of a microcomputer with a built-in nonvolatile memory, comprising: a program (second loader program) for writing code of the application program into the nonvolatile memory; A program (first loader program) for loading a program code into a RAM built in the nonvolatile memory microcomputer or an external RAM, after loading the second loader program by executing the first loader program; And loading the application program by executing the second loader program.
【請求項2】 前記不揮発性メモリはフラッシュメモリ
である請求項1記載の不揮発性メモリ内蔵マイコンへの
ソフトウェアローディング方法。
2. The method according to claim 1, wherein the nonvolatile memory is a flash memory.
JP11110752A 1999-04-19 1999-04-19 Method for loading software to microcomputer incorporating nonvolatile memory Pending JP2000305771A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11110752A JP2000305771A (en) 1999-04-19 1999-04-19 Method for loading software to microcomputer incorporating nonvolatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11110752A JP2000305771A (en) 1999-04-19 1999-04-19 Method for loading software to microcomputer incorporating nonvolatile memory

Publications (1)

Publication Number Publication Date
JP2000305771A true JP2000305771A (en) 2000-11-02

Family

ID=14543672

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11110752A Pending JP2000305771A (en) 1999-04-19 1999-04-19 Method for loading software to microcomputer incorporating nonvolatile memory

Country Status (1)

Country Link
JP (1) JP2000305771A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006202292A (en) * 2005-01-19 2006-08-03 Thomson Licensing System and process for acquiring software code in device from host computer, device including this system, host computer, computer program product, and software transmission system
JP2006202117A (en) * 2005-01-21 2006-08-03 Fuji Xerox Co Ltd Processor and its firmware download method
JP2009251954A (en) * 2008-04-07 2009-10-29 Sony Ericsson Mobilecommunications Japan Inc Software-updating system, software-updating method, portable terminal, and program
JP2016103261A (en) * 2014-11-13 2016-06-02 富士電機株式会社 Firmware downloading method and firmware built-in device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006202292A (en) * 2005-01-19 2006-08-03 Thomson Licensing System and process for acquiring software code in device from host computer, device including this system, host computer, computer program product, and software transmission system
US8595396B2 (en) 2005-01-19 2013-11-26 Thomson Licensing System and process for acquiring a software code, corresponding host computer and software transmission process and associated products
JP2006202117A (en) * 2005-01-21 2006-08-03 Fuji Xerox Co Ltd Processor and its firmware download method
JP2009251954A (en) * 2008-04-07 2009-10-29 Sony Ericsson Mobilecommunications Japan Inc Software-updating system, software-updating method, portable terminal, and program
JP2016103261A (en) * 2014-11-13 2016-06-02 富士電機株式会社 Firmware downloading method and firmware built-in device

Similar Documents

Publication Publication Date Title
US20040076069A1 (en) System and method for initializing a memory device from block oriented NAND flash
JP2007206885A (en) Computer system and system starting method
KR100604877B1 (en) Apparatus and method for controlling memory address mapping in embedded system
JP2010500682A (en) Flash memory access circuit
US20020083427A1 (en) Embedded system capable of rapidly updating software and method for rapidly updating software of embedded system
JP2005157528A (en) Memory device
JP2000305771A (en) Method for loading software to microcomputer incorporating nonvolatile memory
JP2012022479A (en) Microcontroller and its control method
CN114416637A (en) SOC chip reset processing method and device, SOC chip and medium
JP3998452B2 (en) Nonvolatile memory control circuit
JP2010140325A (en) Microcomputer control device
JP4958201B2 (en) Microcomputer
JP4973472B2 (en) Firmware incorporating method, firmware incorporating apparatus, and firmware incorporating program
KR20090021695A (en) System for roll back of flash memory and method there of
JPH11184724A (en) In-circuit emulator and semiconductor integrated circuit
JP2005107608A (en) Electronic device, nonvolatile memory, and method for rewriting data of nonvolatile memory
KR100693559B1 (en) Method for initializing RAM of electronic device
JP2006127407A (en) Semiconductor integrated circuit
KR20000033437A (en) Apparatus for implementing function of bootstrap loader
JP2009093270A (en) Computer system and startup method therefor
JP3866269B2 (en) Microcomputer
JP2004343158A (en) Configuration apparatus, method, and program
JP2002287994A (en) Microcontroller
JPWO2007013191A1 (en) Memory writing device
JP2023020590A (en) Information processing apparatus and monitoring method