A charging pile upgrade method that dynamically adapts to program size

By dividing the charging pile's FLASH into the BOOT area, APP firmware area and reserved storage area, and dynamically adjusting the size of the reserved storage area, the problem of fixed space allocation in the charging pile upgrade method is solved, flexibility and convenience are improved, and development and maintenance by multiple people are supported.

CN116339776BActive Publication Date: 2025-09-26FUJIAN NEBULA ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310232805.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-13
Publication Date
2025-09-26
Estimated Expiration
2043-03-13

AI Technical Summary

Technical Problem

In the existing charging pile upgrade method, the fixed program space allocation leads to insufficient flexibility and convenience, and cannot adapt to the needs of functional iteration and multi-person development and maintenance.

Method used

The FLASH of the charging pile is divided into a BOOT area, several APP firmware areas and several reserved storage areas, which are arranged alternately. The size of the reserved storage area is dynamically adjusted before the upgrade to match the upgrade firmware requirements of different sizes and reduce the impact between APP codes.

Benefits of technology

It improves the flexibility and convenience of charging pile program upgrades, supports multi-person development and maintenance, and avoids upgrade failures due to insufficient space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116339776B_ABST
    Figure CN116339776B_ABST
Patent Text Reader

Abstract

The present invention provides a charging pile upgrade method that dynamically adapts to program size in the field of charging pile technology, including: step S10, dividing FLASH into a BOOT area, several APP firmware areas, and several reserved storage areas; step S20, writing the upgraded firmware into the APP firmware area, parsing the upgraded firmware in the APP firmware area based on the upgrade instruction, and obtaining the function code and firmware information; step S30, obtaining the firmware size of the upgraded firmware, a firmware conversion tool generates an upgrade file information header based on the firmware information and the firmware size, and the firmware conversion tool generates an installation code based on the function code; step S40, verifying the installation space of the upgraded firmware based on the upgrade file information header; step S50, verifying and decrypting the installation code based on the upgrade file information header; step S60, installing the installation code to the corresponding reserved storage area based on the firmware information to perform the upgrade operation. The advantage of the present invention is that it greatly improves the flexibility and convenience of charging pile program upgrades.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of charging piles, and in particular to a charging pile upgrading method that dynamically adapts to program size. Background Art

[0002] With the development of electric vehicles, the number of charging piles is also increasing day by day. During the use of charging piles, their programs (APPs) need to be continuously updated and upgraded to repair program defects and security vulnerabilities. This can reduce recall and after-sales costs, and can introduce and iterate new functions of charging piles, thereby improving user experience and optimizing product performance.

[0003] Traditionally, there are two methods for upgrading charging piles:

[0004] Method 1: Divide the program space into a fixed-size BOOT area and an APP area (including APP space and APP firmware). The program is installed in the APP area and subsequently upgraded based on the APP area. However, this method has the following disadvantages: 1. All functions of the charging pile must be implemented in the APP area, and device function separation cannot be performed, resulting in high code coupling. 2. Developers must jointly maintain a project, and the codes have a great impact on each other, which is not conducive to joint development and maintenance by multiple people.

[0005] Method 2: Divide the program space into a BOOT area of ​​fixed size and several APP areas. Different APP areas implement different business and driver functions. However, there are the following disadvantages: 1. The program space allocated to APP areas with different functions is fixed in size. As the charging pile functions continue to iterate, there may be insufficient space in a certain APP area, making it impossible to upgrade the function of the APP area; 2. It increases the difficulty of standardizing the program space allocation in the early development process.

[0006] Therefore, how to provide a charging pile upgrade method that dynamically adapts to program size to improve the flexibility and convenience of charging pile program upgrades has become a technical problem that needs to be solved urgently. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to provide a charging pile upgrade method that dynamically adapts to program size, thereby improving the flexibility and convenience of charging pile program upgrades.

[0008] The present invention is implemented as follows: a charging pile upgrade method that dynamically adapts to program size, comprising the following steps:

[0009] Step S10: Divide the FLASH of the charging pile into a BOOT area, several APP firmware areas, and several reserved storage areas; the reserved storage areas and the APP firmware areas are arranged alternately, and the storage address of the first reserved storage area is adjacent to the storage address of the BOOT area;

[0010] Step S20: writing the upgrade firmware into the corresponding APP firmware area, parsing the upgrade firmware in the APP firmware area based on the received upgrade instruction to obtain a function code and firmware information;

[0011] Step S30: Obtain the firmware size of the upgraded firmware, and the firmware conversion tool generates an upgrade file information header based on the firmware information and the firmware size, and generates an installation code based on the function code;

[0012] Step S40: verifying the installation space of the upgraded firmware based on the upgrade file information header;

[0013] Step S50: verifying and decrypting the installation code based on the upgrade file information header;

[0014] Step S60: Install the installation code into the corresponding reserved storage area based on the firmware information to perform an upgrade operation.

[0015] Furthermore, in step S10, the starting address of the BOOT area is fixed and remains unchanged, serving as the total reset startup address of the charging pile program, and is used to execute the upgrade operation of the upgrade firmware stored in each APP firmware area;

[0016] The APP corresponding to the first APP firmware area adjacent to the BOOT area is a main APP, which is used to start the APPs corresponding to the other APP firmware areas.

[0017] Furthermore, in step S20, the firmware information at least includes firmware version information, firmware type information, firmware data type, firmware model information, and firmware migration address.

[0018] Furthermore, in step S30, the upgrade file information header carries at least firmware information, firmware size, firmware encryption method, and firmware verification method.

[0019] Furthermore, the step S40 is specifically as follows:

[0020] Based on the firmware size and firmware relocation address carried by the upgrade file information header, determine whether the installation space of the reserved storage area adjacent to the APP firmware area meets the upgrade conditions. If so, the verification passes and enters step S50; if not, move the adjacent APP firmware area to the reserved storage area with a higher address until the upgrade conditions are met.

[0021] Furthermore, the step S50 is specifically as follows:

[0022] After verifying the installation code based on the firmware verification method carried in the upgrade file information header, the installation code is decrypted based on the firmware encryption method carried in the upgrade file information header.

[0023] Furthermore, it also includes:

[0024] Step S70: After the upgrade is completed, jump to the main APP.

[0025] The advantages of the present invention are:

[0026] By dividing the FLASH of the charging pile into a BOOT area, several APP firmware areas and several reserved storage areas; the reserved storage areas and APP firmware areas are arranged alternately, and the storage address of the first reserved storage area is adjacent to the storage address of the BOOT area. Before performing the upgrade operation, the installation space of the upgraded firmware is verified, that is, whether the size of the reserved storage area adjacent to the APP firmware area meets the upgrade conditions. If the reserved storage area is too small, the adjacent APP firmware area is moved to the reserved storage area with a high address, that is, the size of each reserved storage area is dynamically adjusted to match the upgrade of upgraded firmware of different sizes, avoiding the inability to upgrade due to too small installation space. Moreover, since several APP firmware areas are divided, the codes of each APP have little influence on each other, which is conducive to joint development and maintenance by multiple people, and ultimately greatly improves the flexibility and convenience of charging pile program upgrades. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0028] Figure 1 This is a flow chart of a charging pile upgrade method that dynamically adapts to program size according to the present invention.

[0029] Figure 2 It is a schematic diagram of FLASH address allocation of the present invention. DETAILED DESCRIPTION

[0030] The technical solution in the embodiment of the present application has the following overall idea: several reserved storage areas are set in FLASH. When the reserved storage area adjacent to the APP firmware area is too small to perform the upgrade, the adjacent APP firmware area is moved to the reserved storage area with a higher address, that is, the size of each reserved storage area is dynamically adjusted to match the upgrade of upgrade firmware of different sizes, and several APP firmware areas are divided to reduce the impact between each APP code, thereby improving the flexibility and convenience of charging pile program upgrades.

[0031] Please refer to Figures 1 to 2As shown, a preferred embodiment of a charging pile upgrade method that dynamically adapts to program size of the present invention includes the following steps:

[0032] Step S10: Divide the FLASH of the charging pile into a BOOT area, several APP firmware areas, and several reserved storage areas; the reserved storage areas and the APP firmware areas are arranged alternately, and the storage address of the first reserved storage area is adjacent to the storage address of the BOOT area; the size and starting address of the APP firmware area can be adjusted based on the reserved storage area;

[0033] Step S20: writing the upgrade firmware into the corresponding APP firmware area, parsing the upgrade firmware in the APP firmware area based on the received upgrade instruction to obtain function codes and firmware information; performing a reset operation before upgrading to initialize resources including SPI, serial port, FLASH, etc.;

[0034] Step S30: Obtain the firmware size of the upgraded firmware, and the firmware conversion tool generates an upgrade file information header based on the firmware information and the firmware size, and generates an installation code based on the function code;

[0035] Step S40: Verify the installation space of the upgraded firmware based on the upgrade file information header, that is, verify whether it will cross over to the storage space of other apps;

[0036] Step S50: verifying and decrypting the installation code based on the upgrade file information header;

[0037] Step S60: Install the installation code into the corresponding reserved storage area based on the firmware information to perform an upgrade operation.

[0038] In step S10, the starting address of the BOOT area is fixed and remains unchanged, serving as the total reset startup address of the charging pile program, and is used to execute the upgrade operation of the upgrade firmware stored in each APP firmware area, and a system boot program bootlader is installed;

[0039] The APP corresponding to the first APP firmware area adjacent to the BOOT area is a main APP, which is used to start the APPs corresponding to the other APP firmware areas.

[0040] In step S20, the firmware information includes at least firmware version information (soft-vers), firmware type information (soft-type), firmware data type (data-type), firmware model information (pkg-model), and firmware move address (move-addr); the starting address of the firmware information is the APP starting address + 512 bytes; the size of the firmware information is 128 bytes.

[0041] In step S30, the upgrade file information header carries at least firmware information, firmware size, firmware encryption method, and firmware verification method; the upgrade file information header is used to instruct BOOT how to perform the upgrade operation.

[0042] The step S40 is specifically as follows:

[0043] Based on the firmware size and firmware relocation address carried by the upgrade file information header, determine whether the installation space of the reserved storage area adjacent to the APP firmware area meets the upgrade conditions. If so, the verification passes and enters step S50; if not, move the adjacent APP firmware area to the reserved storage area with a higher address until the upgrade conditions are met.

[0044] The step S50 is specifically as follows:

[0045] After verifying the installation code based on the firmware verification method carried in the upgrade file information header, the installation code is decrypted based on the firmware encryption method carried in the upgrade file information header.

[0046] Also includes:

[0047] Step S70: After the upgrade is completed, jump to the main APP.

[0048] In summary, the advantages of the present invention are:

[0049] By dividing the FLASH of the charging pile into a BOOT area, several APP firmware areas and several reserved storage areas; the reserved storage areas and APP firmware areas are arranged alternately, and the storage address of the first reserved storage area is adjacent to the storage address of the BOOT area. Before performing the upgrade operation, the installation space of the upgraded firmware is verified, that is, whether the size of the reserved storage area adjacent to the APP firmware area meets the upgrade conditions. If the reserved storage area is too small, the adjacent APP firmware area is moved to the reserved storage area with a high address, that is, the size of each reserved storage area is dynamically adjusted to match the upgrade of upgraded firmware of different sizes, avoiding the inability to upgrade due to too small installation space. Moreover, since several APP firmware areas are divided, the codes of each APP have little influence on each other, which is conducive to joint development and maintenance by multiple people, and ultimately greatly improves the flexibility and convenience of charging pile program upgrades.

[0050] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A charging pile upgrade method that dynamically adapts to program size, characterized by: The steps include: Step S10: Divide the FLASH of the charging pile into a BOOT area, several APP firmware areas, and several reserved storage areas; the reserved storage areas and the APP firmware areas are arranged alternately, and the storage address of the first reserved storage area is adjacent to the storage address of the BOOT area; the starting address of the BOOT area is fixed and serves as the total reset startup address of the charging pile program, and is used to execute the upgrade operation of the upgrade firmware stored in each of the APP firmware areas; The APP corresponding to the first APP firmware area adjacent to the BOOT area is the main APP, which is used to start the APPs corresponding to the other APP firmware areas; Step S20: writing the upgraded firmware into the corresponding APP firmware area, parsing the upgraded firmware in the APP firmware area based on the received upgrade instruction to obtain a function code and firmware information; the firmware information includes at least firmware version information, firmware type information, firmware data type, firmware model information, and firmware relocation address; Step S30: Obtain the firmware size of the upgraded firmware, and the firmware conversion tool generates an upgrade file information header based on the firmware information and the firmware size, and generates an installation code based on the function code; Step S40: Based on the firmware size and firmware relocation address carried in the upgrade file information header, determine whether the installation space of the reserved storage area adjacent to the APP firmware area meets the upgrade conditions. If so, the verification passes and the process proceeds to step S50; if not, move the adjacent APP firmware area to the reserved storage area with a higher address until the upgrade conditions are met. Step S50: verifying and decrypting the installation code based on the upgrade file information header; Step S60: Install the installation code into the corresponding reserved storage area based on the firmware information to perform an upgrade operation.

2. The charging pile upgrade method that dynamically adapts to program size according to claim 1, characterized in that: In step S30, the upgrade file information header carries at least firmware information, firmware size, firmware encryption method, and firmware verification method.

3. The charging pile upgrade method that dynamically adapts to program size according to claim 1, characterized in that: The step S50 is specifically as follows: After verifying the installation code based on the firmware verification method carried in the upgrade file information header, the installation code is decrypted based on the firmware encryption method carried in the upgrade file information header.

4. The charging pile upgrade method that dynamically adapts to program size according to claim 1, characterized in that: Also includes: Step S70: After the upgrade is completed, jump to the main APP.

Citation Information

Patent Citations

  • Firmware updating method of IO module and IO module

    CN113094067A

  • Firmware upgrading method, device and system and storage medium

    CN115473807A