CN118101469A - DSP network port online upgrading method, DSP, upper computer and system - Google Patents

DSP network port online upgrading method, DSP, upper computer and system Download PDF

Info

Publication number
CN118101469A
CN118101469A CN202410491356.3A CN202410491356A CN118101469A CN 118101469 A CN118101469 A CN 118101469A CN 202410491356 A CN202410491356 A CN 202410491356A CN 118101469 A CN118101469 A CN 118101469A
Authority
CN
China
Prior art keywords
dsp
upgrade
protocol stack
version number
image file
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
CN202410491356.3A
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.)
Suzhou Luzhiyao Intelligent Equipment Co ltd
Original Assignee
Suzhou Luzhiyao Intelligent Equipment 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 Suzhou Luzhiyao Intelligent Equipment Co ltd filed Critical Suzhou Luzhiyao Intelligent Equipment Co ltd
Priority to CN202410491356.3A priority Critical patent/CN118101469A/en
Publication of CN118101469A publication Critical patent/CN118101469A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a DSP network port online upgrading method, a DSP, an upper computer and a system, wherein the method comprises the steps of obtaining a user-defined protocol stack of the DSP in advance; the DSP establishes communication with the upper computer through the network port, receives the DSP version number protocol information sent by the upper computer, determines the DSP version number according to the self-defined protocol stack and the DSP version number protocol information, and returns the DSP version number to the upper computer; the upper computer extracts a DSP upgrade package according to the DSP version number, generates a BOOT image file and sends the BOOT image file to the DSP; the DSP upgrades according to the user-defined protocol stack and the BOOT image file, and writes upgrade data in a preset storage area; when the upgrade data is correct, the DSP sends upgrade success protocol information to the upper computer to finish the upgrade. The invention can realize the online upgrade of the DSP network port based on the self-defined protocol stack technology, has simple operation flow, can control the DSP in real time, and has high upper and lower computers cooperativity and high code optimization degree.

Description

DSP network port online upgrading method, DSP, upper computer and system
Technical Field
The invention relates to the technical field of DSP (digital Signal processor) upgrading, in particular to a DSP network port online upgrading method, a DSP, an upper computer and a system.
Background
The DSP (DIGITAL SIGNAL processor) is a microprocessor specially used for processing batch digital signals, and is widely used in the fields of digital image processing, digital communication and the like due to the special hardware operation advantages thereof. In the use process of the DSP, the built-in program of the DSP needs to be updated or upgraded.
In general, DSP upgrades are primarily debugging interfaces using specialized simulation tools. However, for mass production equipment, reserving the debug interface may occupy a lot of hardware resources, which is not matched with the compact circuit board targets. Furthermore, the general DSP circuit board is installed inside the equipment, and the debugging interface is relatively difficult to upgrade, so that the method has contradiction with convenience. Accordingly, online upgrades using various communication interfaces are receiving increasing attention.
Among them, serial port upgrade has been widely used. However, with the advancement of technology, it has been difficult for the serial port to meet the requirement of a large-capacity upgrade package as a low-speed interface. Therefore, online upgrading of the network port is a better choice, and has the advantages of high transmission speed, stable transmission data and the like, and the network port is used as a necessary interface for most application occasions, so that extra hardware resources are not required to be occupied.
In the existing online upgrade scheme of the DSP network port, the network port can be used for transmitting an upgrade packet, and then the DSP enters a programming program after receiving the transmission packet. However, this upgrade still has some drawbacks: firstly, the transmission technology of the scheme is not optimized according to hardware characteristics, only based on a general protocol, certain operation needs to be executed to enter an upgrading mode before upgrading, and the operation flow is complex. Secondly, after the scheme transmits data, the PC end and the DSP are in a state of being in disconnection, a display or an indicator lamp is needed to be added at the DSP end to indicate that the operation is finished, and the DSP cannot be controlled in real time in the upgrading process. Finally, the scheme does not have a data processing tool matched with a system upgrade package, and additional tools are needed to generate a BOOTIMAGE file (namely a starting IMAGE file) suitable for the embedded terminal, so that the upper computer and the lower computer are low in synergetic effect, and the code optimization degree is low.
Disclosure of Invention
In view of this, the invention provides a method, a DSP, an upper computer and a system for online upgrading a DSP network port, so as to solve the problems of complicated operation flow, inability to control the DSP in real time, low cooperation between the upper computer and the lower computer and low code optimization degree in the existing DSP network port upgrading technology.
The invention provides a DSP network port online upgrading method, which is applied to a DSP, and comprises the following steps:
Acquiring a custom protocol stack of a DSP in advance;
establishing communication with an upper computer through a network port, receiving DSP version number protocol information sent by the upper computer, determining a DSP version number according to the self-defined protocol stack and the DSP version number protocol information, and returning the DSP version number to the upper computer;
Waiting to receive a BOOT image file obtained by the upper computer based on the DSP version number;
after receiving the BOOT image file, upgrading according to the custom protocol stack and the BOOT image file, and writing upgrading data in a preset storage area;
and under the condition that the upgrade data are correct, transmitting upgrade success protocol information to the upper computer to complete online upgrade of the DSP network port.
Optionally, the DSP is configured with RAM memory;
The head of the BOOT image file carries first upgrade package identification protocol information, and the tail of the BOOT image file carries second upgrade package identification protocol information;
after receiving the BOOT image file, upgrading according to the custom protocol stack and the BOOT image file, and writing upgrading data in a preset storage area, wherein the upgrading data comprises the following steps:
When the first upgrade package identification protocol information carried by the BOOT image file header is received, determining whether to enter an upgrade process according to the custom protocol stack and the first upgrade package identification protocol information;
When the upgrading process is determined to be entered, performing real-time data conversion on the received BOOT image file to obtain cache data in a small-end mode, and writing the cache data into the RAM in real time;
When the second upgrade package identification protocol information carried by the BOOT image file header is received, determining whether to enter a programming flow or not according to the custom protocol stack and the second upgrade package identification protocol information;
when the writing process is determined to be entered, writing is performed according to the cache data stored in the RAM memory, and the upgrade data generated in the writing process is written in the preset storage area.
Optionally, after receiving the BOOT image file, upgrading according to the custom protocol stack and the BOOT image file, further including:
waiting for receiving the upgrade stopping protocol information sent by the upper computer;
When the upgrade stopping protocol information is received, entering an upgrade stopping flow according to the self-defined protocol stack and the upgrade stopping protocol information, and determining that the online upgrade of the DSP network port fails.
Optionally, after upgrading according to the custom protocol stack and the BOOT image file and writing upgrade data in a preset storage area, the method further includes:
comparing the upgrade data stored in the preset storage area with the cache data stored in the RAM;
If the comparison is consistent, judging that the upgrade data is correct; otherwise, judging that the upgrade data is incorrect, and determining that the online upgrade of the DSP network port fails.
Optionally, pre-acquiring a custom protocol stack of the DSP, including:
Configuring a protocol stack storage rule of the DSP;
Initializing the DSP with the configured protocol stack storage rule to obtain the custom protocol stack.
Optionally, the DSP is configured with an SPI interface;
configuring a protocol stack storage rule of the DSP, comprising:
based on SPI protocol, hanging FLASH memory under the SPI interface;
And determining the idle partition of the FLASH memory as a protocol stack partition, and writing a pre-compiled protocol stack into the protocol stack partition to complete the configuration of the protocol stack storage rule of the DSP.
Optionally, the DSP is further configured with RAM memory, including secondary cache and/or DDR memory;
initializing the DSP with the configured protocol stack storage rule to obtain the custom protocol stack, wherein the method comprises the following steps:
initializing the RAM memory in the DSP;
positioning the protocol stack partition in the FLASH memory according to the address mapping of the FLASH memory;
and reading a protocol stack from the positioned protocol stack partition by using the RAM memory to obtain the custom protocol stack.
Optionally, determining the DSP version number according to the custom protocol stack and the DSP version number protocol information includes:
Comparing the custom protocol stack with the DSP version number protocol information;
If the information which is the same as the DSP version number protocol information exists in the custom protocol stack, the comparison is successful, and the DSP version number protocol information is analyzed to obtain the DSP version number; otherwise, continuing to wait for receiving the DSP version number protocol information sent by the upper computer until the received DSP version number protocol information is successfully compared.
Optionally, after establishing communication with the upper computer through the portal and before upgrading according to the custom protocol stack and the BOOT image file, the method further includes:
waiting for receiving debugging protocol information sent by the upper computer;
When the debugging protocol information is received, entering a debugging process according to the self-defined protocol stack and the debugging protocol information, generating debugging data, and returning the debugging data to the upper computer through a network port.
In addition, the invention also provides a DSP network port online upgrading method which is applied to an upper computer connected with the DSP through the network port and is correspondingly matched with the DSP network port online upgrading method, and the method comprises the following steps:
after the DSP acquires a self-defined protocol stack in advance, establishing communication with the DSP through a network port;
transmitting DSP version number protocol information to a DSP, and waiting for receiving a DSP version number returned by the DSP based on the self-defined protocol stack and the DSP version number protocol information;
After receiving the returned DSP version number, acquiring a DSP upgrading packet according to the DSP version number, and performing data processing on the DSP upgrading packet to generate a BOOT image file;
the BOOT image file is sent to a DSP, and the DSP is waited to upgrade based on the self-defined protocol stack and the BOOT image file and wait to receive upgrade success protocol information returned by the DSP;
and when the upgrade success protocol information is received, finishing the online upgrade of the DSP network port.
Optionally, performing data processing on the DSP upgrade package to generate a BOOT image file, including:
Performing 16-system conversion and large-end mode conversion on the DSP upgrade package to obtain the BOOT image file; the head of the BOOT image file carries first upgrade package identification protocol information, and the tail of the BOOT image file carries second upgrade package identification protocol information.
Optionally, the upper computer is configured with a file storage area;
After receiving the returned DSP version number, acquiring a DSP upgrade package according to the DSP version number, including:
after receiving the returned DSP version number, obtaining an upgrade package storage address and an upgrade package file name according to the DSP version number;
and extracting the DSP upgrade package from the file storage area according to the upgrade package storage address and the upgrade package file name.
In addition, the invention also provides a DSP, which is applied to the DSP network port online upgrading method for the DSP, and comprises the following steps:
the protocol stack definition module is used for acquiring a user-defined protocol stack of the DSP in advance;
the first communication connection module is used for establishing communication with the upper computer through the network port;
The first information receiving module is used for receiving the DSP version number protocol information sent by the upper computer;
The version number acquisition module is used for determining a DSP version number according to the custom protocol stack and the received DSP version number protocol information;
The first information sending module is used for returning the DSP version number to the upper computer;
The first information receiving module is also used for waiting to receive a BOOT image file obtained by the upper computer based on the DSP version number;
the DSP upgrading module is used for upgrading according to the custom protocol stack and the BOOT image file after the first information receiving module receives the BOOT image file, and writing upgrading data in a preset storage area;
The first information sending module is further used for sending upgrade success protocol information to the upper computer under the condition that the upgrade data are correct, and online upgrade of the DSP network port is completed.
In addition, the invention also provides an upper computer which is correspondingly matched with the DSP, comprising:
The second communication connection module is used for establishing communication with the DSP through a network port after the DSP acquires a self-defined protocol stack in advance;
the second information sending module is used for sending the DSP version number protocol information to the DSP;
The second information receiving module is used for waiting to receive the DSP version number returned by the DSP based on the self-defined protocol stack and the DSP version number protocol information;
the image file generating module is used for acquiring a DSP upgrading packet according to the DSP version number after the second information receiving module receives the returned DSP version number, and performing data processing on the DSP upgrading packet to generate a BOOT image file;
the second information sending module is further configured to send the BOOT image file to a DSP, and wait for the DSP to upgrade based on the custom protocol stack and the BOOT image file;
The second information receiving module is also used for waiting to receive the upgrade success protocol information returned by the DSP, and finishing the online upgrade of the DSP network port when the upgrade success protocol information is received.
In addition, the invention also provides a DSP network port online upgrading system, which comprises the DSP and the upper computer, wherein the DSP and the upper computer are connected through network port communication.
The invention has the beneficial effects that:
The DSP introduces a self-defined protocol stack technology, and in the online upgrading process of the DSP network port, the self-defined protocol stack is utilized to identify and analyze each protocol information (including the DSP version number protocol information, the BOOT image file and the like) sent by the upper computer, so that the current upgrading process can be entered without executing certain operation; meanwhile, based on the custom protocol stack technology, on the basis of conveniently realizing online upgrade of a DSP network port, the DSP can be controlled in real time in the upgrade process, and the design can be designed according to the optimal code quantity, so that the user can conveniently verify and transplant the DSP network port into free projects while ensuring stability, reliability and high speed; in the whole upgrading process, the DSP and the upper computer cooperatively interact, so that the synergy is high, the speed is high, the reliability is high, and the operation flow is simple; in addition, when the upper computer receives the DSP version number fed back by the DSP, the BOOT IMAGE file can be automatically generated, a BOOT IMAGE generating tool is embedded, the code can be optimized by embedding the large end processing, the user operation flow is simplified, and the application value is high.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and should not be construed as limiting the invention in any way, in which:
FIG. 1 is a flowchart of a DSP network port online upgrade method according to a first embodiment of the invention;
FIG. 2 is a partial code schematic diagram of DSP configuration port information in accordance with a first embodiment of the invention;
Fig. 3 is a schematic diagram of an operation interface of configuration port information of a PC side in a second embodiment of the present invention;
Fig. 4 is a schematic diagram of an operation interface of a PC receiving a DSP version number in a second embodiment of the present invention;
fig. 5 shows a schematic diagram of a prompt interface for performing 16-ary conversion and large-end mode conversion on a DSP upgrade package by a PC end in a second embodiment of the present invention;
FIG. 6 is a schematic diagram of a BOOT image file generated in a second embodiment of the present invention;
fig. 7 is a schematic diagram of an operation interface for acquiring a transmission progress in real time by a PC side in the second embodiment of the present invention;
FIG. 8 is a schematic diagram of an operation interface of a transmission progress when a PC end completes a BOOT image file transmission in a second embodiment of the present invention;
FIG. 9 is a schematic diagram of an operation interface of a PC receiving upgrade success protocol information in a second embodiment of the present invention;
Fig. 10 is a schematic diagram of an operation interface in which a PC end sends upgrade stopping protocol information to a DSP in the second embodiment of the present invention;
Fig. 11 is a schematic diagram of an operation interface for feeding back upgrade stopping feedback information to a PC end after a DSP enters an upgrade stopping process in a second embodiment of the present invention;
fig. 12A and fig. 12B are schematic diagrams of an operation interface in which a PC side sends debug protocol information to a DSP in the second embodiment of the present invention;
FIG. 13 is a flowchart showing a method for online upgrade of a DSP network port in a second embodiment of the present invention;
FIG. 14 is a block diagram of a DSP according to a third embodiment of the invention;
Fig. 15 shows a block diagram of an upper computer in a fourth embodiment of the present invention;
fig. 16 shows a block diagram of a DSP portal online upgrade system according to a fifth embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
Example 1
As shown in fig. 1, a method for online upgrading a DSP portal is used for a DSP, and the method includes:
SA1: acquiring a custom protocol stack of a DSP in advance;
SA2: establishing communication with an upper computer through a network port, receiving DSP version number protocol information sent by the upper computer, determining a DSP version number according to the self-defined protocol stack and the DSP version number protocol information, and returning the DSP version number to the upper computer;
SA3: waiting to receive a BOOT image file obtained by the upper computer based on the DSP version number;
SA4: after receiving the BOOT image file, upgrading according to the custom protocol stack and the BOOT image file, and writing upgrading data in a preset storage area;
SA5: and under the condition that the upgrade data are correct, transmitting upgrade success protocol information to the upper computer to complete online upgrade of the DSP network port.
The online upgrading method of the DSP network port is applied to a DSP, and firstly, a custom protocol stack of the DSP is obtained, and after the DSP establishes communication with an upper computer, each protocol information (including DSP version number protocol information, BOOT image files and the like) sent by the upper computer can be identified and analyzed by utilizing the custom protocol stack; after receiving the protocol information of the DSP version number, the user-defined protocol stack can be utilized to analyze the protocol information, so that the DSP version number is determined, the upper computer can return to the corresponding BOOT image file conveniently, and the success of upgrading the DSP is ensured; the BOOT image file is also protocol information, and after the BOOT image file sent by the upper computer is received, the protocol information is also analyzed by utilizing a custom protocol stack, so that the current DSP upgrading flow can be entered.
The online upgrading method of the DSP network port for the DSP is based on a custom protocol stack technology, and on the basis of conveniently realizing online upgrading of the DSP network port, the online upgrading method can ensure that an upper computer and the DSP are in a real-time communication connection state in the upgrading process, no disconnection occurs, and therefore the DSP can be conveniently controlled in real time; corresponding embedded programming can be respectively carried out in the DSP and the upper computer, the optimal code quantity design can be realized without excessive code quantity design, and the user can conveniently verify and transplant the code quantity design into free projects while ensuring stability, reliability and high speed; in the whole upgrading process, the DSP cooperatively interacts with an upper computer connected through a network port, so that the method has the advantages of high cooperativity, high speed, high reliability and simple operation flow; in addition, the DSP receives the BOOT IMAGE file automatically generated by the upper computer according to the DSP version number, which is equivalent to embedding a BOOT IMAGE generating tool in the whole upgrading system, can further optimize codes, simplify the operation flow of a user, improve the user friendliness and have higher application value.
In this embodiment, the DSP is programmed by using an embedded C language, the upper computer is a PC (i.e., a computer) and the PC is programmed by using a Python language, and a communication protocol between the DSP and the PC is a UDP protocol (User Datagram Protocol, user datagram protocol, which is a connectionless transport layer protocol).
The protocol stack is also called a protocol stack and consists of a plurality of layers of protocols, each protocol layer is responsible for a specific function, each protocol module is usually communicated with an upper protocol module and a lower protocol module, and the data transmission and communication reliability are realized by calling and interacting with the protocols layer by layer.
The BOOT IMAGE file, that is, a BOOT IMAGE file, is a binary file that is generated according to a user program and that can be identified by a machine, and is used to drive the machine to execute user application instructions.
Each step of the DSP portal online upgrade method of the present embodiment is described in detail below.
Preferably, the present embodiment SA1 includes:
SA11: configuring a protocol stack storage rule of the DSP;
SA12: initializing the DSP with the configured protocol stack storage rule to obtain the custom protocol stack.
By configuring the protocol stack storage rule of the DSP, the subsequent DSP can conveniently extract the corresponding protocol stack from the accurate storage position according to the configured protocol stack storage rule when the upgrade starts, and the initialization of the DSP protocol stack is completed, so that the protocol information can be conveniently analyzed in real time in the upgrade process; the DSP with the configured protocol stack storage rule is initialized, so that the use of a custom protocol stack is facilitated, and the real-time analysis of a transmission protocol is further ensured.
Preferably, the DSP is configured with an SPI interface;
The SA11 includes:
SA111: based on SPI protocol, hanging FLASH memory under the SPI interface;
SA112: and determining the idle partition of the FLASH memory as a protocol stack partition, and writing a pre-compiled protocol stack into the protocol stack partition to complete the configuration of the protocol stack storage rule of the DSP.
The FLASH memory is hung under the SPI interface, namely the FLASH memory is hung by the SPI interface, so that the memory space can be expanded and the performance can be improved; for the FLASH Memory after mounting, the idle partition is specially used as a protocol stack partition written into a custom protocol stack, so that solidification of the protocol stack can be realized, and the FLASH Memory is a nonvolatile Memory, belongs to one of ROM (Read-Only Memory) and cannot lose data stored after equipment power is turned off, so that protocol information cannot be lost no matter how the DSP equipment is restarted, the reliability of the equipment is improved, and the stability and reliability of the DSP online upgrading process are also improved.
Specifically, the present embodiment further includes the following procedure before SA 111:
Configuring a DSP clock and an enabling clock of the SPI interface;
pulling up a chip selection signal of the SPI interface, and configuring a working mode of the SPI interface;
and after the chip selection signal of the SPI interface is pulled down, hanging a FLASH memory under the SPI interface.
Through the flow, the partition can be conveniently performed in the FLASH memory, and the idle partition is used as a protocol stack partition, so that the solidification of the custom protocol stack is conveniently realized.
When determining the idle partition of the FLASH memory as the protocol stack partition in the SA112, attention is paid to the characteristics of the FLASH memory and the size of each sector, so as to ensure the alignment of the sectors, and further facilitate the subsequent realization of rapid data reading and writing.
Preferably, the DSP is further configured with RAM memory, including secondary cache and/or DDR memory;
SA12 includes:
SA121: initializing the RAM memory in the DSP;
SA122: positioning the protocol stack partition in the FLASH memory according to the address mapping of the FLASH memory;
SA123: and reading a protocol stack from the positioned protocol stack partition by using the RAM memory to obtain the custom protocol stack.
Before formal upgrading, initializing a RAM memory in the DSP, so that a subsequent RAM memory can conveniently read a required protocol stack, namely a custom protocol stack, from a protocol stack partition; by reading the protocol stack using RAM memory (e.g., secondary cache and/or DDR memory), a high speed parsing protocol can be achieved, which is faster than parsing the protocol directly from FLASH memory. Wherein, the second level cache (such as L1 SRAM) refers to a buffer of the first level cache, and the first level cache generally comprises an internal register and an on-chip RAM (such as L1P and L1 DRAM); while DDR memory refers to Double Data Rate Synchronous Dynamic Random Access Memory, double rate synchronous dynamic random access memory.
The embodiment obtains the custom protocol stack according to the methods described in SA11 and SA12, combines the advantages of the ROM memory and the RAM memory, and can realize high-speed analysis protocol under the condition of ensuring that protocol information is not lost.
After the DSP acquires the custom protocol stack, in the SA2 of this embodiment, the DSP establishes communication connection with the PC through configuring its own port information. A partial code schematic diagram of the DSP configuration port information in this embodiment is shown in FIG. 2.
Preferably, in SA2, determining a DSP version number according to the custom protocol stack and the DSP version number protocol information includes:
SA21: comparing the custom protocol stack with the DSP version number protocol information;
SA22: if the information which is the same as the DSP version number protocol information exists in the custom protocol stack, the comparison is successful, and the DSP version number protocol information is analyzed to obtain the DSP version number; otherwise, continuing to wait for receiving the DSP version number protocol information sent by the upper computer until the received DSP version number protocol information is successfully compared.
By the comparison method based on the custom protocol stack, the transmission protocol can be accurately and rapidly analyzed in real time, the accuracy and the reliability of the DSP upgrading process can be ensured, the speed of the DSP upgrading process can be improved, meanwhile, the DSP can be controlled in real time in the upgrading process, and other links cannot be influenced when the DSP is controlled.
And if the new DSP version number protocol information is not received or the new DSP version number protocol information cannot be successfully compared, determining that the online upgrade of the DSP network port fails.
Specifically, in SA3, after the DSP returns the DSP version number to the upper computer, the DSP waits to receive the BOOT image file sent by the upper computer, and if the BOOT image file is not received all the time in the waiting process, it is determined that online upgrade of the DSP portal fails.
The BOOT image file is specifically a 16-ary file in the large-end mode, and includes multiple protocol information required by the DSP upgrade, that is, the data in the file is not only in 16-ary format, but also the most significant bytes of the data are stored at the lowest address, and the least significant bytes of the data are stored at the highest address. The BOOT image file in the format has intuitiveness, accords with the use habit of a user, has compatibility and universality, can be conveniently matched with a network protocol of the DSP, and improves the data transmission efficiency and the protocol analysis efficiency.
Preferably, the header of the BOOT image file carries first upgrade package identification protocol information, and the tail of the BOOT image file carries second upgrade package identification protocol information.
The first upgrade package carried by the head of the BOOT mapping file identifies the protocol information, so that the current data can be identified as the upgrade package, and further, when the protocol analysis is carried out by the subsequent DSP, the upgrade package for the DSP upgrade is determined to be received; the second upgrade package identification protocol information carried by the tail of the BOOT image file can identify the current data as an upgrade package on one hand and the acquired data as a complete upgrade package on the other hand; the identification of the upgrade package can be realized by combining the first upgrade package identification protocol information and the second upgrade package identification protocol information carried by the BOOT image file, and the integrity of the upgrade package data can be ensured, so that the reliability of the subsequent DSP upgrade process is effectively ensured.
The embodiment specifically is that a RAM memory (further referred to as DDR memory) configured on the DSP receives a BOOT image file sent by the host computer.
Preferably, the present embodiment SA4 includes:
SA41: when the first upgrade package identification protocol information carried by the BOOT image file header is received, determining whether to enter an upgrade process according to the custom protocol stack and the first upgrade package identification protocol information;
SA42: when the upgrading process is determined to be entered, performing real-time data conversion on the received BOOT image file to obtain cache data in a small-end mode, and writing the cache data into the RAM in real time;
SA43: when the second upgrade package identification protocol information carried by the BOOT image file header is received, determining whether to enter a programming flow or not according to the custom protocol stack and the second upgrade package identification protocol information;
SA44: when the writing process is determined to be entered, writing is performed according to the cache data stored in the RAM memory, and the upgrade data generated in the writing process is written in the preset storage area.
When the DSP receives the first upgrade package identification protocol information carried by the header in the process of receiving the BOOT image file in real time, the user-defined protocol stack can be utilized to analyze whether the currently received data is an upgrade package or not, and then whether to enter an upgrade flow is determined; when the data is determined to be the upgrade package, the upgrade process is entered, and the BOOT image file in the large-end mode is converted into data in the small-end mode, so that the cache data in the small-end mode is obtained, the cache data can be matched with the hardware characteristics of the DSP, and the subsequent programming is facilitated; when the second upgrade package identification protocol information carried by the tail is received, the user-defined protocol stack can be utilized to analyze whether the currently received data is an upgrade package, and the analysis of the first upgrade package identification protocol information is combined, so that whether the DSP receives the complete upgrade package can be determined, whether the programming process is started or not is further determined, and the integrity and the reliability of the upgrade process are ensured; because the process that the BOOT image file is received by the DSP in real time and correspondingly, the data conversion of the BOOT image file and the storage of the cache data by the RAM memory are all processes carried out in real time, when the writing process is determined, the cache data stored by the RAM memory is directly used for carrying out data writing, and thus the online upgrade of the DSP can be truly realized.
The upgrading process is high in upper computer and lower computer cooperativity, the consistency of transmission data and transmission progress can be guaranteed based on real-time analysis of protocols, the DSP can be controlled in real time, the operation flow is simple, and the user friendliness is high; the reliability of the DSP upgrading process is high, and the brick changing risk can be reduced.
Specifically, in SA41, determining whether to enter an upgrade procedure according to the custom protocol stack and the first upgrade package identification protocol information includes:
SA411: comparing the custom protocol stack with the first upgrade package identification protocol information;
SA412: if the information which is the same as the first upgrade package identification protocol information exists in the custom protocol stack, the comparison is successful, the first upgrade package identification protocol information is analyzed, and the entering of an upgrade flow is determined; otherwise, continuing to wait for receiving the new first upgrade package identification protocol information until the received new first upgrade package identification protocol information is successfully compared.
The method for determining whether to enter the upgrading process based on the custom protocol stack is similar to the method for determining the DSP version number based on the custom protocol stack, and can rapidly and accurately identify and analyze the first upgrading packet identification protocol information in real time, thereby ensuring the reliability of the upgrading process.
Specifically, in this embodiment SA42, the received BOOT image file is subjected to real-time data conversion to obtain the cache data in the small-end mode, and the data conversion in the small-end mode adopts a conventional data conversion method in the art, and details are not described herein.
Specifically, in SA43, determining whether to enter a programming process according to the custom protocol stack and the second upgrade package identification protocol information includes:
SA431: comparing the custom protocol stack with the second upgrade package identification protocol information;
SA432: if the information which is the same as the second upgrade package identification protocol information exists in the custom protocol stack, the comparison is successful, the second upgrade package identification protocol information is analyzed, and the entering of a programming flow is determined; otherwise, continuing to wait for receiving the new second upgrade package identification protocol information until the received new second upgrade package identification protocol information is successfully compared.
The method for determining whether to enter the programming process based on the custom protocol stack is similar to the method for determining whether to enter the upgrading process based on the custom protocol stack by SA 411-SA 412, and can quickly and accurately identify and analyze the second upgrading packet identification protocol information in real time, thereby ensuring the reliability of the upgrading process.
Specifically, in the present embodiment SA44, when it is determined to enter the programming process, programming is directly performed according to the cache data stored in the RAM memory, and in the programming process, the generated upgrade data is stored in the preset storage area. The preset storage area is specifically an application data area in the mounted FLASH memory.
It should be understood that, in the SA42, when the BOOT image file performs real-time data conversion, only the data of the BOOT image file with the first upgrade package identification protocol information and the second upgrade package identification protocol information removed is converted, that is, the first upgrade package identification protocol information and the second upgrade package identification protocol information do not participate in data conversion. Therefore, in SA44, the cache data stored in the RAM memory does not include data related to the first upgrade package identification protocol information and the second upgrade package identification protocol information.
Preferably, after SA44, SA4 further comprises:
SA45: comparing the upgrade data stored in the preset storage area with the cache data stored in the RAM;
SA46: if the comparison is consistent, judging that the upgrade data is correct; otherwise, judging that the upgrade data is incorrect, and determining that the online upgrade of the DSP network port fails.
By comparing the cache data with the upgrade data, the accuracy of the DSP upgrade process can be ensured, and the reliability of the DSP upgrade is further improved.
Specifically, in the SA46 of this embodiment, if it is determined that the upgrade data is correct, upgrade success protocol information is sent to the upper computer, otherwise, not sent.
Preferably, the present embodiment SA4 further includes:
SA47: waiting for receiving the upgrade stopping protocol information sent by the upper computer;
SA48: when the upgrade stopping protocol information is received, entering an upgrade stopping flow according to the self-defined protocol stack and the upgrade stopping protocol information, and determining that the online upgrade of the DSP network port fails.
In the upgrading process of the DSP, the upgrade stopping protocol information sent by the upper computer can be waited to be received, and once the upgrade stopping protocol information is received, the protocol information can be analyzed by utilizing a user-defined protocol stack and then the upgrade stopping flow is entered; and once the upgrade is terminated, the online upgrade failure of the DSP network port under the current condition can be determined. According to the embodiment, through the stopping control of the DSP upgrading based on the custom protocol stack, the real-time operability in the DSP upgrading process can be further improved.
In the above SA48, the method for determining to enter the upgrade stopping process based on the custom protocol stack is similar to the method for determining whether to enter the upgrade stopping process based on the custom protocol stack of the above SA411 to SA412, and detailed descriptions thereof are omitted herein.
Specifically, in the SA5 of this embodiment, when the DSP sends upgrade success protocol information to the upper computer (i.e., the PC end), that is, represents that the DSP upgrade is successful in the current situation, the online upgrade process of the whole DSP network port is ended; and when the DSP does not send the upgrade success protocol information to the PC end, the upgrade failure of the DSP under the current condition is represented, and the online upgrade process of the whole DSP network port is also ended.
Preferably, after establishing communication with the upper computer through the network port in SA2 and before upgrading according to the custom protocol stack and the BOOT image file in SA4, the method further includes:
SA6: waiting for receiving debugging protocol information sent by the upper computer;
SA7: when the debugging protocol information is received, entering a debugging process according to the self-defined protocol stack and the debugging protocol information, generating debugging data, and returning the debugging data to the upper computer through a network port.
When the DSP is in a communication state with the upper computer, the debugging protocol information sent by the upper computer can be utilized, and on-line debugging is realized based on a custom protocol stack; the method adopts the optimal code quantity design, ensures stable and reliable performance and high speed, and is convenient for user verification and transplanting to the self project.
In the above SA7 of the present embodiment, the method for determining whether to enter the debug flow based on the custom protocol stack is similar to the method for determining whether to enter the upgrade flow based on the custom protocol stack described in the above SA411 to SA412, and detailed descriptions thereof are omitted herein.
Example two
As shown in fig. 13, a method for online upgrading a DSP portal is applied to an upper computer connected to a DSP through a portal, and is correspondingly matched with the method for online upgrading a DSP portal in the first embodiment, where the method includes:
SB1: after the DSP acquires a self-defined protocol stack in advance, establishing communication with the DSP through a network port;
SB2: transmitting DSP version number protocol information to a DSP, and waiting for receiving a DSP version number returned by the DSP based on the self-defined protocol stack and the DSP version number protocol information;
SB3: after receiving the returned DSP version number, acquiring a DSP upgrading packet according to the DSP version number, and performing data processing on the DSP upgrading packet to generate a BOOT image file;
SB4: the BOOT image file is sent to a DSP, and the DSP is waited to upgrade based on the self-defined protocol stack and the BOOT image file and wait to receive upgrade success protocol information returned by the DSP;
SB5: and when the upgrade success protocol information is received, finishing the online upgrade of the DSP network port.
The online upgrading method of the DSP network port is applied to an upper computer, and after the DSP acquires a self-defined protocol stack, communication is established with the DSP, so that subsequent online upgrading is ensured; after communication is established with the DSP, the DSP version number protocol information is sent to the DSP, so that the DSP can conveniently analyze the protocol information by utilizing the acquired custom protocol stack to determine the DSP version number, the upper computer can conveniently determine a DSP upgrading packet corresponding to the DSP version number, further, a BOOT image file corresponding to the DSP version number is generated, and the success of upgrading of the DSP is ensured; the BOOT image file is also protocol information, and after the upper computer generates the BOOT image file, the BOOT image file is also sent to the DSP, so that the DSP can conveniently analyze the protocol information by utilizing the obtained self-defined protocol stack, and can enter the current upgrading flow of the DSP, and at the moment, the upper computer determines the completion of the online upgrading process of the whole DSP network port by waiting for receiving the upgrading success protocol information returned by the DSP.
The online upgrading method of the DSP network port for the upper computer is based on the custom protocol stack technology, and on the basis of conveniently realizing online upgrading of the DSP network port, the upper computer and the DSP can be ensured to be in a real-time communication connection state in the upgrading process, no disconnection occurs, and therefore the DSP can be conveniently controlled in real time; corresponding embedded programming can be respectively carried out in the DSP and the upper computer, the optimal code quantity design can be realized without excessive code quantity design, and the user can conveniently verify and transplant the code quantity design into free projects while ensuring stability, reliability and high speed; in the whole upgrading process, the upper computer and the DSP connected through the network port cooperatively interact, so that the cooperative performance is high, the speed is high, the reliability is high, and the operation flow is simple; in addition, the upper computer can automatically generate the BOOT IMAGE file according to the DSP version number, and a BOOT IMAGE generating tool is embedded, so that codes can be further optimized, the operation flow of a user is simplified, the user friendliness is improved, and the application value is high.
In this embodiment, the DSP is programmed by using an embedded C language, the upper computer is a PC (i.e., a computer) and the PC is programmed by using a Python language, and a communication protocol between the DSP and the PC is a UDP protocol (User Datagram Protocol, user datagram protocol, which is a connectionless transport layer protocol).
Specifically, in this embodiment SB1, after the DSP acquires its own custom protocol stack in advance, the upper computer (specifically, the PC side) can implement communication connection with the DSP by configuring port information.
An operation interface schematic diagram of the configuration port information of the PC end in this embodiment is shown in fig. 3, and the communication connection between the PC end and the DSP end can be achieved by respectively configuring "local network configuration" and "remote network configuration" on the PC end, and then clicking "confirm connection" on the operation interface.
Preferably, the upper computer is configured with a file storage area;
in this embodiment SB3, when receiving the returned DSP version number, obtaining a DSP upgrade packet according to the DSP version number includes:
SB31: after receiving the returned DSP version number, obtaining an upgrade package storage address and an upgrade package file name according to the DSP version number;
SB32: and extracting the DSP upgrade package from the file storage area according to the upgrade package storage address and the upgrade package file name.
The upgrade package storage address and the upgrade package file name facilitate the PC end to rapidly and accurately extract the DSP upgrade package corresponding to the DSP version number in the file storage area, thereby ensuring the reliability of subsequent DSP upgrade.
An operation interface schematic diagram of the DSP version number received by the PC side in this embodiment is shown in fig. 4, and in fig. 4, the DSP version number of the current DSP software obtained by the PC side is "VT 2.0.1".
Preferably, in the present embodiment SB3, the processing of data on the DSP upgrade package to generate a BOOT image file includes:
SB33: performing 16-system conversion and large-end mode conversion on the DSP upgrade package to obtain the BOOT image file; the head of the BOOT image file carries first upgrade package identification protocol information, and the tail of the BOOT image file carries second upgrade package identification protocol information.
The upper computer is used for carrying out 16-system conversion and large-end mode conversion on the DSP upgrade package to generate a 16-system file in the large-end mode, so that the method has intuitiveness, accords with the use habit of a user, has compatibility and universality, can be conveniently matched with a network protocol of the DSP, and improves the data transmission efficiency and the protocol analysis efficiency.
The prompt interface for carrying out 16-system conversion and large-end mode conversion on the upgrade package is shown in fig. 5, and on the prompt interface, the user is prompted to operate by generating the binary upgrade file and continuing upgrade, and the 16-system conversion and large-end mode conversion are continuously carried out on the upgrade package to generate the BOOT image file. The generated BOOT image file is shown in fig. 6, and fig. 6 includes information such as a name, a size, a type, and the like of the BOOT image file.
In the SB4 embodiment, when the PC side sends the BOOT image file to the DSP (specifically, the DDR memory configured on the DSP), the PC side starts timing and obtains the transmission progress in real time, and waits for the DSP to upgrade, because the sending process is a real-time data transmission process. The schematic diagram of the operation interface for the PC side to acquire the transmission progress in real time is shown in fig. 7, and in fig. 7, "20%" is the current transmission progress. When the PC end completes the transmission of the BOOT image file, the operation interface of the PC end displays the current transmission progress as 100%, as shown in fig. 8; at this time, the programming flow of the DSP end is waited for, and the upgrade success protocol information returned by the DSP is waited for to be received.
When the DSP completes the programming flow and the comparison of the upgrade data and the cache data is consistent, the PC receives the upgrade success protocol information, the operation interface is shown in figure 9, "upgrade is successful, and the operation is effective after restarting the DSP" is the information obtained after the PC analyzes according to the upgrade success protocol information; meanwhile, the PC side can display a time-consuming prompt in the upgrading process on an operation interface, such as 'upgrading time-consuming' in fig. 9: 310s,19228 μs ", meaning that the sum of 310s and 19228 μs is the total upgrade time consuming.
Specifically, in the process of sending the BOOT image file to the DSP by the PC, for example, when the transmission progress of the BOOT image file is 40%, and when the user sends the upgrade stopping protocol information to the DSP through the PC, as shown in fig. 10, the user clicks "upgrade stopping" on the PC operation interface, and the DSP receives the corresponding upgrade stopping protocol information and analyzes the protocol information by using the custom protocol stack to enter the upgrade stopping flow; when the DSP enters the upgrade stopping flow, the current BOOT image file transmission progress of the operation interface of the PC is suspended at 40%, and upgrade stopping feedback information is fed back to the PC, as shown in fig. 11, and the "upgrade stopped," which is the information obtained by analyzing the feedback information according to the feedback upgrade stopping feedback information by the PC, is called "upgrade stopping, and is requested to reconnect, upgrade, and debug".
Specifically, after the PC end establishes communication with the DSP through the network port and before waiting for the DSP to enter the programming flow, the user may send debug protocol information to the DSP through the PC end, as shown in fig. 12A and 12B. In fig. 12A and 12B, after the user inputs protocol information (for example, "test" or "Hello world |") on the "network transmission data" by checking "hexadecimal transmission" and/or "display remote information" under the "network data setting" menu on the operation interface of the PC, and then clicks "transmission", the DSP can receive the corresponding debug protocol information, and parse based on the custom protocol stack, and feed back the corresponding debug data through the PC. Messages from "746573740a", "test", "from ('172.16.10.100', 6666) in fig. 12A: test "is debug data, and" 48656c6c6f20776f726c64210a "," Hello world-! "," messages from ('172.16.10.100', 6666): hello world-! "also are debug data.
The online upgrade method of the DSP network port for the host computer in this embodiment is correspondingly matched with the online upgrade method of the DSP network port for the DSP in the first embodiment, so that details of the online upgrade method of the DSP network port for the host computer in this embodiment are not described in detail in the first embodiment and the specific descriptions of fig. 1 to 2, and are not described here again.
Example III
The DSP, as shown in fig. 14, is applied to the DSP network port online upgrade method in the first embodiment, and includes:
the protocol stack definition module is used for acquiring a user-defined protocol stack of the DSP in advance;
the first communication connection module is used for establishing communication with the upper computer through the network port;
The first information receiving module is used for receiving the DSP version number protocol information sent by the upper computer;
The version number acquisition module is used for determining a DSP version number according to the custom protocol stack and the received DSP version number protocol information;
The first information sending module is used for returning the DSP version number to the upper computer;
The first information receiving module is also used for waiting to receive a BOOT image file obtained by the upper computer based on the DSP version number;
the DSP upgrading module is used for upgrading according to the custom protocol stack and the BOOT image file after the first information receiving module receives the BOOT image file, and writing upgrading data in a preset storage area;
The first information sending module is further used for sending upgrade success protocol information to the upper computer under the condition that the upgrade data are correct, and online upgrade of the DSP network port is completed.
The DSP of this embodiment first obtains the custom protocol stack of the DSP by using the protocol stack definition module, and may identify and parse each protocol information (including DSP version number protocol information, BOOT image file, etc.) sent by the host computer by using the custom protocol stack after the DSP establishes communication with the host computer by using the first communication connection module; after the first information receiving module receives the DSP version number protocol information, a user-defined protocol stack can be utilized, the version number obtaining module analyzes the protocol information to determine the DSP version number, so that the upper computer can return to the corresponding BOOT image file conveniently, and the success of upgrading the DSP is ensured; the BOOT image file is also protocol information, and after the first information receiving module receives the BOOT image file sent by the upper computer, the DSP upgrading module is utilized to analyze the protocol information by utilizing a custom protocol stack, so that the current DSP upgrading flow can be entered.
The DSP of the embodiment is based on a custom protocol stack technology, and on the basis of conveniently realizing online upgrade of a DSP network port, the state of real-time communication connection between the upper computer and the host computer can be ensured in the upgrade process, no disconnection occurs, and the real-time operability is high; the corresponding embedded programming can be carried out, the optimal code quantity design can be realized without excessive code quantity design, and the user can conveniently verify and transplant the code quantity design into free projects while ensuring stability, reliability and high speed; in the whole upgrading process, the DSP cooperatively interacts with an upper computer connected through a network port, so that the method has the advantages of high cooperativity, high speed, high reliability and simple operation flow; in addition, the DSP receives the BOOT IMAGE file automatically generated by the upper computer according to the DSP version number, which is equivalent to embedding a BOOT IMAGE generating tool in the whole upgrading system, can further optimize codes, simplify the operation flow of a user, improve the user friendliness and have higher application value.
The functions of each module of the DSP in this embodiment are the same as the corresponding steps in the online upgrade method of the DSP network port in the first embodiment, and details of this embodiment are not fully described in this embodiment, and detailed descriptions of the first embodiment and fig. 1 to 2 are omitted here.
Example IV
The upper computer is applied to the online upgrading method of the DSP network port in the second embodiment, and correspondingly cooperates with the DSP in the third embodiment, as shown in FIG. 15, and comprises:
The second communication connection module is used for establishing communication with the DSP through a network port after the DSP acquires a self-defined protocol stack in advance;
the second information sending module is used for sending the DSP version number protocol information to the DSP;
The second information receiving module is used for waiting to receive the DSP version number returned by the DSP based on the self-defined protocol stack and the DSP version number protocol information;
the image file generating module is used for acquiring a DSP upgrading packet according to the DSP version number after the second information receiving module receives the returned DSP version number, and performing data processing on the DSP upgrading packet to generate a BOOT image file;
the second information sending module is further configured to send the BOOT image file to a DSP, and wait for the DSP to upgrade based on the custom protocol stack and the BOOT image file;
The second information receiving module is also used for waiting to receive the upgrade success protocol information returned by the DSP, and finishing the online upgrade of the DSP network port when the upgrade success protocol information is received.
The upper computer of the embodiment firstly acquires a self-defined protocol stack from a DSP which is in communication connection with the upper computer, and then establishes communication with the DSP through a second communication connection module to ensure subsequent online upgrade; after communication is established with the DSP, namely, the second information sending module sends the DSP version number protocol information to the DSP, so that the DSP can conveniently analyze the protocol information by utilizing the acquired custom protocol stack to determine the DSP version number, the upper computer can conveniently determine a DSP upgrading packet corresponding to the DSP version number, and further, the mapping file generating module generates a BOOT mapping file corresponding to the DSP version number to ensure that the DSP can be successfully upgraded; the BOOT image file is also protocol information, after the upper computer generates the BOOT image file, the BOOT image file is sent to the DSP through the second information sending module, so that the DSP can conveniently analyze the protocol information by utilizing the obtained self-defined protocol stack, and the current upgrading process of the DSP can be entered, and at the moment, the upper computer waits for receiving the upgrading success protocol information returned by the DSP through the second information receiving module to determine the completion of the online upgrading process of the whole DSP network port.
The upper computer of the embodiment is based on a custom protocol stack technology, and can ensure the state of real-time communication connection with the DSP in the upgrading process on the basis of conveniently realizing online upgrading of the DSP network port without losing connection, thereby being convenient for carrying out real-time control on the DSP; the corresponding embedded programming can be carried out in the upper computer, the optimal code quantity design can be realized without excessive code quantity design, and the user can conveniently verify and transplant the code quantity design into free projects while ensuring stability, reliability and high speed; in the whole upgrading process, the upper computer and the DSP connected through the network port cooperatively interact, so that the cooperative performance is high, the speed is high, the reliability is high, and the operation flow is simple; in addition, the upper computer can automatically generate the BOOT IMAGE file according to the DSP version number, and a BOOT IMAGE generating tool is embedded, so that codes can be further optimized, the operation flow of a user is simplified, the user friendliness is improved, and the application value is high.
The functions of each module of the upper computer in this embodiment are the same as those of the method steps in the DSP network port online upgrade method in the second embodiment, so details of this embodiment are not fully described, and detailed descriptions of the first embodiment, the second embodiment, the third embodiment, and fig. 1 to 14 are omitted here.
Example five
A DSP network port online upgrading system is shown in FIG. 16, and comprises a DSP of the third embodiment and an upper computer of the fourth embodiment, wherein the DSP and the upper computer are in communication connection through a network port.
The DSP network port online upgrading system of the embodiment is based on a custom protocol stack technology, on the basis of conveniently realizing online upgrading of the DSP network port, not only can the DSP be controlled in real time in the upgrading process, but also the DSP can be designed according to the optimal code quantity, so that the user can conveniently verify and transplant the DSP network port online upgrading system into free projects while ensuring stable, reliable and high speed; in the upgrading process, the DSP and the upper computer cooperatively interact, so that the method has the advantages of higher synergy, high speed, high reliability and simple operation flow; the BOOT IMAGE file can be automatically generated, the BOOT IMAGE generating tool is embedded, the code can be optimized by embedding the size end processing, the user operation flow is simplified, and the application value is high.
In this embodiment, the DSP is programmed by using an embedded C language, the upper computer is a PC (i.e., a computer) and the PC is programmed by using a Python language, and a communication protocol between the DSP and the PC is a UDP protocol. When the DSP network port online upgrading system carries out DSP upgrading, the complete flow is described as follows:
Step.1: the DSP is started and initialized to obtain a self-defined protocol stack;
Step.2: the PC end and the DSP are respectively configured with port information, and the PC end and the DSP are in remote communication connection through a network port;
step.3: the PC end point clicks to acquire the DSP version number and sends the DSP version number protocol information to the DSP;
step 4: the DSP receives the DSP version number protocol information and returns a corresponding DSP version number to the PC terminal;
Step.5: the PC side successfully acquires the DSP version number, jumps to step.6, otherwise, continues to wait for receiving the DSP version number returned by the DSP;
step.6: the PC inputs the upgrade package storage position and the upgrade package file name corresponding to the DSP version number, and extracts the corresponding DSP upgrade package;
Step.7: generating a PC end click file, and processing the extracted DSP upgrade package into a BOOT image file of a 16-system in a large-end mode;
Step.8: the PC end point clicks to confirm the upgrade, and sends the BOOT image file to a DDR memory in the DSP;
Step.9: the PC end starts upgrading timing, and obtains the transmission progress of the BOOT image file sent by the orientation DSP in real time, and waits for entering an upgrading flow;
Step.10: the DSP receives the BOOT image file, confirms that an upgrade package is received according to first upgrade package identification protocol information carried by the head of the BOOT image file, and enters an upgrade process;
Step.11: the DSP converts the BOOT image file into cache data in a small-end mode, and caches the cache data into a RAM (random access memory) of the DSP;
Step.12: if the PC terminal intervenes in the upgrade, clicking to stop the upgrade, sending upgrade stopping protocol information to the DSP, and entering Step13; otherwise, jumping to step.14;
Step.13: the DSP receives the upgrade stopping protocol information, analyzes the upgrade stopping protocol information based on a user-defined protocol stack, enters a upgrade stopping process, and is unsuccessful in upgrade, and the process is ended;
Step.14: the DSP receives the BOOT image file, confirms that the complete upgrade package is received according to the second upgrade package identification protocol information carried by the tail part of the BOOT image file, and enters a programming process, wherein upgrade data in the programming process are stored in an application data area of a FLASH memory hung on the DSP;
Step.15: the DSP finishes programming and compares the cache data in the RAM memory with the upgrade data in the FLASH memory;
step.16: if the DSP is consistent in comparison, the upgrade data is correct, and upgrade success protocol information is sent to the PC end;
step.17: the PC receives the upgrade success protocol information and confirms the upgrade success;
step.18: and restarting the DSP to finish online upgrading of the DSP network port, and ending the flow.
Compared with the traditional technology, the DSP network port online upgrading system of the embodiment has the advantages of upgrading mode, upgrading state and upgrading difficulty shown in table 1.
Table 1 comparison between the DSP network port online upgrade system of the embodiment and the conventional technology
Similarly, the details of the embodiment are not fully described in detail in the first embodiment, the second embodiment, the third embodiment, the fourth embodiment and fig. 1 to 15, and are not repeated here.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations are within the scope of the invention as defined by the appended claims.

Claims (15)

1. An online upgrading method of a DSP network interface, which is applied to a DSP, is characterized by comprising the following steps:
Acquiring a custom protocol stack of a DSP in advance;
establishing communication with an upper computer through a network port, receiving DSP version number protocol information sent by the upper computer, determining a DSP version number according to the self-defined protocol stack and the DSP version number protocol information, and returning the DSP version number to the upper computer;
Waiting to receive a BOOT image file obtained by the upper computer based on the DSP version number;
after receiving the BOOT image file, upgrading according to the custom protocol stack and the BOOT image file, and writing upgrading data in a preset storage area;
and under the condition that the upgrade data are correct, transmitting upgrade success protocol information to the upper computer to complete online upgrade of the DSP network port.
2. The DSP portal online upgrade method according to claim 1, wherein the DSP is configured with RAM memory;
The head of the BOOT image file carries first upgrade package identification protocol information, and the tail of the BOOT image file carries second upgrade package identification protocol information;
after receiving the BOOT image file, upgrading according to the custom protocol stack and the BOOT image file, and writing upgrading data in a preset storage area, wherein the upgrading data comprises the following steps:
When the first upgrade package identification protocol information carried by the BOOT image file header is received, determining whether to enter an upgrade process according to the custom protocol stack and the first upgrade package identification protocol information;
When the upgrading process is determined to be entered, performing real-time data conversion on the received BOOT image file to obtain cache data in a small-end mode, and writing the cache data into the RAM in real time;
When the second upgrade package identification protocol information carried by the BOOT image file header is received, determining whether to enter a programming flow or not according to the custom protocol stack and the second upgrade package identification protocol information;
when the writing process is determined to be entered, writing is performed according to the cache data stored in the RAM memory, and the upgrade data generated in the writing process is written in the preset storage area.
3. The DSP portal online upgrade method according to claim 2, wherein, after receiving the BOOT image file, upgrade is performed according to the custom protocol stack and the BOOT image file, further comprising:
waiting for receiving the upgrade stopping protocol information sent by the upper computer;
When the upgrade stopping protocol information is received, entering an upgrade stopping flow according to the self-defined protocol stack and the upgrade stopping protocol information, and determining that the online upgrade of the DSP network port fails.
4. The DSP portal online upgrade method according to claim 2, wherein after upgrading according to the custom protocol stack and the BOOT image file, and writing upgrade data in a preset storage area, the method further comprises:
comparing the upgrade data stored in the preset storage area with the cache data stored in the RAM;
If the comparison is consistent, judging that the upgrade data is correct; otherwise, judging that the upgrade data is incorrect, and determining that the online upgrade of the DSP network port fails.
5. The method for online upgrading of a DSP portal according to claim 1, wherein obtaining a custom protocol stack of the DSP in advance includes:
Configuring a protocol stack storage rule of the DSP;
Initializing the DSP with the configured protocol stack storage rule to obtain the custom protocol stack.
6. The method for online upgrading of a DSP portal according to claim 5, wherein the DSP is configured with an SPI interface;
configuring a protocol stack storage rule of the DSP, comprising:
based on SPI protocol, hanging FLASH memory under the SPI interface;
And determining the idle partition of the FLASH memory as a protocol stack partition, and writing a pre-compiled protocol stack into the protocol stack partition to complete the configuration of the protocol stack storage rule of the DSP.
7. The online upgrading method of a DSP network port according to claim 6, wherein the DSP is further configured with a RAM memory, and the RAM memory includes a secondary cache and/or a DDR memory;
initializing the DSP with the configured protocol stack storage rule to obtain the custom protocol stack, wherein the method comprises the following steps:
initializing the RAM memory in the DSP;
positioning the protocol stack partition in the FLASH memory according to the address mapping of the FLASH memory;
and reading a protocol stack from the positioned protocol stack partition by using the RAM memory to obtain the custom protocol stack.
8. The method for online upgrading a DSP portal according to claim 1, wherein determining a DSP version number according to the custom protocol stack and the DSP version number protocol information comprises:
Comparing the custom protocol stack with the DSP version number protocol information;
If the information which is the same as the DSP version number protocol information exists in the custom protocol stack, the comparison is successful, and the DSP version number protocol information is analyzed to obtain the DSP version number; otherwise, continuing to wait for receiving the DSP version number protocol information sent by the upper computer until the received DSP version number protocol information is successfully compared.
9. The DSP portal online upgrade method according to any one of claims 1-7, wherein after establishing communication with a host computer through a portal and before upgrading according to the custom protocol stack and the BOOT image file, the method further comprises:
waiting for receiving debugging protocol information sent by the upper computer;
When the debugging protocol information is received, entering a debugging process according to the self-defined protocol stack and the debugging protocol information, generating debugging data, and returning the debugging data to the upper computer through a network port.
10. The online upgrading method of a DSP network port, which is applied to an upper computer connected with the DSP through the network port, is characterized in that the online upgrading method is used for corresponding cooperation of the DSP and the online upgrading method of the DSP network port according to any one of claims 1 to 9, and comprises the following steps:
after the DSP acquires a self-defined protocol stack in advance, establishing communication with the DSP through a network port;
transmitting DSP version number protocol information to a DSP, and waiting for receiving a DSP version number returned by the DSP based on the self-defined protocol stack and the DSP version number protocol information;
After receiving the returned DSP version number, acquiring a DSP upgrading packet according to the DSP version number, and performing data processing on the DSP upgrading packet to generate a BOOT image file;
the BOOT image file is sent to a DSP, and the DSP is waited to upgrade based on the self-defined protocol stack and the BOOT image file and wait to receive upgrade success protocol information returned by the DSP;
and when the upgrade success protocol information is received, finishing the online upgrade of the DSP network port.
11. The method for online upgrade of a DSP portal according to claim 10, wherein the data processing is performed on the DSP upgrade package to generate a BOOT image file, comprising:
Performing 16-system conversion and large-end mode conversion on the DSP upgrade package to obtain the BOOT image file; the head of the BOOT image file carries first upgrade package identification protocol information, and the tail of the BOOT image file carries second upgrade package identification protocol information.
12. The DSP portal online upgrade method according to claim 10, wherein the upper computer is configured with a file storage area;
After receiving the returned DSP version number, acquiring a DSP upgrade package according to the DSP version number, including:
after receiving the returned DSP version number, obtaining an upgrade package storage address and an upgrade package file name according to the DSP version number;
and extracting the DSP upgrade package from the file storage area according to the upgrade package storage address and the upgrade package file name.
13. A DSP, which is applied to the DSP network port online upgrade method according to any one of claims 1 to 9, comprising:
the protocol stack definition module is used for acquiring a user-defined protocol stack of the DSP in advance;
the first communication connection module is used for establishing communication with the upper computer through the network port;
The first information receiving module is used for receiving the DSP version number protocol information sent by the upper computer;
The version number acquisition module is used for determining a DSP version number according to the custom protocol stack and the received DSP version number protocol information;
The first information sending module is used for returning the DSP version number to the upper computer;
The first information receiving module is also used for waiting to receive a BOOT image file obtained by the upper computer based on the DSP version number;
the DSP upgrading module is used for upgrading according to the custom protocol stack and the BOOT image file after the first information receiving module receives the BOOT image file, and writing upgrading data in a preset storage area;
The first information sending module is further used for sending upgrade success protocol information to the upper computer under the condition that the upgrade data are correct, and online upgrade of the DSP network port is completed.
14. A host computer in corresponding cooperation with the DSP of claim 13, comprising:
The second communication connection module is used for establishing communication with the DSP through a network port after the DSP acquires a self-defined protocol stack in advance;
the second information sending module is used for sending the DSP version number protocol information to the DSP;
The second information receiving module is used for waiting to receive the DSP version number returned by the DSP based on the self-defined protocol stack and the DSP version number protocol information;
the image file generating module is used for acquiring a DSP upgrading packet according to the DSP version number after the second information receiving module receives the returned DSP version number, and performing data processing on the DSP upgrading packet to generate a BOOT image file;
the second information sending module is further configured to send the BOOT image file to a DSP, and wait for the DSP to upgrade based on the custom protocol stack and the BOOT image file;
The second information receiving module is also used for waiting to receive the upgrade success protocol information returned by the DSP, and finishing the online upgrade of the DSP network port when the upgrade success protocol information is received.
15. The DSP network port online upgrading system is characterized by comprising the DSP as claimed in claim 13 and the upper computer as claimed in claim 14, wherein the DSP and the upper computer are in communication connection through a network port.
CN202410491356.3A 2024-04-23 2024-04-23 DSP network port online upgrading method, DSP, upper computer and system Pending CN118101469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410491356.3A CN118101469A (en) 2024-04-23 2024-04-23 DSP network port online upgrading method, DSP, upper computer and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410491356.3A CN118101469A (en) 2024-04-23 2024-04-23 DSP network port online upgrading method, DSP, upper computer and system

Publications (1)

Publication Number Publication Date
CN118101469A true CN118101469A (en) 2024-05-28

Family

ID=91157426

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410491356.3A Pending CN118101469A (en) 2024-04-23 2024-04-23 DSP network port online upgrading method, DSP, upper computer and system

Country Status (1)

Country Link
CN (1) CN118101469A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471674A (en) * 2019-08-21 2019-11-19 上海无线电设备研究所 The remote upgrade method of DSP embedded program based on C6455 chip
CN111008033A (en) * 2019-10-30 2020-04-14 中国航空工业集团公司洛阳电光设备研究所 Universal DSP (digital signal processor) online upgrading system and upgrading method based on serial port
CN113238787A (en) * 2021-05-06 2021-08-10 西北工业大学 Local online upgrading method for DSP based on Ethernet
CN115550330A (en) * 2022-08-04 2022-12-30 湖南艾科诺维科技有限公司 Method and system for remotely updating DSP (digital Signal processor) program based on network port
CN117687664A (en) * 2023-12-03 2024-03-12 武汉船舶通信研究所(中国船舶集团有限公司第七二二研究所) Online upgrade configuration method and device for DSP

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471674A (en) * 2019-08-21 2019-11-19 上海无线电设备研究所 The remote upgrade method of DSP embedded program based on C6455 chip
CN111008033A (en) * 2019-10-30 2020-04-14 中国航空工业集团公司洛阳电光设备研究所 Universal DSP (digital signal processor) online upgrading system and upgrading method based on serial port
CN113238787A (en) * 2021-05-06 2021-08-10 西北工业大学 Local online upgrading method for DSP based on Ethernet
CN115550330A (en) * 2022-08-04 2022-12-30 湖南艾科诺维科技有限公司 Method and system for remotely updating DSP (digital Signal processor) program based on network port
CN117687664A (en) * 2023-12-03 2024-03-12 武汉船舶通信研究所(中国船舶集团有限公司第七二二研究所) Online upgrade configuration method and device for DSP

Similar Documents

Publication Publication Date Title
CN101840368B (en) JTAG (Joint Test Action Group) real-time on-chip debug method and system of multicore processor
CN101163055A (en) Method of automatically detecting server hardware information
CN104156234B (en) Start the method and device of multi-core processor, the big small end mode adaptives of bootloader
CN103514018A (en) Method for remotely downloading programs based on STM32F4 controller
US12008171B2 (en) Program download method for intelligent terminal with memory card identifier and intelligent terminal with memory card identifier
CN114024871B (en) Chip verification method, system, computer equipment and readable storage medium
CN118101469A (en) DSP network port online upgrading method, DSP, upper computer and system
CN115658582A (en) PCIE equipment scanning method and server
CN111597137B (en) SPI protocol-based dynamic debugging method, device and system
CN113364747A (en) Debugging method, device and system and data set generation method and device
CN107729090A (en) A kind of user program method for down loading based on Serial Port Transmission
CN111858218A (en) FPGA AMBA bus interface debugging method and device and FPGA
CN112181460A (en) Program firmware upgrading method and device, electronic equipment and storage medium
WO2017088531A1 (en) Tigersharc series dsp start-up management chip and method
CN109144853B (en) Software defined radio SoC chip debugging system
CN116088927A (en) FPGA program circuit and method based on ZYNQ processor configuration
CN116401186A (en) OPI PSRAM control system and method based on AXI bus
CN109344096A (en) A kind of method, apparatus, equipment and storage medium connecting external equipment
CN113590148A (en) Method for upgrading secondary system program on line
CN106445574A (en) Method for realizing on-line programming of DSP (Digital Signal Processor) system
CN110955435A (en) Burning method and related components of FPGA accelerator card onboard flash
CN204256731U (en) A kind of FPGA reads USB device data set at a high speed
CN117271402B (en) FPGA-based low-latency PCIe DMA data transmission method
CN113448632B (en) Redfish resource information calling method, device, equipment and storage medium
JP3775462B2 (en) Debug system and information storage medium

Legal Events

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