CN105260186A - Construction method and device of application program SDK for embedded system - Google Patents

Construction method and device of application program SDK for embedded system Download PDF

Info

Publication number
CN105260186A
CN105260186A CN201510679066.2A CN201510679066A CN105260186A CN 105260186 A CN105260186 A CN 105260186A CN 201510679066 A CN201510679066 A CN 201510679066A CN 105260186 A CN105260186 A CN 105260186A
Authority
CN
China
Prior art keywords
software layer
function
sdk
module
api
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.)
Granted
Application number
CN201510679066.2A
Other languages
Chinese (zh)
Other versions
CN105260186B (en
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.)
Xiamen Cheerzing Technology Co Ltd
Original Assignee
Xiamen Cheerzing Technology 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 Xiamen Cheerzing Technology Co Ltd filed Critical Xiamen Cheerzing Technology Co Ltd
Priority to CN201510679066.2A priority Critical patent/CN105260186B/en
Publication of CN105260186A publication Critical patent/CN105260186A/en
Application granted granted Critical
Publication of CN105260186B publication Critical patent/CN105260186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a construction method and device of an application program SDK for an embedded system. According to the construction method and device, the embedded system is divided into an application software layer and a basic service software layer, an SDK module is constructed in the application software layer and an abstract module is constructed in the basic service software layer, wherein the application software layer and the basic service software layer are indirectly coupled and provided with a common stack, so that the manner of independently developing embedded application program software on the basis of SDK is realized, the developers can independently develop various application programs only on the basis of the SDK, the application program supports the mutual calling between the basic service software API and the application software API corresponding to the basic service software, and the basic service software can load the application software automatically.

Description

For construction method and the device of the application program SDK of embedded system
Technical field
The present invention relates to a kind of embedded system, particularly the construction method of a kind of application program SDK for embedded system and device.
Background technology
Built-in system software product is pursued and to be simplified, in real time, efficiently and low cost, therefore the modules of most of embedded software is all based on RTOS whole development, test and debugging, owing to being that hybrid programming causes application program and infrastructure service program often to influence each other, concurrent development for multiple embedded product software is more difficult with maintenance, the engineering technical personnel of research and development of software team need to be grasped various knowledge and skills, are unfavorable for the extensive development of embedded product particularly Internet of things hardware product.
Summary of the invention
The present invention is for solving the problem, provide construction method and the device of a kind of application program SDK for embedded system, it is by being divided into application software layer and infrastructure service software layer by built-in system software by ATM layer relationsATM, and develop independently abstract module and SDK module, thus achieve the mode based on SDK stand-alone development built-in application program software.
For achieving the above object, the technical solution used in the present invention is:
The construction method of a kind of application program SDK for embedded system, described embedded system is divided into application software layer and infrastructure service software layer, described application software layer is coupled with infrastructure service software layer non-immediate and is provided with common stack, and the structure of described application program SDK comprises the following steps:
10. the functional requirement of application software for XRF analysis layer, and according to this functional requirement, the API demand for infrastructure service software layer is proposed;
20. build abstract module in infrastructure service software layer, and in this abstract module, realize described API demand;
The array of the sensing api function entry address that the API described in 30. foundation is corresponding, and by the start address fixed-link of this array in the fixed address of embedded system;
40. set up the type that is pointed to array of function pointer, and are the type pointing to this array of function pointer by the start address unsteady state operation of the array of described api function entry address;
50. build SDK module in application software layer, and build the api function in SDK, the array of function pointer described in the direct invocation step 40 of api function of this SDK.
Preferably, in described step 40, by the type that the start address unsteady state operation of the array of described api function entry address is set up array of function pointer, be by adopting the type that the start address unsteady state operation of the array of described api function entry address is set up array of function pointer by the pointer unsteady state operation mode of C language, and point to the api function entry address of abstract module.
Preferably, in infrastructure service software layer, the start address adopting jump instruction directly to jump to the application program of application software layer carries out startup application program.
Preferably, in described step 50, in application software layer, build SDK module, comprise entry address and the entrance function of the API arranged in SDK.
Preferably, arrange the readjustment registration function of infrastructure service software layer to application software layer further in abstract module, application software layer is by the entry address of this readjustment registration function to infrastructure service software layer delivery applications program event process function.
Preferably, in abstract module, be provided with anti-registration function further, carry out removing the application event process function being passed to infrastructure service software layer by this anti-registration function.
Preferably, described embedded system is divided into application software layer and infrastructure service software layer, and described application software layer is coupled with infrastructure service software layer non-immediate and is provided with common stack, and the construction device of described application program SDK comprises further:
API requirement analysis module, it is by the functional requirement of application software for XRF analysis layer, and proposes the API demand for infrastructure service software layer according to this functional requirement;
Abstract module, it by building abstract module in infrastructure service software layer, and realizes described API demand in this abstract module;
API array builds module, for setting up the array of sensing api function entry address corresponding to described API, and by the start address fixed-link of this array in the fixed address of embedded system;
API array modular converter, it is by setting up the type that is pointed to array of function pointer, and is the type pointing to this array of function pointer by the start address unsteady state operation of the array of described api function entry address;
SDK module, it by building SDK module in application software layer, and builds the api function in SDK, and the api function of this SDK directly calls described array of function pointer.
Preferably, also comprise function callback module, it by arranging infrastructure service software layer to the readjustment registration function of application software layer and anti-registration function in abstract module, application software layer by the entry address of described readjustment registration function to infrastructure service software layer delivery applications program event process function, and carries out removing the application event process function being passed to infrastructure service software layer by described anti-registration function.
Preferably, described infrastructure service software layer comprises Hardware drive module, operating system module, communication service module further.
Preferably, described application software layer comprises Subscriber Interface Module SIM, application communication protocol module, functional module further.
The invention has the beneficial effects as follows:
The construction method of a kind of application program SDK for embedded system of the present invention and device, it is by being divided into application software layer and infrastructure service software layer by described embedded system, and SDK module is built with in described application software layer, abstract module is built with in described infrastructure service software layer, wherein, described application software layer is coupled with infrastructure service software layer non-immediate and is provided with common stack, thus the mode achieved based on SDK stand-alone development built-in application program software, developer can only based on the various application program of SDK stand-alone development, and application program support to infrastructure service software API and infrastructure service software mutually calling application software API, simultaneously infrastructure service software can loading application software automatically.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a part of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the structural representation of embedded system of the present invention;
Fig. 2 is the general flow chart of the present invention for the construction method of the application program SDK of embedded system;
Fig. 3 is the structural representation of the present invention for the construction device of the application program SDK of embedded system.
Embodiment
In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearly, understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
As shown in Figure 1, described embedded system is divided into application software layer and infrastructure service software layer, SDK module is built with in described application software layer, abstract module is built with in described infrastructure service software layer, wherein, described application software layer is coupled with infrastructure service software layer non-immediate and is provided with common stack.
As shown in Figure 2, the construction method of the application program SDK for embedded system of the present invention comprises the following steps:
10. the functional requirement of application software for XRF analysis layer, and according to this functional requirement, the API demand for infrastructure service software layer is proposed;
20. build abstract module in infrastructure service software layer, and in this abstract module, realize described API demand;
The array of the sensing api function entry address that the API described in 30. foundation is corresponding, and by the fixed address (as A0) of the start address fixed-link of this array in embedded system;
40. set up the type that is pointed to array of function pointer, and are the type pointing to this array of function pointer by the start address A0 unsteady state operation of the array of described api function entry address;
50. build SDK module in application software layer, and build the api function in SDK, the array of function pointer described in the direct invocation step 40 of api function of this SDK.
Wherein, in described step 40, by the type that the start address unsteady state operation of API array is set up array of function pointer, be by adopting the type that the start address unsteady state operation of API array is set up array of function pointer by the pointer unsteady state operation mode of C language, and point to the api function entry address of abstract module.In infrastructure service software layer, the start address adopting jump instruction directly to jump to the application program of application software layer carries out startup application program.In described step 50, in application software layer, build SDK module, comprise entry address (such as: 0xB0000000) and the entrance function of the API arranged in SDK.
In the present embodiment, infrastructure service software layer is set further in abstract module to the readjustment registration function (Callback function) of application software layer and anti-registration function, application software layer by the entry address of described readjustment registration function to infrastructure service software layer delivery applications program event process function, and carries out removing the application event process function being passed to infrastructure service software layer by described anti-registration function.When infrastructure service software event occurs need by application program process time, be directly processed into port address invokes application event handling function according to the application event obtained; When application program does not need to process some particular event, call anti-registration function and remove event handling entry address, if when corresponding event occurs infrastructure service program determine address be eliminated just directly abandon this event after return, thus optimized integration service software directly calling application software module.
As shown in Figure 3, the present invention also provides corresponding construction device 100 according to the construction method of the described application program SDK for embedded system, and it comprises:
API requirement analysis module 101, it is by the functional requirement of application software for XRF analysis layer, and proposes the API demand for infrastructure service software layer according to this functional requirement;
Abstract module 102, it by building abstract module in infrastructure service software layer, and realizes described API demand in this abstract module;
API array builds module 103, for setting up the array of sensing api function entry address corresponding to described API, and by the start address fixed-link of this array in the fixed address of embedded system;
API array modular converter 104, it is by setting up the type that is pointed to array of function pointer, and is the type pointing to this array of function pointer by the start address unsteady state operation of the array of described api function entry address;
SDK module 105, it by building SDK module in application software layer, and builds the api function in SDK, and the api function of this SDK directly calls described array of function pointer.
In the present embodiment, also comprise function callback module 106, it by arranging infrastructure service software layer to the readjustment registration function of application software layer and anti-registration function in abstract module, application software layer by the entry address of described readjustment registration function to infrastructure service software layer delivery applications program event process function, and carries out removing the entry address of the application event process function being passed to infrastructure service software layer by described anti-registration function.
Described infrastructure service software layer comprises Hardware drive module, operating system module, communication service module etc. further, in the present embodiment, described operating system module adopts RTOS real time operating system, and described communication service module comprises GPRS, WCDMA and LTE, bluetooth, WiFi etc.Described application software layer comprises Subscriber Interface Module SIM, application communication protocol module, functional module etc. further.Described application software layer and infrastructure service software layer adopt the mode of sharing system heap (Heap) and stack (Stack), make infrastructure service software layer completely unfettered to the number of parameters and type of applying the open all API of software layer
The embedded system of prior art does not strictly distinguish application software layer and infrastructure service software layer, application software layer and infrastructure service software layer are on same code segment and data segment, in software development, test, maintenance, escalation process due to code overall complicated, huge, the problem such as to intercouple can at substantial resource, needs more senior slip-stick artist to participate in.The present invention is by being divided into application software layer and infrastructure service software layer by embedded system, application software layer and infrastructure service software layer run in same memory headroom, but it is completely independent on storage space, do not interact, and manage respectively in software development, test and maintenance, greatly reduce coupling, the specialization of software developed, tests, safeguard and the difficulty of the aspect such as upgrading reduces greatly, namely improve software quality, also reduce research and development of software resource.
It should be noted that; number order in the present invention " 10,20 ..., 101,102 ... " etc. be not restriction to the sequence of steps of invention etc.; can be such as relation arranged side by side between step 30,40,50; and do not need to perform according to listed sequence of steps, various equivalent or equivalent mapping mode is all in protection scope of the present invention.
It should be noted that, each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually see.For device embodiment, due to itself and embodiment of the method basic simlarity, so description is fairly simple, relevant part illustrates see the part of embodiment of the method.And, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.In addition, one of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
Above-mentioned explanation illustrate and describes the preferred embodiments of the present invention, be to be understood that the present invention is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the present invention, then all should in the protection domain of claims of the present invention.

Claims (10)

1. the construction method for the application program SDK of embedded system, it is characterized in that, described embedded system is divided into application software layer and infrastructure service software layer, described application software layer is coupled with infrastructure service software layer non-immediate and is provided with common stack, and the structure of described application program SDK comprises the following steps:
10. the functional requirement of application software for XRF analysis layer, and according to this functional requirement, the API demand for infrastructure service software layer is proposed;
20. build abstract module in infrastructure service software layer, and in this abstract module, realize described API demand;
The array of the sensing api function entry address that the API described in 30. foundation is corresponding, and by the start address fixed-link of this array in the fixed address of embedded system;
40. set up the type that is pointed to array of function pointer, and are the type pointing to this array of function pointer by the start address unsteady state operation of the array of described api function entry address;
50. build SDK module in application software layer, and build the api function in SDK, the array of function pointer described in the direct invocation step 40 of api function of this SDK.
2. the construction method of a kind of application program SDK for embedded system according to claim 1, it is characterized in that: in described step 40, by the type that the start address unsteady state operation of the array of described api function entry address is set up array of function pointer, be by adopting the type that the start address unsteady state operation of the array of described api function entry address is set up array of function pointer by the pointer unsteady state operation mode of C language, and point to the api function entry address of abstract module.
3. the construction method of a kind of application program SDK for embedded system according to claim 1, it is characterized in that: in infrastructure service software layer, the start address adopting jump instruction directly to jump to the application program of application software layer carries out startup application program.
4. the construction method of a kind of application program SDK for embedded system according to claim 1, is characterized in that: in described step 50, builds SDK module in application software layer, comprises entry address and the entrance function of the API arranged in SDK.
5. the construction method of a kind of application program SDK for embedded system according to any one of claim 4, it is characterized in that: in abstract module, arrange the readjustment registration function of infrastructure service software layer to application software layer further, application software layer is by the entry address of this readjustment registration function to infrastructure service software layer delivery applications program event process function.
6. the construction method of a kind of application program SDK for embedded system according to any one of claim 5, it is characterized in that: in abstract module, be provided with anti-registration function further, carry out removing the application event process function being passed to infrastructure service software layer by this anti-registration function.
7. the construction device for the application program SDK of embedded system, it is characterized in that, described embedded system is divided into application software layer and infrastructure service software layer, described application software layer is coupled with infrastructure service software layer non-immediate and is provided with common stack, and the construction device of described application program SDK comprises further:
API requirement analysis module, it is by the functional requirement of application software for XRF analysis layer, and proposes the API demand for infrastructure service software layer according to this functional requirement;
Abstract module, it by building abstract module in infrastructure service software layer, and realizes described API demand in this abstract module;
API array builds module, for setting up the array of sensing api function entry address corresponding to described API, and by the start address fixed-link of this array in the fixed address of embedded system;
API array modular converter, it is by setting up the type that is pointed to array of function pointer, and is the type pointing to this array of function pointer by the start address unsteady state operation of the array of described api function entry address;
SDK module, it by building SDK module in application software layer, and builds the api function in SDK, and the api function of this SDK directly calls described array of function pointer.
8. the construction device of a kind of application program SDK for embedded system according to claim 7, it is characterized in that, also comprise function callback module, it by arranging infrastructure service software layer to the readjustment registration function of application software layer and anti-registration function in abstract module, application software layer by the entry address of described readjustment registration function to infrastructure service software layer delivery applications program event process function, and carries out removing the application event process function being passed to infrastructure service software layer by described anti-registration function.
9. the construction device of a kind of application program SDK for embedded system according to claim 7, is characterized in that, described infrastructure service software layer comprises Hardware drive module, operating system module, communication service module further.
10. the construction device of a kind of application program SDK for embedded system according to claim 7, is characterized in that, described application software layer comprises Subscriber Interface Module SIM, application communication protocol module, functional module further.
CN201510679066.2A 2015-10-19 2015-10-19 Construction method and device of application program SDK for embedded system Active CN105260186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510679066.2A CN105260186B (en) 2015-10-19 2015-10-19 Construction method and device of application program SDK for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510679066.2A CN105260186B (en) 2015-10-19 2015-10-19 Construction method and device of application program SDK for embedded system

Publications (2)

Publication Number Publication Date
CN105260186A true CN105260186A (en) 2016-01-20
CN105260186B CN105260186B (en) 2017-02-22

Family

ID=55099890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510679066.2A Active CN105260186B (en) 2015-10-19 2015-10-19 Construction method and device of application program SDK for embedded system

Country Status (1)

Country Link
CN (1) CN105260186B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103211A (en) * 2016-02-19 2017-08-29 腾讯科技(深圳)有限公司 SDK is sent, using issue, using operation method and device
CN111414156A (en) * 2019-01-08 2020-07-14 杭州海康威视数字技术股份有限公司 Embedded equipment and service system based on open platform and service development method
CN115794040A (en) * 2022-11-14 2023-03-14 深圳十沣科技有限公司 Method, device, equipment and storage medium for constructing CAE software architecture
WO2023184810A1 (en) * 2022-03-29 2023-10-05 上海商汤智能科技有限公司 Application definition method and apparatus, electronic device, storage medium, and computer program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541567A (en) * 2012-01-05 2012-07-04 深圳市天拓立方通讯科技有限公司 2D mobile game engine and compatible mobile operating system method
CN102662648A (en) * 2012-03-05 2012-09-12 广东天波信息技术股份有限公司 Embedded software development simulation platform of communication terminal and application thereof
US20130263103A1 (en) * 2012-03-29 2013-10-03 Adobe Systems Inc. Method and apparatus for creating a platform agnostic application file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541567A (en) * 2012-01-05 2012-07-04 深圳市天拓立方通讯科技有限公司 2D mobile game engine and compatible mobile operating system method
CN102662648A (en) * 2012-03-05 2012-09-12 广东天波信息技术股份有限公司 Embedded software development simulation platform of communication terminal and application thereof
US20130263103A1 (en) * 2012-03-29 2013-10-03 Adobe Systems Inc. Method and apparatus for creating a platform agnostic application file

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103211A (en) * 2016-02-19 2017-08-29 腾讯科技(深圳)有限公司 SDK is sent, using issue, using operation method and device
CN107103211B (en) * 2016-02-19 2019-03-08 腾讯科技(深圳)有限公司 SDK send, using publication, using operation method and device
CN111414156A (en) * 2019-01-08 2020-07-14 杭州海康威视数字技术股份有限公司 Embedded equipment and service system based on open platform and service development method
CN111414156B (en) * 2019-01-08 2023-09-22 杭州海康威视数字技术股份有限公司 Embedded equipment and service system based on open platform and service development method
WO2023184810A1 (en) * 2022-03-29 2023-10-05 上海商汤智能科技有限公司 Application definition method and apparatus, electronic device, storage medium, and computer program product
CN115794040A (en) * 2022-11-14 2023-03-14 深圳十沣科技有限公司 Method, device, equipment and storage medium for constructing CAE software architecture
CN115794040B (en) * 2022-11-14 2024-02-06 深圳十沣科技有限公司 Method, device, equipment and storage medium for constructing CAE software architecture

Also Published As

Publication number Publication date
CN105260186B (en) 2017-02-22

Similar Documents

Publication Publication Date Title
US9286042B2 (en) Control flow graph application configuration
CN109032706B (en) Intelligent contract execution method, device, equipment and storage medium
US8555280B2 (en) Terminal device of non-android platform for executing android applications, and computer readable recording medium for storing program of executing android applications on non-android platform
US9189300B2 (en) Dynamic service discovery
CN105260186A (en) Construction method and device of application program SDK for embedded system
CN102467448A (en) Test method and system of test case
KR101691063B1 (en) Isa bridging with callback
US20090193444A1 (en) Techniques for creating and managing extensions
CN104932972B (en) A kind of method and device of reaction state debugging utility
US10983847B2 (en) Dynamically loadable unikernel binaries
CN103488466A (en) Method and device for executing application program
CN105975816A (en) Method and system for code protection based on virtual technology under mobile terminal
US8473930B2 (en) Handling signals and exceptions in a dynamic translation environment
US9075601B1 (en) Providing a scripting interface to existing code
RU2635891C2 (en) Installation mechanism and package format for parallelizable reliable installations
CN103309800A (en) Automatic webpage testing method and system
CN111966396A (en) Data processing method and device, computer system and computer readable storage medium
CN105094870A (en) Compatible method of 64-bit Linux operating system for 32-bit application software
CN102455941A (en) Multitask scheduling method, device and communication terminal based on normal form
CN106528219A (en) Upgrading method and apparatus for parasitic tool package in application
CN102170428A (en) Dynamic expansion management method of isomerous virtual machine platform
CN102567195B (en) Object file walkthrough method and object file walkthrough system
CN112506781B (en) Test monitoring method, device, electronic equipment, storage medium and program product
US20130305025A1 (en) Method for dynamic loading of operating systems on bootable devices
CN105760293B (en) The method and system of muti-language support test

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant