^7153 經濟部智慧財產局員工消費合作社印製 A7 五、發明說明(I ) 【本發明之領域】 本發明係有關歲入式系統之技術領域,尤指一種可快 、速更新軟體之嵌入式系統及快速更新嵌入式系統軟體的方 法。 【本發明之背景】 習知嵌入式系統在開發過程中,常常需要透過通訊裝 置不斷地更新快閃記憶體内的内容,以實驗新的程式碼是 否正確。然在嵌入式系統以通訊裝置為媒介燒寫軟體至快 閃記憶體的設計上,若使用高速的通訊裝置,電路與燒錄 軟體的設計就變的複雜,且對處理器與記憶體要求非常 高,對開發成本與時間都是不利的一面,因此,一般嵌入 式系統基於成本與電路複雜度的考量,不一定配備高速的 通‘裝置’且南速的通訊裝置所需使用的通訊協定往往較 為繁複’導致燒錄軟體本身並不適用於小記憶體容量與低 執行能力的嵌入式系統。 若以簡單的低速通訊裝置為媒介,則燒窝效率將受限 於通訊頻寬而降低,而導致下載等待的時間往往相當冗 長,佔用程式開發人員的寶貴時間。因此,如何能夠避免 前述之缺失而有效地快速更新嵌入式系統之軟體,遂成為 一虽待解決之課題。 發明人爰因於此,本於積極發明之精神,虽思一種可 以解決上述問題之「可快速更新軟體之嵌入式系統及快速 更新歆入式系統軟體的方法」’幾經研究實驗終至完成此 項新穎進步之發明。 本紙張尺度適用中國國家標準(CNS)A4規格(210 X 297公i ) ----——------------訂丨^—-----線 (請先閲讀背面之注意事項再填寫本頁) 經濟部智慧財產局員工消費合作社印製 A7 五、發明說明(2) 【本發明之概述】 、本發明之一目的係在提供一種可快速更新軟體之嵌入 式系統,其以可插拔式儲存媒體為媒介來更新嵌入式系統 <軟體,而簡化嵌入式系統需針對系統開發的電路設計。 本發明之另一目的係在提供一種快速更新嵌入式系統 库人體的万法,藉由利用可插拔式儲存媒體為媒介來更新嵌 入式系統之軟體,而有效縮短嵌入式系統軟體的開發 間〇 山依據本發明之一特色,係提出一種可快速更新軟體之 肷入式系統,其主要包括:一中央處理器;一記憶體裝 置,其於重置記憶體位址上預先存放一段啓始載入程式; 以及,一可插拔儲存媒體,係用以存放準備更新至該記憶 to裝置之軟體。其中,當該嵌入式系統重置後,該中央處 理斋先執行該啓始載入程式進行初始化系統,初始化該嵌 入式系統後,判讀該可插拔儲存媒體内是否有預定的設定 描述檔案存在,如是,便依該設定描述檔案的内容而複製 預置於該可插拔儲存媒體内的特定軟體至系統記憶體裝 置。 依據本發明之另一特色,係提出一種快速更新嵌入式 系統軟體的方法,其中,該嵌入式系統具有一記憶體裝置 及一可插拔式儲存媒體,該記憶體裝置於重置記憶體位址 上預先存放一段啓始載入程式,該方法主要包括下述之步 驟:(A)將準備更新至該記憶體裝置之軟體存放在該可 插拔式儲存媒體;(B )重置該嵌入式系統,以執行該啓 本紙張尺mm關家鮮--— — — — — — — — — — — — — k i!tT· — — — !!-線· (請先閱讀背面之注意事項再填寫本頁) 507153 經濟部智慧財產局員工消費合作社印製 明之一設定描述樓案的實際内 (1 2 )記憶體裝置 A7 五、發明說明(♦) 始載入程式而初始化該嵌入式系統· ,(C )判斷是否須進 入一更新模式,如是,執行步騾( 、u ),如否,則跳至系 :統軟體執行;(D)判讀該可插拔儲存媒體内是否有預定 的設定描述檔案存在,如是,執行步驟(e ),如否,則 顯示錯誤訊息;以及(E)則依設定描述檔案的内容而複 製預置於該可插拔儲存媒體内的牯令 于禾4曰口特疋軟體至該記憶體裝 置0 由於本發明設計新穎,能提供產業上利用,且確有增 進功效,故依法申請專利。 為使貴審查委員能進一步瞭解本發明之結構、特徵 及其目的,茲附以圖式及較佳具體實施例之詳細說明如 后: 【圖式簡單説明】 第1圖··係本發明之可快速更新軟體之嵌入式系統的功能 方塊圖。 第2圖·係顯示本發明之可快速更新軟體之後入式系統的 記憶體配置。 第3圖:係顯示本發明之快速更新嵌入式系統軟體之方法 的流程圖。 第4圖:係顯示依據本發 容0 【圖號説明】 (11 )中央處理器 私紙張尺㈣財關家標準(CNS)A4^Ti7〇 x297公! ------------^--------訂---------線· (請先閱讀背面之注意事項再填寫本頁) 507153 A7 發明說明(+) 1 2 1 )隨機存取記憶體 1 3 )可插拔儲存媒體 (122 )非揮發性記.憶體 (14 )旗標 經濟部智慧財產局員工消費合作社印製 【較佳具體實施例之詳細説明 有關本發明之可快速更新軟體之嵌入式系統之一較佳 實施例’請先參照第1圖所示,其主要係由中央處理器 1 1、記憶體裝置1 2及可插拔儲存媒體丨3所構成,其中, 該中央處理器11係為嵌入式系統之主控制中心,該記憶體 裝置1 2包括有隨機存取記憶體丨2 1及非揮發性記憶體 122,該非揮發性記憶體122可為快閃記憶體或唯讀記憶 體等,該可插拔儲存媒體13係為例如C〇mpact FUsh、^ 7153 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs A7 V. Description of the Invention (I) [Field of the Invention] The present invention relates to the technical field of year-entry systems, especially an embedded system that can quickly and quickly update software And a method for quickly updating embedded system software. [Background of the Invention] It is known that during the development process of an embedded system, it is often necessary to continuously update the contents of the flash memory through a communication device to test whether the new code is correct. However, in the design of the embedded system using the communication device as the medium to write the software to the flash memory, if a high-speed communication device is used, the design of the circuit and the programming software becomes complicated, and the processor and memory requirements are very high. High, it is disadvantageous to development cost and time. Therefore, based on considerations of cost and circuit complexity, general embedded systems are not necessarily equipped with high-speed communication devices, and the communication protocols used by South-speed communication devices are often used. More complicated 'cause the programming software itself is not suitable for embedded systems with small memory capacity and low execution capacity. If a simple low-speed communication device is used as the medium, the nest burning efficiency will be limited by the communication bandwidth and will be reduced. As a result, the waiting time for downloading will often be quite lengthy and will take up valuable time of the program developer. Therefore, how to avoid the above-mentioned shortcomings and effectively update the software of embedded systems quickly has become a problem to be solved. Because of this, the inventor, based on the spirit of active invention, thinks of an "embedded system that can quickly update software and a method to quickly update embedded system software" that can solve the above problems. A novel and progressive invention. This paper size is applicable to China National Standard (CNS) A4 specification (210 X 297 male i) ---------------- Order 丨 ^ ------- line (please first Read the notes on the back and fill in this page) Printed A7 by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs 5. Description of the invention (2) [Summary of the invention] One of the purposes of the invention is to provide an embedded software that can quickly update System, which uses pluggable storage media as the medium to update the embedded system < software, and simplify the embedded system's circuit design for system development. Another object of the present invention is to provide a method for quickly updating the human body of an embedded system library. By using a pluggable storage medium as a medium to update the software of the embedded system, the development time of the embedded system software is effectively shortened. 〇 According to a feature of the present invention, a plug-in system capable of quickly updating software is proposed, which mainly includes: a central processing unit; and a memory device, which stores a boot load in advance on a reset memory address. Into the program; and, a pluggable storage medium for storing software to be updated to the memory to device. Wherein, after the embedded system is reset, the central processing system first executes the boot loader to initialize the system. After the embedded system is initialized, it is determined whether a predetermined setting description file exists in the pluggable storage medium. If so, the specific software preset in the pluggable storage medium is copied to the system memory device according to the content of the setting description file. According to another feature of the present invention, a method for rapidly updating embedded system software is proposed. The embedded system has a memory device and a pluggable storage medium. The memory device resets the memory address. A pre-loading program is stored in advance. The method mainly includes the following steps: (A) storing software to be updated to the memory device in the pluggable storage medium; (B) resetting the embedded System to execute the paper rule mm Guan Jia Xian --- — — — — — — — — — — — — — ki! TT · — — — !!-line · (Please read the precautions on the back before filling (This page) 507153 One of the printed statements of the Employees' Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs set the actual internal (1 2) memory device A7 describing the building case. 5. Description of the invention (♦) Initially load the program to initialize the embedded system. (C) Determine whether it is necessary to enter an update mode. If yes, execute steps (, u), if not, skip to the system: system software to execute; (D) determine whether the pluggable storage medium has a predetermined setting description. file If yes, execute step (e), if not, display an error message; and (E) copy the pre-set command in the pluggable storage medium according to the content of the setting description file.疋 Software to the memory device 0 Because the present invention is novel in design, can provide industrial use, and indeed has enhanced efficacy, it has applied for a patent in accordance with the law. In order to enable your reviewing committee to further understand the structure, characteristics, and purpose of the present invention, the detailed description of the drawings and preferred embodiments is attached as follows: [Simplified description of the drawings] Figure 1 ... Function block diagram of embedded system that can quickly update software. Fig. 2 is a diagram showing a memory configuration of a plug-in system capable of quickly updating software according to the present invention. FIG. 3 is a flowchart showing a method for quickly updating embedded system software according to the present invention. Figure 4: The display is based on the current capacity. [Illustration of the drawing number] (11) Central processing unit private paper ruler (CNS) A4 ^ Ti7〇x297 public! ---------- -^ -------- Order --------- Line · (Please read the notes on the back before filling in this page) 507153 A7 Description of Invention (+) 1 2 1) Random Access Memory 1 3) Pluggable storage media (122) Non-volatile memory. Memory (14) Flag printed by the Intellectual Property Bureau of the Ministry of Economic Affairs Employee Consumption Cooperative [Detailed description of the preferred embodiment of the invention can be quickly A preferred embodiment of the embedded system for updating software 'Please refer to FIG. 1 first, which is mainly composed of a central processing unit 11, a memory device 12, and a pluggable storage medium 丨 3, of which, The CPU 11 is a main control center of an embedded system. The memory device 12 includes a random access memory 21 and a non-volatile memory 122. The non-volatile memory 122 may be a flash memory. Or read-only memory, the pluggable storage medium 13 is, for example, Compact FUsh,
Smart-Media、Memory Stick 或 SD 等儲存裝置。 參照第2圖,其顯示該記憶體裝置丨2之記憶體配置, 其中’於該非揮發性記憶體丨2 2之重置位址處,開始存放 有一起始載入程式及一包含於該起始載入程式之可插拔儲 存媒體驅動程式,其餘之非揮發性記憶體空間則供存放系 統幸人m ’或保留作其他用途,而隨機存取記憶體空間則供 執行該啓始載入程式及系統軟體,或保留作其他用途。 而該可插拔儲存媒體1 3係可用以存放準備更新至該 記憶體裝置12之軟體,以提供快速更新嵌入式系統軟體之 功能’而此快速更新嵌入式系統軟體之流程則請參照第3 圖所TF ’其首先係將準備更新至該記憶體裝置之軟體存放 在該可插拔式儲存媒體13 (步騾3〇1),然後重置該嵌入 式系統(步騾S3 02 ),以執行該啓始載入程式而初始化 t紙張尺度適财國國家標準(CNS)A4規格(21G x 297公^ ,丨_丨—__! 訂!· !線,^^· (請先閱讀背面之注意事項再填寫本頁) 507153 A7 B7 經濟部智慧財產局員工消費合作社印製 五、發明說明(5 ) 該嵌入式系統,並執行該可插拔儲存媒體驅動程.式,俾以 在初始化該嵌入式系統後,驅動該可插拔儲存媒體〗3。 步騾S 3 0 3係根據一可由使用者設定之旗標丨4 (參照 第1圖)而判斷是否須進入一更新模式,若旗標不存在, 則不進行軟體更新而跳至系統軟體執行(步騾S 3 〇 9 ), 若旗標存在,則判讀該可插拔儲存媒體丨3内是否有預定的 汉走描述檔案存在(步驟S 3 0 4 ),如否,表示該可插拔 儲存媒體1 3無法提供需要更新之軟體,故顯示找不到設定 描述檔案的錯誤訊息(S 3 0 5 )。 第4圖顯示一設定描述檔案之範例,其提供一基底位 址(Base Address)及偏移位址(〇ffset Address)以 指定所要更新之軟體在記憶體裝置12之開始位置,並提供 了所要更新之軟體的檔案名稱、格式及執行之動作(如複 製及複製後重置)等訊息,可供中央處理器丨丨據以進行軟 體更新作業。再請參照第3圖所示,如步騾83〇4判讀該可 插拔儲存媒體13内有預定的設定描述檔案存在,便可依設 足描述檔案所描述之複製位址與複製檔案的内容而複製預 置於該可插拔儲存媒㈣的特定軟體至該記憶體裝置匕 (步驟 S300 ) 〇 經複製檔案而完成欲入式系統軟體之更新後,執行步 驟S307以判斷是否要重置系統,如是,則於重置系統 後’跳至系統軟體執行(步 、 』、7S 3 0 9 ),如否,則顯示完 成的工作與狀態(步騾S308 )。 先 閱 讀 背 之 注 項 再 填 寫 本 頁 I I I I 暦訂 線 本紙張尺度適用中國國家標準(CNS)A4規格(‘挪☆ 507153 A7 五、發明說明(…) 經由以上之説明可知,本發明藉由以可插拔式儲存媒 體為媒介而進行嵌入式系統軟體之更新作業,確可達成下 :述之之功效: ⑴可以降低電㈣計的複雜度,節省開發成 時間。 /'Μ 古。(2)燒寫程式的架構簡單,所需資源少,可移植性 (3)燒寫時間短,不僅降低軟體開發時間,也簡化 燒錄手續,降低對非工程人員的使用難度。 ⑷燒寫過程中,無須另一部控制主機(通常為個 人電腦)來傳送軟體資料,可以增加產品的普及率,降低 使用的成本。 * (5)最終產品對可繼續使用可插拔式儲存媒體的電 ^設計,不浪費寶貴的產品開發時間於非實際產品的需求 :上所陳,本發明無論就目的、手段及功效,在在均 迥異於習知技術之特徵,μ人式系統設計上之- 為一具產業上利用性、新穎性及進步性之發 明’應符合專利申請要件,麦依法提出申請 本紙張尺度顧_家標準(cks)A4規袼⑽χ 297公]Smart-Media, Memory Stick, or SD storage devices. Referring to FIG. 2, it shows the memory configuration of the memory device 2, where 'in the reset address of the non-volatile memory 2 2, an initial loader and a program included in the memory are stored. The pluggable storage media driver of the initial loader, the remaining non-volatile memory space is used to store the system m 'or reserved for other purposes, and the random access memory space is used to execute the initial loader And system software, or reserved for other purposes. The pluggable storage medium 1 3 can be used to store software that is ready to be updated to the memory device 12 to provide the function of quickly updating embedded system software '. For the process of quickly updating embedded system software, please refer to Section 3 Figure TF 'It first stores the software to be updated to the memory device in the pluggable storage medium 13 (step 301), and then resets the embedded system (step S3 02) to Run the initial loading program to initialize the paper size to the national standard (CNS) A4 size (21G x 297 mm), 丨 _ 丨 —__! Order!!! Line, ^^ · (Please read the first Note: Please fill in this page again) 507153 A7 B7 Printed by the Consumer Cooperatives of the Intellectual Property Bureau of the Ministry of Economic Affairs V. Invention Description (5) The embedded system and execute the pluggable storage media driver. In order to initialize the After the embedded system, drive the pluggable storage medium. 3. Step S 3 0 3 is based on a user-settable flag 4 (refer to Figure 1) to determine whether it is necessary to enter an update mode. Icon does not exist, skip software update Until the system software executes (step S3 〇9), if the flag is present, it is judged whether there is a predetermined Hanzo description file in the pluggable storage medium 丨 3 (step S304), if not, it means The pluggable storage medium 1 3 cannot provide software that needs to be updated, so an error message (S 3 0 5) is not found. Figure 4 shows an example of a setting description file, which provides a base address (Base Address) and offset address (〇ffset Address) to specify the starting position of the software to be updated on the memory device 12, and provide the file name, format, and actions (such as copy and copy) of the software to be updated After resetting) and other information, it can be used by the central processing unit to perform software update operations. Please refer to Figure 3 again, as shown in step 8304 to judge that the pluggable storage medium 13 has a predetermined setting description. If the file exists, the specific software preset on the pluggable storage medium can be copied to the memory device according to the copy address and the content of the copy file described in the description file (step S300). After completing the update of the on-demand system software, execute step S307 to determine whether to reset the system. If so, after the system is reset, 'skip to the system software execution (step,', 7S 3 0 9), if not, then The completed work and status are displayed (step S308). Read the notes at the back before filling in this page IIII 暦 Binding This paper size is applicable to the Chinese National Standard (CNS) A4 specification ('Nov ☆ 507153 A7 V. Description of the invention (... ) From the above description, it can be known that the present invention can achieve the following by updating the embedded system software by using a pluggable storage medium as the following: The effects described below: ⑴ can reduce the complexity of the electric meter, Save development time. / 'Μ 古. (2) The structure of the programming program is simple, the required resources are small, and the portability is short. (3) The programming time is short, which not only reduces the software development time, but also simplifies the programming procedures and reduces the difficulty for non-engineering personnel. ⑷ During the programming process, there is no need for another control host (usually a personal computer) to transfer software data, which can increase the popularity of the product and reduce the cost of use. * (5) The electrical design of the final product that can continue to use pluggable storage media, without wasting precious product development time on non-actual product requirements: As stated above, the present invention, regardless of the purpose, means and efficacy, In terms of features that are very different from conventional technologies, the design of the μ-human system-for an industrially usable, novel, and progressive invention-should meet the requirements for patent applications. Standard (cks) A4 Regulation 袼 ⑽χ 297 Male]