A method and apparatus for upgrading a PLC

CN116009927BActive Publication Date: 2026-08-21FUZHOU WECON ELECTRONICS TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211508862.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-08-21
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

[0002]目前PLC的应用非常广泛,随着系统的发展,对PLC的要求也逐渐增多,传统的同一硬件的PLC虽然能适配不同方案的固件,但一个PLC只能使用其中一个固件,多个固件的使用需要开发多个PLC,即用户需要准备多个设备才能同时使用多种方案的固件,不仅给用户带来不便而且提高了固件镜像开发和测试的成本

Benefits of technology

[0009]本发明的有益效果在于:PLC以固件包文件的形式接收固件,使得在做固件镜像时只需要针对固件包文件进行镜像,无需对固件包文件中的多个固件分别做固件镜像,节约成本提高管理效率,且当用户要对固件进行切换时,无需通过多设备实现,能根据用户固件切换指令,在一个PLC中灵活切换固件,优化用户体验的同时,提高PLC的利用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116009927B_ABST
    Figure CN116009927B_ABST
Patent Text Reader

Abstract

The application relates to a PLC upgrading method and device, wherein the method comprises the following steps: receiving a firmware package file containing multiple firmwares, storing each firmware in the firmware package file in a corresponding firmware address, starting a firmware running PLC, receiving a firmware switching instruction, and switching the firmware address in the starting address information area according to the firmware switching instruction, so as to start the corresponding firmware according to the switched firmware address, and realize firmware switching. Therefore, the application configures multiple firmwares in one PLC in the form of receiving a firmware package file, does not need to develop multiple PLCs to realize the configuration of multiple firmwares, saves cost, improves management efficiency, can flexibly switch the firmware in one PLC according to the user needs, optimizes the user experience, and improves the utilization rate of the PLC.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of PLC technology, and in particular to a method and apparatus for upgrading a PLC. Background Technology

[0002] Currently, PLCs are widely used. With the development of systems, the requirements for PLCs are also gradually increasing. Although traditional PLCs with the same hardware can be adapted to different firmware schemes, a PLC can only use one firmware. Using multiple firmwares requires the development of multiple PLCs. In other words, users need to prepare multiple devices to use multiple firmware schemes at the same time, which not only brings inconvenience to users but also increases the cost of firmware image development and testing. Summary of the Invention

[0003] The technical problem to be solved by the present invention is: to provide a method and apparatus for upgrading a PLC so as to use multiple firmware in the same PLC.

[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0005] In a first aspect, the present invention provides a method for upgrading a PLC, comprising:

[0006] Receive a firmware package file containing multiple firmware files, and store each firmware file in the firmware package file at its corresponding firmware address.

[0007] Start one of the firmware to run the PLC;

[0008] The firmware is switched by receiving a firmware switching instruction and switching the firmware address in the boot address information area according to the firmware switching instruction. Then, the corresponding firmware is started according to the switched firmware address to realize firmware switching.

[0009] The beneficial effects of this invention are as follows: the PLC receives firmware in the form of firmware package files, so that when making firmware images, only the firmware package file needs to be imaged, without having to make separate firmware images for multiple firmwares in the firmware package file, which saves costs and improves management efficiency. Moreover, when users need to switch firmware, it is not necessary to go through multiple devices. Firmware can be flexibly switched in one PLC according to the user's firmware switching command, which optimizes the user experience and improves the utilization rate of the PLC.

[0010] Optionally, the firmware package file is a merged file of multiple firmware files encrypted and packaged together.

[0011] As described above, multiple firmware files can be encrypted and packaged into a single firmware package file, allowing a single PLC to receive and configure multiple firmware files simultaneously. This eliminates the need to develop multiple PLCs based on the number of firmware files, saving costs and improving management efficiency.

[0012] Optionally, storing each firmware file in the firmware package file at its corresponding firmware address includes:

[0013] The firmware package file is downloaded to the upgrade area of ​​the FLASH. The firmware package file in the upgrade area is unpacked and decrypted by the BIOS of the FLASH to obtain each firmware in the firmware package file. Each firmware is encrypted and packaged according to the PLC's own parameters to generate a firmware package corresponding to each firmware. The firmware package is stored in the firmware area of ​​the FLASH and the corresponding firmware address is recorded.

[0014] As described above, the firmware package file is unpacked and decrypted through the FLASH BIOS to obtain each firmware file. Each firmware is then re-encrypted and repackaged. This encryption and repackaging is done in conjunction with the PLC's own parameters, effectively preventing third parties from stealing the firmware and attacking the PLC, thus improving the overall security of the PLC.

[0015] Optionally, receiving the firmware switching instruction, switching the firmware address in the boot address information area according to the firmware switching instruction, and then booting the corresponding firmware according to the switched firmware address, to realize the firmware switching includes:

[0016] Receive firmware switching instructions, and obtain the corresponding firmware address of the firmware to be switched from the firmware area of ​​the FLASH according to the firmware identifier of the firmware to be switched in the firmware switching instructions, and switch the firmware address in the boot address information area of ​​the FLASH according to the firmware address of the firmware to be switched.

[0017] Restart the PLC and determine whether the firmware address in the boot address information of the FLASH is correct. If it is correct, obtain the firmware package corresponding to the firmware address, parse the firmware package to obtain firmware information, and perform legality authentication on the firmware to be switched based on the firmware information. When the firmware information is consistent with the firmware information of the firmware to be switched, unpack and decrypt the firmware package to generate an executable firmware to be switched and send the executable firmware to be switched to the ITCM for execution, start the firmware to be switched, and realize firmware switching.

[0018] As described above, the system can switch firmware according to user needs, optimizing the user experience. When switching firmware, it not only checks the firmware address of the firmware to be switched, but also performs legality authentication on the firmware information. This dual verification further improves the security of the PLC.

[0019] Optionally, determining whether the firmware address in the boot address information area of ​​the FLASH is correct further includes:

[0020] If the process fails, the firmware information corresponding to the firmware address is obtained from the firmware address of the default firmware, and the default firmware is authenticated based on the firmware information. When the firmware information matches the firmware information of the default firmware, an executable default firmware is generated and sent to the ITCM for execution to start the default firmware.

[0021] As described above, when the verification of the firmware to be switched fails, the default firmware will be automatically switched to, which improves the flexibility of the PLC. At the same time, the legality of the switched default firmware will be verified to prevent third parties from attacking the PLC by stealing the default firmware, thereby improving the overall security of the PLC.

[0022] Secondly, the present invention provides a PLC upgrade device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0023] Receive a firmware package file containing multiple firmware files, and store each firmware file in the firmware package file at its corresponding firmware address.

[0024] Start one of the firmware to run the PLC;

[0025] The firmware is switched by receiving a firmware switching instruction and switching the firmware address in the boot address information area according to the firmware switching instruction. Then, the corresponding firmware is started according to the switched firmware address to realize firmware switching.

[0026] Optionally, the firmware package file is a merged file of multiple firmware files encrypted and packaged together.

[0027] As described above, multiple firmware files can be encrypted and packaged into a single firmware package file, allowing a single PLC to receive and configure multiple firmware files simultaneously. This eliminates the need to develop multiple PLCs based on the number of firmware files, saving costs and improving management efficiency.

[0028] Optionally, storing each firmware file in the firmware package file at its corresponding firmware address includes:

[0029] The firmware package file is downloaded to the upgrade area of ​​the FLASH. The firmware package file in the upgrade area is unpacked and decrypted by the BIOS of the FLASH to obtain each firmware in the firmware package file. Each firmware is encrypted and packaged according to the PLC's own parameters to generate a firmware package corresponding to each firmware. The firmware package is stored in the firmware area of ​​the FLASH and the corresponding firmware address is recorded.

[0030] Optionally, receiving the firmware switching instruction, switching the firmware address in the boot address information area according to the firmware switching instruction, and then booting the corresponding firmware according to the switched firmware address, to realize the firmware switching includes:

[0031] Receive firmware switching instructions, and obtain the corresponding firmware address of the firmware to be switched from the firmware area of ​​the FLASH according to the firmware identifier of the firmware to be switched in the firmware switching instructions, and switch the firmware address in the boot address information area of ​​the FLASH according to the firmware address of the firmware to be switched.

[0032] Restart the PLC and determine whether the firmware address in the boot address information of the FLASH is correct. If it is, obtain the firmware package corresponding to the firmware address, parse the firmware package to obtain firmware information, and perform legality authentication on the firmware to be switched based on the firmware information. When the firmware information is consistent with the firmware information of the firmware to be switched, unpack and decrypt the firmware package to generate an executable firmware to be switched and send the executable firmware to be switched to the ITCM for execution, start the firmware to be switched, and realize firmware switching.

[0033] Optionally, determining whether the firmware address in the boot address information of the FLASH is correct further includes:

[0034] If the process fails, the firmware information corresponding to the firmware address is obtained from the firmware address of the default firmware, and the default firmware is authenticated based on the firmware information. When the firmware information matches the firmware information of the default firmware, an executable default firmware is generated and sent to the ITCM for execution to start the default firmware.

[0035] The technical effects of the PLC upgrade device provided in the second aspect are described in the relevant description of the PLC upgrade method provided in the first aspect. Attached Figure Description

[0036] Figure 1 This is a flowchart of a PLC upgrade method provided in an embodiment of the present invention;

[0037] Figure 2This is a schematic diagram of the process of a PLC receiving firmware package files according to an embodiment of the present invention;

[0038] Figure 3 This is a schematic diagram illustrating the firmware switching process according to an embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram of a PLC upgrade device provided in an embodiment of the present invention.

[0040] [Explanation of Labels in the Attached Image]

[0041] 1. A device for upgrading a PLC;

[0042] 2. Processor;

[0043] 3. Memory. Detailed Implementation

[0044] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.

[0045] Example 1

[0046] Please refer to Figures 1 to 3 This invention provides a method for upgrading a PLC, comprising the following steps:

[0047] S1. Receive a firmware package file containing multiple firmware files, and store each firmware file in the firmware package file at the corresponding firmware address.

[0048] In this embodiment, the firmware package file received by the PLC (Programmable Logic Controller) is a file containing multiple firmware files, and the firmware is stored according to the firmware address of each firmware file. For example, it is a firmware package file composed of two firmware files, one old and one new.

[0049] At this time, the firmware package file mentioned in step S1 includes:

[0050] S11. The firmware package file is a merged file of multiple firmware files after being encrypted and packaged.

[0051] In this embodiment, as Figure 2 As shown, the firmware package file contains multiple firmware files that are encrypted, packaged, and then merged into a single firmware package file.

[0052] At this point, each firmware element in the firmware package file mentioned in step S1 is stored at its corresponding firmware address, including:

[0053] S12. Download the firmware package file to the upgrade area of ​​the FLASH, unpack and decrypt the firmware package file in the upgrade area through the BIOS of the FLASH to obtain each firmware in the firmware package file, and encrypt and package each firmware according to the PLC's own parameters to generate a firmware package corresponding to each firmware, store the firmware package in the firmware area of ​​the FLASH and record the corresponding firmware address.

[0054] In this embodiment, as Figure 2 As shown, after the PLC downloads the received firmware package file to the upgrade area of ​​the FLASH (FlashEEPROM), the FLASH BIOS (Basic Input Output System) will unpack and decrypt the firmware package file in the upgrade area to extract each firmware from the firmware package file. To further improve firmware security, each firmware needs to be re-encrypted and repackaged according to the PLC's own parameters to form a firmware package corresponding to each firmware. Each firmware package has a firmware header, which contains firmware information such as firmware size and whether there is a next firmware. Then, the address offset of the corresponding firmware is parsed according to the firmware size to generate the firmware address of each firmware. Based on the generated firmware address, the corresponding firmware package is stored in the firmware area of ​​the FLASH.

[0055] S2. Start one of the firmware to run the PLC;

[0056] In this embodiment, any firmware in the PLC will be started to start the PLC. Specifically, this embodiment has a default firmware. When the firmware package file is downloaded, the PLC will start the default firmware to run the PLC when it restarts. The default firmware can be a new firmware or an old firmware, that is, it can be any one of the firmware in the entire firmware package file.

[0057] S3. Receive firmware switching instruction, switch the firmware address in the boot address information area according to the firmware switching instruction, and then start the corresponding firmware according to the switched firmware address to realize firmware switching.

[0058] In this embodiment, the PLC can receive the user's firmware switching command and implement firmware switching. The PLC starts the corresponding firmware by switching the firmware address in the startup address information area to the firmware address in the firmware switching command, thereby achieving firmware switching.

[0059] At this point, step S3, which involves receiving a firmware switching instruction, switching the firmware address in the boot address information according to the firmware switching instruction, and then booting the corresponding firmware according to the switched firmware address, includes the following steps:

[0060] S31. Receive firmware switching instruction, and obtain the corresponding firmware address of the firmware to be switched from the firmware area of ​​the FLASH according to the firmware identifier of the firmware to be switched in the firmware switching instruction, and switch the firmware address in the boot address information area of ​​the FLASH according to the firmware address of the firmware to be switched.

[0061] In this embodiment, when the PLC receives the user's firmware switching instruction, it will obtain the identifier of the firmware to be switched from the firmware switching instruction, and then obtain the corresponding firmware address from the PLC according to the identifier of the firmware to be switched. Since the PLC runs according to the firmware address in the startup address information area, it will switch the firmware address in the startup address information area to the firmware address of the firmware to be switched.

[0062] If there are only two firmwares: a new firmware and an old firmware, then when switching from the new firmware to the old firmware, the new firmware will change the address in the startup address information area to the address of the old firmware. Then, after the PLC starts, it switches to the old firmware based on the address of the old firmware.

[0063] If there are multiple firmwares, they can be displayed by firmware name for users to select, or a corresponding switch key can be set for users to select, such as firmware 1, firmware 2, firmware 3 and so on. When the user selects firmware 2, the current firmware stores the address information of firmware 2 in the boot address information area, and then restarts to boot firmware 2.

[0064] S32. Restart the PLC and determine whether the firmware address in the boot address information area of ​​the FLASH is correct. If it is correct, obtain the firmware package corresponding to the firmware address, parse the firmware package to obtain firmware information, and perform legality authentication on the firmware to be switched based on the firmware information. When the firmware information is consistent with the firmware information of the firmware to be switched, unpack and decrypt the firmware package to generate an executable firmware to be switched and send the executable firmware to be switched to the ITCM for execution, start the firmware to be switched, and realize firmware switching.

[0065] In this embodiment, as Figure 3As shown, after the address in the startup address information area of ​​step S31 is switched to the firmware address of the firmware to be switched, the PLC will automatically restart. To achieve firmware switching, the firmware to be switched needs to be double-verified. First, the firmware address in the startup address information area of ​​the FLASH is judged. Only when the firmware address in the startup address information area of ​​the FLASH is correct will the firmware packet corresponding to the firmware address in the PLC be obtained according to the firmware address. The firmware information is obtained by parsing the firmware header in the firmware packet. The firmware to be switched is authenticated according to the firmware information. Only when the firmware information is consistent with the firmware information of the firmware to be switched is the authentication considered to be successful. At this time, the FLASH BIOS will unpack and decrypt the firmware packet, generate an executable firmware and send it to the ITCM (Instruction TCM) for execution, thereby realizing firmware switching.

[0066] At this point, determining whether the firmware address in the boot address information area of ​​the FLASH is correct in step S32 includes:

[0067] S321. If the process fails, the firmware information corresponding to the firmware address is obtained from the firmware address of the default firmware, and the default firmware is authenticated based on the firmware information. When the firmware information is consistent with the firmware information of the default firmware, an executable default firmware is generated and sent to the ITCM for execution to start the default firmware.

[0068] In this embodiment, after firmware switching or when the firmware is erased or has a bug, resulting in an incorrect firmware address in the boot address information of the FLASH, the firmware address of the default firmware will be automatically obtained. The corresponding firmware information will be obtained based on the firmware address to perform legality authentication on the default firmware. When the authentication is successful, an executable default firmware will be generated and sent to the ITCM for execution to start the default firmware.

[0069] In other words, for a PLC that can only use one firmware and requires multiple systems, all firmware versions are integrated into a single firmware package so that the PLC can download and store it. Switching between different firmware versions is then achieved by changing the address in the boot address information area. For example, if a customer wants to use the old system but is currently running the new system firmware, they only need to open the host computer configuration software and send a command to automatically restart the PLC and switch to the old system firmware; the customer only needs to wait a few seconds. Conversely, if the customer wants to use the new system but is currently running the old system firmware, they only need to open the host computer configuration software and send a command to automatically restart the PLC and switch to the new system firmware; the customer only needs to wait a few seconds.

[0070] Therefore, for customers, this embodiment only requires one type of PLC to meet their needs for two types of PLCs simultaneously; for developers, there is only one firmware image, and during production, only one type of PLC needs to be produced according to one firmware, making management more convenient. Moreover, only one firmware image needs to be released, which greatly improves efficiency in testing and release processes; finally, for customers who currently use older PLC systems, the ability to freely switch between the old and new PLC systems also helps promote the new PLC system.

[0071] Example 2

[0072] Please refer to Figure 4 A PLC upgrade device 1 includes a memory 3, a processor 2, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, it implements the steps in Embodiment 1 above.

[0073] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art can understand the specific structure and modifications of the systems / devices based on the methods described in the above embodiments of the present invention, and therefore will not be repeated here. All systems / devices used in the methods of the above embodiments of the present invention fall within the scope of protection of the present invention.

[0074] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0075] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions.

[0076] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims that enumerate several means, several of these means may be embodied by the same hardware. The use of the terms first, second, third, etc., is merely for convenience of expression and does not indicate any order. These terms can be understood as part of the component names.

[0077] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0078] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the claims should be interpreted to include both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0079] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.

Claims

1. A method for upgrading a PLC, characterized in that, include: Receive a firmware package file containing multiple firmware files, and store each firmware file in the firmware package file at its corresponding firmware address. Start one of the firmware to run the PLC; The firmware is switched by receiving a firmware switching instruction and switching the firmware address in the boot address information area according to the firmware switching instruction. Then, the corresponding firmware is started according to the switched firmware address to realize firmware switching. The firmware package file includes both old and new firmware files; The firmware package file is a merged file of multiple firmware files encrypted and packaged together. The step of storing each firmware file in the firmware package file at its corresponding firmware address includes: The firmware package file is downloaded to the upgrade area of ​​the FLASH. The firmware package file in the upgrade area is unpacked and decrypted by the BIOS of the FLASH to obtain each firmware in the firmware package file. Each firmware is encrypted and packaged according to the PLC's own parameters to generate a firmware package corresponding to each firmware. The firmware package is stored in the firmware area of ​​the FLASH and the corresponding firmware address is recorded.

2. The method for upgrading a PLC as described in claim 1, characterized in that, The process of receiving a firmware switching instruction, switching the firmware address in the boot address information area according to the firmware switching instruction, and then booting the corresponding firmware according to the switched firmware address, to achieve firmware switching includes: Receive firmware switching instructions, and obtain the corresponding firmware address of the firmware to be switched from the firmware area of ​​the FLASH according to the firmware identifier of the firmware to be switched in the firmware switching instructions, and switch the firmware address in the boot address information area of ​​the FLASH according to the firmware address of the firmware to be switched. Restart the PLC and determine whether the firmware address in the boot address information area of ​​the FLASH is correct. If it is correct, obtain the firmware package corresponding to the firmware address, parse the firmware package to obtain firmware information, and perform legality authentication on the firmware to be switched based on the firmware information. When the firmware information is consistent with the firmware information of the firmware to be switched, unpack and decrypt the firmware package to generate an executable firmware to be switched and send the executable firmware to be switched to the ITCM for execution, start the firmware to be switched, and realize firmware switching.

3. The PLC upgrade method as described in claim 2, characterized in that, The step of determining whether the firmware address in the boot address information of the FLASH is correct also includes: If the process fails, the firmware information corresponding to the firmware address is obtained from the firmware address of the default firmware, and the default firmware is authenticated based on the firmware information. When the firmware information matches the firmware information of the default firmware, an executable default firmware is generated and sent to the ITCM for execution to start the default firmware.

4. A PLC upgrade device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it performs the following steps: Receive a firmware package file containing multiple firmware files, and store each firmware file in the firmware package file at its corresponding firmware address. Start one of the firmware to run the PLC; The firmware is switched by receiving a firmware switching instruction and switching the firmware address in the boot address information area according to the firmware switching instruction. Then, the corresponding firmware is started according to the switched firmware address to realize firmware switching. The firmware package file includes both old and new firmware files; The firmware package file is a merged file of multiple firmware files encrypted and packaged together. The step of storing each firmware file in the firmware package file at its corresponding firmware address includes: The firmware package file is downloaded to the upgrade area of ​​the FLASH. The firmware package file in the upgrade area is unpacked and decrypted by the BIOS of the FLASH to obtain each firmware in the firmware package file. Each firmware is encrypted and packaged according to the PLC's own parameters to generate a firmware package corresponding to each firmware. The firmware package is stored in the firmware area of ​​the FLASH and the corresponding firmware address is recorded.

5. The PLC upgrade device as described in claim 4, characterized in that, The process of receiving a firmware switching instruction, switching the firmware address in the boot address information area according to the firmware switching instruction, and then booting the corresponding firmware according to the switched firmware address, to achieve firmware switching includes: Receive firmware switching instructions, and obtain the corresponding firmware address of the firmware to be switched from the firmware area of ​​the FLASH according to the firmware identifier of the firmware to be switched in the firmware switching instructions, and switch the firmware address in the boot address information area of ​​the FLASH according to the firmware address of the firmware to be switched. Restart the PLC and determine whether the firmware address in the boot address information of the FLASH is correct. If it is, obtain the firmware package corresponding to the firmware address, parse the firmware package to obtain firmware information, and perform legality authentication on the firmware to be switched based on the firmware information. When the firmware information is consistent with the firmware information of the firmware to be switched, unpack and decrypt the firmware package to generate an executable firmware to be switched and send the executable firmware to be switched to the ITCM for execution, start the firmware to be switched, and realize firmware switching.

6. The PLC upgrade device as described in claim 5, characterized in that, The step of determining whether the firmware address in the boot address information of the FLASH is correct also includes: If the process fails, the firmware information corresponding to the firmware address is obtained from the firmware address of the default firmware, and the default firmware is authenticated based on the firmware information. When the firmware information matches the firmware information of the default firmware, an executable default firmware is generated and sent to the ITCM for execution to start the default firmware.

Citation Information

Patent Citations

  • System with firmware and starting method thereof

    CN101571807A