CN117149246A - Method and device for upgrading application program of embedded system, excavator and storage medium - Google Patents

Method and device for upgrading application program of embedded system, excavator and storage medium Download PDF

Info

Publication number
CN117149246A
CN117149246A CN202311167929.9A CN202311167929A CN117149246A CN 117149246 A CN117149246 A CN 117149246A CN 202311167929 A CN202311167929 A CN 202311167929A CN 117149246 A CN117149246 A CN 117149246A
Authority
CN
China
Prior art keywords
program
application program
application
embedded system
upgrading
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.)
Pending
Application number
CN202311167929.9A
Other languages
Chinese (zh)
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.)
Xuzhou XCMG Excavator Machinery Co Ltd
Original Assignee
Xuzhou XCMG Excavator Machinery Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xuzhou XCMG Excavator Machinery Co Ltd filed Critical Xuzhou XCMG Excavator Machinery Co Ltd
Priority to CN202311167929.9A priority Critical patent/CN117149246A/en
Publication of CN117149246A publication Critical patent/CN117149246A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

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 present disclosure relates to an embedded system application program upgrading method and apparatus, an excavator, and a storage medium. The nonvolatile flash memory of the embedded system of the excavator is divided into three storage spaces, wherein the three storage spaces are respectively a guide program storage space, a bottom program storage space and an application program storage space. The method for upgrading the application program of the embedded system comprises the following steps: under the condition that the embedded system of the excavator is electrified and started, acquiring the high and low level states of pins on hardware; according to the high-low level state of the pin, the application program is upgraded offline or the application program is upgraded online; executing the offline upgrading process of the application program according to the instruction of the computer program in the storage space of the bootstrap program under the condition that the offline upgrading of the application program is judged; and under the condition that the online upgrading of the application program is judged, jumping to the starting address of the bottom program, and executing the online upgrading process of the application program. The present disclosure is capable of supporting both online and offline application upgrades.

Description

Method and device for upgrading application program of embedded system, excavator and storage medium
Technical Field
The disclosure relates to the technical field of embedded control systems of engineering machinery, in particular to an embedded system application program upgrading method and device, an excavator and a storage medium.
Background
In early embedded devices, the application was typically a write-once read-only memory (ROM or FLASH), regardless of online upgrades. However, if there are some performance defects in the application program or when the function needs to be upgraded, in order to be able to burn a new application program, the product needs to be disassembled and a burner is used to burn, which is generally expensive, so that the operation of the application program is complex, the efficiency is too low, the cost is too high, and the execution is not easy. With the development of computer technology, embedded systems are becoming more and more widely used. In order to facilitate maintenance of the product, extending new functions and performance debugging, applications in embedded systems have been upgraded without the need to disassemble the product.
The application program upgrading of the related art embedded system mainly comprises two types, namely, directly covering a fixed storage space after receiving a firmware upgrading packet when the application program is executed, restarting the embedded system to achieve the purpose of upgrading the application program, and opening up a new storage space for the firmware upgrading packet, storing the received firmware upgrading packet into the new storage space, and restarting the embedded system to achieve the purpose of upgrading the application program by comparing the version numbers of the firmware upgrading packet.
Disclosure of Invention
The inventors found through research that: the related art upgrade method has limitation because the upgrade method only has two partitions of the storage space, and the partitions are not only not suitable for the program organization architecture of the embedded control system of the three-block storage space excavator, but also can be in a situation of incapacity of upgrading. The situation of no upgrade is represented by: and when the wrong bottom program is upgraded, the jump of the boot program cannot execute the bottom program, so that the firmware package cannot be upgraded.
In view of at least one of the above technical problems, the present disclosure provides an embedded system application program upgrading method and apparatus, an excavator, and a storage medium, capable of supporting online and offline application program upgrades at the same time.
According to one aspect of the present disclosure, there is provided an embedded system application program upgrading method, wherein three storage spaces are divided in a nonvolatile flash memory of an excavator embedded system, and the three storage spaces are respectively a boot program storage space, a bottom program storage space and an application program storage space, wherein the embedded system application program upgrading method includes:
Under the condition that the embedded system of the excavator is electrified and started, acquiring the high and low level states of pins on hardware;
according to the high-low level state of the pin, the application program is upgraded offline or the application program is upgraded online;
executing the offline upgrading process of the application program according to the instruction of the computer program in the storage space of the bootstrap program under the condition that the offline upgrading of the application program is judged;
and under the condition that the online upgrading of the application program is judged, jumping to the starting address of the bottom program, and executing the online upgrading process of the application program.
In some embodiments of the present disclosure, the embedded system application upgrade method further includes:
receiving an application program upgrading packet sent by an upper computer, wherein the application program upgrading packet is a firmware packet;
under the condition that the boot program or the bottom layer program receives the firmware package, after the correctness of the data is checked by the embedded system, the firmware package is stored in the application program storage area;
under the condition that FLASH writing is completed, using an address jump instruction to jump to the starting address of the bottom program, and starting to run the bottom program;
and the bottom layer program periodically calls the application program to finish the upgrading of the application program.
In some embodiments of the present disclosure, the embedded system application upgrade method further includes:
before the upper computer sends the upgrade package of the application program, the application program is segmented and packed into blocks according to a specified protocol, and then the segmented and packed firmware package blocks are transmitted and analyzed by checksum.
In some embodiments of the present disclosure, the application upgrade process includes:
and transmitting the firmware package packaged according to the specified protocol to the embedded system in a divided mode, and carrying out data verification by the embedded system each time, wherein the data passing through the data verification is analyzed and stored in a cache space, and the application program upgrading process is an application program offline upgrading process or an application program online upgrading process.
In some embodiments of the present disclosure, the acquiring the pin high and low state on the hardware includes:
reading of the pin high and low states is achieved by program logic within the boot strap program, wherein the high and low setting requires an artificial provision of a high and low signal at the fixed pin.
In some embodiments of the present disclosure, an underlying program is used for the embedded system to implement pin drivers and input and output.
In some embodiments of the present disclosure, the communication drivers of the underlying program are used for online upgrades of the application program.
In some embodiments of the present disclosure, a boot program is used to boot an embedded system jump and an offline upgrade of an application program.
In some embodiments of the present disclosure, a communication driver within the bootstrap program is used for offline upgrades of the application program.
In some embodiments of the present disclosure, the embedded system application upgrade method further includes:
after the bottom layer program runs correctly, the application program running address is jumped to, and the application program running address is used as a starting address to start executing the application program;
the application program executes the bottom program by calling the bottom program function interface;
the bottom layer program executes the application program by calling the application program function interface.
In some embodiments of the present disclosure, the application is generated by an application programming tool.
In some embodiments of the present disclosure, the boot program is downloaded in advance to the corresponding FALSH of the embedded system by the emulator or emulator.
In some embodiments of the present disclosure, the bootstrap program supports an application program to perform offline upgrade, and the determination of the offline upgrade of the application program depends on the pin high-low level state, and the offline upgrade of the application program performs data transmission and upgrade through the upper computer.
In some embodiments of the present disclosure, the underlying program supports online upgrades of applications that are data transferred and upgraded by an application programming tool or host computer.
In some embodiments of the present disclosure, the embedded system application upgrade method further includes:
and programming the embedded control system by using an application programming tool, and simultaneously using an application library, and generating a binary application program after compiling, wherein the application program is stored in an application program storage area in an off-line upgrading or on-line upgrading mode.
In some embodiments of the present disclosure, when the FLASH writing is completed, using an address jump instruction, jumping to the starting address of the underlying program, and starting to run the underlying program includes:
under the condition that the application program is solidified in FLASH, the embedded system firstly executes the bootstrap program after the embedded device is started;
the boot program jumps to the starting address of the underlying program by addressing, running the underlying operating system.
In some embodiments of the present disclosure, the periodically calling the application by the underlying program, and completing the application upgrade includes:
The bottom operating system periodically calls the bottom driver and the application program, and the firmware library is used in the implementation process of the bottom driver.
According to another aspect of the present disclosure, there is provided an embedded system application program upgrading apparatus, wherein three storage spaces are divided in a nonvolatile flash memory of an excavator embedded system, and the three storage spaces are a boot program storage space, a bottom program storage space and an application program storage space, respectively, where the embedded system application program upgrading apparatus includes:
the level acquisition module is configured to acquire the high-low level state of the pin on the hardware under the condition that the embedded system of the excavator is electrified and started;
the upgrade mode determining module is configured to determine to perform offline upgrade of the application program or online upgrade of the application program according to the high-low level state of the pin;
the offline upgrading module is configured to execute an offline upgrading process of the application program according to the instruction of the computer program in the storage space of the bootstrap program under the condition that the upgrading mode determining module determines to upgrade the application program offline;
and the online upgrading module is configured to jump to the starting address of the bottom program and execute the online upgrading process of the application program under the condition that the upgrading mode determining module determines to upgrade the application program online.
According to another aspect of the present disclosure, there is provided an embedded system application upgrade apparatus, including:
a memory configured to store instructions;
and a processor configured to execute the instructions, so that the embedded system application program upgrading device performs operations of implementing the embedded system application program upgrading method according to any one of the embodiments.
According to another aspect of the disclosure, there is provided an embedded control system of an excavator, including an embedded system application upgrading device according to any one of the above embodiments.
In some embodiments of the present disclosure, the excavator embedded control system further comprises:
an execution unit configured to execute instructions of the embedded system application upgrade apparatus;
and an input unit configured to input a signal to the embedded system application upgrade apparatus.
According to another aspect of the present disclosure, there is provided an excavator embedded system comprising an excavator embedded control system as described in any one of the embodiments above.
According to another aspect of the present disclosure, there is provided an excavator comprising an excavator embedded system as described in any one of the embodiments above.
According to another aspect of the present disclosure, there is provided a computer readable storage medium storing computer instructions that when executed by a processor implement an embedded system application upgrade method as described in any one of the embodiments above.
The present disclosure is capable of supporting both online and offline application upgrades.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of some embodiments of an embedded control system for an excavator of the present disclosure.
FIG. 2 is a schematic diagram of some embodiments of an embedded system application upgrade method of the present disclosure.
FIG. 3 is a schematic diagram of another embodiment of an application upgrade method of an embedded system of the present disclosure.
FIG. 4 is a schematic diagram of yet another embodiment of an embedded system application upgrade method of the present disclosure.
FIG. 5 is a schematic diagram of some embodiments of an embedded system application upgrade apparatus of the present disclosure.
FIG. 6 is a schematic diagram illustrating another exemplary embodiment of an upgrade apparatus for an embedded system application program of the present disclosure.
Detailed Description
The following description of the technical solutions in the embodiments of the present disclosure will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
The relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
The inventors found through research that: related technology online upgrade has the defect of incapability of upgrading, but does not support offline upgrade of application programs, and cannot meet the actual application program upgrading requirement. The division of the storage space of the related art is not suitable for the program organization architecture of the embedded control system of the excavator.
In view of at least one of the above technical problems, the present disclosure provides an embedded system application program upgrading method and apparatus, an excavator, and a storage medium, and the present disclosure is described below by way of specific embodiments.
FIG. 1 is a schematic diagram of some embodiments of an embedded control system for an excavator of the present disclosure. As shown in fig. 1, three storage spaces are divided in a nonvolatile flash memory of an embedded control system of an excavator of the present disclosure, and the three storage spaces are a boot program storage space, a bottom program storage space and an application program storage space, respectively. The boot program storage space stores a boot program, the bottom program storage space stores a bottom program, and the application program storage space stores an application program.
In some embodiments of the present disclosure, as shown in FIG. 1, an embedded control system suitable for an excavator includes an application programming tool 101, an application library 102, an application 103, a bootstrap program 104, an underlying operating system 105, an underlying driver 106, a firmware library 107, and peripherals 108.
In some embodiments of the present disclosure, the application programming tool 101 is used by a user to develop a programming tool for an application.
In some embodiments of the present disclosure, a user refers to a program developer who is able to write, maintain, etc., an application.
In some embodiments of the present disclosure, an application refers to a computer program that performs one or more specific tasks, running on the user side, that can be written, maintained, and downloaded multiple times in non-volatile FLASH memory (NOR FLASH) by the user.
In some embodiments of the present disclosure, non-volatile FLASH memory (NOR FLASH) is a type of non-volatile memory that can be erased and reprogrammed in blocks of memory cells that are symmetrical to blocks.
In some embodiments of the present disclosure, the files of the application library 102 can provide support for standard libraries or custom libraries during application development, and the use of the library 102 can improve the efficiency of application development, and it is required to know that binary files need to be generated after the program developed by the application development tool 101 is compiled successfully.
In some embodiments of the present disclosure, the application programming tool 101 is used to program the embedded control system, and the application library 102 is used at the same time, and after compiling is completed, a binary application 103 is generated, and the application 103 is stored in the application storage area in an offline upgrade or online upgrade mode.
In some embodiments of the present disclosure, the boot program 104 is used to direct the embedded system to jump to the starting address of the underlying program run or to conduct an offline upgrade of the application.
In some embodiments of the present disclosure, the boot program 104 refers to a computer program that is responsible for booting a device to jump to an underlying program start address after a power-on reset of the embedded system.
In some embodiments of the present disclosure, if the application has been cured in FLASH, the embedded system will first execute the boot program 104 after starting the embedded device, the boot program 104 jumping to the starting address of the underlying program by addressing, running the underlying operating system 105.
In some embodiments of the present disclosure, the underlying program includes an underlying driver 106 and an underlying operating system 105, where the underlying driver 106 is used to drive the chip pins to work, and the underlying operating system 105 is used to make periodic calls between the underlying driver and the application program through a function interface.
In some embodiments of the present disclosure, the underlying program refers to a computer program that uses the inherent resources of the single chip microcomputer to develop software and hardware functions, and is capable of performing hardware initialization, register initialization, transferring instruction codes, reading and writing of hardware, and transmitting information acquired from the hardware to an application program or receiving a logic signal of the application program through an interface.
In some embodiments of the present disclosure, the underlying operating system 105 may periodically call the underlying driver 106 and the application 103, the underlying driver 106 may be implemented using the firmware library 107,
in some embodiments of the present disclosure, the firmware library 107 file will be called by the underlying driver, in the same principle as the application library file.
In some embodiments of the present disclosure, the underlying driver 106 and the application 103 are interconnected by a function interface implementation to invoke each other.
In some embodiments of the present disclosure, the peripheral 108 corresponds to an execution unit or an input unit in the embedded system for executing instructions of the embedded system or inputting signals to the embedded system.
In some embodiments of the present disclosure, the excavator embedded control system may further include at least one of an execution unit and an input unit, wherein:
and the execution unit is configured to execute the instruction of the embedded system application program upgrading device.
And an input unit configured to input a signal to the embedded system application upgrade apparatus.
In some embodiments of the present disclosure, the peripheral 108 is an actuator coupled to an embedded system pin, typically including solenoid valves, relays, sensors, and various types of communication equipment, etc., for an excavator control system.
Based on the division of the storage space and the program organization structure, the disclosure provides an embedded control system suitable for an excavator. The embedded control system comprises a bootstrap program, an application programming tool, an application program library file, a bottom layer program, a firmware library file, a peripheral device and the like.
The invention provides an embedded control system and an application program upgrading method suitable for an excavator, which can be used for explaining program organization structure and storage space division of the embedded control system of the excavator, and can also be used for supporting online and offline application program upgrading at the same time, so that the defects in the prior art are overcome.
Fig. 2 is a schematic diagram of some embodiments of an application upgrade method of an embedded system of the present disclosure. The fig. 2 embodiment may be performed by or by an embedded system application upgrade apparatus of the present disclosure or an embedded control system of the present disclosure (e.g., an embedded control system of an excavator of the fig. 1 embodiment) or an embedded system of the present disclosure or an excavator of the present disclosure. As shown in fig. 2, the method of the embodiment of fig. 2 may include at least one of steps 100 to 400, wherein:
Step 100, under the condition that the embedded system of the excavator is powered on and started, acquiring the high and low level states of pins on hardware.
And 200, judging whether the application program is upgraded offline or the application program is upgraded online according to the high-low level state of the pin.
In some embodiments of the present disclosure, the application is generated by an application programming tool.
In some embodiments of the present disclosure, the embedded system application upgrade method may further include: and programming the embedded control system by using an application programming tool, and simultaneously using an application library, and generating a binary application program after compiling, wherein the application program is stored in an application program storage area in an off-line upgrading or on-line upgrading mode.
And step 300, executing the offline upgrading process of the application program according to the instruction of the computer program in the storage space of the bootstrap program when the offline upgrading of the application program is determined.
In some embodiments of the present disclosure, the boot program is downloaded in advance to the corresponding FALSH of the embedded system by the emulator or emulator.
In some embodiments of the present disclosure, the bootstrap program supports an application program to perform offline upgrade, and the determination of the offline upgrade of the application program depends on the pin high-low level state, and the offline upgrade of the application program performs data transmission and upgrade through the upper computer.
Step 400, when it is determined that the online upgrade of the application program is performed, jumping to the starting address of the bottom program and executing the online upgrade process of the application program.
In some embodiments of the present disclosure, the underlying program supports online upgrades of applications that are data transferred and upgraded by an application programming tool or host computer.
In some embodiments of the present disclosure, the application upgrade process may include: and transmitting the firmware package packaged according to the specified protocol to the embedded system in a divided mode, and carrying out data verification by the embedded system each time, wherein the data passing through the data verification is analyzed and stored in a cache space, and the application program upgrading process is an application program offline upgrading process or an application program online upgrading process.
FIG. 3 is a schematic diagram of another embodiment of an application upgrade method of an embedded system according to the present disclosure. The fig. 3 embodiment may be performed by or by an embedded system application upgrade apparatus of the present disclosure or an embedded control system of the present disclosure (e.g., an embedded control system of an excavator of the fig. 1 embodiment) or an embedded system of the present disclosure or an excavator of the present disclosure. As shown in fig. 3, the method of the embodiment of fig. 3 may include at least one of steps 201 to 206, wherein:
In step 201, the basic configuration is started up, and whether the application program is online or offline is determined through the high-low level state of the pins on the hardware.
In some embodiments of the present disclosure, in step 201 of the embodiment of fig. 2 or step 100 of the embodiment of fig. 1, the step of obtaining the pin high-low state on the hardware may include: reading of the pin high and low states is achieved by program logic within the boot strap program, wherein the high and low setting requires an artificial provision of a high and low signal at the fixed pin.
In some embodiments of the present disclosure, if an offline application program upgrade is to be implemented, a driver for implementing communication in a bootstrap program is required, and a communication manner is not limited, and may be in a UART, CAN, or internet access form.
Step 202, if the pin signal status is determined to be online upgrade, the embedded system jumps to the bottom level program execution; otherwise, if the pin signal status is determined to be an offline upgrade, the embedded system jumps to the boot program execution.
In some embodiments of the present disclosure, step 202 of the embodiment of fig. 2 may include: if the application program is judged to be updated offline, executing an application program offline updating process according to the instruction of the computer program in the storage space of the guide program; otherwise, if the online upgrade of the application program is judged, jumping to a starting address of the bottom program, wherein the starting address of the bottom program is a running address of the bottom program, and the bottom program runs in a storage space of the bottom program.
In some embodiments of the present disclosure, the underlying program is key for the embedded system to implement pin drivers and input/output, online upgrades of the application program rely on communication drivers of the underlying program, and the bootstrap program is used to guide the embedded system to jump and offline upgrades of the application program.
In some embodiments of the present disclosure, an underlying program is used for the embedded system to implement pin drivers and input and output.
In some embodiments of the present disclosure, the communication drivers of the underlying program are used for online upgrades of the application program.
In some embodiments of the present disclosure, a boot program is used to boot an embedded system jump and an offline upgrade of an application program.
In some embodiments of the present disclosure, a communication driver within the bootstrap program is used for offline upgrades of the application program.
And 203, receiving an application program upgrading packet sent by the upper computer, wherein the application program upgrading packet is a firmware packet.
In some embodiments of the present disclosure, before the host computer sends the package, the application program needs to be segmented and packaged into blocks according to a specified protocol, and then the segmented and packaged firmware package blocks are checked and parsed by the transmission.
In some embodiments of the present disclosure, the embedded system application upgrade method may further include: before the upper computer sends the upgrade package of the application program, the application program is segmented and packed into blocks according to a specified protocol, and then the segmented and packed firmware package blocks are transmitted and analyzed by checksum.
Step 204, when the boot program or the bottom layer program receives the firmware packet, the embedded system checks the correctness of the data, and then stores the firmware packet in the application program storage area.
Step 205, when the FLASH writing is completed, using the address jump instruction, jumping to the starting address of the bottom program and starting to run the bottom program.
In some embodiments of the present disclosure, step 205 may include: under the condition that the application program is solidified in FLASH, the embedded system firstly executes the bootstrap program after the embedded device is started; the boot program jumps to the starting address of the underlying program by addressing, running the underlying operating system.
And 206, periodically calling the application program by the bottom program to finish the upgrading of the application program.
In some embodiments of the present disclosure, step 206 may include: the bottom operating system periodically calls the bottom driver and the application program, and the firmware library is used in the implementation process of the bottom driver.
In some embodiments of the present disclosure, the application program upgrading process is to transmit the firmware package packaged according to the specified protocol to the embedded system in batches, and each time the embedded system performs data verification, the data passing the data verification will be parsed and stored in the cache space.
In some embodiments of the present disclosure, the specific implementation manner of the data checking method is not limited, and the data checking method may be a Message-Digest Algorithm (MD 5), a cyclic redundancy check (Cyclic Redundancy Check, CRC), and the like; the buffer space is a Random Access Memory (RAM);
aiming at the limitation of the upgrading method of the application program in the related-art embedded system, the present disclosure provides an upgrading method of the application program, which can simultaneously support online and offline. The online upgrade of the application program is to receive the firmware package in the execution process of the bottom program, and directly store the firmware package into the storage space of the application program after verification. The off-line upgrade is mainly used for solving the limitation of the prior invention, and the method provides a process for realizing the upgrade of the application program by judging the hardware signal. Specifically, three storage spaces, namely a boot program storage space, a bottom program storage space and an application program storage space, are divided in a nonvolatile flash memory; judging whether to jump to a bottom program or execute an offline upgrading process according to the high-low level state of the pin on the hardware; if the offline upgrading process is executed, receiving a firmware packet in the execution process of the bootstrap program; and finally, copying the received and verified firmware package to the application program storage space by the embedded system.
The invention provides an embedded control system and an application program upgrading method suitable for an excavator, which can be used for explaining program organization structure and storage space division of the embedded control system of the excavator, and can also be used for supporting online and offline application program upgrading at the same time, so that the defects in the prior art are overcome.
Fig. 4 is a schematic diagram of further embodiments of an application upgrade method of an embedded system of the present disclosure. The fig. 4 embodiment may be performed by or by an embedded system application upgrade apparatus of the present disclosure or an embedded control system of the present disclosure (e.g., an embedded control system of an excavator of the fig. 1 embodiment) or an embedded system of the present disclosure or an excavator of the present disclosure.
FIG. 4 also presents a block diagram of the underlying program and application relationships in some embodiments of the present disclosure. As shown in FIG. 4, a block diagram of the underlying program and application relationships may include an underlying program 301, an application run address 302, an underlying/application function interface 303, and an application 304.
In some embodiments of the present disclosure, the underlying/application function interface 303 is implemented at the bottom level, and the processing by the batch tool may be invoked by the application or the underlying program at the same time.
In some embodiments of the present disclosure, as shown in fig. 4, the embedded system application upgrade method of the embodiment of fig. 4 may further include at least one of steps 41 to 44 in addition to the steps of the embedded system application upgrade method of the embodiment of fig. 2 or 3, wherein:
in step 41, the underlying program 301 jumps to the application running address 302 after it has run correctly.
In step 42, the application 304 is executed starting from the application running address 302 as a starting address.
In step 43, the application 304 executes the underlying program 301 by calling the underlying program function interface 303.
At step 44, the underlying program 301 executes the application 304 by calling the application function interface 303.
In some embodiments of the present disclosure, the implementation and programming language of the computer code of the underlying program and application may be the same or different, and may be C/C++, CODESYS, JAVA, python, etc., depending on the developer and application object specifics.
The present disclosure builds an embedded control system suitable for an excavator.
The present disclosure provides an application program upgrading method capable of supporting online and offline based on the division of FLASH space of an embedded control system and the possible problem of incapability of upgrading related technologies.
The application program and the underlying program unique to the present disclosure mutually make function interface calls and the operating system calls to the underlying driver.
The utility model discloses an because need not use the higher debugger of price to carry out the application upgrade, also need not dismantle the product, embedded system application upgrade's efficiency can promote greatly, and the operation complexity can greatly reduced, can also save time cost simultaneously to this disclosure has solved prior art and probably has the problem that can't upgrade. The disclosure also provides an embedded control system suitable for the excavator, which is used for realizing the upgrading of control logic, bottom layer driving and application programs.
FIG. 5 is a schematic diagram of some embodiments of an embedded system application upgrade apparatus of the present disclosure. The nonvolatile flash memory of the embedded system of the excavator is divided into three storage spaces, wherein the three storage spaces are respectively a guide program storage space, a bottom program storage space and an application program storage space. As shown in fig. 5, the embedded system application upgrade apparatus of the present disclosure may include a level acquisition module 51, an upgrade mode determination module 52, an offline upgrade module 53, and an online upgrade module 54, wherein:
The level obtaining module 51 is configured to obtain a pin high-low level state on hardware when the embedded system of the excavator is powered on.
In some embodiments of the present disclosure, the level acquisition module 51 is configured to implement the reading of the pin high and low level states by program logic within the boot program, wherein the setting of the high and low levels requires an artificial provision of high and low level signals at the fixed pins.
The upgrade mode determining module 52 is configured to perform an offline upgrade of the application program or an online upgrade of the application program according to the pin high-low level state determination.
In some embodiments of the present disclosure, the application is generated by an application programming tool.
And the offline upgrading module 53 is configured to execute an offline upgrading process of the application program according to the instruction of the computer program in the storage space of the bootstrap program when the upgrading mode determining module determines that the offline upgrading of the application program is performed.
In some embodiments of the present disclosure, a boot program is used to boot an embedded system jump and an offline upgrade of an application program.
In some embodiments of the present disclosure, a communication driver within the bootstrap program is used for offline upgrades of the application program.
In some embodiments of the present disclosure, the boot program is downloaded in advance to the corresponding FALSH of the embedded system by the emulator or emulator.
In some embodiments of the present disclosure, the bootstrap program supports an application program to perform offline upgrade, and the determination of the offline upgrade of the application program depends on the pin high-low level state, and the offline upgrade of the application program performs data transmission and upgrade through the upper computer.
The online upgrade module 54 is configured to jump to the starting address of the bottom program and execute the online upgrade process of the application program if the upgrade mode determination module determines that online upgrade of the application program is performed.
In some embodiments of the present disclosure, an underlying program is used for the embedded system to implement pin drivers and input and output.
In some embodiments of the present disclosure, the communication drivers of the underlying program are used for online upgrades of the application program.
In some embodiments of the present disclosure, the underlying program supports online upgrades of applications that are data transferred and upgraded by an application programming tool or host computer.
In some embodiments of the present disclosure, the application upgrade apparatus of the embedded system of the present disclosure may be further configured to receive an application upgrade package sent by the host computer, where the application upgrade package is a firmware package; under the condition that the boot program or the bottom layer program receives the firmware package, after the correctness of the data is checked by the embedded system, the firmware package is stored in the application program storage area; under the condition that FLASH writing is completed, using an address jump instruction to jump to the starting address of the bottom program, and starting to run the bottom program; and the bottom layer program periodically calls the application program to finish the upgrading of the application program.
In some embodiments of the present disclosure, before sending the application upgrade package, the upper computer packages the application program into blocks according to a specified protocol segment, and then transmits and checks and parses the firmware package blocks packaged in segments.
In some embodiments of the present disclosure, the application upgrade process includes: and transmitting the firmware package packaged according to the specified protocol to the embedded system in a divided mode, and carrying out data verification by the embedded system each time, wherein the data passing through the data verification is analyzed and stored in a cache space, and the application program upgrading process is an application program offline upgrading process or an application program online upgrading process.
In some embodiments of the present disclosure, after the bottom layer program runs correctly, it jumps to the application running address, and starts executing the application by using the application running address as the starting address; the application program executes the bottom program by calling the bottom program function interface; the bottom layer program executes the application program by calling the application program function interface.
In some embodiments of the present disclosure, the application upgrading device of the embedded system may be further configured to use an application programming tool to program the embedded control system, and use an application library to generate a binary application after compiling, where the application is stored in the application storage area in an offline upgrading or online upgrading manner.
In some embodiments of the present disclosure, when writing of the FLASH is completed, using an address jump instruction, jumping to an initial address of an underlying program, and starting to run the underlying program, the application program upgrading device of the embedded system of the present disclosure may be configured to execute the boot program first by the embedded system after starting the embedded device, if the application program has been cured in the FLASH; the boot program jumps to the starting address of the underlying program by addressing, running the underlying operating system.
In some embodiments of the present disclosure, when the underlying program periodically invokes the application program to complete the application program upgrade, the underlying operating system periodically invokes the underlying driver and the application program, and the firmware library is used in the implementation process of the underlying driver.
In some embodiments of the present disclosure, the embedded system application upgrade apparatus of the present disclosure may be configured to perform an embedded system application upgrade method that implements the embodiments described above (e.g., any of the embodiments of fig. 1-4).
FIG. 6 is a schematic diagram illustrating another exemplary embodiment of an upgrade apparatus for an embedded system application program of the present disclosure. As shown in fig. 6, the embedded system application upgrade apparatus of the present disclosure includes a memory 61 and a processor 62.
The memory 61 is used for storing instructions, and the processor 62 is coupled to the memory 61, and the processor 62 is configured to implement the embedded system application upgrade method according to the above-described embodiment (e.g., any of the embodiments of fig. 1 to 4) based on the instructions stored in the memory.
As shown in fig. 6, the embedded system application upgrade apparatus further includes a communication interface 63 for information interaction with other devices. Meanwhile, the embedded system application upgrading device further comprises a bus 64, and the processor 62, the communication interface 63 and the memory 61 complete communication with each other through the bus 64.
The memory 61 may comprise a high-speed RAM memory or may further comprise a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 61 may also be a memory array. The memory 61 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules.
Further, the processor 62 may be a central processing unit CPU, or may be an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present disclosure.
According to another aspect of the present disclosure, as shown in fig. 1, there is provided an embedded control system of an excavator, including an embedded system application upgrading device according to any one of the embodiments (fig. 5 or fig. 6).
According to another aspect of the present disclosure, there is provided an excavator embedded system comprising an excavator embedded control system as described in any one of the embodiments above (fig. 1 embodiment).
According to another aspect of the present disclosure, there is provided an excavator comprising an excavator embedded system as described in any one of the embodiments above.
The present disclosure relates to the field of embedded control systems and computers for engineering machinery, and more particularly, to an embedded control system and an application program upgrading method suitable for an excavator.
According to another aspect of the present disclosure, there is provided a computer readable storage medium storing computer instructions that when executed by a processor implement an embedded system application upgrade method as described in any of the embodiments above (e.g., any of fig. 1-4).
The computer-readable storage medium of the present disclosure may be embodied as a non-transitory computer-readable storage medium.
It will be apparent to those skilled in the art that embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The embedded system application upgrade apparatus, level acquisition module, upgrade mode determination module, offline upgrade module, and online upgrade module described above may be implemented as a general purpose processor, programmable Logic Controller (PLC), digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or any suitable combination thereof for performing the functions described in the present disclosure.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of a method of an embodiment of the present disclosure may be implemented by hardware, which may be implemented as a general purpose processor, a programmable logic controller, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any suitable combination thereof, for performing the methods described herein.
Thus far, the present disclosure has been described in detail. In order to avoid obscuring the concepts of the present disclosure, some details known in the art are not described. How to implement the solutions disclosed herein will be fully apparent to those skilled in the art from the above description.
Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above embodiments may be implemented by hardware, or may be implemented by a program indicating that the relevant hardware is implemented, where the program may be stored on a non-transitory computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or optical disk, etc.
The description of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the disclosure in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments were chosen and described in order to best explain the principles of the disclosure and the practical application, and to enable others of ordinary skill in the art to understand the disclosure for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (19)

1. An embedded system application program upgrading method, wherein three storage spaces are divided in a nonvolatile flash memory of an excavator embedded system, and the three storage spaces are respectively a bootstrap program storage space, a bottom program storage space and an application program storage space, wherein the embedded system application program upgrading method comprises the following steps:
Under the condition that the embedded system of the excavator is electrified and started, acquiring the high and low level states of pins on hardware;
according to the high-low level state of the pin, the application program is upgraded offline or the application program is upgraded online;
executing the offline upgrading process of the application program according to the instruction of the computer program in the storage space of the bootstrap program under the condition that the offline upgrading of the application program is judged;
and under the condition that the online upgrading of the application program is judged, jumping to the starting address of the bottom program, and executing the online upgrading process of the application program.
2. The embedded system application upgrade method of claim 1, further comprising:
receiving an application program upgrading packet sent by an upper computer, wherein the application program upgrading packet is a firmware packet;
under the condition that the boot program or the bottom layer program receives the firmware package, after the correctness of the data is checked by the embedded system, the firmware package is stored in the application program storage area;
under the condition that FLASH writing is completed, using an address jump instruction to jump to the starting address of the bottom program, and starting to run the bottom program;
and the bottom layer program periodically calls the application program to finish the upgrading of the application program.
3. The embedded system application upgrade method of claim 2, further comprising:
before the upper computer sends the upgrade package of the application program, the application program is segmented and packed into blocks according to a specified protocol, and then the segmented and packed firmware package blocks are transmitted and analyzed by checksum.
4. The embedded system application upgrade method according to any one of claims 1-3, wherein the application upgrade process comprises:
and transmitting the firmware package packaged according to the specified protocol to the embedded system in a divided mode, and carrying out data verification by the embedded system each time, wherein the data passing through the data verification is analyzed and stored in a cache space, and the application program upgrading process is an application program offline upgrading process or an application program online upgrading process.
5. The embedded system application upgrade method according to any one of claims 1-3, wherein said obtaining pin high and low level states on hardware comprises:
reading of the pin high and low states is achieved by program logic within the boot strap program, wherein the high and low setting requires an artificial provision of a high and low signal at the fixed pin.
6. The embedded system application upgrade method according to any one of claims 1-3, wherein:
The bottom layer program is used for realizing pin driving and input and output of the embedded system;
the communication drive of the bottom layer program is used for online upgrading of the application program.
7. The embedded system application upgrade method according to any one of claims 1-3, wherein:
the guiding program is used for guiding the embedded system to jump and the offline upgrading of the application program;
and the communication drive in the bootstrap program is used for offline upgrading of the application program.
8. The embedded system application upgrade method according to any one of claims 1-3, further comprising:
after the bottom layer program runs correctly, the application program running address is jumped to, and the application program running address is used as a starting address to start executing the application program;
the application program executes the bottom program by calling the bottom program function interface;
the bottom layer program executes the application program by calling the application program function interface.
9. The embedded system application upgrade method according to any one of claims 1-3, wherein:
the application is generated by an application programming tool;
the bootstrap program is downloaded to the corresponding FALSH of the embedded system in advance through the simulator or the simulator;
the guide program supports the application program to carry out offline upgrading, the judgment of the offline upgrading of the application program depends on the high-low level state of the pin, and the offline upgrading of the application program carries out data transmission and upgrading through the upper computer;
The bottom layer program supports the online upgrade of the application program, and the online upgrade of the application program carries out data transmission and upgrade through an application program programming tool or an upper computer.
10. The embedded system application upgrade method according to any one of claims 1-3, further comprising:
and programming the embedded control system by using an application programming tool, and simultaneously using an application library, and generating a binary application program after compiling, wherein the application program is stored in an application program storage area in an off-line upgrading or on-line upgrading mode.
11. The method for upgrading an application program of an embedded system according to any one of claims 1-3, wherein, when the FLASH writing is completed, using an address jump instruction, jumping to an initial address of an underlying program, and starting to run the underlying program includes:
under the condition that the application program is solidified in FLASH, the embedded system firstly executes the bootstrap program after the embedded device is started;
the boot program jumps to the starting address of the underlying program by addressing, running the underlying operating system.
12. The embedded system application upgrade method according to any one of claims 1-3, wherein the underlying program periodically invokes an application program, and completing the application upgrade comprises:
The bottom operating system periodically calls the bottom driver and the application program, and the firmware library is used in the implementation process of the bottom driver.
13. An embedded system application program upgrading device, wherein three storage spaces are divided in a nonvolatile flash memory of an embedded system of an excavator, and the three storage spaces are respectively a boot program storage space, a bottom program storage space and an application program storage space, wherein the embedded system application program upgrading device comprises:
the level acquisition module is configured to acquire the high-low level state of the pin on the hardware under the condition that the embedded system of the excavator is electrified and started;
the upgrade mode determining module is configured to determine to perform offline upgrade of the application program or online upgrade of the application program according to the high-low level state of the pin;
the offline upgrading module is configured to execute an offline upgrading process of the application program according to the instruction of the computer program in the storage space of the bootstrap program under the condition that the upgrading mode determining module determines to upgrade the application program offline;
and the online upgrading module is configured to jump to the starting address of the bottom program and execute the online upgrading process of the application program under the condition that the upgrading mode determining module determines to upgrade the application program online.
14. An embedded system application upgrade apparatus, comprising:
a memory configured to store instructions;
a processor configured to execute the instructions to cause the embedded system application upgrade apparatus to perform operations implementing the embedded system application upgrade method of any one of claims 1-12.
15. An excavator embedded control system comprising an embedded system application upgrade apparatus as claimed in claim 13 or 14.
16. The embedded control system of an excavator of claim 15, further comprising:
an execution unit configured to execute instructions of the embedded system application upgrade apparatus;
and an input unit configured to input a signal to the embedded system application upgrade apparatus.
17. An excavator embedded system comprising an excavator embedded control system as claimed in claim 15 or 16.
18. An excavator comprising the excavator embedded system of claim 17.
19. A computer readable storage medium storing computer instructions which when executed by a processor implement the embedded system application upgrade method of any one of claims 1-12.
CN202311167929.9A 2023-09-11 2023-09-11 Method and device for upgrading application program of embedded system, excavator and storage medium Pending CN117149246A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311167929.9A CN117149246A (en) 2023-09-11 2023-09-11 Method and device for upgrading application program of embedded system, excavator and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311167929.9A CN117149246A (en) 2023-09-11 2023-09-11 Method and device for upgrading application program of embedded system, excavator and storage medium

Publications (1)

Publication Number Publication Date
CN117149246A true CN117149246A (en) 2023-12-01

Family

ID=88902335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311167929.9A Pending CN117149246A (en) 2023-09-11 2023-09-11 Method and device for upgrading application program of embedded system, excavator and storage medium

Country Status (1)

Country Link
CN (1) CN117149246A (en)

Similar Documents

Publication Publication Date Title
CN109358887B (en) On-line upgrading method, device and system for single chip microcomputer program
CN106897090B (en) Embedded equipment program upgrading method and system
US8990776B2 (en) Computing device and device driver debugging method
US20100146481A1 (en) Developing applications at runtime
US20050268195A1 (en) Apparatus and method for improving emulation speed of high-level languages in on-chip emulation systems
US8997049B1 (en) Method and system for debugging of compiled code using an interpreter
CN111240720A (en) Boot program upgrading method and device and storage medium
CN105608370A (en) ECU program flashing and detection method
CN110704113B (en) Starting method and system based on FPGA platform and development board device
US9600397B2 (en) Dynamic debugging method of a software module and corresponding device
CN107340995B (en) Traction control application software development system and optimization compiling method for platform-independent codes
CN105278445A (en) Secondary development method of synchronous generator excitation regulator control program
CN102043654A (en) DSP simple development method based on TMS320VC55xx
CN117149246A (en) Method and device for upgrading application program of embedded system, excavator and storage medium
CN112559336B (en) Method, device and system for self-adaptively debugging heterogeneous computing chip and main board chip
CN112685095B (en) Virtual device loading method, device, equipment and storage medium
CN115587026A (en) Chip testing method and device, storage medium and chip
CN113157329A (en) Method, system, server and storage medium for starting application
Karmore et al. Universal methodology for embedded system testing
CN110888689B (en) Touch screen drive loading method, storage medium and terminal equipment
CN111984329B (en) Boot software standardized generation and execution method and system
CN114546746A (en) Chip debugging method and device, electronic equipment and storage medium
CN110502439B (en) Debugging method, device, electronic equipment and storage medium
JPH0410081B2 (en)
KR20020032256A (en) Integrated Embedded System and Method for Realizing thereof

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