[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113010179B - Independent application running method based on real-time operating system - Google Patents

Independent application running method based on real-time operating system Download PDF

Info

Publication number
CN113010179B
CN113010179B CN202110200480.6A CN202110200480A CN113010179B CN 113010179 B CN113010179 B CN 113010179B CN 202110200480 A CN202110200480 A CN 202110200480A CN 113010179 B CN113010179 B CN 113010179B
Authority
CN
China
Prior art keywords
application
independent
software package
application software
applications
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
CN202110200480.6A
Other languages
Chinese (zh)
Other versions
CN113010179A (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.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
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 Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202110200480.6A priority Critical patent/CN113010179B/en
Publication of CN113010179A publication Critical patent/CN113010179A/en
Priority to PCT/CN2021/120893 priority patent/WO2022179101A1/en
Application granted granted Critical
Publication of CN113010179B publication Critical patent/CN113010179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • 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/4401Bootstrapping
    • G06F9/4406Loading of operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a software storage method, a device, computer equipment and a storage medium under a storage architecture. The method comprises the following steps: acquiring a firmware software package of a main firmware program, and acquiring application software packages corresponding to a first independent application and other independent applications; storing static variables in the application software package in a corresponding static storage area, and storing dynamic variables in the application software package in a dynamic storage area; compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after compiling is successful, burning the firmware software package of the main firmware program and the application software package into corresponding positions in a nonvolatile storage space. By adopting the method, the firmware software package and the application software package can be burnt into different positions of the same nonvolatile storage space, and a foundation is provided for realizing corresponding product functions for subsequent loading operation.

Description

Independent application running method based on real-time operating system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a computer device, and a storage medium for running an independent application based on a real-time operating system.
Background
With the development of communication technology, in order to shorten the product development period and simplify the development flow of a user on a product, an Opencpu (open computer system) architecture appears, under which a user and its sub-users can cooperatively develop each sub-function of the same product.
Based on the current Opencpu architecture, users and sub-users can only load and operate along with system selection after developing each sub-function of the same product in the same set of development environment and independently burning into a nonvolatile storage space.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for storing software under a storage architecture.
A method of software storage under a storage architecture, the method comprising:
acquiring a firmware software package of a main firmware program, and acquiring application software packages corresponding to a first independent application and other independent applications;
storing static variables in the application software package in a corresponding static storage area, and storing dynamic variables in the application software package in a dynamic storage area;
compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after compiling is successful, burning the firmware software package of the main firmware program and the application software package into corresponding positions in a nonvolatile storage space.
In one embodiment, the storing the static variable in the application software package in the corresponding static storage area includes:
and storing the static variables in the application software packages in corresponding static storage areas based on the sizes of the global variables in the application software packages.
In one embodiment, the burning the firmware package and the application package into corresponding locations in the nonvolatile memory space includes:
the firmware software package is burnt into a nonvolatile storage space, and a starting address of the application software package in the nonvolatile storage space when the application software package is burnt into the nonvolatile storage space is determined based on a main firmware program in the firmware software package;
and determining the starting address of each application software package of the nonvolatile storage space based on the starting address and the size of each application software package, and burning the application software package into a corresponding position in the nonvolatile storage space.
A method of running an independent application based on a real-time operating system, the independent application running based on the storage architecture of claims 1-3, the method of running an independent application based on a real-time operating system comprising:
After the initialization of the real-time operating system and the main firmware program is completed, detecting whether a first independent application exists, and loading and running the first independent application when the first independent application exists;
and after loading and running based on the first independent application, detecting whether other independent applications exist, and when the other independent applications exist, calling an application programming interface for starting the other independent applications, and loading and running the other independent applications.
In one embodiment, after the initialization of the real-time operating system and the main firmware program is completed, the step of detecting whether the first independent application exists includes:
after the initialization of the real-time operating system and the main firmware program is completed, searching an application software package in the nonvolatile storage space corresponding to the address of the nonvolatile storage space;
judging whether a first independent application in the application software package is valid or not based on the header information of the application software package;
when the first independent application is determined to be valid based on the header information, it is indicated that the first independent application exists.
In one embodiment, the invoking the application programming interface to launch the other independent application, loading and running the other independent application includes:
Based on the first independent application loaded and operated, the first independent application calls an application programming interface of the other independent application, and the other independent application is loaded and operated;
or (b)
And after the first independent application is loaded and operated, the main firmware program calls the application programming interfaces of the other independent applications to load and operate the other independent applications.
In one embodiment, the loading runs the other independent application, including:
and loading and running the other independent applications in turn based on the storage addresses of the application software packages corresponding to the other independent applications.
A software storage device under a storage architecture, the device comprising:
the software package processing module is used for acquiring a firmware software package of the main firmware program and application software packages corresponding to the first independent application and other independent applications;
the first storage area processing module is used for storing the static variables in the application software package in the corresponding static storage areas and storing the dynamic variables in the application software package in the dynamic storage areas;
the compiling module is used for compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area;
And the second storage area processing module is used for burning the firmware software package of the main firmware program and the application software package into corresponding positions in the nonvolatile storage space after the processing module is successfully compiled.
An operating device for a stand-alone application based on a real-time operating system, the device comprising:
the initialization module is used for initializing the real-time operating system and the main firmware program;
the independent application processing module is used for detecting whether a first independent application exists or not after the initialization module, and loading and running the first independent application when the first independent application exists; and after the loading operation based on the first independent application is finished, detecting whether other independent applications exist, and when the other independent applications exist, calling an application programming interface for starting the other independent applications, and loading and operating the other independent applications.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above when the processor executes the computer program.
A computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method described above.
The software storage method, the device, the computer equipment and the storage medium under the storage architecture acquire a firmware software package of a main firmware program and application software packages corresponding to a first independent application and other independent applications; storing static variables in the application software package in a corresponding static storage area, and storing dynamic variables in the application software package in a dynamic storage area; compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after compiling is successful, burning the firmware software package of the main firmware program and the application software package into corresponding positions in a nonvolatile storage space. The firmware software package and the application software package are stored in different positions of the nonvolatile storage space, so that a foundation is provided for realizing corresponding product functions for subsequent loading operation.
Drawings
FIG. 1 is a flow diagram of a software storage method under a storage architecture in one embodiment;
FIG. 2 is a diagram of a static memory area partitioning architecture of a software memory method under a memory architecture in one embodiment;
FIG. 3 is a diagram of a non-volatile memory space division architecture of a software storage method under a storage architecture in one embodiment;
FIG. 4 is a flow diagram of a method of operating a real-time operating system based standalone application in one embodiment;
FIG. 5 is a flow chart of a method of operating a real-time operating system based standalone application in another embodiment;
FIG. 6 is a block diagram of the architecture of a software storage device under a storage architecture in one embodiment;
FIG. 7 is a block diagram of the architecture of an operating device for a real-time operating system based stand-alone application in one embodiment;
FIG. 8 is an internal block diagram of a computer device in one embodiment;
fig. 9 is an internal structural view of a computer device in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The software storage method under the storage architecture can be applied to the terminal. The terminal acquires a firmware software package of a main firmware program and application software packages corresponding to a first independent application and other independent applications; storing static variables in the application software package in a corresponding static storage area, and storing dynamic variables in the application software package in a dynamic storage area; compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after compiling is successful, burning the firmware software package of the main firmware program and the application software package into corresponding positions in a nonvolatile storage space. The terminal may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and optionally, the method may also be applied to a server, where the server may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 1, a method for storing software in a storage architecture is provided, and the method is applied to a terminal for illustration, and includes the following steps:
step 102, obtaining a firmware software package of the main firmware program and application software packages corresponding to the first independent application and other independent applications.
The main firmware program is a bottom development program comprising a compiling script, a library file and the like, and a user and a sub-user of the user can develop corresponding functions based on the compiling script and the library file in the main firmware program, and can also directly call an application programming interface of the main firmware program to directly realize the corresponding functions. The main firmware program is stored in a firmware software package. The first independent application and other independent applications refer to applications developed by a user based on compiling scripts, library files and the like provided in the main firmware program, and the first independent application can be used for establishing communication with the main firmware program so as to dial up and transmit data by the main firmware program, and of course, the functions of the first independent application can be determined according to the actual application requirements of the user's own products, and the first independent application and other independent applications are compiled and generated into corresponding application software packages under respective PC environments.
In one embodiment, a user needs to produce a product with audio, bluetooth and a camera, and can choose to give the sub-functions of the audio, bluetooth and the camera to each sub-user of the user for development, wherein each manufacturer develops each sub-function under respective development environments, and then burns into respective development boards, and after each sub-function is developed and debugged, a corresponding application software package is generated. And sending the main firmware software package and the application software package to a final manufacturer, and processing the main firmware software package and the application software package based on the sent main firmware software package and the sent application software package by the manufacturer.
Step 104, storing the static variables in the application software package in the corresponding static storage area, and storing the dynamic variables in the application software package in the dynamic storage area.
The application software package stores application codes of a first independent application and other independent applications, a part of static variables are defined in the application codes and stored in a static storage area, for example, the static variables can be global variables or other data stored in the static storage area, and meanwhile, dynamic variables can be stored in a dynamic storage area, and the dynamic variables can be local variables or pointer variables and the like.
And 106, compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after compiling is successful, burning the firmware software package of the main firmware program and the application software package into corresponding positions in a nonvolatile storage space.
After compiling the static variable in the static storage area and the dynamic variable in the dynamic storage area based on the static variable stored in the static storage area and the dynamic variable stored in the dynamic storage area, if the compiling is successful, the firmware package of the main firmware program and the application software package can be burnt into the corresponding position in the nonvolatile storage space.
According to the software storage method under the storage architecture, the firmware software package of the main firmware program and the application software packages corresponding to the first independent application and other independent applications are obtained; storing static variables in the application software package in a corresponding static storage area, and storing dynamic variables in the application software package in a dynamic storage area; compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after compiling is successful, burning the firmware software package of the main firmware program and the application software package into corresponding positions in a nonvolatile storage space. Therefore, the firmware software package and the application software package can be burnt into different positions of the same nonvolatile storage space through the method, and a foundation is provided for realizing corresponding product functions for subsequent loading operation.
In one embodiment, the storing the static variable in the application software package in the corresponding static storage area includes:
and storing the static variables in the application software packages in corresponding static storage areas based on the sizes of the global variables in the application software packages.
The global variable in the first independent application and the global variables in other independent applications are calculated during compiling, and static variables in each application software package can be stored in corresponding address spaces of the static storage area based on the global variable in the application software package.
In one embodiment, after the firmware package and the application package are obtained, before the firmware package and the application package are burned into the nonvolatile storage space, the method includes:
based on the size of the global variable in each application software package, the static variable in the application software package is stored in a corresponding static storage area, and the dynamic variable in the application software package is stored in a dynamic storage area.
As shown in fig. 2, a static storage area dividing structure diagram for a first independent application and other independent applications is shown, where the first independent application and other independent applications are compiled under respective PC environments to generate corresponding application software packages, application codes of the first independent application and other independent applications are stored in the application software packages, a part of static variables are defined in the application codes and stored in the static storage area, for example, the static variables may be global variables or other data stored in the static storage area, and meanwhile, dynamic variables may also be stored in the dynamic storage area, and the dynamic variables may be local variables or pointer variables. The global variables of the first independent application and the other independent applications are respectively corresponding to the corresponding sizes, and static variables in each application software package can be stored in corresponding address spaces of the static storage areas based on the sizes of the global variables in the application software package. By the method, the compiling global variable of the first independent application and other independent applications can be stored in the respective static storage spaces without mutual influence.
In one embodiment, the burning the firmware package and the application package into corresponding locations in the nonvolatile memory space includes:
the firmware software package is burnt into a nonvolatile storage space, and a starting address of the application software package in the nonvolatile storage space when the application software package is burnt into the nonvolatile storage space is determined based on a main firmware program in the firmware software package;
and determining the starting address of each application software package of the nonvolatile storage space based on the starting address and the size of each application software package, and burning the application software package into a corresponding position in the nonvolatile storage space.
As shown in fig. 3, the architecture division diagram of the firmware package and the application package burned into the nonvolatile storage space is shown, the firmware package is burned into the nonvolatile storage space first, the firmware package stores a main firmware program, and the application area in fig. 3 is the location where the firmware package is located, where the main firmware program in the firmware package can determine the starting address of the application package burned into the nonvolatile storage space in the nonvolatile storage space, and after determining the starting address, the application package can be burned into the starting address of the nonvolatile storage space. The non-volatile storage space may be divided based on the size and the start address of the application software package, and the application software package may be burned into the corresponding non-volatile storage space.
Each manufacturer develops each sub-function under respective compiling environment, then compiles and burns into respective developing boards, and generates corresponding application software packages after each sub-function is developed and debugged. And sending the main firmware software package and the application software package to a final manufacturer, and performing burning operation by the manufacturer. Therefore, users and sub-users in the market can independently develop applications without developing in a set of development environment, so that software codes among different users can be well kept secret, and the problems of secret leakage of software developed by various companies and the like caused by sharing a set of software can be avoided.
In one embodiment, as shown in fig. 4, a method for running a stand-alone application based on a real-time operating system is provided, and the method is applied to a terminal for illustration, and includes the following steps:
step 402, after the initialization of the real-time operating system and the main firmware program is completed, detecting whether a first independent application exists, and loading and running the first independent application when the first independent application is detected to exist.
When external event or data is generated, the real-time operation system can accept and process the command in high speed, and the processed result can control the production process or respond to the processing system fast within the set time.
The real-time operating system is a common windows operating system, and the like, which belongs to a time-sharing operating system, and the time-sharing operating system works based on divided time slices and does not respond to other tasks before executing tasks in a certain time slice. The real-time operating system pays attention to the priority of each task, when the task with high priority sends out an execution request, the task with higher priority can be immediately executed even if the task is being executed, for example, a product to be developed can simultaneously comprise functions such as bluetooth and audio, and in the real-time operating system, the corresponding functions can be realized based on the set sequence by setting the priority of bluetooth and audio.
The main firmware program is a bottom development program comprising a compiling script, a library file and the like, and a user and a sub-user of the user can develop corresponding functions based on the compiling script and the library file in the main firmware program, and can also directly call an application programming interface of the main firmware program to directly realize the corresponding functions.
The first independent application is an application developed by a user based on a compiling script, a library file and the like provided in the main firmware program, and can be used for establishing communication with the main firmware program, so that the main firmware program is used for dialing and internet data transmission, and the function of the first independent application can be determined according to the actual application requirement of a product of the user.
Step 404, after loading and running based on the first independent application, detecting whether other independent applications exist, and when other independent applications exist, calling an application programming interface for starting the other independent applications, and loading and running the other independent applications.
And when the existence of other independent applications is detected, calling an application programming interface for starting the other independent applications, and loading and running the other independent applications.
In one embodiment, a user needs to develop a product, the product needs to use audio, bluetooth and camera sub-functions, the sub-functions can be realized by the sub-user of the user, the first independent application can be an application for establishing communication with the main firmware program, the sub-user of the user compiles and develops corresponding functions based on respective development environments, the debugged application codes generate corresponding application software packages, and the application software packages are all sent to a final manufacturer for loading and running after being burnt so as to achieve the corresponding functions.
In the method for operating the independent application based on the real-time operating system, after the initialization of the real-time operating system and the main firmware program is completed, whether the first independent application exists or not is detected, and when the first independent application exists is detected, the first independent application is loaded and operated; and after loading and running based on the first independent application, detecting whether other independent applications exist, and when the other independent applications exist, calling an application programming interface for starting the other independent applications, and loading and running the other independent applications. By the method, the first independent application and other independent applications can be loaded and run in sequence in the environment of the real-time operating system, so that the functions of one set of products are realized.
In one embodiment, after the initialization of the real-time operating system and the main firmware program is completed, the step of detecting whether the first independent application exists includes:
after the initialization of the real-time operating system and the main firmware program is completed, searching an application software package in a nonvolatile storage space corresponding to the address of the nonvolatile storage space;
verifying whether a first independent application in the application software package is valid based on header information of the application software package;
when the first independent application is determined to be valid based on the header information, it is indicated that the first independent application exists.
After compiling and debugging of the first independent application and other independent applications are completed, a corresponding application software package is generated, the application software package is provided with head information correspondingly, when whether the first independent application exists or not is detected, whether the first independent application in the application software package is effective or not can be judged based on the head information by detecting the head information of the corresponding application software package, and when the fact that the application software package is effective is determined based on the head information, the existence of the first independent application is indicated.
In one embodiment, the calling starts the application programming interface of the other independent application, and loading and running the other independent application includes:
Based on the first independent application loaded and operated, the first independent application calls an application programming interface of the other independent application, and the other independent application is loaded and operated;
in one embodiment, the calling starts the application programming interface of the other independent application, and loading and running the other independent application includes:
and after the first independent application is loaded and operated, the main firmware program calls the application programming interfaces of the other independent applications to load and operate the other independent applications.
After the first independent application is loaded and operated, the application programming interfaces of other independent applications can be started through the first independent application, other independent applications can be loaded and operated, and the application programming interfaces of other independent applications can be started through the main firmware program, and specifically, the application programming interfaces can be selected by a user.
In one embodiment, the user only allows the other independent application to communicate with the first independent application, so that no application programming interface information about the main firmware program exists in the compiling environment of the other independent application, the application programming interface of the other independent application is completely provided by the first independent application, the user and the sub-user or the provider cooperate with each other to develop the product function, the information user and the sub-user or the provider are internally aware, that is, the user and the sub-user or the provider only use the architecture in the provided main firmware program, and the development of the first independent application and the other independent application is completely completed by the user and the sub-user or the provider, which is also the market requirement of most users.
In one embodiment, other independent applications communicate with the main firmware program, and call the application programming interface provided by the main firmware program, and at this time, the main firmware program not only provides the compiled script, but also provides the application programming interfaces with different functions, and for the user and its sub-users, the independent applications are independent of each other and independent of each other.
In one embodiment, the loading runs the other independent application, including:
and loading and running the other independent applications in turn based on the storage addresses of the application software packages corresponding to the other independent applications.
And sequentially loading and running other independent applications in the nonvolatile storage space based on the storage addresses of the pre-divided independent applications. For example, each independent application is executed sequentially, and after the interface of the first independent application is loaded, the second independent application is loaded until all independent applications are loaded.
In one embodiment, as shown in FIG. 5, a flow chart of a method of operating a stand-alone application based on a real-time operating system in one embodiment is shown.
After the boot, a bootloader can be set to boot the hardware system, establish a mapping diagram of the memory space, and correspondingly initialize and set the software and the hardware, so as to prepare an environment for running the operating system. The bootloader may be in a self-starting mode, and after the bootloader is started, the bootloader directly loads the operating system program into the memory to run.
When the bootloader is operated, jumping to an application partition, wherein a main firmware program is stored in the application partition, the main firmware program is a bottom development program comprising a compiling script, a library file and the like, a user and a sub-user of the user can develop corresponding functions based on the compiling script and the library file in the main firmware program, and can also directly call an application programming interface of the main firmware program to directly realize the corresponding functions, and an operation initialization stage is loaded for the main firmware program in the application partition.
When the loading operation of the main firmware program is finished, whether a first independent application exists or not is detected, wherein the first independent application can be used for communicating with the main firmware, dial-up networking is carried out by the main firmware to transmit data, and the function of the first independent application can be determined according to the actual application requirement of a product of a user. For example, when the first independent application is used for communication surfing, a dial-up request may be sent to the main firmware program, and specifically, a communication connection may be established with the main firmware program by sending an AT instruction. The method for detecting whether the first independent application exists by the main firmware program can be based on header information of the first independent application when the first independent application is compiled into an application software package, after the header information of the application software and the content of the application software package are burnt into a planned nonvolatile storage space, when the position of the first independent application is loaded, the main firmware program can detect the header content in the planned nonvolatile storage space address, after the first independent application is detected, the program which is effective at the position can be judged after the first independent application is detected, the first independent application exists, and then the first independent application is jumped to an inlet program of the first independent application to be loaded and operated.
After the first independent application is loaded and operated, whether other independent applications exist or not is detected, the other independent applications can comprise a second independent application, a third independent application … and the like, similarly, when the positions of the other independent applications are loaded, the main firmware program can detect the head information of the application software package stored in the corresponding nonvolatile storage space address, and after the verification, the programs of the other independent applications which are considered to be effective can be detected, and then the programs are jumped to the entrance programs of the other independent applications to be loaded and operated, and the specific loading sequence can be realized according to codes of users.
When other independent applications are loaded, the main firmware program can directly load and run other independent applications to realize corresponding functions, or after the first independent application is packaged, the main firmware program invokes the other independent applications to realize corresponding functions, wherein the other independent applications are sequentially executed, and after an interface of the first independent application is loaded and run, a second independent application is loaded until the loading is completed.
It should be understood that, although the steps in the flowcharts of fig. 1, 2, and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 1, 2, 4 may include steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages in other steps.
In one embodiment, as shown in fig. 6, there is provided a software storage device under a storage architecture, comprising:
the software package processing module 602 is configured to obtain a firmware software package of the main firmware program and application software packages corresponding to the first independent application and other independent applications.
The first storage area processing module 604 is configured to store static variables in the application software package in a corresponding static storage area, and store dynamic variables in the application software package in a dynamic storage area.
And the compiling module 606 is used for compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area.
And the second storage area processing module 608 is configured to burn the firmware package of the main firmware program and the application software package into corresponding positions in the nonvolatile storage space after the processing module is successfully compiled.
In one embodiment, the first storage module is configured to store the static variable in each application software package in a corresponding static storage area based on a size of a global variable in each application software package.
In one embodiment, the second storage module is configured to burn the firmware package into a nonvolatile storage space, and determine a start address of the nonvolatile storage space when the application software package is burned into the nonvolatile storage space based on a main firmware program in the firmware package; and determining the starting address of each application software package of the nonvolatile storage space based on the starting address and the size of each application software package, and burning the application software package into a corresponding position in the nonvolatile storage space.
In one embodiment, as shown in fig. 7, there is provided an operating device of a stand-alone application based on a real-time operating system, including: an initialization module and an independent application processing module, wherein:
an initialization module 702 is used for initializing the real-time operating system and the main firmware program.
An independent application processing module 704, configured to detect whether a first independent application exists after the initializing module, and load and run the first independent application when the first independent application is detected to exist; and after the loading operation based on the first independent application is finished, detecting whether other independent applications exist, and when the other independent applications exist, calling an application programming interface for starting the other independent applications, and loading and operating the other independent applications.
In one embodiment, the independent application processing module is further configured to search an application software package in a nonvolatile storage space corresponding to an address of the nonvolatile storage space after the initialization of the real-time operating system and the main firmware program is completed; verifying whether a first independent application in the application software package is valid based on header information of the application software package; when the first independent application is determined to be valid based on the header information, it is indicated that the first independent application exists.
In one embodiment, the independent application processing module is further configured to load and run the other independent applications by calling, by the first independent application, an application programming interface of the other independent application based on the first independent application that is loaded and run;
in one embodiment, the independent application processing module is further configured to, after the first independent application is loaded and executed, invoke the application programming interface of the other independent application by the main firmware program, and load and execute the other independent application.
In one embodiment, the independent application processing module is further configured to load and run the other independent applications sequentially based on the storage addresses of the application software packages corresponding to the other independent applications.
For specific limitations on the software storage device under the storage architecture and the running device based on the independent application of the real-time operating system, reference may be made to the above limitation on the software storage method under the storage architecture and the running method based on the independent application of the real-time operating system, which are not described herein. The software storage device under the storage architecture and each module in the running device based on the independent application of the real-time operating system can be implemented in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing application function data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of running a stand-alone application based on a real-time operating system.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 9. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program, when executed by a processor, implements a method of running a stand-alone application based on a real-time operating system. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structures shown in fig. 8 and 9 are merely block diagrams of portions of structures related to the aspects of the present application and are not intended to limit the computer device on which the aspects of the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or may have different arrangements of components.
In one embodiment, a computer device is provided comprising a memory having a computer program stored therein and a processor implementing the steps of a method of running a real-time operating system based stand-alone application when the computer program is executed
In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which when executed by a processor, implements the steps of a method of running a stand-alone application based on a real-time operating system.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. The running method of the independent application based on the real-time operating system is characterized by comprising the following steps of:
acquiring a firmware software package of a main firmware program, and acquiring application software packages corresponding to a first independent application and other independent applications;
storing static variables in the application software package in a corresponding static storage area, and storing dynamic variables in the application software package in a dynamic storage area;
Compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after compiling is successful, burning the firmware package of the main firmware program and the application software package into corresponding positions in the nonvolatile storage space; the first independent application and other independent applications are applications developed based on compiling scripts and library files provided in the main firmware program;
after the initialization of the real-time operating system and the main firmware program is completed, detecting whether a first independent application exists, and loading and running the first independent application when the first independent application exists;
and after loading and running based on the first independent application, detecting whether other independent applications exist, and when the other independent applications exist, sequentially calling an application programming interface for starting the other independent applications based on the storage addresses of application software packages corresponding to the other independent applications, and loading and running the other independent applications, so that the first independent application and the other independent applications are loaded and run in sequence under the environment of a real-time operating system, and each function of a set of products is realized.
2. The method of claim 1, wherein storing the static variables in the application software package in the corresponding static storage areas comprises:
and storing the static variables in the application software packages in corresponding static storage areas based on the sizes of the global variables in the application software packages.
3. The method of claim 1, wherein burning the firmware package of the main firmware program, the application package, into the nonvolatile memory space at the corresponding location comprises:
the firmware software package is burnt into a nonvolatile storage space, and a starting address of the application software package in the nonvolatile storage space when the application software package is burnt into the nonvolatile storage space is determined based on a main firmware program in the firmware software package;
and determining the starting address of each application software package of the nonvolatile storage space based on the starting address and the size of each application software package, and burning the firmware software package of the main firmware program and the application software package into corresponding positions in the nonvolatile storage space.
4. The method of claim 1, wherein the step of detecting the presence of the first independent application after the initialization of the real-time operating system and the main firmware program is completed comprises:
After the initialization of the real-time operating system and the main firmware program is completed, searching an application software package in the nonvolatile storage space corresponding to the address of the nonvolatile storage space;
judging whether a first independent application in the application software package is valid or not based on the header information of the application software package;
when the first independent application is determined to be valid based on the header information, it is indicated that the first independent application exists.
5. The method of claim 1, wherein the invoking the application programming interface to launch the other independent application loads the other independent application, comprising:
and based on the first independent application loaded and operated, the first independent application calls an application programming interface of the other independent application, and loads and operates the other independent application.
6. The method of claim 1, wherein the invoking the application programming interface to launch the other independent application loads the other independent application, comprising: and after the first independent application is loaded and operated, the main firmware program calls the application programming interfaces of the other independent applications to load and operate the other independent applications.
7. An operating device for a stand-alone application based on a real-time operating system, the device comprising:
the software package processing module is used for acquiring a firmware software package of the main firmware program and application software packages corresponding to the first independent application and other independent applications;
the first storage area processing module is used for storing the static variables in the application software package in the corresponding static storage areas and storing the dynamic variables in the application software package in the dynamic storage areas;
the compiling module is used for compiling the static variables in the static storage area and the dynamic variables in the dynamic storage area;
the second storage area processing module is used for burning the firmware software package of the main firmware program and the application software package into corresponding positions in the nonvolatile storage space after the compiling module compiles successfully; the first independent application and other independent applications are applications developed based on compiling scripts and library files provided in the main firmware program; the initialization module is used for initializing the real-time operating system and the main firmware program;
the independent application processing module is used for detecting whether a first independent application exists or not after the initialization module, and loading and running the first independent application when the first independent application exists; after loading operation based on the first independent application is completed, detecting whether other independent applications exist, and when the other independent applications exist, sequentially calling an application programming interface for starting the other independent applications based on the storage addresses of application software packages corresponding to the other independent applications, and loading and operating the other independent applications, so that the first independent application and the other independent applications are sequentially loaded and operated under the environment of a real-time operating system, and each function of a set of products is realized.
8. The apparatus of claim 7, wherein the independent application processing module is further configured to, after initialization of the real-time operating system and the main firmware program is completed, find an application software package in a non-volatile storage space corresponding to an address of the non-volatile storage space; verifying whether a first independent application in the application software package is valid based on header information of the application software package; when the first independent application is determined to be valid based on the header information, it is indicated that the first independent application exists.
9. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
CN202110200480.6A 2021-02-23 2021-02-23 Independent application running method based on real-time operating system Active CN113010179B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110200480.6A CN113010179B (en) 2021-02-23 2021-02-23 Independent application running method based on real-time operating system
PCT/CN2021/120893 WO2022179101A1 (en) 2021-02-23 2021-09-27 Software storage method under storage architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110200480.6A CN113010179B (en) 2021-02-23 2021-02-23 Independent application running method based on real-time operating system

Publications (2)

Publication Number Publication Date
CN113010179A CN113010179A (en) 2021-06-22
CN113010179B true CN113010179B (en) 2024-03-15

Family

ID=76407194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110200480.6A Active CN113010179B (en) 2021-02-23 2021-02-23 Independent application running method based on real-time operating system

Country Status (2)

Country Link
CN (1) CN113010179B (en)
WO (1) WO2022179101A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010179B (en) * 2021-02-23 2024-03-15 深圳市广和通无线股份有限公司 Independent application running method based on real-time operating system

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744046A (en) * 2004-08-31 2006-03-08 华为技术有限公司 Multi-task application software module management method in real-time operating system environment
CN101004690A (en) * 2007-01-09 2007-07-25 京信通信技术(广州)有限公司 Integrative method for updating load program and application program in embedded type system
CN101013377A (en) * 2007-01-12 2007-08-08 中山大学 Class loading method for starting Java Processor
CN101515239A (en) * 2009-04-08 2009-08-26 南京航空航天大学 Quick start method of X86 flight control computer
CN101763273A (en) * 2008-12-26 2010-06-30 上海闻泰电子科技有限公司 Method for dynamically loading code into extended memory of embedded type system
CN102124448A (en) * 2008-07-10 2011-07-13 明导公司 Controlling real time during embedded system development
CN102508731A (en) * 2011-09-29 2012-06-20 中国航天科技集团公司第五研究院第五一三研究所 Fault tolerance starting method of operating system based on RS (Reed-Solomon) coding and decoding
EP2530586A1 (en) * 2011-05-31 2012-12-05 Myriad France Method for generating software
CN104407852A (en) * 2014-11-05 2015-03-11 中国航天科技集团公司第九研究院第七七一研究所 Code isolation-based construction method for embedded software and calling method for embedded software
CN106164884A (en) * 2014-02-14 2016-11-23 西部数据技术公司 There is the data storage device of embedded software
CN110096272A (en) * 2019-03-19 2019-08-06 深圳壹账通智能科技有限公司 Library file processing method, device, computer equipment and storage medium
CN111124440A (en) * 2019-12-17 2020-05-08 湖南国科微电子股份有限公司 Chip software burning method, chip software burning data processing method and device
CN111142907A (en) * 2019-12-25 2020-05-12 声耕智能科技(西安)研究院有限公司 Partition upgrading method for off-line keyword recognition system
CN111209008A (en) * 2020-04-17 2020-05-29 北京全路通信信号研究设计院集团有限公司 Software separation design method and system
CN111858339A (en) * 2020-07-22 2020-10-30 腾讯科技(成都)有限公司 Memory analysis method, device and system, computing device and computer-readable storage medium
CN112256278A (en) * 2020-11-09 2021-01-22 Oppo广东移动通信有限公司 Compiling method, device, equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050183077A1 (en) * 2004-02-12 2005-08-18 International Business Machines Corporation System and method for JIT memory footprint improvement for embedded java devices
CN102819440B (en) * 2011-06-10 2017-02-22 中兴通讯股份有限公司 Method and device for dynamically loading multi-system application program
US20140359579A1 (en) * 2013-05-31 2014-12-04 Microsoft Corporation Combined data and instruction test content
US20160048409A1 (en) * 2014-08-12 2016-02-18 Peter Briel System and method for automatic initiation and management of a guest operating system which enables a restriction of access to the host machine
CN104679556B (en) * 2015-02-06 2019-01-08 深圳市硅格半导体有限公司 Application program method for burn-recording and system
US10908884B2 (en) * 2019-06-27 2021-02-02 Intel Corporation Methods and apparatus for runtime multi-scheduling of software executing on a heterogeneous system
CN113010179B (en) * 2021-02-23 2024-03-15 深圳市广和通无线股份有限公司 Independent application running method based on real-time operating system

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744046A (en) * 2004-08-31 2006-03-08 华为技术有限公司 Multi-task application software module management method in real-time operating system environment
CN101004690A (en) * 2007-01-09 2007-07-25 京信通信技术(广州)有限公司 Integrative method for updating load program and application program in embedded type system
CN101013377A (en) * 2007-01-12 2007-08-08 中山大学 Class loading method for starting Java Processor
CN102124448A (en) * 2008-07-10 2011-07-13 明导公司 Controlling real time during embedded system development
CN101763273A (en) * 2008-12-26 2010-06-30 上海闻泰电子科技有限公司 Method for dynamically loading code into extended memory of embedded type system
CN101515239A (en) * 2009-04-08 2009-08-26 南京航空航天大学 Quick start method of X86 flight control computer
EP2530586A1 (en) * 2011-05-31 2012-12-05 Myriad France Method for generating software
CN102508731A (en) * 2011-09-29 2012-06-20 中国航天科技集团公司第五研究院第五一三研究所 Fault tolerance starting method of operating system based on RS (Reed-Solomon) coding and decoding
CN106164884A (en) * 2014-02-14 2016-11-23 西部数据技术公司 There is the data storage device of embedded software
CN104407852A (en) * 2014-11-05 2015-03-11 中国航天科技集团公司第九研究院第七七一研究所 Code isolation-based construction method for embedded software and calling method for embedded software
CN110096272A (en) * 2019-03-19 2019-08-06 深圳壹账通智能科技有限公司 Library file processing method, device, computer equipment and storage medium
CN111124440A (en) * 2019-12-17 2020-05-08 湖南国科微电子股份有限公司 Chip software burning method, chip software burning data processing method and device
CN111142907A (en) * 2019-12-25 2020-05-12 声耕智能科技(西安)研究院有限公司 Partition upgrading method for off-line keyword recognition system
CN111209008A (en) * 2020-04-17 2020-05-29 北京全路通信信号研究设计院集团有限公司 Software separation design method and system
CN111858339A (en) * 2020-07-22 2020-10-30 腾讯科技(成都)有限公司 Memory analysis method, device and system, computing device and computer-readable storage medium
CN112256278A (en) * 2020-11-09 2021-01-22 Oppo广东移动通信有限公司 Compiling method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
FIT: Inspect vulnerabilities in cross-architecture firmware by deep learning and bipartite matching;Hongliang Liang 等;《 Computers & Security》;第99卷;第1-17页 *
基于C6678并行多处理器系统信号处理及通信控制软件设计;郭绪涛;《中国优秀硕士学位论文全文数据库信息科技辑》(第1期);第I136-1581页 *

Also Published As

Publication number Publication date
CN113010179A (en) 2021-06-22
WO2022179101A1 (en) 2022-09-01

Similar Documents

Publication Publication Date Title
JP7231681B2 (en) Function extension method and system for package file
CN108847950B (en) Electronic device, cloud system software automatic deployment method and storage medium
US8683462B2 (en) Handling calls to native code in a managed code environment
CN108121594B (en) Process management method and device
CN112114808B (en) Page rendering method and device and electronic equipment
US10019598B2 (en) Dynamic service discovery
CN109388946B (en) Malicious process detection method and device, electronic equipment and storage medium
CN106648755B (en) Method and device for dynamically loading dex in android art environment
CN111324396A (en) Block chain intelligent contract execution method, device and equipment
CN108830077B (en) Script detection method, script detection device and terminal
CN113569246A (en) Vulnerability detection method and device, computer equipment and storage medium
CN111223036A (en) GPU virtualization sharing method and device, electronic equipment and storage medium
CN111389014A (en) Game resource data monitoring method and device, computer equipment and storage medium
CN113391874A (en) Virtual machine detection countermeasure method and device, electronic equipment and storage medium
CN113010179B (en) Independent application running method based on real-time operating system
KR20120113160A (en) Device and method for executing android applications on general purpose operating systems, and computer readable recording medium for the same
CN104050001A (en) Resource processing method, device and equipment based on Android system
CN109408256B (en) Application calling method and device
US10552135B1 (en) Reducing a size of an application package
CN114020278B (en) Data processing method, device, equipment and storage medium
CN115760391A (en) Intelligent contract changing method and device in block chain, electronic equipment and storage medium
CN112306844B (en) Interface test method, device and equipment of software development system and storage medium
CN112148318A (en) Application package issuing method, application method, device, medium, server and equipment
CN112667313A (en) Process starting method, device and system
CN112214213A (en) Linux kernel development and management method and device, computer equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant