CN102541579A - Method for dynamically loading application program of embedded system - Google Patents

Method for dynamically loading application program of embedded system Download PDF

Info

Publication number
CN102541579A
CN102541579A CN2010105998124A CN201010599812A CN102541579A CN 102541579 A CN102541579 A CN 102541579A CN 2010105998124 A CN2010105998124 A CN 2010105998124A CN 201010599812 A CN201010599812 A CN 201010599812A CN 102541579 A CN102541579 A CN 102541579A
Authority
CN
China
Prior art keywords
application program
operating system
embedded
dynamic load
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
CN2010105998124A
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.)
SHENYANG NEW POSTCOM EQUIPMENT CO Ltd
Original Assignee
SHENYANG NEW POSTCOM EQUIPMENT 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 SHENYANG NEW POSTCOM EQUIPMENT CO Ltd filed Critical SHENYANG NEW POSTCOM EQUIPMENT CO Ltd
Priority to CN2010105998124A priority Critical patent/CN102541579A/en
Publication of CN102541579A publication Critical patent/CN102541579A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for dynamically loading an application program of an embedded system, which comprises the following steps: S1, starting an embedded device and dividing an ROM (read only memory) space and an RAM (random access memory) space respectively occupied by the operating system and the application program; S2, determining the function interface between the operating system and the application program; S3, storing a firmware document of the application program in a built-in external storage space of the embedded device, and connecting the embedded device; S4, burning firmware document of the application program to the ROM space of the application program; and S5, initializing the function interface, wherein the operating system loads the application program dynamically. The method of the invention stores the firmware document of the application program in the own external storage space of the embedded device and dynamically loads the function interface between the operating system and the application program so that the ROM space of a chip is low in demand, and the research and development cost is reduced. In addition, the burning time is shortened and the debugging speed is improved.

Description

The method of embedded system application program dynamic load
Technical field
The present invention relates to a kind of method of application program dynamic load, particularly relate to a kind of method of embedded OS application program dynamic load.
Background technology
At present, a lot of embedded OSs are not supported the dynamic load technology, like UC/OS, ThreadX, RTK etc.In based on these embedded OS developing applications, usually application program and operating system all are put into a firmware file the inside, promptly application program is not self-existent.Then, the user also need be burnt to the firmware file that comprises operating system and application program in the product and go.
So not only increased user's use difficulty, and improved ROM space requirement, thereby caused the increase of R&D costs chip.
In addition, very inconvenient debugging the time.This mode need be entered all executable files (comprising operating system and application program) burning.Increase the time of burning like this, reduced the speed of debugging.
Summary of the invention
The technical matters that the present invention will solve is that to implement difficulty big in order to overcome prior art, and the high and inefficient defective of cost provides a kind of method of embedded system application program dynamic load.
The present invention solves above-mentioned technical matters through following technical proposals: a kind of method of embedded system application program dynamic load, and its characteristics are that it may further comprise the steps:
S 1, open embedded device, the ROM that division operation system and application program are occupied respectively (read-only memory) space and RAM (RAS) space.
This is to prepare for back burning application firmware file, makes the application firmware burning file to fixing zone, can not produce overlapping with the shared zone of operating system.
S 2, confirm the function interface between operating system and application program.
The effect of said function interface is to make the interface that operating system can invokes application provides, the system interface that application program can the call operation system provides.
S 3, the application firmware file is deposited in the external memory space that embedded device carries, link to each other this embedded device with external memory space.
Because the ROM space of chip internal is limited, need be placed into the firmware file of application program in the foreign file system of system and go, when dynamic load, be convenient to call at any time.
S 4, with the application firmware burning file in the ROM space of application program.
S 5, the said function interface of initialization, the operating system application programs is carried out dynamic load.
Through function interface, can carry out the dynamic load of application program quickly and easily, reduced operation easier, improved operating efficiency.
Preferably, said operating system is non intelligent embedded OS.
Function of application is single in the non intelligent embedded OS, makes things convenient for the function interface between defining operation system and the application program like this, and application program towards object a lot, can load different application firmware according to the object that is connected.
Preferably, said external memory space is USB flash disk, portable hard drive or computer.Said external memory space is simple.
Preferably, said step S 2In further comprising the steps of:
S 21, defining operation system function structure, comprise the function interface that operating system provides to application program:
S 22, defining operation system function structure variable, with first fixed position of said variables constant in operating system ROM space;
S 23, definition application function structure body, comprise the function interface that application program provides to operating system;
S 24, definition application function structure body variable, with second fixed position of said variables constant in application program ROM space.
Preferably, said step S 3In also comprise: in the external memory space that said embedded device carries, create a corresponding list file.
Preferably, said correspondence table file is used to write down the name of each application firmware file and the unit type of support, and sets up corresponding relation.The handled easily system searches firmware fast like this.
System carries out searching of application firmware fast according to the correspondence table lattice file after obtaining the unit type of connection, reduced the time of searching.
Preferably, said step S 3Further comprising the steps of afterwards:
S 31, operating system obtains the embedded device model of connection;
S 32, judge whether to obtain the embedded device model success that is connected; If not, get into step S 33If,, get into step S 34
S 33, the prompting user do not support, need to upgrade application firmware;
S 34, in the correspondence table file, search the corresponding application program firmware according to the embedded device model that is connected obtained;
S 35, judge whether to search successfully; If not, return step S 33If,, get into step S 4
Preferably, said step S 5In further comprising the steps of:
S 51, the operating system function interface that the initialization application program provides to operating system on the second place;
S 52, the application program function interface that the initialization operation system provides to application program on primary importance.
When suitable applications program firmware burning after the ROM space, operating system is carried out the initialization of function interface, reaching the interface that operating system can invokes application provides, the purpose of the interface that application program can the call operation system.
Positive progressive effect of the present invention is: the present invention deposits in the external memory space that embedded device carries through the firmware file with application program; And the function interface between setting operation system and application program carries out dynamic load; Make the demand in chip ROM space reduce, so that reduce R&D costs.In addition,, reduced the time of burning, also improved the speed of debugging simultaneously owing to only need the firmware file of burning application program.
Description of drawings
Fig. 1 is the process flow diagram of the method for embedded system application program dynamic load of the present invention.
Fig. 2 is for confirming the process flow diagram of function interface in the method for embedded system application program dynamic load of the present invention.
Fig. 3 is the process flow diagram of initialization function interface in the method for embedded system application program dynamic load of the present invention.
Embodiment
Provide preferred embodiment of the present invention below in conjunction with accompanying drawing, to specify technical scheme of the present invention.
Shared ROM of operating system and application program and ram space at first to have been divided.
For example, set following address realm:
The ROM space:
Operating system: 0x00000000-0x000FFFFF
Application program 0x100000-0x8FFFFF
Ram space:
Operating system: 0x00000000-0x00100000
Application program 0x100001-0x300001
So just can arrive fixing zone to the application firmware burning file, thereby guarantee that the shared zone of operating system produces overlapping.
Fig. 1 is the process flow diagram of the method for embedded system application program dynamic load of the present invention.As shown in Figure 1, this method may further comprise the steps:
Step 100 is opened embedded device.
ROM space and ram space that step 101, division operation system and application program are occupied respectively.
This step is prepared for back burning application firmware file, guarantees that the application firmware file can not produce overlapping with the shared zone of operating system.
In addition, the said operating system here is non intelligent embedded OS.Function of application wherein is single, makes things convenient for the function interface between defining operation system and the application program like this.And, application program towards object a lot, can load different application firmware according to the object that is connected.
Such as: the function of a application program is IEMI (International MobileEquipment Identity, the international equipment identification sign indicating number that moves) number of programming mobile phone, and function is single relatively.But because mobile phone of a great variety, according to former application model, to each different mobile need be different to the product burning firmware (comprising operating system and the application program of supporting current phone).
Adopt the present invention, be stored in application firmware in the foreign file system and go, operating system is carried out application firmware according to the model of institute's connection device and is searched; After finding, be burnt to the ROM space, start working then; Realize dynamic load, whole operation is simple and efficient.
Step 102 is confirmed the function interface between operating system and application program.
The effect of said function interface is to make the interface that operating system can invokes application provides, the system interface that the application program row can the call operation system provides.
Step 103 deposits the application firmware file in the external memory space that embedded system carries in.
External memory space can be USB flash disk, portable hard drive or computer, and other memory devices.
Because the ROM space of chip internal is limited, need be placed into the firmware file of application program in the foreign file system of system and go, when dynamic load, be convenient to call at any time.
Step 104 is created a corresponding list file in the external memory space that embedded system carries.
The correspondence table file is used to write down the name of each application firmware file and the unit type of support, and sets up corresponding relation.The handled easily system searches firmware fast like this.
System carries out searching of application firmware fast according to the correspondence table lattice file after obtaining the unit type of connection, reduced the time of searching.
Step 105 connects embedded device and external memory space.
Step 106, operating system are obtained the embedded device model of connection.
Step 107 judges whether that success obtains the embedded device model that is connected; If not, get into step 108, if get into step 109.
Step 108, the prompting user does not support, needs to upgrade application firmware.
Step 109 is searched the corresponding application program firmware according to the embedded device model of obtaining in the correspondence table file.
Step 110 judges whether to search successfully; If not, return step 108, if get into step 111.
Step 111, with the application firmware burning file in the ROM space of application program.
Step 112, the said function interface of initialization, the operating system application programs is carried out dynamic load.
Through function interface, can carry out the dynamic load of application program quickly and easily, reduced operation easier, improved operating efficiency.
Below specify this method through an instance:
Supposing to have 8 application firmware files, is respectively 1.bin, 2.bin, and 3.bin, 4.bin, 5.bin, 6.bin, 7.bin, 8.bin, and support M_A, M_B, M_C, M_D, M_E, M_F, M_G, M_H respectively.
Table.txt is following for the opening relationships correspondence table:
1.bin:M_A
2.bin:M_B
3.bin:M_C
4.bin:M_D
5.bin:M_E
6.bin:M_F
7.bin:M_G
8.bin:M_H
When the equipment that connects is M_E, system finds 5.bin according to correspondence table table.txt and supports M_E.Therefore 5.bin is burnt to the corresponding ROM space of application program, the function interface between initialization operation system and the application program then, system brings into operation.
When the equipment that connects is M_C, system finds 3.bin according to correspondence table table.txt and supports M_C.Therefore 3.bin is burnt to the corresponding ROM space of application program, the function interface between initialization operation system and the application program then, system brings into operation.
So just reached the purpose of dynamic call.If the equipment that connects is M_X, table.txt does not exist, and then points out the user not support, needs to upgrade firmware.
Fig. 2 is for confirming the process flow diagram of function interface in the method for embedded system application program dynamic load of the present invention.
As shown in Figure 2, this flow process of confirming function interface comprises the steps:
Step 200, defining operation system function structure comprises the function interface that operating system provides to application program.
Step 201, defining operation system function structure variable is with first fixed position of said variables constant in operating system ROM space.
Step 202, definition application function structure body comprises the function interface that application program provides to operating system.
Step 203, definition application function structure body variable is with second fixed position of said variables constant in application program ROM space.
Fig. 3 is the process flow diagram of initialization function interface in the method for embedded system application program dynamic load of the present invention.
When suitable applications program firmware burning after the ROM space, operating system is carried out the initialization of function interface, reaching the interface that operating system can invokes application provides, the purpose of the interface that application program can the call operation system.
As shown in Figure 3, the flow process of this initialization function interface comprises the steps:
Step 300, the operating system function interface that the initialization application program provides to operating system on the second place.
Step 301, the application program function interface that the initialization operation system provides to application program on primary importance.
The flow process of below clearly deciding function interface and initialization function interface through an instance:
The function interface that operating system provides to application program:
Void(*)OS_interface1(Void*)
Void(*)OS_interface2(Void*)
Void(*)OS_interface3(Void*)
Void(*)OS_interface4(Void*)
Void(*)OS_interface5(Void*)
Void(*)OS_interfacex(Void*)
The function interface that application program provides to operating system:
Void(*)App_interface1(Void*)
Void(*)App_interface2(Void*)
Void(*)App_interface3(Void*)
Void(*)App_interface4(Void*)
Void(*)App_interface5(Void*)
Void(*)App_interfacex(Void*)
Defining operation system function structure:
Figure BSA00000394205700081
Defining operation application structure body:
Figure BSA00000394205700091
Defining operation system function structure variable:
Figure BSA00000394205700092
O_Interface is fixed on the 0x0000FFFF.
Definition application function structure body variable:
Figure BSA00000394205700093
Figure BSA00000394205700101
A_Interface is fixed on the 0x8FFFF0.
Method through embedded system application program dynamic load of the present invention has improved debugging speed, has reduced the cost of product, thereby efficiently solves the situation that embedded OS is not supported dynamic load.
Though more than described embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited appended claims.Those skilled in the art can make numerous variations or modification to these embodiments under the prerequisite that does not deviate from principle of the present invention and essence, but these changes and modification all fall into protection scope of the present invention.

Claims (8)

1. the method for an embedded system application program dynamic load is characterized in that it may further comprise the steps:
S 1, open embedded device, ROM space and ram space that division operation system and application program are occupied respectively;
S 2, confirm the function interface between operating system and application program;
S 3, the application firmware file is deposited in the external memory space that embedded device carries, link to each other this embedded device with external memory space;
S 4, with the application firmware burning file in the ROM space of application program;
S 5, the said function interface of initialization, the operating system application programs is carried out dynamic load.
2. the method for embedded system application program dynamic load as claimed in claim 1 is characterized in that, said operating system is non intelligent embedded OS.
3. the method for embedded system application program dynamic load as claimed in claim 1 is characterized in that, said external memory space is USB flash disk, portable hard drive or computer.
4. the method for embedded system application program dynamic load as claimed in claim 1 is characterized in that, said step S 2In further comprising the steps of:
S 21, defining operation system function structure, comprise the function interface that operating system provides to application program;
S 22, defining operation system function structure variable, with first fixed position of said variables constant in operating system ROM space;
S 23, definition application function structure body, comprise the function interface that application program provides to operating system;
S 24, definition application function structure body variable, with second fixed position of said variables constant in application program ROM space.
5. the method for embedded system application program dynamic load as claimed in claim 1 is characterized in that, said step S 3In also comprise: in the external memory space that said embedded device carries, create a corresponding list file.
6. the method for embedded system application program dynamic load as claimed in claim 5 is characterized in that, said correspondence table file is used to write down the name of each application firmware file and the unit type of support, and sets up corresponding relation.
7. the method for embedded system application program dynamic load as claimed in claim 1 is characterized in that, said step S 3Further comprising the steps of afterwards:
S 31, operating system obtains the embedded device model of connection;
S 32, judge whether to obtain the embedded device model success that is connected; If not, get into step S 33If,, get into step S 34
S 33, the prompting user do not support, need to upgrade application firmware;
S 34, in the correspondence table file, search the corresponding application program firmware according to the embedded device model that is connected obtained;
S 35, judge whether to search successfully; If not, return step S 33If,, get into step S 4
8. the method for embedded system application program dynamic load as claimed in claim 1 is characterized in that, said step S 5In further comprising the steps of:
S 51, the operating system function interface that the initialization application program provides to operating system on the second place;
S 52, the application program function interface that the initialization operation system provides to application program on primary importance.
CN2010105998124A 2010-12-17 2010-12-17 Method for dynamically loading application program of embedded system Pending CN102541579A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105998124A CN102541579A (en) 2010-12-17 2010-12-17 Method for dynamically loading application program of embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105998124A CN102541579A (en) 2010-12-17 2010-12-17 Method for dynamically loading application program of embedded system

Publications (1)

Publication Number Publication Date
CN102541579A true CN102541579A (en) 2012-07-04

Family

ID=46348550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105998124A Pending CN102541579A (en) 2010-12-17 2010-12-17 Method for dynamically loading application program of embedded system

Country Status (1)

Country Link
CN (1) CN102541579A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645920A (en) * 2013-12-19 2014-03-19 深圳市捷顺科技实业股份有限公司 Embedded system program burning method and system
CN104422865A (en) * 2013-08-22 2015-03-18 上海海尔集成电路有限公司 Wafer-level one time programmable (OTP) chip test method and device
CN106371884A (en) * 2016-09-18 2017-02-01 时瑞科技(深圳)有限公司 Universal embedded application loading system and method
CN106909480A (en) * 2017-01-19 2017-06-30 华南师范大学 A kind of embedded system cross debugging method and apparatus
CN107122216A (en) * 2017-05-19 2017-09-01 北京计算机技术及应用研究所 A kind of embedded real-time operating system dynamic loading method
CN109254762A (en) * 2018-08-23 2019-01-22 深圳市默贝克驱动技术有限公司 A kind of open-drive device software platform
CN114035842A (en) * 2022-01-07 2022-02-11 飞腾信息技术有限公司 Firmware configuration method, computing system configuration method, computing device and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246427A (en) * 2007-02-15 2008-08-20 凌阳科技股份有限公司 Method for relocated loading application program and address relocation device
CN101290577A (en) * 2007-04-20 2008-10-22 鸿富锦精密工业(深圳)有限公司 Embedded equipment and its loading method
CN101458629A (en) * 2008-12-31 2009-06-17 北京中星微电子有限公司 Method and apparatus for implementing dynamic loading in embedded real-time operating system
WO2009086692A1 (en) * 2008-01-07 2009-07-16 Fortune Spring Technology (Shenzhen) Corporation A processing method for embedded system using nand flash to memorize and start up
CN101493775A (en) * 2009-03-06 2009-07-29 北京北纬通信科技股份有限公司 Dynamic loading system and loading method thereof for embedded system
CN101673204A (en) * 2009-08-13 2010-03-17 上海酷吧信息技术有限公司 Dynamic loading method of application program of mobile phone based on arm

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246427A (en) * 2007-02-15 2008-08-20 凌阳科技股份有限公司 Method for relocated loading application program and address relocation device
CN101290577A (en) * 2007-04-20 2008-10-22 鸿富锦精密工业(深圳)有限公司 Embedded equipment and its loading method
WO2009086692A1 (en) * 2008-01-07 2009-07-16 Fortune Spring Technology (Shenzhen) Corporation A processing method for embedded system using nand flash to memorize and start up
CN101458629A (en) * 2008-12-31 2009-06-17 北京中星微电子有限公司 Method and apparatus for implementing dynamic loading in embedded real-time operating system
CN101493775A (en) * 2009-03-06 2009-07-29 北京北纬通信科技股份有限公司 Dynamic loading system and loading method thereof for embedded system
CN101673204A (en) * 2009-08-13 2010-03-17 上海酷吧信息技术有限公司 Dynamic loading method of application program of mobile phone based on arm

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104422865A (en) * 2013-08-22 2015-03-18 上海海尔集成电路有限公司 Wafer-level one time programmable (OTP) chip test method and device
CN103645920A (en) * 2013-12-19 2014-03-19 深圳市捷顺科技实业股份有限公司 Embedded system program burning method and system
CN106371884A (en) * 2016-09-18 2017-02-01 时瑞科技(深圳)有限公司 Universal embedded application loading system and method
CN106371884B (en) * 2016-09-18 2019-12-20 时瑞科技(深圳)有限公司 Universal embedded loading application system and method
CN106909480A (en) * 2017-01-19 2017-06-30 华南师范大学 A kind of embedded system cross debugging method and apparatus
CN107122216A (en) * 2017-05-19 2017-09-01 北京计算机技术及应用研究所 A kind of embedded real-time operating system dynamic loading method
CN107122216B (en) * 2017-05-19 2020-06-16 北京计算机技术及应用研究所 Dynamic loading method for embedded real-time operating system
CN109254762A (en) * 2018-08-23 2019-01-22 深圳市默贝克驱动技术有限公司 A kind of open-drive device software platform
CN109254762B (en) * 2018-08-23 2022-12-20 深圳市默贝克驱动技术有限公司 Open driver software platform
CN114035842A (en) * 2022-01-07 2022-02-11 飞腾信息技术有限公司 Firmware configuration method, computing system configuration method, computing device and equipment

Similar Documents

Publication Publication Date Title
CN102541579A (en) Method for dynamically loading application program of embedded system
CN104166561B (en) Electronic apparatus system starts method and electronic equipment
CN104239083A (en) Method, device and system for migrating application of mobile terminals
CN101510161A (en) Bootstrap implementing method, apparatus and portable electronic apparatus
CN102622249B (en) A kind of safe starting method preventing CPU self-locking
CN103955536A (en) Classification method and device of applications
CN103365644A (en) Method and device for expanding software functions
CN104503922B (en) The method that loading WindowsCE systems are guided based on uboot
US12008171B2 (en) Program download method for intelligent terminal with memory card identifier and intelligent terminal with memory card identifier
CN101833464A (en) Method and device for sectionally loading application programs by mobile terminal
CN102937904A (en) Multi-node firmware updating method and device
CN103593281A (en) Test system and test method
CN111290773B (en) System upgrade method, device and readable storage medium
CN103226505A (en) Method and equipment for checking basic input output system (BIOS)
CN103514014A (en) Method for designing boot system of embedded terminal equipment
CN104050001A (en) Resource processing method, device and equipment based on Android system
CN103455750B (en) The high peace verification method of a kind of embedded device and device
US20140298319A1 (en) Method for installing operating system on electronic device
CN109190367B (en) Method and device for running application program installation package by utilizing sandbox
CN103064934B (en) Android file management method and device
CN103020186B (en) A kind of document retrieval method based on embedded device, device and equipment
CN103024928A (en) Terminal wireless connection method and wireless terminal
CN113031996A (en) OTA (over the air) upgrading method and device of electronic equipment, control terminal and medium
CN105630530A (en) Multilevel boot method and system of digital signal processor
CN103793231A (en) Processing method and system for mobile terminal parameters

Legal Events

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

Application publication date: 20120704