201250593 , 六、發明說明: • 【發明所屬之技^術領域】 本發明係有關一種系統之設計,特別是一種系統彈性化 之方法。 【先前技術】 目前有愈來愈多的嵌入式系統產生,如手機、機上盒、 數位電視機、數位相機等。嵌入式系統中之軟體為一特殊用 途之权體僅可使用於3亥對應的硬體中,但因應市場變化,硬 體也有多樣化的需求,如不同尺寸的面板或鏡頭、不同的接 收硬體或是不同的喇叭單體等。再加上有時雖然硬體規格大 致相同,但同一家廠商供貨可能不夠穩定,如面板的供應常 發生缺貨或是停產等問題,使得嵌入式系統軟體經常必須配 合硬體的不同而修改相對應之參數值。如此造成了同一個型 號的產品卻有數個不同版本的軟體,經常會造成搭配 題,搭配錯誤會產生產品品質不良的問題。多個軟體版本的 維護也造成許多的困擾。 【發明内容】 本發明目的之-係提供-㈣統彈性化之方法利用在 欲入式系統的非揮發性記憶體中獨立—塊區域㈣存硬體設 定值’且此區塊可利用外部下載更新,可省下許多軟體版本 維護與相關測試人力之成本。 本發明目的之-係提供-㈣統彈性化之方法,包括下 列步驟:於-嵌入式系統之一非揮發性記憶體中定義一硬體 設定區塊,此硬體設定區塊μ儲存—硬體之—硬體設定值 201250593 與一參數調整值;自嵌入式系統之一傳輸介面中下載更新硬 體設定區塊;以及嵌入式系統依據硬體設定值及參數調整值 更新硬體之相關設定。 本發明目的之一係提供一種系統彈性化之方法,包括下 列步驟:自嵌入式系統之一非揮發性記憶體定義一硬體設定 區塊以及一硬體預設區塊,其中硬體設定區塊用以儲存一硬 體之一硬體設定值與一參數調整值;以及硬體預設區塊以儲 存硬體之一硬體預設值及一參數調整預設值。接著,對硬體 設定區塊進行一更新檢查。再來,依據更新檢查之結果,決 定對硬體設定值進行一第一有效性檢查或者對硬體預設值進 行一第二有效性檢查。以及,依據第一有效性檢查及第二有 效性檢查之結果,決定嵌入式系統採用硬體設定值或者硬體 預設值以更新硬體之相關設定。 以下藉由具體實施例配合所附的圖式詳加說明,當更容 易瞭解本發明之目的、技術内容、特點及其所達成之功效。 【實施方式】 其詳細說明如下,所述較佳實施例僅做一說明非用以限 定本發明。 請先參考圖1及圖2,圖1為本發明一實施例之系統彈性 化之方法的流程圖;圖2為本發明一實施例之嵌入式系統之 記憶體分配之示意圖。如圖1及圖2所示,於本實施例中, 本發明之系統彈性化之方法包括下列步驟。首先,於一嵌入 式系統之一非揮發性記憶體100中定義一硬體設定區塊 110,此硬體設定區塊110用以儲存一硬體的一硬體設定值 112與一參數調整值114 (步驟S10)。接著,於步驟S10定 義規劃的硬體設定區塊110,可自嵌入式系統的一傳輸介面 201250593 下載更新(步驟S2G)。其t傳輸介面可為—有線傳輸介面或 一無線傳輸介面。而有線傳輸介面包括但不限於一通用序列 匯流排(USB)傳輸介面。再來,嵌人式系統即可依據更新 後的硬體設定區塊11〇之硬體設定值112及參數調整值114 更新硬體的相關設定(步驟S30),以符合各家供應商之硬體 的調校參數。 請繼續參考圖圖2,嵌入式系統的非揮發性記憶體1〇〇 通常可定義以下幾個區塊:用以存放開機程式的區塊1〇1、 用以存放作業系統的區塊1〇2、用以存放檔案系統的區塊 103、用以存放應用程式的區塊1〇4、用以存放與硬體無關的 軟體設定之區塊105以及保留區塊109。而本發明一實施例, 係於非揮發性記憶體1〇〇中多定義一硬體設定區塊11〇,以 存放與硬體設定相關的硬體設定值112及其相對應的參數調 整值114,其中硬體設定值112與參數調整值114的形式包 含但不限於以資料庫、資料結構與檔案等類型存在。 接續上述,嵌入式系統包含但不限於手機、數位機上盒、 數位電視或數位相機等。但為方便說明,以下以數位電視為 例,硬體設定區塊110中可儲存面板(硬體)的硬體設定值 112以及與面板相關的參數調整值114,其中硬體設定值 可包含面板尺寸(18.5吋);參數調整值114可包含色溫、伽 瑪(Gamma)值等。此外,可以理解的是,即使同樣是提供 18.5吋面板的供應商’於嵌入式系統各硬體整合時,各家面 板所需調校的參數調整值亦會有所不同,故於一實施例中, 硬體設定值112包括提供所述面板之一供應商的資料,例如 供應商Al、A2、…,且參數調整值114為依據供應商A1、 A2、…所提供之面板的相關調整設定。另,可以理解的是, 硬體設定區塊110中可儲存多組硬體及其相關設定,故於一 實施例中,硬體設定區塊110亦可儲存喇叭的硬體設定值 201250593 112 ’例如供應商B卜B2、…所提供輸出功率為3瓦的剩叭, 以及此制π八相關的參數調整值’例如音質調整設定。而存放 這些設定值的硬體設定區塊110可利用外部下載的方式更新 以彈性地整合系統中的各硬體設備。 本發明利用將硬體没定值從軟體中抽離,以解決需要經 常配合不同硬體來編譯新軟體的問題,同時亦省下多個軟體 維護與相關測試的人力成本。此外,產線可以簡化生產流程, 快速換線’達到多樣化生產的目標以提升嵌入式系統的彈性。 於又一實施例中,如圖3與圖4所示,圖3為本發明又 一實施例之系統彈性化之方法的流程圖;圖4為本發明又一 貫施例之後入式系統之非揮發性記憶體分配之示意圖。請參 考圖3之步驟S11及圖4,與上述實施例差異在於,非揮發 性記憶體100包括一硬體預設區塊12〇以儲存一硬體預設值 122,及一參數調整預設值124。以下以數位電視舉例說明, 硬體預设區塊120中可儲存面板(硬體)的預設定供應商及 面板尺寸(硬體預設值122),例如供應商Α的22吋面板, 以及此供應商A所提供的22吋面板相關的參數調整值124, 例如色溫、伽瑪(Gamma)值等。同理,硬體預設值122亦 可儲存喇叭(另一硬體)供應商B與輸出功率5瓦,以及此 °刺π八相關的參數調整值,例如音質調整設定。 請接續參考圖3及圖4,如上所述,本發明又一實施例之 系統彈性化之方法,在下載更新硬體設定區塊11〇(步驟S2〇) 之後,為確保所下載之硬體設定值112無誤或者無毀損,更 包括對硬體設定值112進行一第一有效性檢查(步驟S22), 以媒認硬體狀值II2是否有效。接著,依鮮-有效性檢 查之結果,決定是否對硬體預設值122進行一第二有效性檢 查(步驟S24)’以確認硬體預設值122是否有效。其中第一 有效性檢查及第二有效性檢查係依據一資料一致性檢查演算 201250593 法(Data Integrity Checking Algorithm)以判斷硬體設定值 112 及硬體預設值122是否有效,其中資料一致性檢查演算法包 括一循環冗餘檢查(Cyclic Redundancy Check,CRC)演算 法、一總合檢查(checksum )演算法、資訊一摘要演算法 (Message-Digest Algorithm 5, MD5 演算法)、安全散列演算法 (Secure Hash Algorithm, SHA1 演算法)等其中之一。最後, 依據第一有效性檢查及第二有效性檢查之結果,以決定嵌入 式系統採用硬體設定值112或者硬體預設值122以調整面板 及喇叭之相關設定(步驟S26)。 承上述,嵌入式系統僅會採用硬體設定值112或者硬體 預設值122其中之一來更新相關硬體設定。當所更新的硬體 設定值112有效,則嵌入式系統係採用供應商A1 (或A2、 A3、…)的18.5吋面板及其調整設定,喇叭採用供應商B1 (或B2、B3、…)的3瓦喇队及其調整設定。另外,當更新 的硬體設定值112無效而硬體預設值122有效時’則嵌入式 系統係採用供應商A的22吋面板及其調整設定,喇叭採用 供應商B的5瓦喇叭及其調整設定。 於又一實施例之系統彈性化的方法’請一併參考圖5及 圖4,與圖3之實施例差異在於,先對硬體設定區塊H〇進 行一更新檢查(步驟S12)以判斷硬體設定區塊11〇是否已 儲存硬體設定值112。接著,依據更新檢查之結果,決定對 硬體設值定112進行一第一有效性檢查或者對硬體預設值 120進行一第二有效性檢查(步驟S14)。最後’依據第一有 效性檢查及第二有效性檢查之結果,決定嵌入式系統採用硬 體設定值112或者硬體預設值122以更新裝置之相關設定(步 驟S16)。此處須說明的是,當硬體設定區塊11〇已進行更新 時,則先對硬體設定值112進行一第一有效性檢查’視有效 性檢查之結果以判斷是否針對硬體預設值122進行一第二有 201250593 =性檢查。當硬體設定區塊110無更新時,則直接對硬體預 設,122進行一第二有效性檢查,嵌入式系統會視第二有效 性檢查之結果以判斷是否採用硬體預設值122進行設定。 根據上述說明,本發明之特徵在於利用外部更新之方 式,更新嵌入式系統所使用各硬體的硬體設定值以及相對應 的調整參數’使嵌人式系統之生產更具彈性。此外,軟體二 程師針對該項嵌入式系統之產品,僅需維護一個軟體版本, 可大大減少人力成本。更者,依據本發明之方法,產線可簡 化生產流程,快速換線,達到多樣化生產之目標。 綜合上述說明,本發明之一種系統彈性化之方法,利用 入式系統的非揮發性記憶體中獨立一塊區域來儲存硬體 設定值,且此區塊可利用外部下載更新,可省下許 本維護與相關測試人力之成本。 & 以上所述之實施例僅係為說明本發明之技術思想及特 點,其目的在使熟習此項技藝之人士能夠瞭解本發明之内容 並據以實施,當不能以之限定本發明之專利範圍,即大凡依 本發明所揭示之精神所作之均等變化或修飾,仍應涵蓋在本 發明之專利範圍内。 201250593 【圖式簡單說明】 圖1為依據本發明一實施例之系統彈性化之方法的流程圖。 圖2為依據本發明一實施例之嵌入式系統之非揮發性記憶體 分配之示意圖。 圖3為依據本發明又一實施例之系統彈性化之方法的流程 圖。 圖4為依據本發明又一實施例之嵌入式系統之非揮發性記憶 體分配之示意圖。 圖5為依據本發明一實施例之系統彈性化之方法的流程圖。 【主要元件符號說明】 100 非揮發性記憶體 101, 102, 103,104, 105, 109 區塊 110 硬體設定區塊 112 硬體設定值 114 參數調整值 120 硬體預設區塊 122 硬體預設值 124 參數調整預設值 S10, S11,S12, S14, S16, S20, S22, 步驟 S24, S26, S30 9201250593, VI. Description of the invention: • [Technical field of the invention] The present invention relates to the design of a system, and more particularly to a method of system flexibility. [Prior Art] There are more and more embedded systems, such as mobile phones, set-top boxes, digital TVs, and digital cameras. The software in the embedded system is a special purpose right body that can only be used in the hardware corresponding to 3H, but in response to market changes, the hardware also has diverse needs, such as different sizes of panels or lenses, different receiving hard Body or different speaker units. In addition, although the hardware specifications are almost the same, the supply from the same manufacturer may not be stable enough. For example, the supply of the panel is often out of stock or discontinued, so that the embedded system software often has to be modified with the hardware. Corresponding parameter values. In this way, the products of the same model have several different versions of the software, which often cause collocation problems, and mismatches may result in poor product quality. Maintenance of multiple software versions also causes a lot of trouble. SUMMARY OF THE INVENTION The object of the present invention is to provide a method for the flexibility of the (4) system to utilize the independent hardware in the non-volatile memory of the desired system (4) to store the hardware set value 'and the block can be externally downloaded. The update saves the cost of many software version maintenance and related test manpower. The object of the present invention is to provide a method for flexing - (4), comprising the steps of: defining a hardware setting block in a non-volatile memory of an embedded system, the hardware setting block μ storing - hard Body-hardware setting value 201250593 and a parameter adjustment value; downloading the updated hardware setting block from one of the embedded system transmission interfaces; and the embedded system updating the hardware related setting according to the hardware setting value and the parameter adjustment value . One object of the present invention is to provide a method for system flexibility, comprising the steps of: defining a hardware setting block and a hardware preset block from a non-volatile memory of the embedded system, wherein the hardware setting area The block is configured to store a hardware set value and a parameter adjustment value; and a hardware preset block to store a hardware preset value and a parameter adjustment preset value. Next, an update check is performed on the hardware setting block. Then, depending on the result of the update check, it is decided to perform a first validity check on the hardware set value or a second validity check on the hardware preset value. And, based on the results of the first validity check and the second validity check, the embedded system is determined to use a hardware setting value or a hardware preset value to update the relevant settings of the hardware. The purpose, technical contents, features and effects achieved by the present invention will be more readily understood from the following detailed description of the embodiments. [Embodiment] The detailed description is as follows, and the preferred embodiment is not intended to limit the invention. Please refer to FIG. 1 and FIG. 2, FIG. 1 is a flowchart of a method for system resiliency according to an embodiment of the present invention; and FIG. 2 is a schematic diagram of memory allocation of an embedded system according to an embodiment of the present invention. As shown in Figs. 1 and 2, in the present embodiment, the method of elasticizing the system of the present invention comprises the following steps. First, a hardware setting block 110 is defined in a non-volatile memory 100 of an embedded system. The hardware setting block 110 is configured to store a hardware set value 112 and a parameter adjustment value. 114 (step S10). Next, the planned hardware setting block 110 is defined in step S10, and the update can be downloaded from a transmission interface 201250593 of the embedded system (step S2G). The t transmission interface can be a wired transmission interface or a wireless transmission interface. The wired transmission interface includes, but is not limited to, a universal serial bus (USB) transmission interface. Then, the embedded system can update the relevant settings of the hardware according to the hardware setting value 112 and the parameter adjustment value 114 of the updated hardware setting block 11 (step S30), so as to meet the hardness of each supplier. Body tuning parameters. Please continue to refer to Figure 2. The non-volatile memory of the embedded system can usually define the following blocks: the block for storing the boot program, and the block for storing the operating system. 2. A block 103 for storing the file system, a block for storing the application program, a block 105 for storing hardware-independent software settings, and a reserved block 109. In an embodiment of the present invention, a hardware setting block 11〇 is defined in the non-volatile memory 1〇〇 to store the hardware setting value 112 related to the hardware setting and the corresponding parameter adjustment value. 114, wherein the form of the hardware set value 112 and the parameter adjustment value 114 includes, but is not limited to, a type such as a database, a data structure, and an archive. Following the above, the embedded system includes but is not limited to a mobile phone, a digital set-top box, a digital television or a digital camera. For convenience of description, the digital television is taken as an example. The hardware setting block 110 can store the hardware setting value 112 of the panel (hard body) and the parameter adjustment value 114 related to the panel, wherein the hardware setting value can include the panel. Size (18.5 吋); parameter adjustment value 114 may include color temperature, gamma value, and the like. In addition, it can be understood that even if the supplier who provides the 18.5-inch panel is integrated with each hardware of the embedded system, the parameter adjustment values required for adjustment of each panel may be different, so in an embodiment The hardware set value 112 includes information providing a supplier of one of the panels, such as suppliers A1, A2, ..., and the parameter adjustment value 114 is a related adjustment setting of the panel provided by the suppliers A1, A2, .... . In addition, it can be understood that a plurality of sets of hardware and related settings can be stored in the hardware setting block 110. Therefore, in an embodiment, the hardware setting block 110 can also store the hardware setting value of the speaker 201250593 112 ' For example, the supplier B B B2, ... provides the output power of 3 watts, and the parameter adjustment value of the π eight correlation, such as the sound quality adjustment setting. The hardware setting block 110 storing these settings can be updated by external downloading to flexibly integrate the hardware devices in the system. The invention utilizes the problem that the hardware is not valued from the software to solve the problem that the new software needs to be compiled with different hardware, and the labor cost of multiple software maintenance and related tests is also saved. In addition, the production line can simplify the production process and quickly change the line to achieve the goal of diversified production to enhance the flexibility of embedded systems. In another embodiment, as shown in FIG. 3 and FIG. 4, FIG. 3 is a flowchart of a method for system resiliency according to still another embodiment of the present invention; FIG. 4 is a non-conventional system of the present invention. Schematic diagram of volatile memory allocation. Referring to step S11 and FIG. 4 of FIG. 3, the difference from the above embodiment is that the non-volatile memory 100 includes a hardware preset block 12 储存 to store a hardware preset value 122, and a parameter adjustment preset. The value is 124. The following is an example of a digital television. The hardware preset block 120 can store a preset supplier of the panel (hardware) and a panel size (hard preset value 122), such as a 22-inch panel of the supplier, and the like. The 22-inch panel-related parameter adjustment value 124 provided by supplier A, such as color temperature, gamma value, and the like. Similarly, the hardware preset value 122 can also store the speaker (another hardware) supplier B with an output power of 5 watts, and the parameter adjustment values associated with the puncturing, such as the sound quality adjustment setting. Referring to FIG. 3 and FIG. 4, as described above, the system flexibility method according to still another embodiment of the present invention, after downloading the update hardware setting block 11 (step S2〇), to ensure the downloaded hardware. The set value 112 is correct or non-destructive, and further includes performing a first validity check on the hardware set value 112 (step S22) to determine whether the hardware value II2 is valid. Next, based on the result of the freshness-effectiveness check, it is determined whether or not a second validity check is performed on the hardware preset value 122 (step S24)' to confirm whether the hardware preset value 122 is valid. The first validity check and the second validity check are based on a Data Integrity Checking Algorithm 201250593 (Data Integrity Checking Algorithm) to determine whether the hardware set value 112 and the hardware preset value 122 are valid, wherein the data consistency check is performed. The algorithm includes a Cyclic Redundancy Check (CRC) algorithm, a checksum algorithm, a Message-Digest Algorithm 5 (MD5 algorithm), and a secure hash algorithm. (Secure Hash Algorithm, SHA1 algorithm) and so on. Finally, based on the results of the first validity check and the second validity check, the embedded system is determined to adopt the hardware set value 112 or the hardware preset value 122 to adjust the related settings of the panel and the speaker (step S26). In view of the above, the embedded system only uses one of the hardware set value 112 or the hardware preset value 122 to update the relevant hardware settings. When the updated hardware setting value 112 is valid, the embedded system adopts the 18.5" panel of the supplier A1 (or A2, A3, ...) and its adjustment settings, and the speaker uses the supplier B1 (or B2, B3, ...). The 3 va team and its adjustment settings. In addition, when the updated hardware setting value 112 is invalid and the hardware preset value 122 is valid, the embedded system adopts the supplier's 22-inch panel and its adjustment settings, and the speaker uses the supplier B's 5 watt speaker and Adjust the settings. In another embodiment, the method of system flexibility is described with reference to FIG. 5 and FIG. 4, and the difference from the embodiment of FIG. 3 is that an update check is performed on the hardware setting block H〇 (step S12) to determine Whether the hardware setting value 112 has been stored in the hardware setting block 11〇. Next, based on the result of the update check, it is decided to perform a first validity check on the hardware setting value 112 or a second validity check on the hardware preset value 120 (step S14). Finally, based on the results of the first validity check and the second validity check, it is determined that the embedded system uses the hardware set value 112 or the hardware preset value 122 to update the relevant settings of the device (step S16). It should be noted that when the hardware setting block 11〇 has been updated, a first validity check is performed on the hardware set value 112 to determine the result of the validity check to determine whether it is for the hardware preset. The value 122 is a second with 201250593 = sex check. When the hardware setting block 110 is not updated, the second validity check is directly performed on the hardware preset 122, and the embedded system determines whether to adopt the hardware preset value 122 according to the result of the second validity check. Make settings. According to the above description, the present invention is characterized in that the hardware setting of the hardware used in the embedded system and the corresponding adjustment parameter are updated by means of external updating to make the production of the embedded system more flexible. In addition, the software programmers only need to maintain one software version for the embedded system products, which can greatly reduce labor costs. Moreover, according to the method of the present invention, the production line can simplify the production process, quickly change the line, and achieve the goal of diversified production. Based on the above description, a system flexibility method of the present invention utilizes a separate area of the non-volatile memory of the input system to store hardware setting values, and the block can be externally downloaded and updated, thereby saving the license. Maintenance and related test manpower costs. The embodiments described above are merely illustrative of the technical spirit and features of the present invention, and are intended to enable those skilled in the art to understand the contents of the present invention and practice the present invention. </ RTI> </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; </ RTI> <RTIgt; 201250593 [Schematic Description of the Drawings] FIG. 1 is a flow chart of a method for system flexibility according to an embodiment of the present invention. 2 is a schematic diagram of non-volatile memory allocation of an embedded system in accordance with an embodiment of the present invention. 3 is a flow chart showing a method of system resiliency according to still another embodiment of the present invention. 4 is a schematic diagram of non-volatile memory allocation of an embedded system in accordance with yet another embodiment of the present invention. 5 is a flow chart of a method of system resiliency in accordance with an embodiment of the present invention. [Main component symbol description] 100 Non-volatile memory 101, 102, 103, 104, 105, 109 Block 110 Hardware setting block 112 Hardware setting value 114 Parameter adjustment value 120 Hardware preset block 122 Hardware preset Value 124 parameter adjustment preset value S10, S11, S12, S14, S16, S20, S22, step S24, S26, S30 9