CN111580850A - Increment upgrading method and device, computer equipment and storage medium - Google Patents

Increment upgrading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111580850A
CN111580850A CN202010398573.XA CN202010398573A CN111580850A CN 111580850 A CN111580850 A CN 111580850A CN 202010398573 A CN202010398573 A CN 202010398573A CN 111580850 A CN111580850 A CN 111580850A
Authority
CN
China
Prior art keywords
project
application layer
layer
firmware
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010398573.XA
Other languages
Chinese (zh)
Other versions
CN111580850B (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.)
Chongqing University of Science and Technology
Original Assignee
Chongqing University of Science and Technology
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 Chongqing University of Science and Technology filed Critical Chongqing University of Science and Technology
Priority to CN202010398573.XA priority Critical patent/CN111580850B/en
Publication of CN111580850A publication Critical patent/CN111580850A/en
Application granted granted Critical
Publication of CN111580850B publication Critical patent/CN111580850B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

Landscapes

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

Abstract

The scheme relates to an incremental upgrading method. The method comprises the following steps: decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode; establishing firmware layer engineering for firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode; generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project; determining a target project file from the firmware layer project dispersed loading description file and the application layer project dispersed loading description file; and performing increment upgrading according to the target project file. According to the scheme, incremental downloading can be realized by utilizing scattered loading, and resources required by file upgrading can be reduced.

Description

Increment upgrading method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of embedded technologies, and in particular, to an incremental upgrade method and apparatus, a computer device, and a storage medium.
Background
The low-power-consumption Internet of things equipment and the NB-Iot communication technology are rapidly developed, higher and higher requirements are provided for the power consumption of the equipment, the traditional single chip microcomputer upgrading technology almost realizes the upgrading of the equipment by using a full upgrading mode, however, the full upgrading mode has the characteristics of more bottom codes and less functional codes, a certain function or a small section of code is usually modified in the upgrading process, and due to the characteristics of low communication rate of the NB-Iot, large power consumption in communication and the like, if the full upgrading mode is adopted, the defects of unstable communication, long upgrading time, large power consumption, occupation of limited storage resources of the single chip microcomputer and the like are easily caused.
Disclosure of Invention
Based on this, in order to solve the above technical problems, an incremental upgrading method, an incremental upgrading device, a computer device, and a storage medium are provided, which can reduce resources required by upgrading a single chip microcomputer.
An incremental upgrade method, the method comprising:
decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode;
establishing firmware layer engineering for the firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode;
generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project;
determining a target project file from the firmware layer project scattered loading description file and the application layer project scattered loading description file;
and performing increment upgrading according to the target project file.
In one embodiment, the method further comprises:
allocating an RAM address and an ROM address for the firmware layer project, and allocating the RAM address and the ROM address for each application layer project respectively;
and writing the RAM address and the ROM address of the firmware layer project into the firmware layer project distributed loading description file, and writing the RAM address and the ROM address of the application layer project into the application layer project distributed loading description file.
In one embodiment, the method further comprises:
generating a firmware layer function external interface for the firmware layer code, and generating an application layer function external interface for the application layer code;
acquiring a firmware layer address space of a ROM address in the firmware layer project, and allocating a firmware layer entry address at the initial address of the firmware layer address space; the firmware layer entry address is a continuous and fixed space and is used for storing the entry address of the firmware layer engineering external function;
acquiring an application layer address space of a ROM address in the application layer project, and allocating an application layer entry address at an initial address of the application layer address space; the application layer entry address is a continuous and fixed space used for storing the entry address of the application layer engineering external function.
In one embodiment, the method further comprises:
establishing a firmware layer starting file corresponding to the firmware layer project, acquiring a firmware layer starting file name of the firmware layer starting file through a dispersed loading description file, and importing the firmware layer function into the firmware layer project through the firmware layer starting file;
and establishing an application layer starting file corresponding to the application layer project, acquiring the application layer starting file name of the application layer starting file through the dispersed loading description file, and importing the application layer function into the application layer project through the application layer starting file.
In one embodiment, the method further comprises:
creating a function vector table for the firmware layer project and the application layer project respectively; the function vector table contains the function names of the firmware layer function and the application layer function.
In one embodiment, before the firmware layer code and the application layer code are obtained, the method further comprises:
initializing the firmware layer code and the application layer code, respectively
An incremental upgrade apparatus, the apparatus comprising:
the code acquisition module is used for decomposing a full engineering code into a firmware layer code and an application layer code and dividing the application layer code into at least one application layer subcode;
the project establishing module is used for establishing firmware layer projects for the firmware layer codes and establishing corresponding application layer projects for each application layer subcode;
the project file generation module is used for generating firmware layer project dispersed loading description files according to the firmware layer projects and generating corresponding application layer project dispersed loading description files for each application layer project;
the project file determining module is used for determining a target project file from the firmware layer project scattered loading description file and the application layer project scattered loading description file;
and the increment upgrading module is used for carrying out increment upgrading according to the target engineering file.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode;
establishing firmware layer engineering for the firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode;
generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project;
determining a target project file from the firmware layer project scattered loading description file and the application layer project scattered loading description file;
and performing increment upgrading according to the target project file.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode;
establishing firmware layer engineering for the firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode;
generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project;
determining a target project file from the firmware layer project scattered loading description file and the application layer project scattered loading description file;
and performing increment upgrading according to the target project file.
According to the increment upgrading method, the increment upgrading device, the computer equipment and the storage medium, a full engineering code is decomposed into a firmware layer code and an application layer code, and the application layer code is divided into at least one application layer subcode; establishing firmware layer engineering for firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode; generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project; determining a target project file from the firmware layer project dispersed loading description file and the application layer project dispersed loading description file; and performing increment upgrading according to the target project file. According to the scheme, incremental downloading can be realized by utilizing scattered loading, and resources required by file upgrading can be reduced.
Drawings
FIG. 1 is a diagram of an application environment for the incremental upgrade method in one embodiment;
FIG. 2 is a flowchart illustrating a method for incremental upgrade in one embodiment;
FIG. 3 is a block diagram of an incremental upgrade apparatus in one embodiment;
FIG. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The incremental upgrading method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. As shown in FIG. 1, the application environment includes a computer device 110. The computer device 110 may decompose a full amount of engineering code into firmware layer code and application layer code, and divide the application layer code into at least one application layer subcode; establishing firmware layer engineering for the firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode; generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project; determining a target project file from the firmware layer project dispersed loading description file and the application layer project dispersed loading description file; and performing increment upgrading according to the target project file. The computer device 110 may be, but is not limited to, various personal computers, notebook computers, and the like.
In one embodiment, as shown in fig. 2, there is provided an incremental upgrade method, including the steps of:
step 202, decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode.
The firmware layer code is some bottom driver programs and some codes which do not need to be modified in the later equipment function upgrade, the codes which do not need to be maintained and updated in the later period can be used as the firmware layer code, and the codes in the firmware layer can be the parts with the largest code quantity. The application layer code is mainly all code to realize the functions of the device, the code amount of the application layer code is often less than that of the firmware layer code, but a part of the code may be updated at a later stage, so that the application layer code needs to be divided into a plurality of parts, namely a plurality of application layer subcodes.
And step 204, establishing a firmware layer project for the firmware layer codes, and establishing a corresponding application layer project for each application layer subcode.
The firmware layer engineering mainly provides a uniform export function for other engineering, namely other application layer engineering can call some functions in the firmware layer engineering; firmware layer engineering may also provide a unified entry function for other engineering, i.e., the firmware layer engineering calls the functions of other application layer engineering. The application layer project is generally divided into one or more projects according to project requirements, the divided one or more projects can respectively complete a part of functions of the equipment, and the incremental upgrade is to upgrade the code of one project. Multiple application layer engineering and firmware layer engineering make up the full functionality of the device. Function inter-calling relations can exist between application layer projects, and meanwhile, the function inter-calling relations can be called and called by firmware layer projects. Since the application layer code is divided into at least one application layer subcode, an application layer project needs to be separately established for each part of the application layer subcode.
The computer equipment can also comprise other projects, such as a BootLoder project, wherein the BootLoder project is a project which can be used for realizing the upgrading of the programs of the single chip microcomputer, does not belong to an equipment function block, and is only used for upgrading; moreover, BootLoder engineering does not have an exit function and an entry function, and does not call any function of other engineering, nor does any other engineering call any function of the engineering.
And step 206, generating a firmware layer project distributed loading description file according to the firmware layer project, and generating a corresponding application layer project distributed loading description file for each application layer project.
And step 208, determining a target project file from the firmware layer project scattered loading description file and the application layer project scattered loading description file.
The codes in the firmware layer project are codes which do not need to be upgraded at the later stage of the equipment, and are burnt into the single chip microcomputer when the equipment is produced; when the application layer code needs to be updated, a developer needs to compile the modified application layer code, a code file generated by compiling is transmitted to the embedded device through a wireless technology, and the embedded device directly replaces all codes in a ROM space allocated in the single chip microcomputer before the codes are verified and passed, so that the purpose of incremental updating of the single chip microcomputer is achieved.
And step 210, performing increment upgrading according to the target project file.
In the embodiment, a full amount of engineering code is decomposed into firmware layer code and application layer code, and the application layer code is divided into at least one application layer subcode; establishing firmware layer engineering for firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode; generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project; determining a target project file from the firmware layer project dispersed loading description file and the application layer project dispersed loading description file; and performing increment upgrading according to the target project file. According to the scheme, incremental downloading can be realized by utilizing scattered loading, and resources required by file upgrading can be reduced.
In one embodiment, the incremental upgrade method provided may further include a process of allocating an address, where the specific process includes: allocating an RAM address and an ROM address for the firmware layer project, and allocating the RAM address and the ROM address for each application layer project respectively; and writing the RAM address and the ROM address of the firmware layer project into the firmware layer project distributed loading description file, and writing the RAM address and the ROM address of the application layer project into the application layer project distributed loading description file.
The ram (random access memory), i.e., a random access memory, loses its memory contents when power is off, and is mainly used for storing programs used for a short time. A ROM (Read-Only Memory), which is a Read-Only Memory, is a solid-state semiconductor Memory that can Only Read out data stored in advance.
After the firmware layer project and the application layer project are established, the computer equipment needs to allocate a storage address to each project from the storage space of the single chip microcomputer. Specifically, the computer device may allocate a RAM address and a ROM address to the firmware layer project, and allocate a RAM address and a ROM address to each application layer project, respectively. The address allocation can utilize a scatter load description file to write addresses into the description file, so that a compiler can respectively specify addresses for each project when linking codes.
In an embodiment, the incremental upgrade method provided may further include a process of storing the entry address, where the specific process includes: generating a firmware layer function external interface for the firmware layer code and generating an application layer function external interface for the application layer code; acquiring a firmware layer address space of a ROM address in firmware layer engineering, and allocating a firmware layer entry address at an initial address of the firmware layer address space; the firmware layer entry address is a continuous and fixed space and is used for storing the entry address of the firmware layer engineering external function; acquiring an application layer address space of a ROM address in application layer engineering, and allocating an application layer entry address at an initial address of the application layer address space; the application layer entry address is a continuous and fixed space used for storing the entry address of the application layer engineering external function.
The external interface may be an interface for an externally called entry function. The computer device may generate a firmware layer function external interface for the firmware layer code and an application layer function external interface for the application layer code. The firmware layer function external interface may be an interface for externally calling a firmware layer function, and the application layer function external interface may be an interface for externally calling an application layer function.
In the firmware layer function and the application layer function, the function address space allocation method is that the address of a function entry function is sequentially established in a continuous space of the initial address of each engineering ROM by adopting assembly language, the address of the entry function is established in a starting file, the function is declared to be a weak function type, and the function is imported into the engineering by using an EXPORT instruction.
For example, the computer device may compile each function to a fixed address of the ROM, and use the fixed address as an entry address of the function. In this embodiment, the computer device may allocate a continuous and fixed space in the ROM of each project for all external functions, and the space is specially used for storing the entry address of the function, so that the external call only needs to directly call the function in the form of an address. The computer equipment can obtain a firmware layer address space of a ROM address in firmware layer engineering, wherein the firmware layer address space is used for storing an entry address of a firmware layer function; the computer device may obtain an application layer address space of ROM addresses in the application layer project, the application layer address space being used to store entry addresses for application layer functions. In this embodiment, the method for designing the function external interface includes: applying a 4-byte memory for each function externally applied by the project by using assembly language in a starting file for accessing the function address of the project, declaring the function as a weak function type, wherein the function name of the weak function type must be consistent with the actual function name, and all the function addresses must be sequentially ordered to form a function vector table base address.
In an embodiment, the provided incremental upgrade method may further include a process of importing a function, where the specific process includes: establishing a firmware layer starting file corresponding to the firmware layer project, acquiring a firmware layer starting file name of the firmware layer starting file through the dispersed loading description file, and importing a firmware layer function into the firmware layer project through the firmware layer starting file; and establishing an application layer starting file corresponding to the application layer project, acquiring the application layer starting file name of the application layer starting file through the dispersed loading description file, and importing the application layer function into the application layer project through the application layer starting file.
After assigning the function address, the computer device may create a boot file, assign a name to the boot file, and import the boot file to the code load domain, where the boot file name is in the s-file description file import by scatter load, using assembly naming, and importing to the load domain as needed. The starting file corresponding to the firmware layer project is a firmware layer starting file; the startup file corresponding to the application layer project is an application layer startup file.
In an embodiment, the provided incremental upgrade method may further include a process of creating a function vector table, where the specific process includes: respectively establishing a function vector table for a firmware layer project and an application layer project; the function vector table contains the function names of the firmware layer function and the application layer function.
The computer device can respectively create function vector tables for firmware layer engineering and application layer engineering, and each engineering can call functions of other engineering through the function vector tables. Specifically, the function vector table is created in a manner of creating a pointer-type structure, the structure members are function names of the pointer type, the member name sequence must be sequentially filled according to the sequence of the function names in the start file, and the initial address of the structure is forced to point to the start address of the ROM address of the project in which the function is called. The function vector table can comprise two parts, one part is to create the function vector table in a starting file, specifically, a function address for accessing a project is applied for each function outside the project by assembly language in the starting file, and the function is declared as a weak function type, the function name of the function address must be consistent with the actual function name, and all the function addresses must be sequentially ordered to form a function vector table base address; and the other part is that a file of h and c is created separately, then all function vector tables except the engineering itself are created in the h file in the form of a structure pointer, and the structure pointer points to each engineering base address, so that the engineering can call the functions in other engineering in the form of function pointers through the pointer structure. Wherein the initialization function is contained in the c-file.
In an embodiment, the incremental upgrade method provided may further include a code initialization process, where the specific process includes: the firmware layer code and the application layer code are initialized separately.
It should be understood that, although the steps in the respective flowcharts described above are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in each of the flowcharts described above may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or the stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 3, there is provided an incremental upgrade apparatus, including: a code acquisition module 310, a project establishment module 320, a project file generation module 330, a project file determination module 340 and an increment upgrade module 350, wherein:
the code obtaining module 310 is configured to obtain the firmware layer code and the application layer code, and divide the application layer code into a plurality of application layer subcodes.
The project establishing module 320 is configured to establish a firmware layer project for the firmware layer codes, and establish a corresponding application layer project for each application layer sub-code.
The project file generating module 330 is configured to generate a firmware layer project distributed loading description file according to the firmware layer project, and generate a corresponding application layer project distributed loading description file for each application layer project.
The project file determining module 340 is configured to determine a target project file from the firmware layer project distributed loading description file and the application layer project distributed loading description file.
And the increment upgrading module 350 is configured to perform increment upgrading according to the target project file.
In one embodiment, an incremental upgrade apparatus is provided, further comprising: the device comprises an address allocation module and an address writing module, wherein the address allocation module is used for allocating a plurality of addresses;
and the address allocation module is used for allocating the RAM address and the ROM address for the firmware layer project and allocating the RAM address and the ROM address for each application layer project respectively.
And the address writing module is used for writing the RAM address and the ROM address of the firmware layer project into the firmware layer project distributed loading description file and writing the RAM address and the ROM address of the application layer project into the application layer project distributed loading description file.
In one embodiment, the address allocation module is further configured to generate a firmware layer function external interface for the firmware layer code, and generate an application layer function external interface for the application layer code; acquiring a firmware layer address space of a ROM address in firmware layer engineering, and allocating a firmware layer entry address at an initial address of the firmware layer address space; the firmware layer entry address is a continuous and fixed space and is used for storing the entry address of the firmware layer engineering external function; acquiring an application layer address space of a ROM address in application layer engineering, and allocating an application layer entry address at an initial address of the application layer address space; the application layer entry address is a continuous and fixed space used for storing the entry address of the application layer engineering external function.
In an embodiment, the incremental upgrading apparatus provided may further include a function import module, configured to establish a firmware layer boot file corresponding to the firmware layer project, obtain a firmware layer boot file name of the firmware layer boot file by dispersedly loading the description file, and import the firmware layer function into the firmware layer project by using the firmware layer boot file; and establishing an application layer starting file corresponding to the application layer project, acquiring the application layer starting file name of the application layer starting file through the dispersed loading description file, and importing the application layer function into the application layer project through the application layer starting file.
In one embodiment, the function importing module is further configured to create a function vector table for the firmware layer engineering and the application layer engineering respectively; the function vector table contains the function names of the firmware layer function and the application layer function.
In one embodiment, an incremental upgrade apparatus provided may further include an initialization module configured to initialize the firmware layer code and the application layer code, respectively.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 4. The computer device includes a processor, a memory, a network 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 comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an incremental upgrade method. 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, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode;
establishing firmware layer engineering for the firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode;
generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project;
determining a target project file from the firmware layer project dispersed loading description file and the application layer project dispersed loading description file;
and performing increment upgrading according to the target project file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: allocating an RAM address and an ROM address for the firmware layer project, and allocating the RAM address and the ROM address for each application layer project respectively; and writing the RAM address and the ROM address of the firmware layer project into the firmware layer project distributed loading description file, and writing the RAM address and the ROM address of the application layer project into the application layer project distributed loading description file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: generating a firmware layer function external interface for the firmware layer code and generating an application layer function external interface for the application layer code; acquiring a firmware layer address space of a ROM address in firmware layer engineering, and allocating a firmware layer entry address at an initial address of the firmware layer address space; the firmware layer entry address is a continuous and fixed space and is used for storing the entry address of the firmware layer engineering external function; acquiring an application layer address space of a ROM address in application layer engineering, and allocating an application layer entry address at an initial address of the application layer address space; the application layer entry address is a continuous and fixed space used for storing the entry address of the application layer engineering external function.
In one embodiment, the processor, when executing the computer program, further performs the steps of: establishing a firmware layer starting file corresponding to the firmware layer project, acquiring a firmware layer starting file name of the firmware layer starting file through the dispersed loading description file, and importing a firmware layer function into the firmware layer project through the firmware layer starting file; and establishing an application layer starting file corresponding to the application layer project, acquiring the application layer starting file name of the application layer starting file through the dispersed loading description file, and importing the application layer function into the application layer project through the application layer starting file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: respectively establishing a function vector table for a firmware layer project and an application layer project; the function vector table contains the function names of the firmware layer function and the application layer function.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the firmware layer code and the application layer code are initialized separately.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode;
establishing firmware layer engineering for the firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode;
generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project;
determining a target project file from the firmware layer project dispersed loading description file and the application layer project dispersed loading description file;
and performing increment upgrading according to the target project file.
In one embodiment, the computer program when executed by the processor further performs the steps of: allocating an RAM address and an ROM address for the firmware layer project, and allocating the RAM address and the ROM address for each application layer project respectively; and writing the RAM address and the ROM address of the firmware layer project into the firmware layer project distributed loading description file, and writing the RAM address and the ROM address of the application layer project into the application layer project distributed loading description file.
In one embodiment, the computer program when executed by the processor further performs the steps of: generating a firmware layer function external interface for the firmware layer code and generating an application layer function external interface for the application layer code; acquiring a firmware layer address space of a ROM address in firmware layer engineering, and allocating a firmware layer entry address at an initial address of the firmware layer address space; the firmware layer entry address is a continuous and fixed space and is used for storing the entry address of the firmware layer engineering external function; acquiring an application layer address space of a ROM address in application layer engineering, and allocating an application layer entry address at an initial address of the application layer address space; the application layer entry address is a continuous and fixed space used for storing the entry address of the application layer engineering external function.
In one embodiment, the computer program when executed by the processor further performs the steps of: establishing a firmware layer starting file corresponding to the firmware layer project, acquiring a firmware layer starting file name of the firmware layer starting file through the dispersed loading description file, and importing a firmware layer function into the firmware layer project through the firmware layer starting file; and establishing an application layer starting file corresponding to the application layer project, acquiring the application layer starting file name of the application layer starting file through the dispersed loading description file, and importing the application layer function into the application layer project through the application layer starting file.
In one embodiment, the computer program when executed by the processor further performs the steps of: respectively establishing a function vector table for a firmware layer project and an application layer project; the function vector table contains the function names of the firmware layer function and the application layer function.
In one embodiment, the computer program when executed by the processor further performs the steps of: the firmware layer code and the application layer code are initialized separately.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An incremental upgrade method, characterized in that the method comprises:
decomposing a full engineering code into a firmware layer code and an application layer code, and dividing the application layer code into at least one application layer subcode;
establishing firmware layer engineering for the firmware layer codes, and establishing corresponding application layer engineering for each application layer subcode;
generating a firmware layer project dispersed loading description file according to the firmware layer project, and generating a corresponding application layer project dispersed loading description file for each application layer project;
determining a target project file from the firmware layer project scattered loading description file and the application layer project scattered loading description file;
and performing increment upgrading according to the target project file.
2. The method of claim 1, further comprising:
allocating an RAM address and an ROM address for the firmware layer project, and allocating the RAM address and the ROM address for each application layer project respectively;
and writing the RAM address and the ROM address of the firmware layer project into the firmware layer project distributed loading description file, and writing the RAM address and the ROM address of the application layer project into the application layer project distributed loading description file.
3. The method of claim 2, further comprising:
generating a firmware layer function external interface for the firmware layer code, and generating an application layer function external interface for the application layer code;
acquiring a firmware layer address space of a ROM address in the firmware layer project, and allocating a firmware layer entry address at the initial address of the firmware layer address space; the firmware layer entry address is a continuous and fixed space and is used for storing the entry address of the firmware layer engineering external function;
acquiring an application layer address space of a ROM address in the application layer project, and allocating an application layer entry address at an initial address of the application layer address space; the application layer entry address is a continuous and fixed space used for storing the entry address of the application layer engineering external function.
4. The method of claim 3, further comprising:
establishing a firmware layer starting file corresponding to the firmware layer project, acquiring a firmware layer starting file name of the firmware layer starting file through a dispersed loading description file, and importing the firmware layer function into the firmware layer project through the firmware layer starting file;
and establishing an application layer starting file corresponding to the application layer project, acquiring the application layer starting file name of the application layer starting file through the dispersed loading description file, and importing the application layer function into the application layer project through the application layer starting file.
5. The method of claim 3, further comprising:
creating a function vector table for the firmware layer project and the application layer project respectively; the function vector table contains the function names of the firmware layer function and the application layer function.
6. The method of claim 1, wherein prior to obtaining the firmware layer code and the application layer code, the method further comprises:
and respectively initializing the firmware layer code and the application layer code.
7. An incremental upgrade apparatus, comprising:
the code acquisition module is used for decomposing a full engineering code into a firmware layer code and an application layer code and dividing the application layer code into at least one application layer subcode;
the project establishing module is used for establishing firmware layer projects for the firmware layer codes and establishing corresponding application layer projects for each application layer subcode;
the project file generation module is used for generating firmware layer project dispersed loading description files according to the firmware layer projects and generating corresponding application layer project dispersed loading description files for each application layer project;
the project file determining module is used for determining a target project file from the firmware layer project scattered loading description file and the application layer project scattered loading description file;
and the increment upgrading module is used for carrying out increment upgrading according to the target engineering file.
8. The apparatus of claim 7, further comprising:
the address allocation module is used for allocating an RAM address and an ROM address for the firmware layer project and allocating the RAM address and the ROM address for each application layer project respectively;
and the address writing module is used for writing the RAM address and the ROM address of the firmware layer project into the firmware layer project distributed loading description file and writing the RAM address and the ROM address of the application layer project into the application layer project distributed loading description file.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202010398573.XA 2020-05-12 2020-05-12 Increment upgrading method and device, computer equipment and storage medium Active CN111580850B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010398573.XA CN111580850B (en) 2020-05-12 2020-05-12 Increment upgrading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010398573.XA CN111580850B (en) 2020-05-12 2020-05-12 Increment upgrading method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111580850A true CN111580850A (en) 2020-08-25
CN111580850B CN111580850B (en) 2023-03-31

Family

ID=72126611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010398573.XA Active CN111580850B (en) 2020-05-12 2020-05-12 Increment upgrading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111580850B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306540A (en) * 2020-11-05 2021-02-02 重庆科技学院 Multi-project independent compiling method, system, terminal and medium
CN112306539A (en) * 2020-11-05 2021-02-02 重庆科技学院 Method, system, terminal and medium for developing application layer of single chip microcomputer

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080184220A1 (en) * 2000-11-17 2008-07-31 Shao-Chun Chen Initialzation and update of software and/or firmware in electronic devices
CN106610839A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Method for releasing upgrading package and lightweight upgrading method, device and system
CN110704000A (en) * 2019-10-10 2020-01-17 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and storage medium
CN110764813A (en) * 2019-10-31 2020-02-07 京东方科技集团股份有限公司 Upgrading method of system software and running method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080184220A1 (en) * 2000-11-17 2008-07-31 Shao-Chun Chen Initialzation and update of software and/or firmware in electronic devices
CN106610839A (en) * 2015-10-21 2017-05-03 阿里巴巴集团控股有限公司 Method for releasing upgrading package and lightweight upgrading method, device and system
CN110704000A (en) * 2019-10-10 2020-01-17 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and storage medium
CN110764813A (en) * 2019-10-31 2020-02-07 京东方科技集团股份有限公司 Upgrading method of system software and running method thereof

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
JAVAD MOHAMMADI 等: ""Fully distributed corrective security constrained optimal power flow"" *
夏爽: ""ARM处理器的分散加载及特殊应用研究"" *
陈昊琦 等: ""电力设备用MCU嵌入式程序分块更新技术"" *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306540A (en) * 2020-11-05 2021-02-02 重庆科技学院 Multi-project independent compiling method, system, terminal and medium
CN112306539A (en) * 2020-11-05 2021-02-02 重庆科技学院 Method, system, terminal and medium for developing application layer of single chip microcomputer
CN112306539B (en) * 2020-11-05 2023-08-01 重庆科技学院 Development method, system, terminal and medium for SCM application layer

Also Published As

Publication number Publication date
CN111580850B (en) 2023-03-31

Similar Documents

Publication Publication Date Title
US7409694B2 (en) Highly componentized system architecture with loadable virtual memory manager
US7203941B2 (en) Associating a native resource with an application
CN111580850B (en) Increment upgrading method and device, computer equipment and storage medium
US7596782B2 (en) Software build extensibility
CN114942796B (en) Plug-in compiling and calling method, device, equipment and storage medium
CN103443763A (en) ISA bridging including support for call to overidding virtual functions
US20090133042A1 (en) Efficient linking and loading for late binding and platform retargeting
CN114185551B (en) Applet compiling method, applet running method and device and storage medium
CN111045707B (en) Method, apparatus, computer device and storage medium for updating applet
CN111427782A (en) Operation method, device, equipment and storage medium of android dynamic link library
CN116401003A (en) Android application running method, system and storage medium based on desktop operating system
CN111290740A (en) Application program development method and device, computer equipment and storage medium
CN106775608B (en) Method and device for realizing independent system process
CN113220374A (en) Software processing method and device
KR20100110710A (en) Method for simplifying interfaces having dynamic libraries
CN112379867B (en) Embedded operating system, method and storage medium based on modular development
CN110941433B (en) Method and system for edge-assisted deployment of third party application to microcontroller
CN110333870B (en) Simulink model variable distribution processing method, device and equipment
CN111666116A (en) SDK calling method and device, computer equipment and storage medium
US6751790B2 (en) Frameworks for efficient representation of string objects in Java programming environments
CN112306539A (en) Method, system, terminal and medium for developing application layer of single chip microcomputer
CN115952017B (en) Memory processing method, device, equipment and medium
US20030041181A1 (en) Frameworks for efficient representation of string objects in Java programming environments
CN111352877B (en) System management bus device management system and method thereof
CN117724775A (en) Application program starting method, device, 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