[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114281390A - Zynq 7000-based online upgrading system and method - Google Patents

Zynq 7000-based online upgrading system and method Download PDF

Info

Publication number
CN114281390A
CN114281390A CN202210099027.5A CN202210099027A CN114281390A CN 114281390 A CN114281390 A CN 114281390A CN 202210099027 A CN202210099027 A CN 202210099027A CN 114281390 A CN114281390 A CN 114281390A
Authority
CN
China
Prior art keywords
file
application program
upgrading
upgrade
monitoring application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210099027.5A
Other languages
Chinese (zh)
Inventor
黄威
郭志品
夏龙
姜涛
熊晶洲
杨笑天
柯鸿飞
卢安军
刘宏
刘欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CASIC Rocket Technology Co
Original Assignee
CASIC Rocket Technology Co
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 CASIC Rocket Technology Co filed Critical CASIC Rocket Technology Co
Priority to CN202210099027.5A priority Critical patent/CN114281390A/en
Publication of CN114281390A publication Critical patent/CN114281390A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of computers, and discloses an online upgrading system and method based on Zynq 7000. The system comprises a control host, a control intermediate machine and a plurality of target devices; the control host and the control intermediate machine are connected through an Ethernet, and the control intermediate machine and the target equipment are connected through a CAN bus; the control host sends an upgrade command and an upgrade data packet to the target equipment through the control intermediate machine; and the target equipment enters an upgrading state according to the upgrading command and upgrades the bit stream file, the peripheral equipment drive and the application program in the equipment system through the upgrading data packet. The technical scheme of the embodiment of the application has the advantages of simplicity in use, strong universality, simplified upgrading content, more reliable and faster upgrading and the like.

Description

Zynq 7000-based online upgrading system and method
Technical Field
The application relates to the technical field of computers, in particular to an online upgrading system and method based on Zynq 7000.
Background
Zynq7000 is a Programmable extensible Processing platform structure of Xilinx corporation, and integrates a Processing System (PS) and Xilinx Programmable Logic (PL) of a dual-core ARM Cortex-A9 multi-core processor with rich characteristics in a single chip. The dual core ARM Cortex-A9 includes on-chip memory, external memory interface, and rich I/O peripherals. PL in Zynq-7000 employs Xilinx 7 series FPGA technology for extended functionality to meet specific functional requirements.
At present, two methods are mainly used for upgrading the Zynq program, one method is to use a simulator such as a USB-Blaster and the like to write the program into a FLASH through a JTAG, the commonly used method comprises SPI FLASH, NOR FALSH and NAND FLASH, and when a system comprises a plurality of ZYNQ boards, the program is required to be updated through the simulator respectively; another method is to take off the SD card, update the program to the SD card, and reinstall the SD card when the SD card is used to store the program. The two upgrading modes have the defects of low upgrading speed and need of disassembling equipment.
Disclosure of Invention
The application aims to provide an online upgrading system and method based on Zynq7000, so that the system has the advantages of simplicity in use, strong universality, simplified upgrading content, more reliable and faster upgrading and the like.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to one aspect of the embodiment of the application, an online upgrading system based on Zynq7000 is provided, and the system comprises a control host, a control intermediate machine and a plurality of target devices; the control host and the control intermediate machine are connected through an Ethernet, and the control intermediate machine and the target equipment are connected through a CAN bus; the control host sends an upgrade command and an upgrade data packet to the target equipment through the control intermediate machine; and the target equipment enters an upgrading state according to the upgrading command and upgrades the bit stream file, the peripheral equipment drive and the application program in the equipment system through the upgrading data packet.
In one embodiment of the application, the target device comprises a Zynq7000 processor, a DDR3 memory and a QSPI Flash memory, wherein a boot program and a setting system are solidified in a non-file system area of the QSPI Flash memory, a bit stream file, a peripheral driver and an application program are stored in a yaffs2 file system of the QSPI Flash memory, the setting system is a minimum system of Zynq7000 running a SylixOS embedded real-time operating system, and the boot program is used for guiding the setting system to start after the Zynq7000 processor is powered on.
In one embodiment of the application, after the setting system is started, a monitoring application program is automatically started, and the monitoring application program is used for initializing a CAN and an Ethernet communication link so as to receive an upgrading command of a control host; if the monitoring application program does not receive the upgrading command within 3 seconds after the monitoring application program is started, selecting the latest bit stream file, the peripheral driver and the application program in the yaffs2 file system to load; and if the monitoring application program receives an upgrading command within 3 seconds after starting, entering an upgrading process, receiving an upgrading data packet through the CAN and the Ethernet communication link, unpacking the upgrading data packet, and writing the yaffs2 file system to realize upgrading of the bit stream file, the peripheral driver and the application program in the equipment system.
In an embodiment of the present application, the monitoring application includes a data communication module, a file read-write module, and an application loading module.
In one embodiment of the present application, in the process of receiving the upgrade data packet, the following steps are included:
and S11, confirming whether the storage space meets the storage requirement of the upgrade data packet through the CAN bus data information.
And S12, if the storage space meets the storage requirement of the upgrade data packet, transmitting the upgrade data packet through the CAN bus according to a set protocol.
And S13, storing the transmitted upgrade data package in a fixed path of yaffs2 file system on the QSPI Flash memory.
And S14, after the transmission of the upgrade data packet is completed, the control host acquires the read-back data packet of the target equipment through the CAN bus, and performs binary comparison and verification to confirm the correctness of the transmission of the upgrade data packet.
In one embodiment of the present application, during the yaffs2 file system writing process, the following steps are included:
s21, determine if the remaining space of yaffs2 file system supports the upgrade.
S22, if the residual space of yaffs2 file system supports upgrading, unpacking the upgrading data package and upgrading by using a backup mode, wherein the new upgrading file and the old upgrading file are stored in the same path, and the file names are sorted by software version.
And S23, after the upgrade is completed, generating an upgrade configuration file for reading and writing of the upgrade function application.
In one embodiment of the application, the upgrade function application controls the boot history program through the control host within 3 seconds of starting to execute software rollback caused by system failure due to incorrect upgrade, and after the upgrade function application executes the software rollback, the upgrade configuration file is modified to start the history version software according to the configuration file.
According to another aspect of the embodiments of the present application, there is provided an online upgrade method based on Zynq7000, the method is performed in the online upgrade system as described in any embodiment of the first aspect, and the method includes a general start-up phase, an upgrade phase, and an application start-up phase.
The general start-up phase comprises the steps of:
and S31, powering on the target device.
S32, the bootstrap program guides the setup system of the SylixOS embedded real-time operating system to start.
And S33, loading a QSPI Flash memory drive after the system is set to be started.
S34, the system is set to load yaffs2 file system from the 6M start address of QSPI Flash memory.
S35, the setting system reads configuration files, system libraries and monitoring application programs from yaffs2 file system.
S36, the configuration system executes the monitoring application.
S37, the monitoring application loads the CAN drive ko file in yaffs2 file system.
S38, after loading the CAN drive ko file, generating a/dev/CAN 0,/dev/CAN 1 device part file by the SylixOS embedded real-time operating system.
S39, monitoring the opening/dev/can 0,/dev/can 1 device part files for data transmission and reception.
And S310, receiving an upgrading command of the control host within 3S after the monitoring application program is started.
S311, if the upgrading command of the control host is received in 3S, entering an upgrading process.
S312, if the upgrading command of the control host is not received within 3S, the application program starting process is started.
In one embodiment of the present application, the upgrade phase comprises the steps of:
and S41, the monitoring application program enters an upgrading process.
And S42, the monitoring application program receives the erasing instruction of the control host, and the monitoring application program erases the spaces from 4M to 6M of the QSPI Flash memories.
And S43, the monitoring application program receives a write instruction of the control host, and writes the data into the position of a QSPI Flash memory 4M +4k, wherein when writing a section of data, the related data length plus the length of the starting section of the QSPI Flash memory 4M is rewritten into the position of the starting section of the QSPI Flash memory 4M, and the 4k space needs to be erased before writing.
And S44, after the writing is finished, the monitoring application program receives a control host machine reading instruction, and the monitoring application program reads data from the position of the QSPI Flash memory 4M +4k and sends the data back to the control host machine.
And S45, controlling the host to read the data and compare the data to ensure whether the upgrade is successful.
In one embodiment of the present application, the application program starting phase includes the following steps:
s51, the monitoring application program reads the length of the application program package from the starting segment position of the QSPI Flash memory 4M.
And S52, the monitoring application program reads the application program package from the position of the QSPI Flash memory 4M +4k to the memory file system to be saved as tar.gz.
And S53, the monitoring application program decompresses the read tar.gz file, and the related compression comprises an application executable file, a bit stream file and a CAN drive ko file.
S54, the monitoring application program confirms that the decompression is successful, the monitoring application program closes/dev/CAN 0,/dev/CAN 1, and the corresponding CAN drive ko module is unloaded.
And S55, the monitoring application program loads the decompressed CAN drive ko file and the decompressed bit stream file.
And S56, the monitoring application program loads the application executable file and exits.
S57, the application executable begins execution.
In the technical scheme of this application embodiment, the system is quick-witted and a plurality of target device in the middle of control host computer, control host computer with the machine passes through ethernet connection in the middle of the control, the machine in the middle of the control with target device passes through CAN bus connection, control host computer passes through the machine in the middle of the control to target device sends upgrade order and upgrade data package, target device basis the upgrade order gets into the upgrade state, and passes through the upgrade data package upgrades bit stream file, peripheral hardware drive and application in the equipment system. Therefore, the control host and the control intermediate machine upgrade the bit stream file, the peripheral driver and the application program in the target equipment through the Ethernet and the CAN bus without disassembling the equipment, the speed is high, and the system has the advantages of simple use, strong universality, simplified upgrade content, more reliable upgrade, rapider upgrade and the like.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic diagram of an online upgrade system based on Zynq7000 according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a QSPI Flash memory partition according to an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference herein to "a plurality" means two or more. "and/or" describe the association relationship of the associated objects, meaning that there may be three relationships, e.g., A and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It is noted that the terms first, second and the like in the description and claims of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than those illustrated or described herein.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
in the application, an online upgrading system based on Zynq7000 is provided, and the system comprises a control host, a control intermediate machine and a plurality of target devices; the control host and the control intermediate machine are connected through an Ethernet, and the control intermediate machine and the target equipment are connected through a CAN bus; the control host sends an upgrade command and an upgrade data packet to the target equipment through the control intermediate machine; and the target equipment enters an upgrading state according to the upgrading command and upgrades the bit stream file, the peripheral equipment drive and the application program in the equipment system through the upgrading data packet.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram of an online upgrade system based on Zynq7000 according to an embodiment of the present application, where the system 100 may include a control host, a control intermediate machine, and four target devices, the control host and the control intermediate machine are connected through an ethernet, the control intermediate machine and the target devices are connected through a CAN bus, and the system is remotely upgraded through the CAN bus and the ethernet.
In an embodiment of the present application, an upgrade data package includes a bitstream file to be upgraded, a driver file, a configuration file, and an application file, and the upgrade data package may adopt a simple path combination structure, where the simple path combination structure is:
Figure BDA0003488997550000061
further, the format of the upgrade data packet may adopt a tar packet compressed in Gzip format, and a specific suffix is represented as tar. The compressed packet in the format has the characteristics of high compression ratio, high decompression speed, capability of being packaged on a windows system and the like, and the time overhead of data transmission can be greatly reduced. For example, in the test, the original 4M volume of data may reach about 200k after being compressed, and the time overhead of decompressing the upgrade data packet of about 200k to the memory file system and loading and running is less than 1 s. The compression and decompression operations of the upgrade data packet can be respectively performed by adopting a tar command in a SylixOS development tool on a Windows system, and then decompression is performed by adopting an untar command under a SylixOS embedded real-time operating system.
In the application, the target device comprises a Zynq7000 processor, a DDR3 memory and a QSPI Flash memory, wherein a bootstrap program and a setting system are solidified in a non-file system area of the QSPI Flash memory, a bit stream file, a peripheral driver and an application program are stored in a yaffs2 file system of the QSPI Flash memory, the setting system is a minimum system of Zynq7000 for running a SylixOS embedded real-time operating system, and the bootstrap program is used for guiding the setting system to start after the Zynq7000 processor is powered on.
For example, the target device may include a Zynq7000 processor, a 1G DDR3 memory, a 16M QSPI Flash memory; the bootstrap program can be Zynq series secondary bootstrap program FSBL, which is not in the integral upgrading part; in addition, the setting system CAN comprise functions and interfaces such as a clock, a serial port, a network port, Flash, DDR3, CAN and the like. Here, with reference to fig. 1, the system 100 in fig. 1 may implement a CAN communication function by loading a driver file, an FPGA function by dynamically loading a bitstream file, and an application program upgrade by dynamically loading an application program file.
In an embodiment of the present application, the setting system may be started after the Zynq7000 processor is powered on, then the control host upgrade command is obtained through the CAN bus to enter the software upgrade process, and the setting system and the monitoring application program complete the upgrade function.
Specifically, after the set system is started, a monitoring application program is automatically started, and the monitoring application program is used for initializing a CAN and an Ethernet communication link so as to receive an upgrading command of a control host; if the monitoring application program does not receive the upgrading command within 3 seconds after the monitoring application program is started, selecting the latest bit stream file, the peripheral driver and the application program in the yaffs2 file system to load; and if the monitoring application program receives an upgrading command within 3 seconds after starting, entering an upgrading process, receiving an upgrading data packet through the CAN and the Ethernet communication link, unpacking the upgrading data packet, and writing the yaffs2 file system to realize upgrading of the bit stream file, the peripheral driver and the application program in the equipment system.
Furthermore, the monitoring application program can comprise a data communication module, a file reading and writing module and an application loading module, and each module is divided into different parts to realize the upgrading function.
Specifically, the data communication module may be responsible for sending and receiving the CAN packet, and performing packet assembling before sending and analyzing after receiving. The module is responsible for initializing the baud rate and sampling time sequence of the CAN bus of the equipment during initialization. Two real-time tasks for transmitting and receiving CAN messages are established in the data communication module corresponding to one CAN device channel, and an independent and non-continuous blocked data transmitting and receiving interface is realized through a message queue and an operating system Select detection mechanism. The specific process can be carried out as follows: the method comprises the steps of program starting- > driver loading- > CAN channel initialization- > transceiving task initialization- > main task initialization- > sending data taken by the task processing main task to be packaged and sent- > receiving task real-time acquisition data and sending the data to the main task to be processed through a message queue.
And secondly, the file reading and writing module can be responsible for storing, reading back, checking and other functions of the upgrade file. In order to ensure the time certainty of writing the file data into the QSPI Flash memory, the file data is not directly stored through a file system, and the QSPI Flash memory is partitioned in consideration of the characteristic that the QSPI Flash memory needs to be erased and written in first. As shown in fig. 2, fig. 2 is a schematic diagram of a QSPI Flash memory partition according to an embodiment of the present application, in the QSPI Flash memory partition 200, reserving a front 4M space of a QSPI Flash memory to an FSBL + SylixOS system image, and then reserving 4M to 16M spaces to a scalable integrated data packet, where a first Sector (4K) from an address of 4M is used to store some description information of the integrated data packet, such as a packet size; and reserving 16M-32M space as yaffs2 file system for storing data such as system configuration files, monitoring application programs, peripheral drivers, log texts, system libraries and the like. Based on this, the file read-write module can realize the interface of bare operation of the QSPI Flash memory, and comprises three types of erasing, writing and reading according to the address. In addition, the file read-write module needs to provide a standard io operation interface for file systems such as yaffs2 and ramfs, which is convenient for reading conventional files and reading upgrade data packages.
In addition, the application loading module may be configured to read and decompress the updated upgrade data package, and select and load a configuration file, a bitstream file, a driver file, and an application file of the upgrade data package according to the content of the actual compressed package.
In this application, the process of receiving the upgrade data packet may specifically include the following steps:
and S11, confirming whether the storage space meets the storage requirement of the upgrade data packet through the CAN bus data information.
And S12, if the storage space meets the storage requirement of the upgrade data packet, transmitting the upgrade data packet through the CAN bus according to a set protocol.
And S13, storing the transmitted upgrade data package in a fixed path of yaffs2 file system on QSPI Flash.
And S14, after the transmission of the upgrade data packet is completed, the control host acquires the read-back data packet of the target equipment through the CAN bus, and performs binary comparison and verification to confirm the correctness of the transmission of the upgrade data packet.
Further, during the writing process of yaffs2 file system, the following steps can be included:
s21, determine if the remaining space of yaffs2 file system supports the upgrade.
S22, if the residual space of yaffs2 file system supports upgrading, unpacking the upgrading data package and upgrading by using a backup mode, wherein the new upgrading file and the old upgrading file are stored in the same path, and the file names are sorted by software version.
And S23, after the upgrade is completed, generating an upgrade configuration file for reading and writing of the upgrade function application.
Specifically, the upgrade function application controls the boot history program through the control host within 3 seconds of starting to execute software rollback caused by system failure due to incorrect upgrade, and the upgrade function application modifies the upgrade configuration file after executing the software rollback to start the history version software according to the configuration file.
In the present application, the upgrade process of the online upgrade system may include a general start stage, an upgrade stage, and an application start stage. Thus, the general start-up phase may specifically comprise the steps of:
and S31, powering on the target device.
S32, the bootstrap program guides the setup system of the SylixOS embedded real-time operating system to start.
And S33, loading a QSPI Flash memory drive after the system is set to be started.
S34, the system is set to load yaffs2 file system from the 6M start address of QSPI Flash memory.
S35, the setting system reads configuration files, system libraries and monitoring application programs from yaffs2 file system.
S36, the configuration system executes the monitoring application.
S37, the monitoring application loads the CAN drive ko file in yaffs2 file system.
S38, after loading the CAN drive ko file, generating a/dev/CAN 0,/dev/CAN 1 device part file by the SylixOS embedded real-time operating system.
S39, monitoring the opening/dev/can 0,/dev/can 1 device part files for data transmission and reception.
And S310, receiving an upgrading command of the control host within 3S after the monitoring application program is started.
S311, if the upgrading command of the control host is received in 3S, entering an upgrading process.
S312, if the upgrading command of the control host is not received within 3S, the application program starting process is started.
Further, the upgrade stage may include the following steps:
and S41, the monitoring application program enters an upgrading process.
And S42, the monitoring application program receives the erasing instruction of the control host, and the monitoring application program erases the spaces from 4M to 6M of the QSPI Flash memories.
And S43, the monitoring application program receives a write instruction of the control host, and writes the data into the position of a QSPI Flash memory 4M +4k, wherein when writing a section of data, the related data length plus the length of the starting section of the QSPI Flash memory 4M is rewritten into the position of the starting section of the QSPI Flash memory 4M, and the 4k space needs to be erased before writing.
And S44, after the writing is finished, the monitoring application program receives a control host machine reading instruction, and the monitoring application program reads data from the position of the QSPI Flash memory 4M +4k and sends the data back to the control host machine.
And S45, controlling the host to read the data and compare the data to ensure whether the upgrade is successful.
Further, the application program starting phase may include the following steps:
s51, the monitoring application program reads the length of the application program package from the starting segment position of the QSPI Flash memory 4M.
And S52, the monitoring application program reads the application program package from the position of the QSPI Flash memory 4M +4k to the memory file system to be saved as tar.gz.
And S53, the monitoring application program decompresses the read tar.gz file, and the related compression comprises an application executable file, a bit stream file and a CAN drive ko file.
S54, the monitoring application program confirms that the decompression is successful, the monitoring application program closes/dev/CAN 0,/dev/CAN 1, and the corresponding CAN drive ko module is unloaded.
And S55, the monitoring application program loads the decompressed CAN drive ko file and the decompressed bit stream file.
And S56, the monitoring application program loads the application executable file and exits.
S57, the application executable begins execution.
In the technical scheme of this application embodiment, the system is quick-witted and a plurality of target device in the middle of control host computer, control host computer with the machine passes through ethernet connection in the middle of the control, the machine in the middle of the control with target device passes through CAN bus connection, control host computer passes through the machine in the middle of the control to target device sends upgrade order and upgrade data package, target device basis the upgrade order gets into the upgrade state, and passes through the upgrade data package upgrades bit stream file, peripheral hardware drive and application in the equipment system. Therefore, the control host and the control intermediate machine upgrade the bit stream file, the peripheral driver and the application program in the target equipment through the Ethernet and the CAN bus without disassembling the equipment, the speed is high, and the system has the advantages of simple use, strong universality, simplified upgrade content, more reliable upgrade, rapider upgrade and the like.
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present application, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An online upgrading system based on Zynq7000 is characterized in that the system comprises a control host, a control intermediate machine and a plurality of target devices;
the control host and the control intermediate machine are connected through an Ethernet, and the control intermediate machine and the target equipment are connected through a CAN bus;
the control host sends an upgrade command and an upgrade data packet to the target equipment through the control intermediate machine;
and the target equipment enters an upgrading state according to the upgrading command and upgrades the bit stream file, the peripheral equipment drive and the application program in the equipment system through the upgrading data packet.
2. The system of claim 1, wherein the target device comprises a Zynq7000 processor, a DDR3 memory, a QSPI Flash memory, wherein a boot program and a setup system are fixed in a non-file system area of the QSPI Flash memory, wherein a bitstream file, peripheral drivers, and applications are stored in a yaffs2 file system of the QSPI Flash memory, wherein the setup system is a minimal system running Zynq7000 of a SylixOS embedded real-time operating system, and wherein the boot program is configured to boot the setup system after the Zynq7000 processor is powered on.
3. The system of claim 2, wherein after the setup system is started, a monitoring application is automatically started, the monitoring application being configured to initialize the CAN and ethernet communication links to receive an upgrade command for the control host; if the monitoring application program does not receive the upgrading command within 3 seconds after the monitoring application program is started, selecting the latest bit stream file, the peripheral driver and the application program in the yaffs2 file system to load; and if the monitoring application program receives an upgrading command within 3 seconds after starting, entering an upgrading process, receiving an upgrading data packet through the CAN and the Ethernet communication link, unpacking the upgrading data packet, and writing the yaffs2 file system to realize upgrading of the bit stream file, the peripheral driver and the application program in the equipment system.
4. The method of claim 3, wherein the monitoring application comprises a data communication module, a file read-write module, and an application loading module.
5. The system of claim 3, wherein in the process of receiving the upgrade data package, the method comprises the following steps:
s11, determining whether the storage space meets the storage requirement of the upgrade data packet through the CAN bus data information;
s12, if the storage space meets the storage requirement of the upgrade data packet, the upgrade data packet is transmitted through the CAN bus according to a set protocol;
s13, storing the transmitted upgrade data package in a fixed path of yaffs2 file system on QSPI Flash memory;
and S14, after the transmission of the upgrade data packet is completed, the control host acquires the read-back data packet of the target equipment through the CAN bus, and performs binary comparison and verification to confirm the correctness of the transmission of the upgrade data packet.
6. The system of claim 5, wherein during the yaffs2 file system writing process, the method comprises the following steps:
s21, judging whether the residual space of yaffs2 file system supports upgrading;
s22, if the residual space of yaffs2 file system supports upgrading, unpacking the upgrading data package and upgrading by using a backup mode, wherein the new upgrading file and the old upgrading file are stored in the same path, and the file names are sorted by software version;
and S23, after the upgrade is completed, generating an upgrade configuration file for reading and writing of the upgrade function application.
7. The system of claim 6, wherein the upgrade function application controls the boot history program to execute a software rollback due to a system failure caused by an incorrect upgrade by controlling the host within 3 seconds of starting, and the upgrade function application modifies the upgrade configuration file after executing the software rollback to start the historical version of software according to the configuration file.
8. An online upgrade method based on Zynq7000, characterized in that the method is executed in the online upgrade system according to any one of claims 1 to 7, and the method comprises a general boot phase, an upgrade phase, and an application boot phase;
the general start-up phase comprises the steps of:
s31, powering on the target device;
s32, the bootstrap program guides the start of the setting system of the SylixOS embedded real-time operating system;
s33, loading a QSPIFlash memory drive after the system is set to be started;
s34, setting the system to start loading yaffs2 file system from the 6M initial address of QSPI Flash memory;
s35, setting the system to read the configuration file, the system library and the monitoring application program from the yaffs2 file system;
s36, setting a system to execute a monitoring application program;
s37, the monitoring application program loads a CAN drive ko file in the yaffs2 file system;
s38, after loading the CAN drive ko file, generating a/dev/CAN 0,/dev/CAN 1 device part file by a SylixOS embedded real-time operating system;
s39, monitoring the opening/dev/can 0,/dev/can 1 device part files for data transmission and reception;
s310, receiving an upgrading command of the control host in 3S after the monitoring application program is started;
s311, if the upgrading command of the control host is received in 3S, entering an upgrading process;
s312, if the upgrading command of the control host is not received within 3S, the application program starting process is started.
9. The method according to claim 8, characterized in that said upgrading phase comprises the steps of:
s41, monitoring the application program to enter an upgrading process;
s42, the monitoring application program receives an erasing instruction of the control host, and the monitoring application program erases the spaces from 4M to 6M of the QSPI Flash memories;
s43, the monitoring application program receives a write instruction of the control host, and writes the data into the position of a QSPI Flash memory 4M +4k, wherein when writing a section of data, the length of the relevant data plus the length of the starting section of the QSPI Flash memory 4M is rewritten into the position of the starting section of the QSPI Flash memory 4M, and the 4k space needs to be erased before writing;
s44, after the writing is finished, the monitoring application program receives the control host machine reading instruction, and the monitoring application program reads data from the position of the QSPIFlash memory 4M +4k and sends the data back to the control host machine;
and S45, controlling the host to read the data and compare the data to ensure whether the upgrade is successful.
10. The method according to claim 9, wherein the application launch phase comprises the steps of:
s51, the monitoring application program reads the length of the application program package from the starting section position of the QSPI Flash memory 4M;
s52, the monitoring application program reads the application program package from the position of the QSPI Flash memory 4M +4k to the memory file system to be saved as tar.gz;
s53, monitoring tar.gz files read by the application program, wherein the related compression comprises an application executable file, a bit stream file and a CAN drive ko file;
s54, the monitoring application program confirms that decompression is successful, the monitoring application program closes/dev/CAN 0,/dev/CAN 1, and the corresponding CAN drive ko module is unloaded;
s55, the monitoring application program loads the decompressed CAN drive ko file and the decompressed bit stream file;
s56, the application executable file is loaded by the monitoring application program, and the monitoring application program exits;
s57, the application executable begins execution.
CN202210099027.5A 2022-01-26 2022-01-26 Zynq 7000-based online upgrading system and method Pending CN114281390A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210099027.5A CN114281390A (en) 2022-01-26 2022-01-26 Zynq 7000-based online upgrading system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210099027.5A CN114281390A (en) 2022-01-26 2022-01-26 Zynq 7000-based online upgrading system and method

Publications (1)

Publication Number Publication Date
CN114281390A true CN114281390A (en) 2022-04-05

Family

ID=80881769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210099027.5A Pending CN114281390A (en) 2022-01-26 2022-01-26 Zynq 7000-based online upgrading system and method

Country Status (1)

Country Link
CN (1) CN114281390A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721695A (en) * 2022-06-08 2022-07-08 成都航天通信设备有限责任公司 Software online upgrading system and method based on double FPGA chips

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656593A (en) * 2018-12-07 2019-04-19 天津光电通信技术有限公司 The method for realizing FPGA program remote upgrading based on ZYNQ chip
CN109710295A (en) * 2018-11-23 2019-05-03 北京计算机技术及应用研究所 A kind of safely and reliably FPGA remote upgrade method
CN111142909A (en) * 2019-12-26 2020-05-12 中国电子科技集团公司第五十八研究所 Terminal, method and system for realizing remote upgrading of CAN (controller area network) based on XC7Z045 chip

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710295A (en) * 2018-11-23 2019-05-03 北京计算机技术及应用研究所 A kind of safely and reliably FPGA remote upgrade method
CN109656593A (en) * 2018-12-07 2019-04-19 天津光电通信技术有限公司 The method for realizing FPGA program remote upgrading based on ZYNQ chip
CN111142909A (en) * 2019-12-26 2020-05-12 中国电子科技集团公司第五十八研究所 Terminal, method and system for realizing remote upgrading of CAN (controller area network) based on XC7Z045 chip

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴凤柱, 王斌, 张铖林: "ZYNQ7000全可编程SOC应用软件更新技术研究", 应用科技, vol. 47, no. 4, 5 July 2020 (2020-07-05), pages 71 - 74 *
龚行梁,周强,赵天恩,孙浩,文继锋: "CAN总线实现的ZYNQ-7000程序在线升级方法", 单片机与嵌入式系统应用, vol. 18, no. 11, 1 November 2018 (2018-11-01), pages 63 - 66 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114721695A (en) * 2022-06-08 2022-07-08 成都航天通信设备有限责任公司 Software online upgrading system and method based on double FPGA chips

Similar Documents

Publication Publication Date Title
CN103365696B (en) BIOS image file acquisition methods and device
US7543277B1 (en) Method and system for remote software debugging
US8135993B1 (en) Updating a firmware image using a firmware debugger application
CN110597542B (en) Software automatic OTA (over the air) upgrading method and device and electronic equipment
CN106648803A (en) Online upgrading method for DSP chip
CN101815988A (en) Firmware image update and management
JP2003345618A (en) Method of switching between tow or more images of firmware
CN113434162B (en) Method for remotely updating FPGA multi-version program on line
US20030076311A1 (en) Computer having a display interface with two basic input/output systems
EP3518097A2 (en) Firmware updating method and electronic device using the same
CN115658160B (en) Multi-operating system upgrading method, device and system based on multi-core heterogeneous SOC
WO2007023497A1 (en) Method and system for in-place updating content stored in a storage device
CN106598654B (en) Method for updating PowerPC mainboard boot chip on line
CN110187909B (en) Single-chip microcomputer firmware upgrading method based on android system
CN112947977A (en) Software online upgrading method and system
CN112231005A (en) Method for managing FPGA (field programmable Gate array) version based on UBOOT (Universal boot on Board)
US20230060908A1 (en) Computer system and method for booting up the computer system
US5673385A (en) Method for downloading special code from a computer to a hard copy apparatus
CN111813432B (en) FPGA configuration upgrading method and FPGA platform
CN113835735A (en) FPGA remote upgrading method, system and storage medium
US20070233750A1 (en) Data control apparatus and method
CN114281390A (en) Zynq 7000-based online upgrading system and method
CN113127264A (en) Data storage device repairing method
CN114443175A (en) Startup configuration method for missile-borne FPGA online upgrade
JP2002208886A (en) Portable terminal equipment, storage data updating method and firmware-updating method

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