[go: up one dir, main page]

CN105260186B - 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
CN105260186B
CN105260186B CN201510679066.2A CN201510679066A CN105260186B CN 105260186 B CN105260186 B CN 105260186B CN 201510679066 A CN201510679066 A CN 201510679066A CN 105260186 B CN105260186 B CN 105260186B
Authority
CN
China
Prior art keywords
software layer
sdk
function
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.)
Active
Application number
CN201510679066.2A
Other languages
Chinese (zh)
Other versions
CN105260186A (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

Landscapes

  • Stored Programmes (AREA)

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

Construction method for the application program SDK of embedded system and device
Technical field
The present invention relates to a kind of embedded system, the structure of particularly a kind of application program SDK for embedded system Method and device.
Background technology
Built-in system software product pursue simplify, in real time, efficient and inexpensive, therefore most of embedded software each Individual module is all based on RTOS whole development, test and debugging, due to being that hybrid programming leads to application program and infrastructure service journey Sequence often influences each other, and the concurrent development for multiple embedded product softwares and maintenance are more difficult, research and development of software team Engineers and technicians need to be grasped various knowledge and skills, are unfavorable for the big rule of embedded product particularly Internet of things hardware product Mould develops.
Content of the invention
The present invention is to solve the above problems, there is provided a kind of construction method of the application program SDK for embedded system And device, it is by being divided into application software layer and infrastructure service software layer by built-in system software by layer relation, and develops solely Vertical abstract module and SDK module, it is achieved thereby that 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:
A kind of construction method of the 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 non-immediate with infrastructure service software layer to be coupled and is provided with shared heap Stack, the structure of described application program SDK comprises the following steps:
10. the functional requirement of application software for XRF analysis layer, and infrastructure service software layer is proposed for according to this functional requirement API demand;
20. build abstract module in infrastructure service software layer, and realize described API demand in this abstract module;
30. set up the corresponding array pointing to api function entry address of described API, and the initial address by this array Fixed-link is in the fixing address of embedded system;
40. types setting up a sensing array of function pointer, and rising the array of described api function entry address Beginning address unsteady state operation is the type pointing to this array of function pointer;
50. build SDK module in application software layer, and build the api function in SDK, and the api function of this SDK is direct Array of function pointer described in invocation step 40.
Preferably, in described step 40, by the initial address unsteady state operation of the array of described api function entry address The type of the array of function pointer by being set up, is by described api function by the pointer unsteady state operation mode using C language The type of the array of function pointer by being set up for the initial address unsteady state operation of the array of entry address, and point to abstract module Api function entry address.
Preferably, the application program of application software layer in infrastructure service software layer, is jumped directly to using jump instruction Initial address carry out start application program.
Preferably, in described step 50, application software layer builds SDK module, including the API's in setting SDK Entry address and entrance function.
Preferably, in abstract module, setting infrastructure service software layer registers letter to the readjustment of application software layer further Number, application software layer passes through this readjustment registration function and transmits, to infrastructure service software layer, the entrance that application event processes function Address.
Preferably, it is provided with anti-registration function further in abstract module, be purged by this anti-registration function Application event through being transferred to infrastructure service software layer processes function.
Preferably, described embedded system is divided into application software layer and infrastructure service software layer, and described application is soft Part layer is non-immediate with infrastructure service software layer to couple and is provided with common stack, and the construction device of described application program SDK enters one Step includes:
API requirement analysis module, it passes through the functional requirement of application software for XRF analysis layer, and right according to the proposition of this functional requirement API demand in infrastructure service software layer;
Abstract module, it passes through to build abstract module in infrastructure service software layer, and realizes institute in this abstract module The API demand stated;
API array builds module, for setting up the corresponding array pointing to api function entry address of described API, and will The initial address fixed-link of this array is in the fixing address of embedded system;
API array modular converter, its type by setting up a sensing array of function pointer, and by described API letter The initial address unsteady state operation of the array of number entry address is the type pointing to this array of function pointer;
SDK module, it passes through to build SDK module in application software layer, and builds the api function in SDK, this SDK's Api function directly invokes described array of function pointer.
Preferably, also include function callback module, it passes through to arrange infrastructure service software layer in abstract module to application The readjustment registration function of software layer and anti-registration function, application software layer is soft to infrastructure service by described readjustment registration function Part layer transmits the entry address that application event processes function, and is purged having transmitted by described anti-registration function Application event to infrastructure service software layer processes function.
Preferably, described infrastructure service software layer further includes Hardware drive module, operating system module, communication clothes Business module.
Preferably, described application software layer further includes Subscriber Interface Module SIM, application communication protocol module, function mould Block.
The invention has the beneficial effects as follows:
A kind of construction method of application program SDK for embedded system of the present invention and device, it passes through will be described Embedded system be divided into application software layer and infrastructure service software layer, and be built with SDK in described application software layer Module, is built with abstract module in described infrastructure service software layer, and wherein, described application software layer is soft with infrastructure service Part layer is non-immediate to be coupled and is provided with common stack, it is achieved thereby that the side based on SDK stand-alone development built-in application program software Formula, developer can be based only on the various application program of SDK stand-alone development, and application program is supported to infrastructure service software API With infrastructure service software mutually calling to application software API, infrastructure service software can loading application software automatically simultaneously.
Brief description
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the present invention, this Bright schematic description and description is used for explaining the present invention, does not constitute inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the structural representation of the embedded system of the present invention;
Fig. 2 is used for the general flow chart of the construction method of application program SDK of embedded system for the present invention;
Fig. 3 is used for the structural representation of the construction device of application program SDK of embedded system for the present invention.
Specific embodiment
In order that the technical problem to be solved, technical scheme and beneficial effect are clearer, clear, below tie The present invention will be described in further detail to close drawings and Examples.It should be appreciated that specific embodiment described herein is only used To explain the present invention, it is 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, described application It is built with SDK module in software layer, in described infrastructure service software layer, is built with abstract module, wherein, described application is soft Part layer is non-immediate with infrastructure service software layer to be coupled and is provided with common stack.
As shown in Fig. 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 infrastructure service software layer is proposed for according to this functional requirement API demand;
20. build abstract module in infrastructure service software layer, and realize described API demand in this abstract module;
30. set up the corresponding array pointing to api function entry address of described API, and the initial address by this array Fixed-link is in the fixing address (as A0) of embedded system;
40. types setting up a sensing array of function pointer, and rising the array of described api function entry address Beginning address A0 unsteady state operation is the type pointing to this array of function pointer;
50. build SDK module in application software layer, and build the api function in SDK, and the api function of this SDK is direct Array of function pointer described in invocation step 40.
Wherein, in described step 40, the initial address unsteady state operation of API array is the array of function pointer set up Type, be by the pointer unsteady state operation mode using C language, the initial address unsteady state operation of API array to be set up The type of array of function pointer, and point to the api function entry address of abstract module.In infrastructure service software layer, using jump The initial address turning the application program that instruction jumps directly to application software layer carries out starting application program.Described step 50 In, in application software layer build SDK module, include arrange SDK in API entry address (for example:0xB0000000) with And entrance function.
In the present embodiment, the readjustment registration to application software layer for the setting infrastructure service software layer in abstract module further Function (Callback function) and anti-registration function, application software layer is by described readjustment registration function to infrastructure service software Layer transmission application event processes the entry address of function, and is purged being transferred to by described anti-registration function The application event of infrastructure service software layer processes function.When infrastructure service software event occurs need by application program During reason, directly entry address is processed according to the application event having obtained and call application event to process function;When should When not needing to process some particular events with program, anti-registration function is called to remove event handling entry address, corresponding event Return after infrastructure service program determines and directly abandons this event if address is eliminated during generation, thus optimized integration service Software directly invokes to application software module.
As shown in figure 3, the present invention provides always according to the construction method of the described application program SDK for embedded system Corresponding construction device 100, it includes:
API requirement analysis module 101, it passes through the functional requirement of application software for XRF analysis layer, and is carried according to this functional requirement Go out the API demand for infrastructure service software layer;
Abstract module 102, it passes through to build abstract module in infrastructure service software layer, and realizes in this abstract module Described API demand;
API array builds module 103, for setting up the corresponding array pointing to api function entry address of described API, And by the initial address fixed-link of this array in the fixing address of embedded system;
API array modular converter 104, its type by setting up a sensing array of function pointer, and by described API The initial address unsteady state operation of the array of function entrance address is the type pointing to this array of function pointer;
SDK module 105, it passes through to build SDK module in application software layer, and builds the api function in SDK, this SDK Api function directly invoke described array of function pointer.
In the present embodiment, also include function callback module 106, it passes through to arrange infrastructure service software layer in abstract module Readjustment registration function to application software layer and anti-registration function, application software layer is by described readjustment registration function to basis Service software layer transmits the entry address that application event processes function, and is purged by described anti-registration function Application event through being transferred to infrastructure service software layer processes the entry address of function.
Described infrastructure service software layer further includes Hardware drive module, operating system module, communication service module Deng in the present embodiment, described operating system module adopts RTOS real time operating system, and described communication service module includes GPRS, WCDMA and LTE, bluetooth, WiFi etc..Described application software layer further includes Subscriber Interface Module SIM, application communication association View module, functional module etc..Described application software layer and infrastructure service software layer adopt sharing system heap (Heap) and stack (Stack) mode is so that the infrastructure service software layer number of parameters of all APIs open to application software layer and type are complete Unfettered
The embedded system of prior art does not strictly distinguish application software layer and infrastructure service software layer, application software layer With infrastructure service software layer in same code segment data section, in software development, test, maintenance, escalation process due to Code overall complicated, huge, ample resources can be expended the problems such as intercouple, need more senior engineer to participate in.The present invention By embedded system is divided into application software layer and infrastructure service software layer, application software layer and infrastructure service software layer fortune Row is in same memory headroom, but is completely independent on memory space, does not interact, and in software development, test and maintenance Middle manage respectively, greatly reduce coupling, to the specialized exploitation of software, test, safeguard and the aspect such as upgrading difficulty Degree substantially reduces, that is, improve software quality, also reduces research and development of software resource.
It should be noted that number order " 10,20 ..., 101,102 ... " in the present invention etc. is not to invention Sequence of steps etc. restriction, can be for example relation arranged side by side between step 30,40,50, without according to listed step Suddenly sequentially to execute, various equivalent or equivalent mapping mode is all within the scope of the present invention.
It should be noted that each embodiment in this specification is all described by the way of going forward one by one, each embodiment weight Point explanation is all difference with other embodiment, between each embodiment identical similar partly mutually referring to. For device embodiment, because it is with embodiment of the method basic simlarity, so description is fairly simple, in place of correlation referring to The part of embodiment of the method illustrates.And, herein, term " inclusion ", "comprising" or its any other variant meaning Covering comprising of nonexcludability, so that including a series of process of key elements, method, article or equipment not only include that A little key elements, but also include other key elements being not expressly set out, or also include for this process, method, article or The intrinsic key element of equipment.In the absence of more restrictions, the key element being limited by sentence "including a ...", does not arrange Remove and also there is other identical element in the process including described key element, method, article or equipment.In addition, this area is general Logical technical staff is appreciated that all or part of step realizing above-described embodiment can be completed it is also possible to pass through by hardware Program completes come the hardware to instruct correlation, and described program can be stored in a kind of computer-readable recording medium, above-mentioned carries To storage medium can be read only memory, disk or CD etc..
Described above illustrate and describes the preferred embodiments of the present invention it should be understood that the present invention is not limited to this paper institute The form disclosing, is not to be taken as the exclusion to other embodiment, and can be used for various other combinations, modification and environment, and energy Enough in invention contemplated scope herein, it is modified by the technology or knowledge of above-mentioned teaching or association area.And people from this area The change that carried out of member and change, then all should be in the protections of claims of the present invention without departing from the spirit and scope of the present invention In the range of.

Claims (10)

1. a kind of construction method of the application program SDK for embedded system is it is characterised in that described embedded system is drawn It is divided into application software layer and infrastructure service software layer, described application software layer is non-immediate with infrastructure service software layer to be coupled and set There is common stack, the structure of the described SDK SDK of application program comprises the following steps:
10. the functional requirement of application software for XRF analysis layer, and it is proposed for the API need of infrastructure service software layer according to this functional requirement Ask;
20. build abstract module in infrastructure service software layer, and realize described API demand in this abstract module;
30. set up the corresponding array pointing to api function entry address of described API, and the initial address of this array is fixed It is linked in the fixing address of embedded system;
40. types setting up a sensing array of function pointer, and the starting point by the array of described api function entry address Location unsteady state operation is the type pointing to this array of function pointer;
50. build SDK module in application software layer, and build the api function in SDK, and the api function of this SDK directly invokes Array of function pointer described in step 40.
2. the construction method of a kind of application program SDK for embedded system according to claim 1, its feature exists In:In described step 40, the initial address unsteady state operation of the array of described api function entry address is the letter set up The type of number array of pointers, is by the number of described api function entry address by the pointer unsteady state operation mode using C language The type of the array of function pointer by being set up for the initial address unsteady state operation of group, and point to the api function entrance of abstract module Address.
3. the construction method of a kind of application program SDK for embedded system according to claim 1, its feature exists In:In infrastructure service software layer, the initial address being jumped directly to the application program of application software layer using jump instruction is entered Row starts application program.
4. the construction method of a kind of application program SDK for embedded system according to claim 1, its feature exists In:In described step 50, in application software layer build SDK module, include arrange SDK in API entry address and Entrance function.
5. the construction method of a kind of application program SDK for embedded system according to claim 4, its feature exists In:The readjustment registration function to application software layer for the setting infrastructure service software layer, application software layer in abstract module further The entry address that application event processes function is transmitted to infrastructure service software layer by this readjustment registration function.
6. the construction method of a kind of application program SDK for embedded system according to claim 5, its feature exists In:It is provided with anti-registration function further in abstract module, be purged being transferred to basis by this anti-registration function The application event of service software layer processes function.
7. a kind of construction device of the application program SDK for embedded system is it is characterised in that described embedded system is drawn It is divided into application software layer and infrastructure service software layer, described application software layer is non-immediate with infrastructure service software layer to be coupled and set There is common stack, the construction device of described application program SDK further includes:
API requirement analysis module, it passes through the functional requirement of application software for XRF analysis layer, and is proposed for base according to this functional requirement The API demand of plinth service software layer;
Abstract module, it passes through to build abstract module in infrastructure service software layer, and realizes described in this abstract module API demand;
API array builds module, for setting up the corresponding array pointing to api function entry address of described API, and this is counted The initial address fixed-link of group is in the fixing address of embedded system;
API array modular converter, its type by setting up a sensing array of function pointer, and described api function is entered The initial address unsteady state operation of the array of port address is the type pointing to this array of function pointer;
SDK module, it passes through to build SDK module in application software layer, and builds the api function in SDK, the API letter of this SDK Number directly invokes described array of function pointer.
8. the construction device of a kind of application program SDK for embedded system according to claim 7, its feature exists In, also include function callback module, its pass through in abstract module setting infrastructure service software layer to application software layer readjustment Registration function and anti-registration function, application software layer transmits application by described readjustment registration function to infrastructure service software layer Program event processes the entry address of function, and is purged being transferred to infrastructure service soft by described anti-registration function The application event of part layer processes function.
9. the construction device of a kind of application program SDK for embedded system according to claim 7, its feature exists In described infrastructure service software layer further includes Hardware drive module, operating system module, communication service module.
10. the construction device of a kind of application program SDK for embedded system according to claim 7, its feature exists In described application software layer further includes Subscriber Interface Module SIM, application communication protocol module, functional module.
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 CN105260186A (en) 2016-01-20
CN105260186B true 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)

Families Citing this family (4)

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

Family Cites Families (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
CN102662648B (en) * 2012-03-05 2015-09-30 广东天波信息技术股份有限公司 A kind of embedded software developing emulation platform of communicating terminal and application thereof
US9436487B2 (en) * 2012-03-29 2016-09-06 Adobe Systems Incorporated Method and apparatus for creating a platform agnostic application file

Also Published As

Publication number Publication date
CN105260186A (en) 2016-01-20

Similar Documents

Publication Publication Date Title
CN105260186B (en) Construction method and device of application program SDK for embedded system
US9916136B2 (en) Interface infrastructure for a continuation based runtime
CN101663644B (en) Apparatus and method for handling exception signals in a computing system
CN104205109B (en) The worker process of continuation and elasticity
US20150195346A1 (en) Open platform, open platform access system, storage medium, and method for allowing third party application to access open platform
CN104094224B (en) Method and device for para-virtualized asymmetric gpu processors
Natale et al. The iCub software architecture: evolution and lessons learned
CN107402952A (en) Big data processing accelerator and big data processing system
CN102819430B (en) A kind of device and method of realizing serial communication interface under linux environment
Zhao et al. HIPLZ: Enabling performance portability for exascale systems
US8078555B2 (en) Decoupling static program data and execution data
Singh et al. Parallel chopped symbolic execution
CN101025731A (en) Computing system
EP2756396B1 (en) Simulation of static members and parameterized constructors on an interface-based api
Zhang et al. SMT-based bounded model checking for OSEK/VDX applications
US8276165B2 (en) Continuation-based runtime callback invocation
Handziski et al. Hardware abstraction architecture
JPH08502375A (en) Method of performing at least one test on at least one object of an object-oriented program that can be executed in parallel by a computer
CN102662730B (en) Atomic instruction simulation method of parallel multi-nuclear virtual machine and virtual machine device
CN117215661A (en) Event processing method, device and storage medium
CN113495546B (en) Method, controller and test bench for realizing automatic test of test cases
CN116860589A (en) Register verification method, device, electronic equipment and computer storage medium
US20110137460A1 (en) Task implementation method based on behavior in robot system
CN115170125A (en) Block chain transaction execution method based on conflict detection
CN118797638B (en) A method to prevent shell injection in Linux C

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