CN101140523A - Storage resource dividing method and apparatus for embedded system - Google Patents

Storage resource dividing method and apparatus for embedded system Download PDF

Info

Publication number
CN101140523A
CN101140523A CNA2007100979888A CN200710097988A CN101140523A CN 101140523 A CN101140523 A CN 101140523A CN A2007100979888 A CNA2007100979888 A CN A2007100979888A CN 200710097988 A CN200710097988 A CN 200710097988A CN 101140523 A CN101140523 A CN 101140523A
Authority
CN
China
Prior art keywords
application program
module
version
embedded system
described application
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
CNA2007100979888A
Other languages
Chinese (zh)
Inventor
崔卓
谢志雄
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNA2007100979888A priority Critical patent/CN101140523A/en
Publication of CN101140523A publication Critical patent/CN101140523A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a partition method and device for storage resources in an embedding system; wherein, the method comprises the following steps: Step S102, divide the storage regions in an embedding system into a boot area, a parameter area and an application program area; Step S104, after the embedding system is powered on, perform initialization inside the boot area, and acquire information in the parameter area; as well as Step S106, if the version of an application program is available, jump directly from the boot area to the application program area, and execute the corresponding application program; if the version of the application program is disable, the boot area continuously outputs error information corresponding with the application program to serial ports or peripheral communication devices. The invention can effectively increase utilization efficiency of program storage regions, and as increases code maintainability as well as expansibility.

Description

The storage resource dividing method and the device that are used for embedded system
Technical field
The present invention relates to the planning technology of single board software edition in the embedded system, relate in particular to a kind of storage resource dividing method and device that is used for embedded system.
Background technology
Single-chip microcomputer comprises circuit such as CPU (central processing unit), memory block, timer and IO interface as the device level computer system, realizes control operation to other devices by user written program.Single-chip microcomputer has characteristics such as volume is little, light weight, cost performance height, therefore is widely used in the embedded systems such as Industry Control and communication facilities.
The memory block of single-chip microcomputer can be divided into sheet stored district and sheet external memory district, and wherein sheet stored district can be divided into data storage area RAM (Random Access Memory) and program storage area ROM (Read Only Memory) again.Wherein, the resource in sheet stored district is very limited, and with the SST89V564RD type single-chip microcomputer of SST company, the internal data store district has only 1K, and the internal processes memory block is 64K.Usually, sheet external memory district is the expansion to sheet stored district, to remedy the deficiency of sheet stored resource.Along with the raising of using complicacy, it is more and more important that the storage resources of single-chip microcomputer shows.
Usually, for write (under Keil C, the programming) of single-chip microcomputer class software, need not be concerned about the distribution in the entire flash interval of single-chip microcomputer, as long as the code that compiles out does not exceed the space constraint of Flash.But MCU (microcontroller) is different from CPU, the limited storage space of MCU, and extendible part is also very limited, therefore, under the bigger situation of size of code for the planning of code space show extremely important.
Yet, the exploitation of traditional Single Chip Microcomputer (SCM) program all is to finish power-up initializing and all function of application in while (1) circulation basically, tediously long, the readable extreme difference of code, be not easy to maintenance and expansion, this mode has also caused the very big wasting of resources to program storage area simultaneously.
Summary of the invention
At the problem that prior art exists, the present invention proposes a kind of service efficiency and the maintainability of raising code and the storage resources classification apparatus and method of being used for embedded system of extensibility that can effectively improve program storage area.
For achieving the above object, according to an aspect of the present invention, a kind of storage resource dividing method that is used for embedded system may further comprise the steps: step S102 is divided into boot section, parameter region and application area with the memory block of embedded system; Step S104 after embedded system powers on, carries out initialization and reads information in the parameter region in the boot section; And step S106, under the situation that the version of application program can be used, directly jump to application area from the boot section and carry out corresponding application program, under the disabled situation of the version of application program, the failure message of corresponding application program is constantly exported in the boot section to serial ports or external communication device.
Wherein, the boot section is used for after embedded system powers on, and carries out initialization and reads information in the parameter region, and be used to indicate application program operational area executive utility and realize driving to device; Parameter region is used for the relevant information of records application program; And the application program operational area is used for realizing in actual moving process the function of upper layer module.
Wherein, determine situation that the version of application program can use in the boot section under, the indication application program module is moved described application program; And determine at bootstrap module under the disabled situation of version of application program that bootstrap module is constantly exported the failure message of corresponding application program to serial ports or external communication device.
The relevant information of application program comprises following at least a: the version of application program, size, piece number, update times information.Wherein, embedded system comprises single-chip microcomputer.
According to a further aspect in the invention, a kind of memory storage that is used for embedded system comprises: bootstrap module, be used for after embedded system powers on, carry out initialization and read information in the parameter module, and be used to indicate application program operation module executive utility and realize driving device; Parameter module is used for the relevant information of records application program; And application program operation module, be used in actual moving process, realize the function of upper layer module.
Under bootstrap module was determined situation that the version of application program can use, the indication application program module ran application; Determine at bootstrap module under the disabled situation of version of application program that bootstrap module is constantly exported the failure message of corresponding application program to serial ports or external communication device.
The relevant information of application program comprises following at least a: the version of application program, size, piece number, update times information.Wherein, embedded system comprises single-chip microcomputer.
The present invention proposes the memory storage and the method that are used for embedded system, can rationally plan Single Chip Microcomputer (SCM) program efficiently, thereby improve the service efficiency of program storage area and maintainability and the extensibility that improves code, and overcome the disadvantage that in the single-chip microcomputer start-up course, occurs starting the boot inefficacy and cause.
Description of drawings
Shuo Ming accompanying drawing is used to provide further understanding of the present invention herein, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute to improper qualification of the present invention, in the accompanying drawings:
Fig. 1 illustrates a kind of process flow diagram that is used for the storage resource dividing method of embedded system of the present invention;
Fig. 2 illustrates a kind of structured flowchart that is used for the storage resources classification apparatus of embedded system of the present invention;
Fig. 3 is single-chip microcomputer internal storage region Module Division figure according to an embodiment of the invention; And
Fig. 4 is that the SST89V564RD Single Chip Microcomputer (SCM) program starts process flow diagram according to an embodiment of the invention.
Embodiment
Below in conjunction with corresponding accompanying drawing and specific embodiment storage resource dividing method and the device that is used for embedded system of the present invention described in detail.
Fig. 1 illustrates a kind of process flow diagram that is used for the storage resource dividing method of embedded system of the present invention.As shown in Figure 1, the storage resource dividing method that is used for embedded system of the present invention may further comprise the steps: step S102, the memory block of embedded system mainly is divided into boot section, parameter region and application area, and can be divided into a plurality of modules according to function; Step S104 after embedded system powers on, carries out initialization and reads information in the parameter region in the boot section; And step S106, under the situation that the version of application program can be used, directly jump to described application area from the boot section and carry out corresponding application program, under the disabled situation of the version of application program, the failure message of corresponding application program is constantly exported in the boot section to serial ports or external communication device.
The boot section is used for after embedded system powers on, and carries out initialization and reads information in the described parameter region, and be used to indicate application program operational area executive utility and realize driving to device; Parameter region is used for relevant informations such as version, size, piece number, the update times of records application program; And the application program operational area is used in actual moving process the function of realization upper layer module.
Under determining situation that the version of application program can use in the boot section, the indication application program module is moved described application program; And determine at bootstrap module under the disabled situation of version of application program that bootstrap module is constantly exported the failure message of corresponding application program to serial ports or external communication device.
Fig. 2 illustrates a kind of structured flowchart that is used for the storage resources classification apparatus of embedded system of the present invention, as shown in Figure 2, the memory storage that is used for embedded system of the present invention comprises: bootstrap module 202, be used for after embedded system powers on, carry out initialization and read information in the parameter module, and be used to indicate application program operation module executive utility and realize driving device; Parameter module 204 is used for the relevant information such as version, size, piece number, update times of records application program; And application program operation module 206, be used in actual moving process, realize the function of upper layer module.
Under bootstrap module was determined situation that the version of application program can use, the indication application program module ran application; Determine at bootstrap module under the disabled situation of version of application program that bootstrap module is constantly exported the failure message of corresponding application program to serial ports or external communication device.
Embedded system among the present invention can be single-chip microcomputer.
Be that example specifically describes the storage resource dividing method that is used for embedded system of the present invention below with the single-chip microcomputer.
This method is mainly mainly divided boot section, parameter region and application area with the memory block of single-chip microcomputer, wherein, boot section, parameter region are divided in fixing code segment, usually power on from single-chip microcomputer and move the section start of instruction fetch, and application area be divided in preceding two subregions after, the concrete division as shown in Figure 3.
Single-chip microcomputer power-up initializing and obtaining parameter region information are realized in the boot section; Parameter region need be preserved information such as version, size, piece number, the update times in current application program district; Application area is used for realizing concrete upper layer application.The specific implementation process as shown in Figure 4, after single-chip microcomputer powers on (S401), at first start from the boot section, instruction fetch (S402), the boot section program is (S403) after initialization is finished, and whether the version that reads the parameter region version information and judge current application area available (S404), if available, by jump instruction, leap to application area and carry out corresponding program operation (S405); If unavailable, then continue to call the corresponding interface function and constantly export the unavailable information of corresponding application area (S406) toward serial ports or other communication facilitiess in the boot section operation, enter IDLE (free time) state, the signal no application version (S407) of lighting a lamp.
In compiling, it is compiled in the good code space of planning, this part is realized by compiler, requirement is in the process of coding, carry out Module Division, the simplest be with application layer code as a module, general initialization and drive part are as a module, different Module Division compiles at different code segments.
Be described in detail below in conjunction with the implementation procedure of SST89V564RD single-chip microcomputer this method.
There is the 64K program storage SST9V64RD inside, can divide this 64K according to demand.Program storage area from 0X0000 to 0X1000 is used to deposit the code of promoter region, when compiling code constraints is got final product in this interval.From 0X1000 to 0X1800, be used for compiling and deposit the parameter region code.Remaining interval is used for answering the division of program area, and is concrete according to being used for handling.
The invention provides a kind of for the device and method of dividing storage space in the MCU application process of limited storage space, in the present invention, unified initialization section is compiled into the promoter region, other APD branches are compiled into application area, the parameter region of recorded information is provided simultaneously, parameter region is independent of other districts, is used for writing down information such as version specially, thereby can improves the MCU service efficiency.
Those skilled in the art will readily understand additional advantages and modifications of the present invention.Therefore, above-mentioned at embodiment be described as the concrete Application Example of the present invention, the present invention aspect widely is not limited to the specific detail and the exemplary embodiments that illustrate and describe herein.Therefore, can under the condition that does not break away from by claim and the spirit or scope of the present invention that equivalent limited thereof, make various modifications.

Claims (10)

1. memory storage that is used for embedded system is characterized in that comprising:
Bootstrap module is used for after described embedded system powers on, and carries out initialization and reads information in the described parameter module, and be used to indicate application program operation module to carry out described application program and realize driving to device;
Described parameter module is used to write down the relevant information of described application program; And
Described application program operation module is used in actual moving process, realizes the function of upper layer module.
2. memory storage according to claim 1 is characterized in that, under described bootstrap module is determined situation that the version of described application program can use, indicates described application program module to move described application program.
3. memory storage according to claim 2 is characterized in that, determines at described bootstrap module under the disabled situation of version of described application program, and described bootstrap module is constantly exported the failure message of corresponding application program to serial ports or external communication device.
4. memory storage according to claim 3 is characterized in that, the relevant information of described application program comprises following at least a: the version of described application program, size, piece number, update times information.
5. according to each described memory storage in the claim 1 to 4, it is characterized in that described embedded system comprises single-chip microcomputer.
6. a storage resource dividing method that is used for embedded system is characterized in that, may further comprise the steps:
Step S102 is divided into boot section, parameter region and application area with the memory block of described embedded system;
Step S104 after described embedded system powers on, carries out initialization and reads information in the described parameter region in described boot section; And
Step S106 under the situation that the version of described application program can be used, directly jumps to described application area from described boot section and carries out corresponding application program; Under the disabled situation of the version of described application program, the failure message of corresponding application program is constantly exported in described boot section to serial ports or external communication device.
7. storage resource dividing method according to claim 6 is characterized in that:
Described boot section is carried out initialization and is read information in the described parameter region after described embedded system powers on, and is used to indicate the application program operational area to carry out described application program and realizes driving to device;
Described parameter region writes down the relevant information of described application program; And
The function of upper layer module is realized in described application program operational area in actual moving process.
8. storage resource dividing method according to claim 7 is characterized in that:
Under determining situation that the version of described application program can use in described boot section, indicate described application program module to move described application program; And
Determine at described bootstrap module under the disabled situation of version of described application program that described bootstrap module is constantly exported the failure message of corresponding application program to serial ports or external communication device.
9. storage resource dividing method according to claim 8 is characterized in that, the relevant information of described application program comprises following at least a: the version of described application program, size, piece number, update times information.
10. according to each described storage resource dividing method in the claim 6 to 9, it is characterized in that described embedded system comprises single-chip microcomputer.
CNA2007100979888A 2007-04-25 2007-04-25 Storage resource dividing method and apparatus for embedded system Pending CN101140523A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007100979888A CN101140523A (en) 2007-04-25 2007-04-25 Storage resource dividing method and apparatus for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007100979888A CN101140523A (en) 2007-04-25 2007-04-25 Storage resource dividing method and apparatus for embedded system

Publications (1)

Publication Number Publication Date
CN101140523A true CN101140523A (en) 2008-03-12

Family

ID=39192484

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100979888A Pending CN101140523A (en) 2007-04-25 2007-04-25 Storage resource dividing method and apparatus for embedded system

Country Status (1)

Country Link
CN (1) CN101140523A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101582029B (en) * 2009-06-05 2013-07-03 中兴通讯股份有限公司 System and method for realizing embedded application
CN101370020B (en) * 2008-10-17 2013-12-11 北京中星微电子有限公司 Peripheral information product, method and system for updating its collocation information
CN104572206A (en) * 2015-01-14 2015-04-29 厦门为那通信科技有限公司 Application program self updating and backup recovery method
WO2018040925A1 (en) * 2016-08-31 2018-03-08 福建联迪商用设备有限公司 Module initialization method and system
CN111124461A (en) * 2019-12-12 2020-05-08 青岛海尔科技有限公司 Method and device for OTA (over the air) upgrade of single chip microcomputer and single chip microcomputer
CN111221553A (en) * 2019-12-31 2020-06-02 深圳优地科技有限公司 Firmware upgrading method and device
CN113254089A (en) * 2021-06-04 2021-08-13 深圳市科力锐科技有限公司 System boot method correction method, device, equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101370020B (en) * 2008-10-17 2013-12-11 北京中星微电子有限公司 Peripheral information product, method and system for updating its collocation information
CN101582029B (en) * 2009-06-05 2013-07-03 中兴通讯股份有限公司 System and method for realizing embedded application
CN104572206A (en) * 2015-01-14 2015-04-29 厦门为那通信科技有限公司 Application program self updating and backup recovery method
WO2018040925A1 (en) * 2016-08-31 2018-03-08 福建联迪商用设备有限公司 Module initialization method and system
CN111124461A (en) * 2019-12-12 2020-05-08 青岛海尔科技有限公司 Method and device for OTA (over the air) upgrade of single chip microcomputer and single chip microcomputer
CN111124461B (en) * 2019-12-12 2023-08-18 青岛海尔科技有限公司 Method and device for upgrading OTA (over the air) of singlechip and singlechip
CN111221553A (en) * 2019-12-31 2020-06-02 深圳优地科技有限公司 Firmware upgrading method and device
CN113254089A (en) * 2021-06-04 2021-08-13 深圳市科力锐科技有限公司 System boot method correction method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN101140523A (en) Storage resource dividing method and apparatus for embedded system
CN103425592A (en) Memory management method and device for multiprocess system
CN101551780B (en) Television and data storage method and device thereof
CN102239524B (en) Logical unit operation
US8200934B2 (en) Data transfer unit in multi-core processor
CN102637461B (en) Start method supporting bad block flash memory scanning
CN101004681A (en) Method for implementing long jumping dynamic patch in embedded system
WO2011063016A1 (en) Power management of memory systems
CN101699402B (en) Multi-mode startup embedded system
CN106445834A (en) Managing Operational State Data in Memory Module
CN101281493A (en) And non flash memory device and management method thereof
CN103608792A (en) Method and system for supporting resource isolation under multi-core architecture
CN101165659A (en) Methods and apparatus for reallocating addressable spaces within memory devices
CN1834950A (en) Multicore processor having active and inactive execution cores
US8285920B2 (en) Memory device with dynamic controllable physical logical mapping table loading
CN101021797A (en) Repairing and staging method for software of embedded system
CN101414264A (en) Method for updating high reliable software version and three update modes
CN102622257A (en) On-line meter self-updating method and device
CN100426220C (en) Device for realizing software down loading using single-chip processor in communication system and its method
CN103136015A (en) Method and system for controlling U boot to enter download operation mode
CN102567220A (en) Cache access control method and Cache access control device
CN115220758B (en) Method for on-line upgrading of single chip microcomputer firmware
CN106201608A (en) Computer UEFI firmware update
CN103955389A (en) System startup method based on PCM (Phase Change Random Access Memory)
CN103488585B (en) For realizing the controller of configuration information buffer update in reconfigurable system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication