WO2022179101A1 - 存储架构下的软件存储方法 - Google Patents
存储架构下的软件存储方法 Download PDFInfo
- Publication number
- WO2022179101A1 WO2022179101A1 PCT/CN2021/120893 CN2021120893W WO2022179101A1 WO 2022179101 A1 WO2022179101 A1 WO 2022179101A1 CN 2021120893 W CN2021120893 W CN 2021120893W WO 2022179101 A1 WO2022179101 A1 WO 2022179101A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- application
- independent
- software package
- applications
- variables
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 68
- 230000003068 static effect Effects 0.000 claims abstract description 78
- 238000012545 processing Methods 0.000 claims description 27
- 238000004590 computer program Methods 0.000 claims description 25
- 238000004891 communication Methods 0.000 claims description 13
- 238000013515 script Methods 0.000 claims description 11
- 238000011161 development Methods 0.000 claims description 10
- 230000005540 biological transmission Effects 0.000 claims description 3
- 230000001568 sexual effect Effects 0.000 claims description 3
- 230000006870 function Effects 0.000 description 20
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 6
- 238000005192 partition Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000012356 Product development Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011017 operating method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
Definitions
- the present application relates to the field of communication technologies, and in particular, to a software storage method, apparatus, computer device and storage medium under a storage architecture.
- Open Computer System (OpenCPU) architecture
- a software storage method, apparatus, computer device, and storage medium under a storage architecture are provided.
- a software storage method under a storage architecture comprising: acquiring 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 the corresponding static storage area, and the dynamic variables in the application software package are stored in the dynamic storage area; and the static variables in the static storage area and the dynamic variables in the dynamic storage area are compiled.
- the firmware software package of the main firmware program and the application software package are burned into corresponding positions in the non-volatile storage space.
- a method for running an independent application based on a real-time operating system wherein the independent application runs based on a storage architecture that executes the software storage method under the above-mentioned storage architecture, and the method for running an independent application based on a real-time operating system includes: After the initialization of the real-time operating system and the main firmware program is completed, it is detected whether there is a first independent application, and when it is detected that there is a first independent application, the first independent application is loaded and executed; when the first independent application is loaded based on the first independent application After running, it is detected whether there are other independent applications, and when there are other independent applications, the application programming interface for starting the other independent applications is called to load and run the other independent applications.
- a software storage device under a storage architecture comprising:
- a software package processing module used to obtain the firmware software package of the main firmware program and the application software packages corresponding to the first independent application and other independent applications;
- a first storage area processing module 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;
- the second storage area processing module is configured to burn the firmware software package of the main firmware program and the application software package into a corresponding position in the non-volatile storage space after the processing module is successfully compiled.
- a running device for an independent application based on a real-time operating system comprising:
- the independent application processing module is used to detect whether there is a first independent application after initializing the real-time operating system and the main firmware program, and when it is detected that there is a first independent application, load and run the first independent application; After the first independent application is found, it is detected whether other independent applications exist, and when there are other independent applications, the application programming interface for starting the other independent applications is called to load and run the other independent applications.
- a computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor implements the steps of the software storage method under the above-mentioned storage architecture.
- a computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor implements the steps of the above-mentioned method for running an independent application based on a real-time operating system.
- FIG. 1 is a schematic flowchart of a software storage method under a storage architecture in one embodiment
- Fig. 2 is the static storage area division architecture diagram of the software storage method under the storage architecture in one embodiment
- Fig. 3 is a non-volatile storage space division architecture diagram of a software storage method under a storage architecture in one embodiment
- FIG. 4 is a schematic flowchart of a method for running an independent application based on a real-time operating system in one embodiment
- FIG. 5 is a schematic flowchart of a method for running an independent application based on a real-time operating system in another embodiment
- FIG. 6 is a structural block diagram of a software storage device under a storage architecture in one embodiment
- FIG. 7 is a structural block diagram of an apparatus for running an independent application based on a real-time operating system in one embodiment
- FIG. 8 is an internal structural diagram of a computer device in one embodiment
- FIG. 9 is an internal structure diagram of a computer device in another embodiment.
- the software storage method under the storage architecture provided by this application can be applied to a terminal.
- the terminal obtains the firmware software package of the main firmware program and the application software packages corresponding to the first independent application and other independent applications; stores the static variables in the application software package in the corresponding static storage area, and stores the static variables in the application software package
- the dynamic variables are stored in the dynamic storage area; the static variables in the static storage area and the dynamic variables in the dynamic storage area are compiled, and after the compilation is successful, the firmware software package and application software package of the main firmware program are burned into the non-volatile at the corresponding location in the sexual storage space.
- the terminal may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices.
- the above method can also be applied to a server, and the server can be implemented by an independent server or a server cluster composed of multiple servers.
- a software storage method under a storage architecture is provided, and the method is applied to a terminal as an example for description, including the following steps:
- Step 102 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 main firmware program refers to a bottom-level development program including compilation scripts, library files, and the like. Users and their sub-users can develop corresponding functions based on the compilation scripts and library files in the main firmware program, or directly call the application programming interface of the main firmware program to directly implement corresponding functions.
- the main firmware program is stored in the firmware package.
- the first independent application and other independent applications refer to the applications developed by the user based on the compilation scripts, library files, etc. provided in the main firmware program.
- the first independent application can be used to establish communication with the main firmware program, so as to use the main firmware program to perform dial-up Internet data transmission.
- the function of the first independent application may also be determined depending on the actual application requirements of the user's own product.
- the first independent application and other independent applications are compiled under respective PC environments to generate corresponding application software packages.
- the user needs to produce a product with audio, bluetooth, and camera, and can choose to deliver sub-functions such as audio, bluetooth, and camera to each sub-user of the user for development.
- each manufacturer develops each sub-function in their own development environment, and then burns them into their respective development boards.
- a corresponding application software package is generated.
- the firmware software package and the application software package of the main firmware program are sent to the final manufacturer, and the manufacturer performs processing based on the sent firmware software package and the application software package of the main firmware program.
- step 104 the static variables in the application software package are stored in the corresponding static storage area, and the dynamic variables in the application software package are stored in the dynamic storage area.
- the application software package stores application codes of the first independent application and other independent applications, and a part of static variables are defined in the application code, and the static variables are stored in the static storage area.
- static variables can be global variables or other data stored in static storage areas.
- dynamic variables are also stored in the dynamic storage area, and dynamic variables can be local variables or pointer variables.
- Step 106 Compile the static variables in the static storage area and the dynamic variables in the dynamic storage area, and after the compilation is successful, burn the firmware software package and the application software package of the main firmware program into the non-volatile storage space. at the corresponding location.
- the main firmware can be The firmware software package and the application software package of the program are burned into the corresponding position in the non-volatile storage space.
- the firmware software package of the main firmware program and the application software packages corresponding to the first independent application and other independent applications by acquiring the firmware software package of the main firmware program and the application software packages corresponding to the first independent application and other independent applications; the static variables in the application software package are stored in the corresponding static storage area, and store the dynamic variables in the application software package in the dynamic storage area; compile the static variables in the static storage area and the dynamic variables in the dynamic storage area, after the compilation is successful, the firmware software package of the main firmware program,
- the application software package is burned into the corresponding location in the non-volatile storage space. Therefore, through the above method, the firmware software package and the application software package can be burned into different locations in the same non-volatile storage space, providing a basis for subsequent loading and running to realize corresponding product functions.
- step 104 the static variables in the application software package are stored in the corresponding static storage area, including:
- the static variables in the application software package are stored in the corresponding static storage area.
- the global variables in the first independent application and other independent applications will calculate the size of each corresponding global variable during compilation. Based on the size of the global variable in the application software package, the static variables in each application software package can be stored. in the corresponding address space of the static storage area.
- the method further includes:
- the static variables in the application software package are stored in the corresponding static storage area
- the dynamic variables in the application software package are stored in the dynamic storage area.
- an architecture diagram is divided into static storage areas for the first independent application and other independent applications.
- the first independent application (APP1) and the other independent applications (APP2...APPn) are compiled under respective PC environments to generate corresponding application software packages respectively.
- These application software packages store the application codes of the first independent application and other independent applications, and some static variables are defined in the application codes and stored in the static storage area.
- static variables can be global variables or other data stored in static storage areas.
- the static global variables of APP1 are stored in the address space at Addr1 in the static storage area Static RAM
- the static global variables of APP2 are stored in the address space at Addr2 in the static storage area Static RAM, and many more.
- Dynamic variables can be local variables or pointer variables.
- the dynamic variables of APP1 are stored in the dynamic storage area Dynamic RAM
- the dynamic variables of APP2 are stored in the dynamic storage area Dynamic RAM
- the global variables of the first independent application and other independent applications have corresponding sizes.
- the static variables in each application software package may be stored in the corresponding address space of the static storage area.
- burning the firmware software package and the application software package into the corresponding location in the non-volatile storage space in step 106 includes:
- the starting address of each application software package in the non-volatile storage space is determined, and the application software package is burned into the corresponding position in the non-volatile storage space.
- the architecture division diagram for burning firmware software package and application software package into non-volatile storage space may be, for example, but not limited to, a flash memory (Flash) and the like.
- the firmware software package stores the main firmware program, and the application partition in FIG. 3 is the location where the firmware software package is located.
- the starting address (Start addr) of the application software package in the non-volatile storage space when the application software package is burned into the non-volatile storage space can be determined by the main firmware program in the firmware software package.
- the application software package can be programmed into the starting address of the non-volatile storage space.
- the non-volatile storage space can be divided based on the size and starting address of the application software package, and the application software package can be programmed into the corresponding non-volatile storage space.
- each manufacturer develops each sub-function in their own compilation environment, and then compiles and burns the developed sub-function into their respective development boards. After each sub-function has been developed and debugged, the corresponding application software package will be generated. Send the main firmware software package and application software package to the final manufacturer, and the manufacturer will burn and run. Therefore, some users and their sub-users in the market can independently develop applications without developing in a set of development environments. In this way, the software codes between different users can be well kept secret, and there will be no leakage of software developed by various companies due to sharing a set of software.
- a method for running an independent application based on a real-time operating system is provided, and the method is applied to a terminal as an example for description, including the following steps:
- Step 402 after the initialization of the real-time operating system and the main firmware program is completed, it is detected whether there is a first independent application, and when it is detected that there is a first independent application, the first independent application is loaded and run.
- a real-time operating system executes commands and manages system resources in a given order.
- the real-time operating system can accept and process them at a fast enough speed, and the results of its processing can control the production process or respond quickly to the processing system within a specified time. Utilize resources to complete real-time tasks and control all real-time tasks to run in unison.
- the real-time operating system has the main characteristics of being able to provide timely response and high reliability.
- the real-time operating system is relative to the time-sharing operating system.
- Commonly used Microsoft Windows (Windows) operating systems and the like belong to time-sharing operating systems.
- the time-sharing operating system works based on the divided time slices, and will not respond to other tasks until the tasks in a certain time slice are executed.
- the real-time operating system will pay attention to the priority of each task.
- a task with a higher priority sends an execution request, even if the task is being executed, the task with a higher priority will be executed immediately.
- a product to be developed may include functions such as Bluetooth and audio at the same time.
- the priority of Bluetooth and audio can be set, and corresponding functions can be implemented based on the order of settings.
- the main firmware program refers to a bottom-level development program including compilation scripts, library files, and the like. Users and their sub-users can develop corresponding functions based on the compilation scripts and library files in the main firmware program, or directly call the application programming interface of the main firmware program to directly implement corresponding functions.
- the first independent application refers to an application developed by the user based on the compilation script, library file, etc. provided in the main firmware program.
- the first independent application can be used to establish communication with the main firmware program, so as to use the main firmware program to perform dial-up Internet data transmission.
- the function of the first independent application may also be determined depending on the actual application requirements of the user's own product.
- Step 404 After the first independent application is loaded and run, it is detected whether there are other independent applications. When there are other independent applications, the application programming interface for starting the other independent applications is called, and the other independent applications are loaded and run. application.
- the user needs to develop a product, and the product needs to use sub-functions such as audio, Bluetooth and camera, and these sub-functions can be implemented by the user's sub-users.
- the first independent application may be an application for establishing communication with the main firmware program.
- the sub-users of the user compile and develop the corresponding functions based on their own development environments, generate the corresponding application software packages from the debugged application code, and send the application software packages to the final manufacturer to be burned and loaded to run to achieve the corresponding function.
- the first independent application is loaded and run.
- Application after loading and running the first independent application, check whether there are other independent applications, when there are other independent applications, call the application programming interface for starting other independent applications, load and run other independent applications.
- the step of detecting whether there is a first independent application includes:
- corresponding application software packages will be generated, and the application software packages have corresponding header information.
- an application programming interface for launching other independent applications is called to load and run other independent applications, including:
- the first independent application invokes the application programming interfaces of other independent applications to load and run the other independent applications.
- an application programming interface for launching other independent applications is called to load and run other independent applications, including:
- the main firmware program After loading and running the first independent application, the main firmware program calls the application programming interfaces of other independent applications to load and run the other independent applications.
- the application programming interface for starting other independent applications can be called by the first independent application, other independent applications can be loaded and run, and the main firmware program can also be used to start other independent applications.
- Application programming interface which can be selected by the user.
- the user only allows other independent applications to communicate with the first independent application, then there will not be any application programming interface information about the main firmware program in the compilation environment of other independent applications.
- the application programming interface is entirely provided by the first standalone application.
- the user and its sub-users or suppliers cooperate with each other to develop product functions, and the information is known internally by the user and its sub-users or suppliers. That is to say, the user and its sub-users or suppliers only use the framework in the main firmware program provided, and the development of the first independent application and other independent applications is completely completed by the user and its sub-users or suppliers. Market demand.
- the application programming interface provided by the main firmware needs to be called.
- the main firmware program not only provides compilation scripts, but also provides application programming interfaces with different functions. For users and their sub-users, independent applications are independent of each other and do not depend on each other.
- other independent applications are loaded and run, including:
- the other independent applications are loaded and executed in sequence.
- non-volatile storage space other independent applications are loaded and run in sequence based on the pre-divided storage addresses of the independent applications. For example, each independent application is executed in sequence, and after the interface for loading the first independent application runs, the second independent application is loaded until all the independent applications are loaded.
- FIG. 5 it is a flowchart of a method for running an independent application based on a real-time operating system in one embodiment.
- the boot loader can be set to boot the hardware system, establish the mapping map of the memory space, and perform corresponding initialization and settings for the software and hardware, etc. , which prepares the environment for running the operating system.
- the operating mode of the bootloader may be a self-starting mode. After the bootloader is turned on, the bootloader directly loads the operating system program into the memory to run.
- the main firmware program is stored in the Application partition.
- the main firmware program refers to a bottom-level development program including compilation scripts, library files, and the like. Users and their sub-users can develop corresponding functions based on the compilation scripts and library files in the main firmware program, or directly call the application programming interface of the main firmware program to directly implement corresponding functions.
- the main firmware program loads and runs the initialization phase.
- the first independent application may be used to communicate with the main firmware, use the main firmware to transfer data via dial-up Internet access, or determine the function of the first independent application depending on the actual application requirements of the user's own product. For example, when the first independent application is used for communication and Internet access, a dial-up request may be sent to the main firmware program, specifically, a communication connection may be established with the main firmware program by sending an AT command.
- the method for detecting whether the first independent application exists by the main firmware program may be, based on the header information of the first independent application when it is compiled into the application software package, burn the header information of the application software package and the content of the application software package into the After the planned non-volatile storage space, when loading the location of the first independent application, the main firmware program detects the header content in the planned non-volatile storage space address, and it can be judged as valid after the verification is passed.
- the program of the first independent application indicates that there is a first independent application, and then jumps to the entry program of the first independent application for loading and running.
- the main firmware program After loading and running the first independent application, the main firmware program will detect whether there are other independent applications in the APP flash space.
- the other independent applications may include a second independent application (APP2), a third independent application (APP3) . . . the nth independent application (APPn), where n is a positive integer.
- the method for the main firmware program to detect whether there are other independent applications may be, when loading the positions of other independent applications, the main firmware program detects the header of the application software package stored in the corresponding non-volatile storage space address. After the verification is passed, it can be considered that this is a valid program of other independent applications, and then jump to the entry program of other independent applications to load and run.
- the specific loading sequence can be implemented according to the user's own code.
- the main firmware program can directly load and run other independent applications to realize corresponding functions, or after the first independent application is encapsulated, the main firmware program can call other independent applications to implement the corresponding function.
- the other independent applications are executed in sequence, and after loading and running the interface of the first independent application, the second independent application is loaded until all the independent applications are loaded.
- steps in the flowcharts of FIGS. 1 , 2 and 4 are sequentially displayed according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 1 , 2 and 4 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. These steps or stages The order of execution of the steps is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages in the other steps.
- a software storage device 600 under a storage architecture including a software package processing module 602, a first storage area processing module 604, a compilation module 606 and a second storage area processing module 608, of which:
- 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 the corresponding static storage area, and store dynamic variables in the application software package in the dynamic storage area.
- the compilation module 606 is used for compiling static variables in the static storage area and dynamic variables in the dynamic storage area.
- the second storage area processing module 608 is configured to burn the firmware software package and the application software package of the main firmware program into a corresponding position in the non-volatile storage space after the processing module is successfully compiled.
- the first storage area processing module 604 is further configured to store the static variables in the application software package in the corresponding static storage area based on the size of the global variables in each application software package.
- the second storage area processing module 608 is further configured to burn the firmware software package into the non-volatile storage space, and determine the application in the non-volatile storage space based on the main firmware program in the firmware software package The starting address when the software package is burned into the non-volatile storage space; based on the starting address and the size of each application software package, the starting address of each application software package in the non-volatile storage space is determined, and the application software The package is programmed into the corresponding location in the non-volatile storage space.
- an apparatus 700 for running an independent application based on a real-time operating system including: an initialization module 702 and an independent application processing module 704, wherein:
- the initialization module 702 is used for the initialization of the real-time operating system and the main firmware program.
- the independent application processing module 704 is used to detect whether there is a first independent application after initializing the real-time operating system and the main firmware program, and when it is detected that there is a first independent application, load and run the first independent application; After the first independent application, it is detected whether other independent applications exist, and when there are other independent applications, the application programming interface for starting the other independent applications is called to load and run the other independent applications.
- the independent application processing module 704 is further configured to search for the application software package in the non-volatile storage space corresponding to the address of the non-volatile storage space after the initialization of the real-time operating system and the main firmware program is completed; Based on the header information of the application software package, it is checked whether the first independent application in the application software package is valid; when it is determined based on the header information that the first independent application is valid, it is determined that the first independent application exists.
- the independent application processing module 704 is further configured to load and run the first independent application, the first independent application invokes the application programming interfaces of other independent applications, and loads and runs the other independent applications.
- the independent application processing module 704 is further configured to, after loading and running the first independent application, the main firmware program calls the application programming interfaces of other independent applications to load and run other independent applications.
- the independent application processing module 704 is further configured to sequentially load and run other independent applications based on the storage addresses of the application software packages corresponding to the other independent applications.
- each module in the software storage device under the above-mentioned storage architecture and the running device of the independent application based on the real-time operating system can be implemented in whole or in part by software, hardware and combinations thereof.
- the above modules may be embedded in or independent of the processor in the computer device in the form of hardware, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute operations corresponding to the above modules.
- a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in FIG. 8 .
- the computer device includes a processor, memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium, an internal memory.
- the nonvolatile storage medium stores an operating system, a computer program, and a database.
- the internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
- the database of the computer device is used to store application function data.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 9 .
- the computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium, an internal memory.
- the nonvolatile storage medium stores an operating system and a computer program.
- the internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
- the communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies.
- the computer program is executed by the processor, a method for running an independent application based on a real-time operating system is realized.
- the display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
- FIGS. 8 and 9 are only block diagrams of partial structures related to the solution of the present application, and do not constitute a limitation on the computer equipment to which the solution of the present application is applied.
- a device may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
- a computer device including a memory and a processor, a computer program is stored in the memory, and the processor implements steps of a method for running an independent application based on a real-time operating system when the processor executes the computer program
- a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements steps of a method for running an independent application based on a real-time operating system.
- Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like.
- Volatile memory may include random access memory (RAM) or external cache memory.
- the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
- a component As used in this application, the terms “component,” “module,” and “system” and the like are intended to mean a computer-related entity, which may be hardware, a combination of hardware and software, software, or software in execution.
- a component may be, but is not limited to, a process running on a processor, a processor, an object, executable code, a thread of execution, a program, and/or a computer.
- both the application running on the server and the server can be components.
- One or more components can reside within a process and/or thread of execution, and a component can be localized within one computer and/or distributed between two or more computers.
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
一种存储架构下的软件存储方法,包括:获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包;将应用软件包中的静态变量存储于对应的静态存储区域,以及将应用软件包中的动态变量存储于动态存储区域;对静态存储区域中的静态变量、动态存储区域中的动态变量进行编译,在编译成功之后,将主固件程序的固件软件包、应用软件包烧录进非易失性存储空间中的对应位置处。
Description
相关申请的交叉引用
本申请要求于2021年02月23日提交中国专利局、申请号为202110200480.6、名称为“存储架构下的软件存储方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,特别是涉及一种存储架构下的软件存储方法、装置、计算机设备和存储介质。
随着通信技术的发展,为了缩短产品开发周期,简化用户对产品的开发流程,出现了开放式计算机系统(OpenCPU)架构,在此架构下,用户及其子用户可以共同合作开发同一产品的各个子功能。
用户及其子用户基于当前的OpenCPU架构,在同一套开发环境中开发同一产品的各个子功能后,独立烧录进非易失性存储空间后,只能随系统择机加载运行。
发明内容
根据本申请各种实施例,提供一种存储架构下的软件存储方法、装置、计算机设备和存储介质。
一种存储架构下的软件存储方法,所述方法包括:获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包;将所述应用软件包中的静态变量存储于对应的静态存储区域,以及将所述应用软件包中的动态变量存储于动态存储区域;以及对所述静态存储区域中的静态变量、所述动态存储区域中的动态变量进行编译,在编译成功之后,将所述主固件程序的固 件软件包、所述应用软件包烧录进非易失性存储空间中的对应位置处。
一种基于实时操作系统的独立应用的运行方法,所述独立应用基于执行如上所述的存储架构下的软件存储方法的存储架构运行,所述基于实时操作系统的独立应用的运行方法,包括:在实时操作系统和主固件程序初始化完成之后,检测是否存在有第一独立应用,当检测到存在有第一独立应用时,加载运行所述第一独立应用;当基于所述第一独立应用加载运行之后,检测是否有其它的独立应用存在,当存在有其它的独立应用时,调用启动所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用。
一种存储架构下的软件存储装置,包括:
软件包处理模块,用于获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包;
第一存储区域处理模块,用于将所述应用软件包中的静态变量存储于对应的静态存储区域,以及将所述应用软件包中的动态变量存储于动态存储区域;
编译模块,用于对所述静态存储区域中的静态变量、所述动态存储区域中的动态变量进行编译;以及
第二存储区域处理模块,用于在处理模块编译成功之后,将所述主固件程序的固件软件包、所述应用软件包烧录进非易失性存储空间中的对应位置处。
一种基于实时操作系统的独立应用的运行装置,包括:
初始化模块,用于实时操作系统和主固件程序的初始化;以及
独立应用处理模块,用于在初始化实时操作系统和主固件程序之后,检测是否存在有第一独立应用,当检测到存在有第一独立应用时,加载运行所述第一独立应用;当加载运行了所述第一独立应用之后,检测是否有其它的独立应用存在,当存在有其它的独立应用时,调用启动所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用。
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述的存储架构下的软件存储方法的步骤。
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述的基于实时操作系统的独立应用的运行方法的步骤。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的存储架构下的软件存储方法的步骤。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的基于实时操作系统的独立应用的运行方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
为了更好地描述和说明这里公开的那些发明的实施例和/或示例,可以参考一幅或多幅附图。用于描述附图的附加细节或示例不应当被认为是对所公开的发明、目前描述的实施例和/或示例以及目前理解的这些发明的最佳模式中的任何一者的范围的限制。
图1为一个实施例中存储架构下的软件存储方法的流程示意图;
图2为一个实施例中存储架构下的软件存储方法的静态存储区域划分架构图;
图3为一个实施例中存储架构下的软件存储方法的非易失性存储空间划分架构图;
图4为一个实施例中基于实时操作系统的独立应用的运行方法的流程示意图;
图5为另一个实施例中基于实时操作系统的独立应用的运行方法的流程示意图;
图6为一个实施例中存储架构下的软件存储装置的结构框图;
图7为一个实施例中基于实时操作系统的独立应用的运行装置的结构框图;
图8为一个实施例中计算机设备的内部结构图;
图9为另一个实施例中计算机设备的内部结构图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅 用以解释本申请,并不用于限定本申请。
本申请提供的存储架构下的软件存储方法,可以应用于终端中。其中,终端获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包;将应用软件包中的静态变量存储于对应的静态存储区域,以及将应用软件包中的动态变量存储于动态存储区域;对静态存储区域中的静态变量、动态存储区域中的动态变量进行编译,在编译成功之后,将主固件程序的固件软件包、应用软件包烧录进非易失性存储空间中的对应位置处。其中,终端可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。可选的,上述方法也可以应用于服务器中,服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一个实施例中,如图1所示,提供了一种存储架构下的软件存储方法,以该方法应用于终端为例进行说明,包括以下步骤:
步骤102,获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包。
其中,主固件程序是指包括有编译脚本、库文件等的底层开发程序。用户以及用户的子用户可以基于主固件程序中的编译脚本和库文件,开发相应的功能,也可以直接调用主固件程序的应用程序编程接口,直接实现相应的功能。主固件程序存储于固件软件包中。其中,第一独立应用、其它各独立应用是指用户基于主固件程序中提供的编译脚本、库文件等开发出来的应用。第一独立应用可以用于和主固件程序建立通信,从而借用主固件程序进行拨号上网传输数据。当然,也可以取决于用户自己产品实际应用需求来决定第一独立应用的功能。第一独立应用和其它各独立应用在各自的PC环境下分别编译生成对应的应用软件包。
在其中一个实施例中,用户需要生产一款带有音频、蓝牙和摄像头的产品,可以选择将音频、蓝牙以及摄像头等子功能交给用户的各子用户进行开发。其中,各个厂商在各自的开发环境下,对各子功能进行开发,然后烧录进各自的开发板,待各个子功能均开发调试完毕,生成对应的应用软件包。将主固件程序的固件软件包、应用软件包发送给最终的生产厂商,由生产厂商基于发送过来的主固件程序的固件软件包、应用软件包进行处理。
步骤104,将应用软件包中的静态变量存储于对应的静态存储区域,以及将 应用软件包中的动态变量存储于动态存储区域。
其中,应用软件包中存储有第一独立应用和其它各独立应用的应用代码,在应用代码里会定义一部分静态变量,将这部分静态变量存储于静态存储区域。例如,静态变量可以为全局变量或其他存储在静态存储区域的数据。同时也会将动态变量存储于动态存储区域,动态变量可以为局部变量或者指针变量等。
步骤106,对静态存储区域中的静态变量、动态存储区域中的动态变量进行编译,在编译成功之后,将主固件程序的固件软件包、应用软件包烧录进非易失性存储空间中的对应位置处。
其中,基于存储于静态存储区域的静态变量以及存储于动态存储区域的动态变量,对静态存储区域中的静态变量、动态存储区域中的动态变量进行编译之后,如果编译成功,则可以将主固件程序的固件软件包、应用软件包烧录进非易失性存储空间中的对应位置处。
在上述存储架构下的软件存储方法中,通过获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包;将应用软件包中的静态变量存储于对应的静态存储区域,以及将应用软件包中的动态变量存储于动态存储区域;对静态存储区域中的静态变量、动态存储区域中的动态变量进行编译,在编译成功之后,将主固件程序的固件软件包、应用软件包烧录进非易失性存储空间中的对应位置处。从而通过上述方法,能够使得固件软件包和应用软件包村烧录进同一非易失性存储空间的不同位置处,为后续加载运行实现相应的产品功能提供基础。
在其中一个实施例中,步骤104中的将应用软件包中的静态变量存储于对应的静态存储区域,包括:
基于各应用软件包中全局变量的大小,将应用软件包中的静态变量存储于对应的静态存储区域。
其中,第一独立应用和其它的独立应用中的全局变量,在编译期间会计算各个对应的全局变量的大小,基于应用软件包中全局变量的大小,可以将各应用软件包中的静态变量存储在静态存储区域的相应地址空间内。
在其中一个实施例中,步骤106中的获取固件软件包以及应用软件包之后,将固件软件包以及应用软件包烧录进非易失性存储空间中之前,还包括:
基于各应用软件包中全局变量的大小,将应用软件包中的静态变量存储于 对应的静态存储区域,以及将应用软件包中的动态变量存储于动态存储区域。
如图2所示,为第一独立应用和其它的独立应用静态存储区域划分架构图。其中,第一独立应用(APP1)和其它各独立应用(APP2……APPn)在各自的PC环境下分别编译生成对应的应用软件包。这些应用软件包中存储有第一独立应用和其它各独立应用的应用代码,在应用代码里会定义一部分静态变量存储于静态存储区域。例如,静态变量可以为全局变量或其他存储在静态存储区域的数据。例如,如图2所示,将APP1的静态全局变量存储在静态存储区域Static RAM中Addr1处的地址空间内,将APP2的静态全局变量存储在静态存储区域Static RAM中Addr2处的地址空间内,等等。同时也会将动态变量存储于动态存储区域。动态变量可以为局部变量或者指针变量等。例如,如图2所示,将APP1的动态变量存储在动态存储区域Dynamic RAM中,将APP2的动态变量存储在动态存储区域Dynamic RAM中,等等。其中,第一独立应用和其它的独立应用的全局变量均对应有相应的大小。基于应用软件包中全局变量的大小,可以将各应用软件包中的静态变量存储在静态存储区域相应地址空间内。通过上述方法,可以使得第一独立应用以及其它各独立应用编译的全局变量存储在各自的静态存储空间互不影响。
在其中一个实施例中,步骤106中的将固件软件包、应用软件包烧录进非易失性存储空间中的对应位置处,包括:
将固件软件包烧录进非易失性存储空间,基于固件软件包中的主固件程序,确定非易失性存储空间中应用软件包烧录进非易失性存储空间时的起始地址;以及
基于起始地址,以及各应用软件包的大小,确定非易失性存储空间的各应用软件包的起始地址,将应用软件包烧录进非易失性存储空间中的对应位置处。
如图3所示,为固件软件包和应用软件包烧录进非易失性存储空间中的架构划分图。该非易失性存储空间例如可以但不限于是闪存(Flash)等。首先,将固件软件包烧录进非易失性存储空间中。固件软件包中存储有主固件程序,图3中的应用(Application)分区即为固件软件包所处的位置。其中,可以通过固件软件包中的主固件程序确定非易失性存储空间中应用软件包烧录进非易失性存储空间时的起始地址(Start addr)。确定起始地址后,即可将应用软件包烧录进非易失性存储空间的起始地址处。其中,可以基于应用软件包的大小 以及起始地址,划分非易失性存储空间,将应用软件包烧录进对应的非易失性存储空间。
其中,各个厂商在各自的编译环境下,对各子功能进行开发,然后将开发的各子功能编译烧录进各自的开发板。待各个子功能均开发调试完毕,生成对应的应用软件包。将主固件软件包、应用软件包发送给最终的生产厂商,由生产厂商进行烧录运行。从而可以使得市场上一些用户及其子用户各自独立开发应用,而不用在一套开发环境里开发。这样,不同用户间的软件代码可以很好的保密,不会因为共享一套软件导致的各个公司开发的软件泄密等问题。
在其中一个实施例中,如图4所示,提供了一种基于实时操作系统的独立应用的运行方法,以该方法应用于终端中为例进行说明,包括以下步骤:
步骤402,在实时操作系统和主固件程序初始化完成之后,检测是否存在有第一独立应用,当检测到存在有第一独立应用时,加载运行该第一独立应用。
其中,实时操作系统按给定顺序执行命令并管理系统资源。当外界事件或数据产生时,实时操作系统能够接受并以足够快的速度予以处理,其处理的结果又能在规定的时间之内来控制生产过程或对处理系统做出快速响应,调度一切可利用的资源完成实时任务,并控制所有实时任务协调一致运行。实时操作系统具有能够提供及时响应和高可靠性的主要特点。
其中,实时操作系统是相对于分时操作系统而言的。常用的微软视窗(Windows)操作系统等属于分时操作系统。分时操作系统基于划分好的时间片进行工作,在执行完某一个时间片内的任务之前,不会响应其它的任务。而实时操作系统会注重各个任务的优先级,当优先级高的任务发出执行请求时,即便正在执行任务中,也会立即执行优先级更高的任务。例如,一款待开发的产品可以同时包括有蓝牙、音频等功能,在实时操作系统中,可以通过设置蓝牙、音频的优先级,基于设置的顺序实现相应的功能。
其中,主固件程序是指包括有编译脚本、库文件等的底层开发程序。用户以及用户的子用户可以基于主固件程序中的编译脚本和库文件,开发相应的功能,也可以直接调用主固件程序的应用程序编程接口,直接实现相应的功能。
其中,第一独立应用是指用户基于主固件程序中提供的编译脚本、库文件等开发出来的应用。第一独立应用可以用于和主固件程序建立通信,从而借用主固件程序进行拨号上网传输数据。当然,也可以取决于用户自己产品实际应 用需求来决定第一独立应用的功能。
步骤404,当加载运行了第一独立应用之后,检测是否有其它的独立应用存在,当存在有其它的独立应用时,调用启动该其它的独立应用的应用程序编程接口,加载运行该其它的独立应用。
其中,当加载运行了第一独立应用之后,会检测是否还有其它的独立应用。当检测到有其它的独立应用存在时,调用启动其它独立应用的应用程序编程接口,加载运行其它的独立应用。
在其中一个实施例中,用户需要开发一款产品,产品中需要用到音频,蓝牙和摄像头这些子功能,这些子功能均可交给用户的子用户实现。第一独立应用可以为用于与主固件程序建立通信的应用。用户的子用户基于各自的开发环境,分别编译开发相应的功能,并将调试完成的应用代码生成对应的应用软件包,将应用软件包均发送给最终的生产厂商烧录后加载运行以达到相应的功能。
上述基于实时操作系统的独立应用的运行方法中,在实时操作系统和主固件程序初始化完成之后,检测是否存在有第一独立应用,当检测到存在有第一独立应用时,加载运行第一独立应用;当加载运行了第一独立应用之后,检测是否有其它的独立应用存在,当存在有其它的独立应用时,调用启动其它的独立应用的应用程序编程接口,加载运行其它的独立应用。通过上述方法,可以使得第一独立应用和其它各个独立应用在实时操作系统的环境下,依次加载运行,从而实现一套产品的各个功能。
在其中一个实施例中,步骤402中的在实时操作系统和主固件程序初始化完成之后,检测是否存在有第一独立应用的步骤,包括:
在实时操作系统和主固件程序初始化完成之后,查找非易失性存储空间的地址对应的非易失性存储空间中的应用软件包;
基于应用软件包的头部信息,检验应用软件包中的第一独立应用是否有效;以及
当基于头部信息确定第一独立应用有效时,则确定存在有第一独立应用。
其中,在第一独立应用和其它各独立应用编译调试完成之后,会生成对应的应用软件包,应用软件包对应有头部信息。在检测是否存在有第一独立应用时,可以通过检测对应的应用软件包的头部信息,基于头部信息,判断应用软件包中的第一独立应用是否有效。当基于头部信息确定应用软件包有效时,则 确定存在有第一独立应用。
其中一个实施例中,调用启动其它的独立应用的应用程序编程接口,加载运行其它的独立应用,包括:
基于加载运行的第一独立应用,由第一独立应用调用其它的独立应用的应用程序编程接口,加载运行其它的独立应用。
其中一个实施例中,调用启动其它的独立应用的应用程序编程接口,加载运行其它的独立应用,包括:
当加载运行了第一独立应用之后,由主固件程序调用其它的独立应用的应用程序编程接口,加载运行其它的独立应用。
其中,当加载运行了第一独立应用之后,可以通过第一独立应用调用启动其它的独立应用的应用程序编程接口,加载运行其它的独立应用,也可以通过主固件程序调用启动其它的独立应用的应用程序编程接口,具体可以由用户自行选择。
在其中一个实施例中,用户仅允许其它的独立应用与第一独立应用进行通信,则其它独立应用的编译环境里不会有任何关于主固件程序的应用程序编程接口信息,其它的独立应用的应用程序编程接口完全由第一独立应用提供。此时,用户及其子用户或供应商之间彼此协同开发产品功能,信息由用户及其子用户或供应商内部知晓。也就是说,用户及其子用户或供应商仅使用了提供的主固件程序中架构,第一独立应用以及其它的独立应用开发完全由用户及其子用户或供应商完成,这也是大部分用户市场需求。
在其中一个实施例中,其它的独立应用与主固件程序进行通信,则需调用主固件提供的应用程序编程接口。此时,主固件程序中不仅提供了编译脚本,还要提供不同功能的应用程序编程接口。对于用户及其子用户来讲,各独立应用之间彼此独立,互不依赖。
在其中一个实施例中,加载运行其它的独立应用,包括:
基于其它的独立应用对应的应用软件包的存储地址,依次加载运行其它的独立应用。
其中,在非易失性存储空间中,基于预先划分好的各独立应用的存储地址,依次加载运行其它的独立应用。例如,各独立应用是按顺序执行的,加载第一独立应用的接口运行后,再加载第二独立应用,直至所有的独立应用加载完成。
在一个实施例中,如图5所示,为一个实施例中基于实时操作系统的独立应用的运行方法的流程图。
在开机之后,在图5中所示的Boot加载运行步骤中,可以通过设置引导加载程序(bootloader),引导启动硬件系统、建立内存空间的映射图、对软硬件进行相应的初始化和设定等,从而为运行操作系统准备好环境。其中,bootloader的操作模式可以为自启动模式,在开机之后,bootloader直接将操作系统程序加载到存储器中运行。
在bootloader运行结束时,跳转至应用(Application)分区,执行图5中所示的Application加载运行步骤。其中,Application分区中存储有主固件程序。其中,主固件程序是是指包括有编译脚本、库文件等的底层开发程序。用户以及用户的子用户可以基于主固件程序中的编译脚本和库文件,开发相应的功能,也可以直接调用主固件程序的应用程序编程接口,直接实现相应的功能。Application分区中为主固件程序加载运行初始化阶段。
当主固件程序加载运行结束时,会去检测在非易失性存储空间(例如闪存,即图5中所示的APP flash空间)中是否存在有第一独立应用(APP1)。其中,第一独立应用可以用于与主固件进行通信,借用主固件进行拨号上网传输数据,也可以取决于用户自己产品实际应用需求来决定第一独立应用的功能。例如,当第一独立应用用于通信上网时,可以通过向主固件程序发送拨号请求,具体的,可以通过发送AT指令与主固件程序建立通信连接。其中,主固件程序检测是否存在有第一独立应用的方法可以是,基于第一独立应用在编译成应用软件包时的头部信息,在应用软件包头部信息及应用软件包的内容烧录进规划的非易失性存储空间中后,在加载第一独立应用的位置时,主固件程序检测规划的非易失性存储空间地址里的头部内容,检验通过后即可判断此处为有效的第一独立应用的程序,则代表存在有第一独立应用,进而跳转至第一独立应用的入口程序里进行加载运行。
当加载运行了第一独立应用之后,主固件程序会检测在APP flash空间是否存在有其它的独立应用。其它各独立应用可以包括第二独立应用(APP2)、第三独立应用(APP3)……第n独立应用(APPn),n为正整数。类似地,主固件程序检测是否存在有其它的独立应用的方法可以是,在加载其它各独立应用的位置时,主固件程序检测对应的非易失性存储空间地址中存储的应用软件包的 头部信息,检验通过后即可认为此处为有效的其它各独立应用的程序,进而跳转至其它独立应用的入口程序里进行加载运行,具体的加载顺序可以根据用户自己的代码实现。
在加载其它的各独立应用时,可以由主固件程序直接加载运行其它的各独立应用以实现相应功能,也可以由第一独立应用被封装之后,再由主固件程序调用其它的各独立应用以实现相应功能。其中,其它的独立应用是是按顺序执行的,在加载运行第一独立应用的接口后,再加载第二独立应用,直至加载完成所有的独立应用。
应该理解的是,虽然图1、2、4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1、2、4中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图6所示,提供了一种存储架构下的软件存储装置600,包括软件包处理模块602、第一存储区域处理模块604、编译模块606和第二存储区域处理模块608,其中:
软件包处理模块602,用于获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包。
第一存储区域处理模块604,用于将应用软件包中的静态变量存储于对应的静态存储区域,以及将应用软件包中的动态变量存储于动态存储区域。
编译模块606,用于对静态存储区域中的静态变量、动态存储区域中的动态变量进行编译。
第二存储区域处理模块608,用于在处理模块编译成功之后,将主固件程序的固件软件包、应用软件包烧录进非易失性存储空间中的对应位置处。
在其中一个实施例中,第一存储区域处理模块604还用于基于各应用软件包中全局变量的大小,将应用软件包中的静态变量存储于对应的静态存储区域。
在其中一个实施例中,第二存储区域处理模块608还用于将固件软件包烧录进非易失性存储空间,基于固件软件包中的主固件程序,确定非易失性存储 空间中应用软件包烧录进非易失性存储空间时的起始地址;基于起始地址,以及各应用软件包的大小,确定非易失性存储空间的各应用软件包的起始地址,将应用软件包烧录进非易失性存储空间中的对应位置处。
在一个实施例中,如图7所示,提供了一种基于实时操作系统的独立应用的运行装置700,包括:初始化模块702和独立应用处理模块704,其中:
初始化模块702,用于实时操作系统和主固件程序的初始化。
独立应用处理模块704,用于在初始化实时操作系统和主固件程序之后,检测是否存在有第一独立应用,当检测到存在有第一独立应用时,加载运行第一独立应用;当加载运行了第一独立应用之后,检测是否有其它的独立应用存在,当存在有其它的独立应用时,调用启动其它的独立应用的应用程序编程接口,加载运行其它的独立应用。
在其中一个实施例中,独立应用处理模块704还用于在实时操作系统和主固件程序初始化完成之后,查找非易失性存储空间的地址对应的非易失性存储空间中的应用软件包;基于应用软件包的头部信息,检验应用软件包中的第一独立应用是否有效;当基于头部信息确定第一独立应用有效时,则确定存在有第一独立应用。
在其中一个实施例中,独立应用处理模块704还用于基于加载运行的第一独立应用,由第一独立应用调用其它的独立应用的应用程序编程接口,加载运行其它的独立应用。
在其中一个实施例中,独立应用处理模块704还用于当加载运行了第一独立应用之后,由主固件程序调用其它的独立应用的应用程序编程接口,加载运行其它的独立应用。
在其中一个实施例中,独立应用处理模块704还用于基于其它的独立应用对应的应用软件包的存储地址,依次加载运行其它的独立应用。
关于存储架构下的软件存储装置、基于实时操作系统的独立应用的运行装置的具体限定可以参见上文中对于存储架构下的软件存储方法、基于实时操作系统的独立应用的运行方法的限定,在此不再赘述。上述存储架构下的软件存储装置、基于实时操作系统的独立应用的运行装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中, 以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储应用功能数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于实时操作系统的独立应用的运行方法。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种基于实时操作系统的独立应用的运行方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图8、9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现基于实时操作系统的独立应用的运行方法的步骤
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程 序,计算机程序被处理器执行时实现基于实时操作系统的独立应用的运行方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。
如在本申请中所使用的,术语“组件”、“模块”和“系统”等旨在表示计算机相关的实体,它可以是硬件、硬件和软件的组合、软件、或者执行中的软件。例如,组件可以是但不限于是,在处理器上运行的进程、处理器、对象、可执行码、执行的线程、程序和/或计算机。
作为说明,运行在服务器上的应用程序和服务器都可以是组件。一个或多个组件可以驻留在进程和/或执行的线程中,并且组件可以位于一个计算机内和/或分布在两个或更多的计算机之间。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。
Claims (19)
- 一种存储架构下的软件存储方法,包括:获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包;将所述应用软件包中的静态变量存储于对应的静态存储区域,以及将所述应用软件包中的动态变量存储于动态存储区域;以及对所述静态存储区域中的静态变量、所述动态存储区域中的动态变量进行编译,在编译成功之后,将所述主固件程序的固件软件包、所述应用软件包烧录进非易失性存储空间中的对应位置处。
- 根据权利要求1所述的方法,其中,所述将所述应用软件包中的静态变量存储于对应的静态存储区域,包括:基于各所述应用软件包中全局变量的大小,将所述应用软件包中的静态变量存储于对应的静态存储区域。
- 根据权利要求1所述的方法,其中,所述将所述固件软件包、所述应用软件包烧录进非易失性存储空间中的对应位置处,包括:将所述固件软件包烧录进非易失性存储空间,基于所述固件软件包中的主固件程序,确定所述非易失性存储空间中所述应用软件包烧录进所述非易失性存储空间时的起始地址;以及基于所述起始地址,以及各所述应用软件包的大小,确定所述非易失性存储空间的各所述应用软件包的起始地址,将所述应用软件包烧录进非易失性存储空间中的对应位置处。
- 根据权利要求1所述的方法,其中,所述主固件程序为包括有编译脚本和库文件的底层开发程序。
- 根据权利要求1所述的方法,其中,所述第一独立应用和所述其它的独立应用为基于所述主固件程序中提供的编译脚本和库文件开发出来的应用。
- 根据权利要求1所述的方法,其中,所述第一独立应用用于与所述主固件程序建立通信,并借用所述主固件程序进行拨号上网传输数据。
- 根据权利要求1所述的方法,其中,针对所述第一独立应用和所述其它的独立应用,在各自的开发环境下分别编译生成对应的所述应用软件包。
- 根据权利要求1所述的方法,其中,所述应用软件包中分别存储有所述 第一独立应用和所述其它的独立应用的应用代码,在所述应用代码里定义有所述静态变量。
- 根据权利要求1所述的方法,其中,所述静态变量包括全局变量。
- 根据权利要求1所述的方法,其中,所述动态变量包括局部变量或者指针变量。
- 一种基于实时操作系统的独立应用的运行方法,所述独立应用基于执行如权利要求1-10中任一项所述的存储架构下的软件存储方法的存储架构运行,所述基于实时操作系统的独立应用的运行方法,包括:在实时操作系统和主固件程序初始化完成之后,检测是否存在有第一独立应用,当检测到存在有第一独立应用时,加载运行所述第一独立应用;以及当加载运行了所述第一独立应用之后,检测是否有其它的独立应用存在,当存在有其它的独立应用时,调用启动所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用。
- 根据权利要求11所述的方法,其中,在实时操作系统和主固件程序初始化完成之后,检测是否存在有第一独立应用的步骤,包括:在实时操作系统和主固件程序初始化完成之后,查找非易失性存储空间的地址对应的非易失性存储空间中的应用软件包;基于所述应用软件包的头部信息,判断所述应用软件包中的第一独立应用是否有效;以及当基于头部信息确定所述第一独立应用有效时,则确定存在有第一独立应用。
- 根据权利要求11所述的方法,其中,所述调用启动所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用,包括:基于所述加载运行的第一独立应用,由所述第一独立应用调用所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用。
- 根据权利要求11所述的方法,其中,所述调用启动所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用,包括:当加载运行了所述第一独立应用之后,由所述主固件程序调用所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用。
- 根据权利要求11所述的方法,其中,所述加载运行所述其它的独立应 用,包括:基于所述其它的独立应用对应的应用软件包的存储地址,依次加载运行所述其它的独立应用。
- 一种存储架构下的软件存储装置,包括:软件包处理模块,用于获取主固件程序的固件软件包以及第一独立应用和其它的独立应用对应的应用软件包;第一存储区域处理模块,用于将所述应用软件包中的静态变量存储于对应的静态存储区域,以及将所述应用软件包中的动态变量存储于动态存储区域;编译模块,用于对所述静态存储区域中的静态变量、所述动态存储区域中的动态变量进行编译;以及第二存储区域处理模块,用于在编译模块编译成功之后,将所述主固件程序的固件软件包、所述应用软件包烧录进非易失性存储空间中的对应位置处。
- 一种基于实时操作系统的独立应用的运行装置,包括:初始化模块,用于实时操作系统和主固件程序的初始化;以及独立应用处理模块,用于在初始化所述实时操作系统和所述主固件程序之后,检测是否存在有第一独立应用,当检测到存在有第一独立应用时,加载运行所述第一独立应用;当加载运行了所述第一独立应用之后,检测是否有其它的独立应用存在,当存在有其它的独立应用时,调用启动所述其它的独立应用的应用程序编程接口,加载运行所述其它的独立应用。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现权利要求1至15中任一项所述的方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现权利要求1至15中任一项所述的方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110200480.6 | 2021-02-23 | ||
CN202110200480.6A CN113010179B (zh) | 2021-02-23 | 2021-02-23 | 基于实时操作系统的独立应用的运行方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022179101A1 true WO2022179101A1 (zh) | 2022-09-01 |
Family
ID=76407194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/120893 WO2022179101A1 (zh) | 2021-02-23 | 2021-09-27 | 存储架构下的软件存储方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113010179B (zh) |
WO (1) | WO2022179101A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113010179B (zh) * | 2021-02-23 | 2024-03-15 | 深圳市广和通无线股份有限公司 | 基于实时操作系统的独立应用的运行方法 |
Citations (4)
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 |
CN102819440A (zh) * | 2011-06-10 | 2012-12-12 | 中兴通讯股份有限公司 | 一种多制式应用程序的动态加载方法和装置 |
CN104679556A (zh) * | 2015-02-06 | 2015-06-03 | 深圳市硅格半导体有限公司 | 应用程序烧录方法及系统 |
CN113010179A (zh) * | 2021-02-23 | 2021-06-22 | 深圳市广和通无线股份有限公司 | 存储架构下的软件存储方法 |
Family Cites Families (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1317640C (zh) * | 2004-08-31 | 2007-05-23 | 华为技术有限公司 | 实时操作系统环境下多任务应用软件模块的管理方法 |
CN100454258C (zh) * | 2007-01-09 | 2009-01-21 | 京信通信技术(广州)有限公司 | 嵌入式系统加载程序与应用程序一体化更新方法 |
CN100465894C (zh) * | 2007-01-12 | 2009-03-04 | 中山大学 | 一种Java Processor启动时类装载方法 |
US9459890B2 (en) * | 2008-07-10 | 2016-10-04 | Mentor Graphics Corporation | Controlling real time during embedded system development |
CN101763273B (zh) * | 2008-12-26 | 2014-08-13 | 上海闻泰电子科技有限公司 | 一种在嵌入式系统的扩展存储器中动态装入代码的方法 |
CN101515239A (zh) * | 2009-04-08 | 2009-08-26 | 南京航空航天大学 | X86飞控计算机快速启动方法 |
FR2976094B1 (fr) * | 2011-05-31 | 2013-07-12 | Myriad France | Procede de generation d'un logiciel |
CN102508731B (zh) * | 2011-09-29 | 2013-06-12 | 中国航天科技集团公司第五研究院第五一三研究所 | 基于rs编译码的操作系统的容错启动方法 |
US20140359579A1 (en) * | 2013-05-31 | 2014-12-04 | Microsoft Corporation | Combined data and instruction test content |
US10587689B2 (en) * | 2014-02-14 | 2020-03-10 | Western Digital Technologies, Inc. | Data storage device with embedded software |
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 |
CN104407852B (zh) * | 2014-11-05 | 2017-09-29 | 中国航天科技集团公司第九研究院第七七一研究所 | 一种基于代码隔离的嵌入式软件构建方法和调用方法 |
CN110096272A (zh) * | 2019-03-19 | 2019-08-06 | 深圳壹账通智能科技有限公司 | 库文件处理方法、装置、计算机设备及存储介质 |
US10908884B2 (en) * | 2019-06-27 | 2021-02-02 | Intel Corporation | Methods and apparatus for runtime multi-scheduling of software executing on a heterogeneous system |
CN111124440A (zh) * | 2019-12-17 | 2020-05-08 | 湖南国科微电子股份有限公司 | 芯片软件烧录方法、芯片软件烧录数据处理方法和装置 |
CN111142907B (zh) * | 2019-12-25 | 2022-07-29 | 声耕智能科技(西安)研究院有限公司 | 离线关键词识别系统分区升级方法 |
CN111209008A (zh) * | 2020-04-17 | 2020-05-29 | 北京全路通信信号研究设计院集团有限公司 | 软件的分离设计方法及系统 |
CN111858339B (zh) * | 2020-07-22 | 2023-11-28 | 腾讯科技(成都)有限公司 | 内存分析方法、设备和系统以及计算设备、计算机可读存储介质 |
CN112256278B (zh) * | 2020-11-09 | 2024-10-01 | Oppo广东移动通信有限公司 | 编译方法、装置、设备及存储介质 |
-
2021
- 2021-02-23 CN CN202110200480.6A patent/CN113010179B/zh active Active
- 2021-09-27 WO PCT/CN2021/120893 patent/WO2022179101A1/zh active Application Filing
Patent Citations (4)
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 |
CN102819440A (zh) * | 2011-06-10 | 2012-12-12 | 中兴通讯股份有限公司 | 一种多制式应用程序的动态加载方法和装置 |
CN104679556A (zh) * | 2015-02-06 | 2015-06-03 | 深圳市硅格半导体有限公司 | 应用程序烧录方法及系统 |
CN113010179A (zh) * | 2021-02-23 | 2021-06-22 | 深圳市广和通无线股份有限公司 | 存储架构下的软件存储方法 |
Also Published As
Publication number | Publication date |
---|---|
CN113010179B (zh) | 2024-03-15 |
CN113010179A (zh) | 2021-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7231681B2 (ja) | パッケージファイルに対する機能拡張方法およびシステム | |
US8683462B2 (en) | Handling calls to native code in a managed code environment | |
US9946525B2 (en) | Extracting source code | |
EP3035191B1 (en) | Identifying source code used to build executable files | |
US20120102485A1 (en) | Runtime Extensions | |
US10019598B2 (en) | Dynamic service discovery | |
US8539506B2 (en) | Dynamic injection of code into running process | |
US20220365773A1 (en) | Run-Time Application Modification | |
CN108733553B (zh) | 基于docker的测试装置的配置方法、装置和系统 | |
US11726799B2 (en) | Preventing framework conflicts for multi-OS applications | |
WO2022179101A1 (zh) | 存储架构下的软件存储方法 | |
US10552135B1 (en) | Reducing a size of an application package | |
US20170060571A1 (en) | System and method for masking complexity in a heterogeneous development environment | |
US20160364222A1 (en) | Methods and systems for running modern applications in legacy software environments | |
EP2414937A2 (en) | In-process intermediary to create virtual processes | |
US11720374B1 (en) | Dynamically overriding a function based on a capability set | |
KR20180048518A (ko) | 패키지 파일에 대한 기능 확장 방법 및 시스템 | |
US20170316211A1 (en) | Application translocation | |
WO2023154092A1 (en) | Dynamically overriding a function based on a capability set during load time | |
CN118656144A (zh) | Matlab驱动加载方法、装置、存储介质及电子设备 | |
CN118556228A (zh) | 在加载期间基于能力集动态地重写函数 | |
CN115705289A (zh) | 测试方法、Mock框架、用户设备、服务设备和存储介质 | |
CN118295635A (zh) | 应用程序的开发方法、装置、电子设备及存储介质 | |
CN114564247A (zh) | 多系统兼容方法及装置、电子设备、存储介质 | |
CN113032094A (zh) | 一种cad容器化方法、装置及电子设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21927527 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21927527 Country of ref document: EP Kind code of ref document: A1 |