CN107247608A - A kind of operating system implementation method with application software hardware address independence - Google Patents

A kind of operating system implementation method with application software hardware address independence Download PDF

Info

Publication number
CN107247608A
CN107247608A CN201710399564.0A CN201710399564A CN107247608A CN 107247608 A CN107247608 A CN 107247608A CN 201710399564 A CN201710399564 A CN 201710399564A CN 107247608 A CN107247608 A CN 107247608A
Authority
CN
China
Prior art keywords
application software
software
hardware
independence
operating system
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
CN201710399564.0A
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.)
Henan Thought Rail Traffic Technology Research Institute Co Ltd
Original Assignee
Henan Thought Rail Traffic Technology Research Institute 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 Henan Thought Rail Traffic Technology Research Institute Co Ltd filed Critical Henan Thought Rail Traffic Technology Research Institute Co Ltd
Priority to CN201710399564.0A priority Critical patent/CN107247608A/en
Publication of CN107247608A publication Critical patent/CN107247608A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request

Abstract

The operating system implementation method with application software hardware address independence that the present invention is provided, compiles generation by application software in the unrelated mode in address first;Embedded system to not supporting virtual memory management, sets the system with hardware address independence to call;Then operating system starts application software by reading the configuration information of application software;Application software carries out information exchange by calling the system of hardware address independence to call with hardware resource.The embedded software system built using this method, realize the complete hardware independence of Embedded Application control software, it can realize that application software supports software to issue respectively with hardware platform, exploitation, test to built-in system software, especially hardware platform improves upgrade job, cost can be reduced, efficiency is improved.

Description

A kind of operating system implementation method with application software hardware address independence
Technical field
The present invention relates to a kind of operating system implementation method with application software hardware address independence.
Background technology
In the embedded system of virtual memory is not supported, application software generally must specify its code in compiling, link With the loading hardware address of data, if application software is mounted in unspecified address, it is impossible to correct operation.
In current embedded system, if its processor does not support virtual memory management, its software is generally all and hardware Address correlation, it is accomplished by specifying the hardware address and address data area of operation during compiling link.Even with embedded behaviour Make system, being called due to the system of offer is realized with generic function method of calling, and application software needs to know that system calls letter Several address, so its application software part is also related to the address of hardware.In fact, such embedded system is often bottom Layer hardware driving code and application code are to compile together, one software document that can issue of generation.
Application software can not accomplish unrelated with hardware, when bottom hardware changes, it is necessary to recompilate the whole insertion of generation Formula system software, is issued again.Increase the test, checking, the cost of issue of software.Especially in safety-related field, correspondence Require high with control software, supervision is tight, change the supervision of application control software, examine that cost is very high, simply because some of hardware Replacement of Electronic Components, upgrading cause software to be issued again, can bring about the examination again to whole software systems, substantially increasing this is System updates, the cost of development.
The content of the invention
The present invention provides a kind of operating system implementation method with application software hardware address independence, existing to solve The problem of technology is present.
The present invention uses following technical scheme:
Operating system implementation method with application software hardware address independence,
Application software is compiled into generation in the unrelated mode in address;
Embedded system to not supporting virtual memory management, sets the system with hardware address independence to call;
Operating system starts application software by reading the configuration information of application software;Application software is by calling hardware address The system of independence is called, and information exchange is carried out with hardware resource.
The system with hardware address independence that the embedded system is provided is called, real by software interrupt mode It is existing:
The different system that embedded system is provided calls the different interrupt number of correspondence software interrupt, and application software needs calling system When calling, by triggering software interrupt, interrupt number and corresponding system are called into the incoming operating system nucleus of required parameter;
Software interrupt service routine in operating system nucleus takes out interrupt number and incoming parameter, jumps to corresponding system and adjusts With function and perform, function implementing result returns to application software.
Described information exchange refers to that application software obtains the information that hardware resource is provided, or application software is sent out Signal.
Operating system resource for needed for application software distributes it according to application software configuration information, by application software Code is loaded onto run location, starts application software operation;If the position operation that application software is installed at it, is no longer carried out Loading, directly initiates application software;
It is described the code of application software is loaded onto run location to refer to copy run location to by storage location.
It is described that the code of application software is loaded onto run location and started after application software operation, line code can be entered Integrality, validity checking.
Beneficial effects of the present invention:The embedded software system built using this method, realizes Embedded Application control The complete hardware independence of software, it is possible to achieve application software supports software to issue respectively with hardware platform, to embedded system The exploitation of software, especially test, hardware platform improve upgrade job, can reduce cost, improve efficiency.
Brief description of the drawings
Fig. 1 is flow chart of the invention.
Fig. 2 is architecture diagram of the invention.
Fig. 3 is that traps call schematic diagram.
Embodiment
The present invention is described in further detail with reference to the accompanying drawings and detailed description.
Application software hardware address independence, refer to application software do not limit its load, the hardware address of run location, Can correctly it perform.
The present invention is directed to the embedded system for not supporting virtual memory management, it is impossible to realized by existing mode using soft Application software and bottom can be achieved in the problem of part complete hardware address is unrelated, Stand-alone distribution is run, a solution of proposition Software(Operating system, driver)It is independently updated, i.e., can realize first using and basic-level support system can upgrade respectively renewal, Recompilate, update without whole softwares;Secondly, it can be achieved not changing under original software conditions, by increasing application software, carry For new function.
Specifically include:
Application software is compiled into generation in the unrelated mode in address.
Embedded system to not supporting virtual memory management, sets the system with hardware address independence to call.
Application software carries out information exchange by calling the system of hardware address independence to call.
That is, embedded software operating system of the invention adds the framework mode of application software to set with embedded OS Meter, two parts are compiled, link, issued respectively.
Application software must be compiled with address independence mode and generated.Current common compiler supports address independence mode Compiling, such as ARM compilers offer-ropi ,-rwpi, which compile option, to be used to compile the generation execution generation unrelated with particular hardware address Code.As GCC compiler offer-fPIC options generate the unrelated execution code in address.
The embedded system for not supporting virtual memory management is called there is provided the system with hardware address independence.Than As present embodiment realizes that system is called with software interrupt mode.The different system that operating system is provided calls correspondence software interrupt Different interrupt numbers.When application software needs the calling system to call, trigger software interrupt, by storehouse by interrupt number and corresponding system System calls the incoming operating system nucleus of parameter of needs.Software interrupt service routine in operating system nucleus take out interrupt number and Incoming parameter, jumps to corresponding system call function and performs, function implementing result returns to application software.Such a mode In, application software only needs to know the system call number that operating system is provided(That is traps number), you can reality is called by system Now to the access of hardware component, the specific address without knowing system call function.
And in a running software, two kinds of address correlation circumstances can be roughly classified into:One is each function of therein and The address of data storage location, the second is calling the specific address of external function.In the present invention, therein address passes through hardware The unrelated mode in address compiles realization, the plot of data field before load operating application program it is specified that inter access be all with Accessed with respect to plot position, be so achieved that the independence of application software therein code and hardware address.And call outer Refer to that above-mentioned system is called in the specific address of portion's function, the present invention, address independence is realized by traps mode.
As it was previously stated, the system call interfaces interactive information that application software is provided by operating system, completes its function.And Above-mentioned interactive information refers to:1. application software obtains the information that hardware resource is provided, including collection information, communication data etc. To hardware resource order, data etc. are sent Deng, 2. application software.
In the present invention, operating system starts application software operation by reading application software configuration information.Application software is matched somebody with somebody Confidence ceases, can be described using the binary file for starting script or user-defined format application software storage location, run location, Operation resource requirement relevant information, such as the size of application software, storage location, run location, data segment base etc., information Content is according to depending on embedded system concrete condition.Operating system passes through specified position or the filename of agreement(Use file During system)Read application software configuration information.Operating system is according to application software configuration information for needed for application software distributes it Resource, is loaded onto run location, sets its data segment base etc., then can start application software operation.If application software is at it The position operation of installation, then load step can be omitted.The loading refers to application software code and is loaded into run location.In some systems The storage location of software is unable to operation code, it is necessary to application software is loaded into the memory of energy operation code.Such as apply Program storage is in NANDflash, and this position can not perform code and be run, it is necessary to which application software is loaded into RAM.
Because application software has address independence in the present invention, its loading procedure simply copies operation to by storage location Position, and without the reorientation of code.Run location code and execution position code content are identicals, simply storage location Change.Because without being relocated, the beneficial effect that integrality, legitimacy in operation to code are checked can be obtained Really.And if relocated, operation code is changed, it is clear that such inspection when can not be run.It is above-mentioned right The inspection of code integrity, legitimacy, is the existing method checked code.Reruned after software needs to relocate When, existing inspection method can only be carried out in loading procedure or before loading, it is impossible to be carried out in the process of running, because being weighed Positioning, causes operation code to change, it is impossible to carry out such inspection in operation.
It is abstract, call parameters to embedded system hardware resource that the system that operating system in the present invention is provided, which is called, It is not related to particular hardware information.Called by system and shield specific hardware information completely, so that application software has had Full hardware independence.
As the specific embodiment that shielding particular hardware information is called by system, such as to make in one embedded system Communicated with CAN, now, the CAN controller in the embedded system that hardware objects are assumed that.Using the present invention Method, set up the operation set of equipment with resource name in operating system and device drives first, application software is logical with resource name The system of mistake, which is called, finds corresponding operation set, calls equipment operation, completes the access to equipment.For example, to CAN controller resource Resource name can0, can1 etc. can be named, CAN operation is taken out such as opening, reading and writing, these operations are with some form Carry is on using resource name as the data structure of mark, and application software accesses CAN device with resource name, and access is called by system The driver of CAN device completes specific operation.Application software code is not related to the specifying information of specific equipment(Such as register Address, position definition etc.), with hardware independence, change CAN controller and have no effect on application software.During this, system is called The mode of access equipment driving is not limited, using existing mode, together with system is called and compiled with device drives.
Using the above method, independence of the application software to hardware specifying information is realized, when particular hardware changes, Wu Xuxiu Change application software.
The embedded software system built using this method, the complete hardware for realizing Embedded Application control software is unrelated Property, it is possible to achieve application software supports that software is issued respectively with hardware platform, exploitation, test to built-in system software, especially It is that hardware platform improves upgrade job, can reduce cost, improve efficiency.Additionally by application configuration information, can conveniently it adjust The application function that whole embedded system is provided.
Above-described is only the preferred embodiment of the present invention, it is noted that for those skilled in the art, Under the premise of general idea of the present invention is not departed from, some changes and improvements can also be made, these should also be considered as the present invention's Protection domain.

Claims (5)

1. the operating system implementation method with application software hardware address independence, it is characterised in that:
Application software is compiled into generation in the unrelated mode in address;
Embedded system to not supporting virtual memory management, sets the system with hardware address independence to call;
Operating system starts application software by reading the configuration information of application software;Application software is by calling hardware address The system of independence is called, and information exchange is carried out with hardware resource.
2. according to the method described in claim 1, it is characterised in that:
The system with hardware address independence that the embedded system is provided is called, and is realized by software interrupt mode:
The different system that embedded system is provided calls the different interrupt number of correspondence software interrupt, and application software needs calling system When calling, by triggering software interrupt, interrupt number and corresponding system are called into the incoming operating system nucleus of required parameter;
Software interrupt service routine in operating system nucleus takes out interrupt number and incoming parameter, jumps to corresponding system and adjusts With function and perform, function implementing result returns to application software.
3. according to the method described in claim 1, it is characterised in that:Described information exchange refers to that application software obtains hardware money The information that source is provided, or application software are sent out signal.
4. according to the method described in claim 1, it is characterised in that:The operating system is according to application software configuration information should Its required resource with software distribution, run location is loaded onto by the code of application software, starts application software operation;If using The position operation that software is installed at it, then no longer loaded, directly initiate application software;
It is described the code of application software is loaded onto run location to refer to copy run location to by storage location.
5. method according to claim 4, it is characterised in that:It is described that the code of application software is loaded onto run location simultaneously Start after application software operation, integrality, the validity checking of line code can be entered.
CN201710399564.0A 2017-05-31 2017-05-31 A kind of operating system implementation method with application software hardware address independence Pending CN107247608A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710399564.0A CN107247608A (en) 2017-05-31 2017-05-31 A kind of operating system implementation method with application software hardware address independence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710399564.0A CN107247608A (en) 2017-05-31 2017-05-31 A kind of operating system implementation method with application software hardware address independence

Publications (1)

Publication Number Publication Date
CN107247608A true CN107247608A (en) 2017-10-13

Family

ID=60017960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710399564.0A Pending CN107247608A (en) 2017-05-31 2017-05-31 A kind of operating system implementation method with application software hardware address independence

Country Status (1)

Country Link
CN (1) CN107247608A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110837393A (en) * 2019-11-14 2020-02-25 北京知道创宇信息技术股份有限公司 Method and device for manufacturing firmware differential upgrade package and readable storage medium
CN110990018A (en) * 2019-10-29 2020-04-10 北京全路通信信号研究设计院集团有限公司 Compiling deployment method, compiling method and compiling system of embedded system
CN116450206A (en) * 2023-06-14 2023-07-18 飞腾信息技术有限公司 Software system construction method, device, equipment and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395521A (en) * 2000-10-11 2003-02-05 索尼公司 Robot control system and method for installing software for robot control
CN1604060A (en) * 2003-09-30 2005-04-06 国际商业机器公司 Method and apparatus for handling interrupts
CN1828545A (en) * 2006-04-07 2006-09-06 浙江大学 Software method for embedded type operating system input/output apparatus
CN101668283A (en) * 2008-09-01 2010-03-10 沃勤网络科技(上海)有限公司 Method for dynamic loading in embedded system of mobile phone
CN101751730A (en) * 2008-12-10 2010-06-23 航天信息股份有限公司 Safety operating platform of tax-controlling device
CN102968311A (en) * 2012-12-13 2013-03-13 中国航空无线电电子研究所 Onboard embedded software development platform
CN103309684A (en) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 Method and device for dynamically loading application

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395521A (en) * 2000-10-11 2003-02-05 索尼公司 Robot control system and method for installing software for robot control
CN1604060A (en) * 2003-09-30 2005-04-06 国际商业机器公司 Method and apparatus for handling interrupts
CN1828545A (en) * 2006-04-07 2006-09-06 浙江大学 Software method for embedded type operating system input/output apparatus
CN101668283A (en) * 2008-09-01 2010-03-10 沃勤网络科技(上海)有限公司 Method for dynamic loading in embedded system of mobile phone
CN101751730A (en) * 2008-12-10 2010-06-23 航天信息股份有限公司 Safety operating platform of tax-controlling device
CN103309684A (en) * 2012-03-07 2013-09-18 腾讯科技(深圳)有限公司 Method and device for dynamically loading application
CN102968311A (en) * 2012-12-13 2013-03-13 中国航空无线电电子研究所 Onboard embedded software development platform

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
奉臣修资: ""Swi软件中断理解"", 《HTTPS://WENKU.BAIDU.COM/VIEW/AE5FFA10F01DC281E53AF0CD.HTML》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990018A (en) * 2019-10-29 2020-04-10 北京全路通信信号研究设计院集团有限公司 Compiling deployment method, compiling method and compiling system of embedded system
CN110990018B (en) * 2019-10-29 2023-03-24 北京全路通信信号研究设计院集团有限公司 Compiling method and compiling system of embedded system
CN110837393A (en) * 2019-11-14 2020-02-25 北京知道创宇信息技术股份有限公司 Method and device for manufacturing firmware differential upgrade package and readable storage medium
CN116450206A (en) * 2023-06-14 2023-07-18 飞腾信息技术有限公司 Software system construction method, device, equipment and computer readable storage medium
CN116450206B (en) * 2023-06-14 2023-09-01 飞腾信息技术有限公司 Software system construction method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN1258702C (en) Method for communication between firmware written for different instruction set architectures
US7886287B1 (en) Method and apparatus for hot updating of running processes
US8255892B2 (en) Flash memory programming
CN108369520B (en) Protecting basic input/output (BIOS) code
CN101667154A (en) Apparatus and method for improving emulation speed of high-level languages in on-chip emulation systems
EP1755034A1 (en) Object code generation for increasing the performance of delta files
WO2015117434A1 (en) Method and device for manufacturing patch, and method and device for activating patch
CN105138382A (en) Method for upgrading Android system and terminal
CN107247608A (en) A kind of operating system implementation method with application software hardware address independence
WO2001024009A1 (en) Method and apparatus for testing a process in a computer system
CN107077379B (en) A kind of virtual machine creation method and device
US8881123B2 (en) Enabling symbol resolution of private symbols in legacy programs and optimizing access to the private symbols
CN115617687B (en) Program instrumentation method, device, equipment and storage medium
US20190095187A1 (en) Incremental updates in static libraries
US6665671B2 (en) System and method for optimization of shared data
US20090119653A1 (en) Instrumenting a compiled software routine for augmentation
CN102722438A (en) Kernel debugging method and equipment
CN114021141A (en) Electronic equipment, trusted application calling method, device, equipment and medium
CN107943504A (en) The dynamic update method of software module in a kind of embedded system
CN111984263A (en) Method, device, equipment and medium for running second system application on first system
CN116401003A (en) Android application running method, system and storage medium based on desktop operating system
CN113282439B (en) eMMC test method and device, readable storage medium and electronic equipment
CN115374017A (en) Method for capturing site during simulation running of executable file and computing equipment
US11188361B1 (en) Cross-architecture software distribution using a virtual instruction set architecture
CN111984329B (en) Boot software standardized generation and execution method and system

Legal Events

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

Application publication date: 20171013

RJ01 Rejection of invention patent application after publication