CN115454465A - Automatic updating method of CPLD firmware - Google Patents

Automatic updating method of CPLD firmware Download PDF

Info

Publication number
CN115454465A
CN115454465A CN202210965554.XA CN202210965554A CN115454465A CN 115454465 A CN115454465 A CN 115454465A CN 202210965554 A CN202210965554 A CN 202210965554A CN 115454465 A CN115454465 A CN 115454465A
Authority
CN
China
Prior art keywords
firmware
cpld
updating
new version
automatic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210965554.XA
Other languages
Chinese (zh)
Other versions
CN115454465B (en
Inventor
万梦佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Nexsec Internet Co ltd
Original Assignee
Beijing Nexsec Internet 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 Beijing Nexsec Internet Co ltd filed Critical Beijing Nexsec Internet Co ltd
Priority to CN202210965554.XA priority Critical patent/CN115454465B/en
Publication of CN115454465A publication Critical patent/CN115454465A/en
Application granted granted Critical
Publication of CN115454465B publication Critical patent/CN115454465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

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

Abstract

The invention provides an automatic updating method of CPLD firmware, which can automatically screen the CPLD firmware to match with correct CPLD firmware, and can also lead a client to select to update in the idle time period of a server, and an automatic updating program can automatically judge the adaptive CPLD firmware by additionally selecting CPLD versions in an updating mechanism, thereby being more suitable for different clients and mainboards, setting the inspection of the built-in safety marks of the CPLD firmware and avoiding the false updating. The invention improves the efficiency of updating the CPLD firmware on a large scale, is convenient and simple to operate compared with a burning jig, does not need personnel to participate in the whole firmware updating process on the server deployment site, effectively reduces the operation cost of a client, is suitable for a large number of client systems to participate in automatic updating at the same time, has wider application range, and can ensure that a user can experience new functions at the first time by automatic updating in time.

Description

Automatic updating method of CPLD firmware
Technical Field
The invention relates to the technical field of electric digital data processing, in particular to an automatic updating method of CPLD firmware.
Background
The Complex Programmable Logic Device (CPLD) is developed from PAL and GAL Logic devices, and has relatively large scale and Complex structure, and belongs to the field of large scale integrated circuit. The CPLD allows devices to adapt accordingly to support multiple protocols and to change functionality as standards and protocols evolve. This provides great convenience to system designers, since they can proceed with hardware design before the standard has fully matured and then modify the code to meet the requirements of the final standard. The speed and delay characteristics of CPLDs are better than pure software solutions, which allows as much of the software-implementable logic to be handled using CPLDs as possible, and also means that updates to the CPLD firmware will be more frequent.
The current CPLD firmware updating method comprises the following steps:
(1) Locally updating CPLD through jig
The off-line burning is carried out by directly placing the chip in the socket of the burning jig, the operation is simple, but the CPLD chip is repeatedly plugged and welded, and the chip is easily damaged.
(2) Online updating of CPLD through downloader
The online burning is carried out by connecting the download cable with a standard USB PC port, compared with a burning jig, the burning jig is quicker, JTAG pins are required to be reserved on a circuit board, a downloader is required, the steps are complicated, and tools are complex.
(3) CPLD (complex programmable logic device) local online updating system
The updating operation is executed on the CPLD through the JTAG port, so that the expenses of a jig, a downloader and the like are saved, but the method can only be used for one-to-one upgrading on site, and the efficiency is not high.
(4) Remote updating of CPLD
A user remotely updates the instruction of the CPLD through a firmware updating tool, the defect that the CPLD can only be updated on site is overcome, manual intervention is still needed to sequentially update the instruction of different client systems, and the efficiency is still low.
After the CPLD functions of a large number of motherboards are updated, the prior art can realize that a user remotely updates the CPLD firmware by himself, but the efficiency is still not effectively improved for a large number of motherboards, and only one instruction can be given for one; in addition, in the face of motherboards of various models and different customers, the corresponding CPLD firmware is very complicated, and the CPLD firmware to be upgraded needs to be manually searched and confirmed, so that error brushing is easily caused, and even the mainboard is damaged; after the CPLD function is updated, the user often does not know the new function at the first time, and experiences the new function brought by the update as soon as possible, and if the host board can automatically detect whether the CPLD is updated at present in the server, and automatically matches the corresponding CPLD firmware according to the configured update rule to automatically perform the CPLD update operation, the host board can be updated in parallel in a large amount without manual intervention, so that the efficiency is improved, and the user experience is improved.
Therefore, a method for automatically updating the firmware of the CPLD is needed.
Disclosure of Invention
The invention aims to solve the problem of updating efficiency of CPLD, and provides an automatic updating method of CPLD firmware, which is more suitable for different customers and mainboards by newly adding CPLD version selection in an updating mechanism, and an automatic updating program can automatically judge the adaptive CPLD firmware, and simultaneously, the checking of the built-in safety mark of the CPLD firmware is set, thereby avoiding false refreshing, and the customers can select to update in the idle time period of a server. The invention improves the efficiency of updating the CPLD firmware on a large scale, is convenient and simple to operate compared with a burning jig, does not need personnel to participate in the whole firmware updating process on the server deployment site, effectively reduces the operation cost of a client, is suitable for a large number of client systems to participate in automatic updating at the same time, has wider application range, and can ensure that a user can experience new functions at the first time by automatic updating in time.
The invention provides an automatic updating method of CPLD firmware, which comprises the following steps:
s1, a user configures an automatic updating rule, wherein the automatic updating rule comprises whether an automatic updating function is started or not, if the user selects yes, the step S2 is carried out, and if the user selects no, the automatic updating is not carried out;
s2, running an automatic updating process after the client system is powered on, wherein the automatic updating process comprises the following steps: a firmware acquisition process, a firmware analysis process and a firmware update process;
s3, the firmware acquisition process starts to operate, the client system acquires a release file containing firmware updating information from the CPLD remote server and analyzes the release file, whether the CPLD firmware updating is needed or not is judged, if yes, the step S4 is carried out, and if not, the release file is acquired again;
s4, the firmware acquisition process downloads the current latest new version CPLD firmware from the CPLD remote server according to the IP address of the CPLD remote server and stores the current latest new version CPLD firmware in the position of a readable and writable memory of the client system for storing the CPLD firmware, and the firmware acquisition process is completed;
s5, the client system checks whether the firmware of the CPLD of the new version is complete, and if so, the step S6 is carried out; if not, removing the CPLD firmware of the new version, and returning to the step S4;
if the accumulated three times are negative, adding the new version CPLD firmware into the automatic updating rule blacklist, and returning to the step S3;
s6, starting the firmware analysis process, analyzing the new version CPLD firmware by the firmware analysis process and judging whether to update the firmware, if so, entering a step S7, if not, adding the version number of the new version CPLD firmware into an automatic update rule blacklist, removing the new version CPLD firmware stored in the read-write memory, and returning to the step S3;
s7, if the user selects to start the function of the user before updating in the automatic updating rule, the client system runs a firmware updating process and informs the user that the CPLD firmware of the new version is downloaded; judging whether the customer selects self-updating, if so, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3; if not, entering step S8;
s8, the firmware analysis process analyzes the new version of the CPLD firmware, the local CPLD chip information is obtained through the firmware updating circuit, whether the new version of the CPLD firmware can be used for updating the local CPLD chip is judged, if yes, the step S9 is executed, and the firmware analysis process is completed; if not, adding the version number of the new version CPLD firmware into an automatic update rule blacklist, removing the new version CPLD firmware stored in the read-write memory, and returning to the step S3;
s9, a firmware updating process runs, the firmware updating process judges whether the client system is idle, if so, the updating state is set to be started, the step S10 is entered, if not, the updating state is set to be waiting, and whether the client system is idle is continuously judged until the client system is idle;
s10, writing the firmware data analyzed in the step S8 into a local CPLD chip through a firmware updating circuit by a firmware updating process, updating and returning firmware updating response information, judging whether the updating response is successful or not by the firmware updating process, if so, continuing to update, if not, re-executing the writing of the firmware updating circuit and starting counting, and continuing to judge whether the updating response is successful or not; if the successful updating response information is not accumulated for three times, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist;
if the user selects to send the update message in the automatic update rule, notifying the user that the CPLD firmware update fails;
returning to the step S3;
s11, reading the version of the CPLD firmware updated by the local CPLD chip through the firmware updating circuit in the automatic updating process, and determining whether the version is the version of the new version of the CPLD firmware;
if the user selects to send the update message in the automatic update rule, informing the user that the automatic update of the current version CPLD firmware is completed;
returning to the step S3, and continuing to perform automatic updating.
As a preferable mode, the method for automatically updating CPLD firmware according to the present invention further includes, between step S5 and step S6, step S i:
s I, starting a firmware analysis process, analyzing a safety mark built in the firmware of the new version CPLD by the firmware analysis process, judging whether the safety mark is correct or not, and if so, entering a step S6; if not, adding the version number of the new version CPLD firmware into the automatic update rule blacklist, removing the new version CPLD firmware stored in the read-write memory, sending information to remind a user by the update message sending function, and returning to the step S3.
In the method for automatically updating the CPLD firmware according to the present invention, as a preferred mode, if the safety flag is incorrect in step S6, the unknown firmware is mixed into the new CPLD firmware.
As a preferred mode, in step S1, the automatic updating rule further comprises the IP address, the updating time, the updating message sending, the host model, the client information and the blacklist of the CPLD remote server.
As a preferred mode, the updating message sending comprises whether to notify the user before updating, whether to notify the user when the safety mark of the new CPLD firmware version is wrong, and whether to notify the user after updating.
As a preferred mode, in step S3, the method for determining whether to update the CPLD firmware includes: after the release file is successfully analyzed, the firmware acquisition process searches whether the release file contains the host model or the client information of the client system, whether the new version CPLD firmware is not in the automatic update rule blacklist, and if the new version CPLD firmware is not in the automatic update rule blacklist, the CPLD firmware needs to be updated; if one is not, then no CPLD firmware update is required.
The invention relates to an automatic updating method of CPLD firmware, which is characterized in that in a preferred mode, in step S6, a method for judging whether to automatically update a firmware analysis process is as follows: if the version number of the new version CPLD firmware is newer than that of the local CPLD chip and the timestamp of the new version CPLD firmware is newer than that of the CPLD chip on the client system, updating is needed; if either item is false, no update is required.
As a preferred mode, in step S9, the firmware update circuit includes but is not limited to SPI, I2C, and JTAG.
The invention relates to an automatic updating method of CPLD firmware, which is characterized in that in a preferred mode, in step S9, a method for judging whether new version CPLD firmware can be used for updating a local CPLD chip is as follows: and comparing the analyzed new version CPLD firmware with the local CPLD chip information and then judging.
In the method for automatically updating the firmware of the CPLD, as a preferred mode, in step S2, at least two client systems are provided, and each client system performs steps S3 to S12 at the same time.
The invention reads and analyzes the latest release file of the remote server according to the user configuration automatic update rule through the firmware acquisition process on the client system, determines whether the firmware is matched with a mainboard, acquires the new version CPLD firmware of the remote server if the firmware is matched, stores the position of the CPLD firmware in the read-write memory, verifies the CPLD firmware, analyzes the safety mark built in the firmware, judges whether the current new version CPLD firmware is updated compared with the self firmware version of the CPLD chip on the client system if the firmware is matched, analyzes the CPLD firmware through the CPLD firmware analysis process on the client system if the firmware is idle, inquires whether the client system is idle, updates the CPLD chip through the firmware update process on the client system, returns update response information, finally confirms the updated CPLD firmware version, and sends the update result to the user.
The invention has the following advantages:
(1) The method improves the efficiency of updating the CPLD firmware in a large scale, is more convenient and simpler than the operation of using a burning jig, does not need personnel to participate in the whole firmware updating process on the server deployment site, and effectively reduces the operation cost of customers.
(2) The invention enables the automatic updating program to automatically judge the adaptive CPLD firmware by newly adding the selection of the CPLD version in the updating mechanism, is more suitable for different customers and mainboards, and enables a user to experience new functions at the first time; the check of the safety mark built in the CPLD firmware is set, so that the CPLD firmware can be effectively prevented from being replaced by unknown firmware after the server is attacked, and the mistaken brushing is avoided; meanwhile, the client can select to update in the idle time period of the server, so that the method is faster and more flexible, and the service of the client running on the server is not influenced.
(3) The invention is suitable for automatic upgrading of a large number of client systems at the same time, and has wider application range.
Drawings
FIG. 1 is a flow chart of a method for automatically updating CPLD firmware;
fig. 2 is a block diagram of a method for automatically updating firmware of a CPLD.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
Example 1
As shown in fig. 1-2, an automatic updating method of CPLD firmware includes the following steps:
s1, a user configures an automatic updating rule, wherein the automatic updating rule comprises whether an automatic updating function is started or not, if the user selects yes, the step S2 is carried out, and if the user selects no, the automatic updating is not carried out;
the automatic updating rule also comprises an IP address of the CPLD remote server, updating time, updating message sending, host model, client information and a blacklist list, wherein the updating message sending comprises whether to notify a user before updating, whether to notify the user when a safety mark of a new version CPLD firmware is wrong, and whether to notify the user after updating;
s2, running an automatic updating process after the client system is powered on, wherein the automatic updating process comprises the following steps: a firmware acquisition process, a firmware analysis process and a firmware update process; at least two client systems are provided, and each client system simultaneously performs the steps S3 to S12;
s3, the firmware acquisition process starts to operate, the client system acquires a release file containing firmware updating information from the CPLD remote server and analyzes the release file, whether the CPLD firmware updating is needed or not is judged, if yes, the step S4 is carried out, and if not, the release file is acquired again;
the method for judging whether the CPLD firmware needs to be updated comprises the following steps: after the release file is successfully analyzed, the firmware acquisition process searches whether the release file contains the host model or the client information of the client system, whether the new version CPLD firmware is not in the automatic update rule blacklist, and if the new version CPLD firmware is not in the automatic update rule blacklist, the CPLD firmware needs to be updated; if one item is not the case, updating the CPLD firmware is not needed;
s4, downloading the current latest new version CPLD firmware from the CPLD remote server by the firmware acquisition process according to the IP address of the CPLD remote server and storing the firmware at the position of storing the CPLD firmware in the readable and writable memory of the client system, and finishing the firmware acquisition process;
s5, the client system checks whether the firmware of the CPLD of the new version is complete, and if so, the step S I is carried out; if not, removing the CPLD firmware of the new version, and returning to the step S4;
if the three accumulative times are no, adding the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3;
s I, starting a firmware analysis process, analyzing a safety mark built in the firmware of the new version CPLD by the firmware analysis process, judging whether the safety mark is correct or not, and if so, entering a step S6; if not, adding the version number of the new version CPLD firmware into an automatic update rule blacklist, removing the new version CPLD firmware stored in the read-write memory, sending information to remind a user by an update message sending function, and returning to the step S3;
if the safety mark is wrong, unknown firmware is mixed into the new version CPLD firmware;
s6, the firmware analysis process judges whether to update the firmware, if so, the step S7 is carried out, if not, the version number of the new version CPLD firmware is added into an automatic update rule blacklist, the new version CPLD firmware stored in the read-write memory is removed, and the step S3 is returned;
the method for judging whether to automatically update the firmware analysis process comprises the following steps: if the version number of the new version CPLD firmware is newer than the firmware version number of the local CPLD chip and the timestamp of the new version CPLD firmware is newer than the timestamp of the CPLD chip on the client system, the new version CPLD firmware needs to be updated; if any item is negative, updating is not needed;
s7, if the user selects to start the function of the user before updating in the automatic updating rule, the client system runs a firmware updating process and informs the user that the CPLD firmware of the new version is downloaded; judging whether the customer selects self-updating, if so, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3; if not, the step S8 is carried out;
s8, the firmware analysis process analyzes the new version of the CPLD firmware, the local CPLD chip information is obtained through the firmware updating circuit, whether the new version of the CPLD firmware can be used for updating the local CPLD chip is judged, if yes, the step S9 is executed, and the firmware analysis process is completed; if not, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, removing the new version CPLD firmware stored in the read-write memory, and returning to the step S3;
firmware update circuitry including but not limited to SPI, I2C, and JTAG;
the method for judging whether the new version CPLD firmware can be used for updating the local CPLD chip comprises the following steps: comparing the analyzed new version CPLD firmware with the local CPLD chip information and then judging;
s9, a firmware updating process runs, the firmware updating process judges whether the client system is idle, if so, the updating state is set to be started, the step S10 is entered, if not, the updating state is set to be waiting, and whether the client system is idle is continuously judged until the client system is idle;
s10, writing the firmware data analyzed in the step S8 into a local CPLD chip through a firmware updating circuit by a firmware updating process, updating and returning firmware updating response information, judging whether the updating response is successful or not by the firmware updating process, if so, continuing to update, if not, re-executing the writing of the firmware updating circuit and starting counting, and continuing to judge whether the updating response is successful or not; if the successful updating response information is not accumulated for three times, adding the version number of the new version CPLD firmware into an automatic updating rule blacklist;
if the user selects to send the update message in the automatic update rule, notifying the user that the CPLD firmware update fails;
returning to the step S3;
s11, reading the version of the CPLD firmware updated by the local CPLD chip through the firmware updating circuit in the automatic updating process, and determining whether the version is the version of the new version of the CPLD firmware;
if the user selects to send the update message in the automatic update rule, informing the user that the automatic update of the CPLD firmware of the current version is completed;
returning to the step S3, the automatic updating is continued.
Example 2
As shown in fig. 1-2, the invention relates to an automatic updating method of CPLD firmware, which comprises two parts, namely a remote server (1) and a client system (2), wherein the client system (2) is divided into an SOC automatic updating process (3), a firmware updating circuit (SPI/I2C/jtag.) (4), a CPLD chip (5) and a readable and writable memory (6).
The control logic of the invention is as follows:
(1) The user configures an automatic updating rule, the IP address of the CPLD remote server, updating time, updating message sending, the model of the host, customer information, a blacklist list, whether to start an automatic updating function, whether to notify the user before updating and the like;
(2) When the automatic updating function is started in the automatic updating rule configured by the user, the client system (2) starts to run the automatic updating process (3) after being powered on. The automatic updating process (3) can be divided into 3 sub-processes of a firmware acquisition process, a firmware analysis process and a firmware updating process;
(3) The operating firmware acquisition process on the client system (2) acquires a release file containing firmware update information from the remote server (1) through an automatic update rule configured by a user, analyzes the release file, judges whether CPLD firmware update information matched with the host model, the client information and the like exists, if the release file is analyzed successfully and available CPLD firmware of a new version which is not in an automatic update rule blacklist exists, the step (4) is executed, otherwise, the step (3) is executed;
(4) The automatic updating process (3) of the client system (2) starts a firmware acquiring process to download the current latest CPLD firmware from a remote server, stores the current latest CPLD firmware in the position of a readable and writable memory (6) for storing the CPLD firmware, the automatic updating process (3) finishes the firmware acquiring process and simultaneously checks the integrity of the version of the CPLD firmware, if the firmware is checked to be correct, the step (5) is executed, if the firmware is checked to be correct, the current CPLD firmware in the position of the CPLD firmware stored in the readable and writable memory (6) is removed, the step (4) is skipped, and after repeating for 3 times and still failing, the CPLD firmware is added into a blacklist list, and then the step (3) is skipped;
(5) And (3) starting the CPLD firmware analysis process to analyze the new version of the CPLD firmware by the automatic update process (3) of the client system (2), analyzing a safety mark built in the firmware, avoiding unknown or tampered firmware from being mixed into the firmware to threaten the safety of the host, if the safety mark is correct, continuing to execute the step (6), if the safety mark is wrong, adding the version of the firmware into a blacklist list, removing the CPLD firmware stored in the position of the CPLD firmware stored in the read-write memory (6), and sending the information to remind a user by an update message sending function in an automatic update rule configured by the user.
(6) The firmware analysis process judges whether the CPLD firmware needs to be updated according to whether the firmware version number of the CPLD firmware update information is larger than the firmware version number of a CPLD chip on the client system (2); meanwhile, checking the CPLD firmware generation timestamp, judging whether the CPLD firmware generation timestamp is more updated than the time stamp of the existing CPLD firmware, if so, continuing the step (7), otherwise, adding the CPLD firmware into a blacklist list, removing the CPLD firmware stored in the position of the readable and writable memory (6) for storing the CPLD firmware, and jumping to the step (3);
(7) When the function of informing the user before updating is started in the automatic updating rule configured by the user, a firmware updating process is operated on the client system (2) to inform the user that the latest CPLD firmware is downloaded, if the user selects to update by himself, the version of the CPLD firmware is added into a blacklist, and then the step (3) is executed. Otherwise, executing step (8);
(8) The CPLD firmware analysis process of the client system (2) analyzes the CPLD firmware in the position where the CPLD firmware is stored in the read-write memory (6); obtaining the information of a local CPLD chip (5) through a firmware updating circuit (SPI/I2C/JTAG.) (4), comparing the information with the analyzed CPLD firmware information, confirming that the CPLD firmware can be used for updating the CPLD chip (5), continuing the step (9), if the comparison fails, adding the CPLD firmware into a blacklist list, removing the CPLD firmware stored in the position of the read-write memory (6) for storing the CPLD firmware, and jumping to the step (3);
(9) And (3) judging whether the client system (2) is in an idle state or not by the CPLD firmware updating process of the client system (2), if so, setting the updating state to be started, and continuing the step (10), otherwise, setting the updating state to be waiting until the client system (2) is in the idle state or is restarted, and continuing the step (10).
(10) Writing the analyzed firmware data into a CPLD chip (5) by a CPLD firmware updating process of the client system (2) through a firmware updating circuit (SPI/I2C/JTAG.) (4), updating, returning firmware updating response information, continuing the step (11) if the firmware updating process judges that the response information is successful, otherwise repeating the step (10) for 3 times, if the response information still fails, adding the CPLD firmware into a blacklist list, removing the CPLD firmware stored in a read-write memory (6) for storing the CPLD firmware, then informing a user of failure in updating the CPLD firmware according to an updating message sending function in an automatic updating rule configured by the user, and jumping to the step (3);
(11) The client system (2) automatically updates the process (3) by reading the version of the currently updated CPLD firmware of the CPLD chip (5) through the firmware update circuit (SPI/I2C/JTAG.) (4), confirms whether the CPLD firmware is the currently updated version, sends the CPLD update result to the user according to the update message sending function in the automatic update rule configured by the user, and jumps to the step (3).
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered as the technical solutions and the inventive concepts of the present invention within the technical scope of the present invention.

Claims (10)

1. A CPLD firmware automatic updating method is characterized in that: the method comprises the following steps:
s1, configuring an automatic updating rule by a user, wherein the automatic updating rule comprises whether an automatic updating function is started or not, if the user selects yes, entering a step S2, and if the user selects no, not performing automatic updating;
s2, running an automatic updating process after the client system is electrified, wherein the automatic updating process comprises the following steps: a firmware acquisition process, a firmware analysis process and a firmware update process;
s3, the firmware acquisition process starts to operate, the client system acquires a release file containing firmware updating information from the CPLD remote server and analyzes the release file, whether the CPLD firmware updating is needed or not is judged, if yes, the step S4 is carried out, and if not, the release file is acquired again;
s4, the firmware acquisition process downloads the current latest new version CPLD firmware from the CPLD remote server according to the IP address of the CPLD remote server and stores the latest new version CPLD firmware in the position of a read-write memory of the client system for storing the CPLD firmware, and the firmware acquisition process is completed;
s5, the client system checks whether the firmware of the new version CPLD is complete, and if so, the step S6 is executed; if not, removing the new version CPLD firmware, and returning to the step S4;
if the accumulated three times are negative, adding the new version CPLD firmware into an automatic updating rule blacklist, and returning to the step S3;
s6, the firmware analysis process is started, the firmware analysis process analyzes the new version CPLD firmware and judges whether the firmware is updated, if yes, the step S7 is carried out, if not, the version number of the new version CPLD firmware is added into the automatic update rule blacklist, the new version CPLD firmware stored in the read-write memory is removed, and the step S3 is returned;
s7, if the user selects to start the function of the user before updating in the automatic updating rule, the client system runs a firmware updating process and informs the user that the new version CPLD firmware is downloaded; judging whether the customer selects self-updating, if so, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, and returning to the step S3; if not, the step S8 is carried out;
s8, the firmware analysis process analyzes the new version CPLD firmware, local CPLD chip information is obtained through a firmware updating circuit, whether the new version CPLD firmware can be used for updating the local CPLD chip is judged, if yes, the step S9 is executed, and the firmware analysis process is completed; if not, adding the version number of the new version CPLD firmware into the automatic update rule blacklist, removing the new version CPLD firmware stored in the read-write memory, and returning to the step S3;
s9, the firmware updating process runs, the firmware updating process judges whether the client system is idle, if yes, the updating state is set to be started, the step S10 is carried out, if not, the updating state is set to be waiting, and whether the client system is idle is continuously judged until the client system is idle;
s10, the firmware updating process writes the firmware data analyzed in the step S8 into the local CPLD chip through the firmware updating circuit, updates and returns firmware updating response information, the firmware updating process judges whether the updating response is successful, if so, the updating is continued, if not, the firmware updating circuit is re-executed to write and start counting, and whether the updating response is successful is continuously judged; when the successful updating response information is accumulated for three times, the version number of the new version CPLD firmware is added into the automatic updating rule blacklist;
if the user selects the updating message to send in the automatic updating rule, notifying the user that the CPLD firmware updating fails;
returning to the step S3;
s11, the automatic updating process reads the version of the CPLD firmware updated by the local CPLD chip through the firmware updating circuit and confirms whether the version is the version of the new version of the CPLD firmware;
if the user selects to send the update message in the automatic update rule, informing the user that the automatic update of the current version CPLD firmware is completed;
returning to the step S3, the automatic updating is continued.
2. The method according to claim 1, wherein: step S5 and step S6 also include step SI:
the method comprises the following steps that S I, when the firmware of the new version CPLD is complete, the firmware analysis process is started, analyzes a safety mark built in the firmware of the new version CPLD and judges whether the safety mark is correct or not, and if yes, the step S6 is executed; if not, adding the version number of the new version CPLD firmware into the automatic updating rule blacklist, removing the new version CPLD firmware stored in the read-write memory, sending information to remind a user by an updating message sending function, and returning to the step S3.
3. The method according to claim 2, wherein: in step S i, if the security flag is incorrect, an unknown firmware is mixed into the new version CPLD firmware.
4. The method according to claim 1, wherein: in step S1, the automatic update rule further includes an IP address of the CPLD remote server, update time, update message transmission, a host model, customer information, and a blacklist.
5. The method according to claim 4, wherein: the updating message sending comprises whether the user is informed before updating, whether the user is informed when the safety mark of the new CPLD firmware version is wrong, and whether the user is informed after updating.
6. The method according to claim 1, wherein: in step S3, the method for determining whether CPLD firmware update is required is: after the release file is successfully analyzed, the firmware acquisition process searches whether the release file contains the host model or the client information of the client system or not, whether the new version CPLD firmware is not in the automatic update rule blacklist or not, and if the new version CPLD firmware is not in the automatic update rule blacklist, the CPLD firmware needs to be updated; if one is not, then no CPLD firmware update is required.
7. The method according to claim 1, wherein: in step S6, the method for the firmware parsing process to determine whether to perform automatic update includes: if the version number of the new version CPLD firmware is newer than the firmware version number of the local CPLD chip and the timestamp of the new version CPLD firmware is newer than the timestamp of the CPLD chip on the client system, updating is needed; if either item is false, no update is required.
8. The method according to claim 1, wherein: in step S8, the firmware update circuit includes, but is not limited to, SPI, I2C, and JTAG.
9. The method according to claim 1, wherein: in step S8, the method for determining whether the new version CPLD firmware is available for updating the local CPLD chip is: and comparing the analyzed new version CPLD firmware with the information of the local CPLD chip and then judging.
10. The method according to claim 1, wherein: in step S2, there are at least two client systems, and each client system performs steps S3 to S12 at the same time.
CN202210965554.XA 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware Active CN115454465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210965554.XA CN115454465B (en) 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210965554.XA CN115454465B (en) 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware

Publications (2)

Publication Number Publication Date
CN115454465A true CN115454465A (en) 2022-12-09
CN115454465B CN115454465B (en) 2023-04-25

Family

ID=84297726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210965554.XA Active CN115454465B (en) 2022-08-12 2022-08-12 Automatic updating method of CPLD firmware

Country Status (1)

Country Link
CN (1) CN115454465B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674590A (en) * 2009-09-29 2010-03-17 中兴通讯股份有限公司 Client device and remote updating method and remote updating service system thereof
CN102662699A (en) * 2012-03-27 2012-09-12 惠州Tcl移动通信有限公司 Method for updating NFC (Near Field Communication) firmware of mobile terminal and mobile terminal
US20170192768A1 (en) * 2016-01-05 2017-07-06 Inventec (Pudong) Technology Corporation Updating system of firmware of complex programmable logic device and updating method thereof
CN106970778A (en) * 2017-03-20 2017-07-21 中国科学院长春光学精密机械与物理研究所 A kind of Configuration Online method and system of the embedded device based on FPGA
CN110515641A (en) * 2019-08-30 2019-11-29 西安易朴通讯技术有限公司 The update method of server firmware, apparatus and system
CN111966371A (en) * 2020-07-25 2020-11-20 苏州浪潮智能科技有限公司 Method, system, device and storage medium for avoiding error in updating CPLD version
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware
CN113703792A (en) * 2021-08-18 2021-11-26 苏州浪潮智能科技有限公司 Firmware remote upgrade test method, device, server and medium
CN114115984A (en) * 2021-12-10 2022-03-01 百信信息技术有限公司 Server firmware upgrading method, storage device and terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674590A (en) * 2009-09-29 2010-03-17 中兴通讯股份有限公司 Client device and remote updating method and remote updating service system thereof
CN102662699A (en) * 2012-03-27 2012-09-12 惠州Tcl移动通信有限公司 Method for updating NFC (Near Field Communication) firmware of mobile terminal and mobile terminal
US20170192768A1 (en) * 2016-01-05 2017-07-06 Inventec (Pudong) Technology Corporation Updating system of firmware of complex programmable logic device and updating method thereof
CN106970778A (en) * 2017-03-20 2017-07-21 中国科学院长春光学精密机械与物理研究所 A kind of Configuration Online method and system of the embedded device based on FPGA
CN110515641A (en) * 2019-08-30 2019-11-29 西安易朴通讯技术有限公司 The update method of server firmware, apparatus and system
CN111966371A (en) * 2020-07-25 2020-11-20 苏州浪潮智能科技有限公司 Method, system, device and storage medium for avoiding error in updating CPLD version
CN112148326A (en) * 2020-08-31 2020-12-29 山东省科学院自动化研究所 Remote updating method, device and system for Internet of things equipment firmware
CN113703792A (en) * 2021-08-18 2021-11-26 苏州浪潮智能科技有限公司 Firmware remote upgrade test method, device, server and medium
CN114115984A (en) * 2021-12-10 2022-03-01 百信信息技术有限公司 Server firmware upgrading method, storage device and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
穆超等: "基于数字证书识别及校验的物联网固件安全检测系统的设计与实现" *

Also Published As

Publication number Publication date
CN115454465B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN105209925A (en) Implementing edit and update functionality within a development environment used to compile test plans for automated semiconductor device testing
CN103309693A (en) Complex programmable logic device updating method and system
CN112231228A (en) Firmware upgrade test method, device, platform, equipment and storage medium
CN108073738B (en) GPIO (general purpose input/output) verification system and method
CN109002305A (en) A kind of update method and its system of device program
CN115454465A (en) Automatic updating method of CPLD firmware
CN109582334B (en) Upgrading method and device for programmable logic device
CN111104270A (en) Hardware configuration detection device and equipment of storage equipment and storage medium
CN107203471B (en) Joint debugging method, service platform and computer storage medium
CN113076140B (en) GPIO (general purpose input/output) configuration detection method and device and server
CN115373710A (en) Vehicle OTA upgrade control method and device, vehicle and storage medium
CN112765041A (en) Game automatic testing method and device and electronic equipment
CN110647343B (en) OpenPower server and system deployment method thereof
CN111858198A (en) Multi-scheme memory plugging test method, system, terminal and storage medium
CN111338677A (en) Component and drive association validity verification method, system, terminal and storage medium
CN113452550A (en) Information acquisition device, firmware updating method and system of embedded system device
CN111949278B (en) Method, system, terminal and storage medium for automatically installing MCS system
CN104102517B (en) The circuit and wiring method of basic input output system program code is written
JP2002077071A (en) Automatic fault diagnosis and correction method for private wireless network
CN116932010B (en) System firmware upgrading method, device and server
CN111966387B (en) Firmware upgrading method, device, equipment and storage medium of NTB card
CN114793196B (en) Firmware upgrading method, device, equipment and storage medium
CN117742757A (en) Multi-terminal management equipment upgrading method and device
CN113971035A (en) Method for checking differential upgrade package and computer equipment
CN117056161A (en) Cabinet overhauling method, system, electronic setting and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant