CN113703811A - Method, device and equipment for downloading firmware remotely by DSP and storage medium - Google Patents

Method, device and equipment for downloading firmware remotely by DSP and storage medium Download PDF

Info

Publication number
CN113703811A
CN113703811A CN202111037396.3A CN202111037396A CN113703811A CN 113703811 A CN113703811 A CN 113703811A CN 202111037396 A CN202111037396 A CN 202111037396A CN 113703811 A CN113703811 A CN 113703811A
Authority
CN
China
Prior art keywords
program
board card
firmware
dsp board
core dsp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111037396.3A
Other languages
Chinese (zh)
Other versions
CN113703811B (en
Inventor
郑佳晶
丁彦杰
王国永
李洪亮
孙邦元
高繁星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Semiconductor Equipment Institute
Original Assignee
Beijing Semiconductor Equipment Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Semiconductor Equipment Institute filed Critical Beijing Semiconductor Equipment Institute
Priority to CN202111037396.3A priority Critical patent/CN113703811B/en
Publication of CN113703811A publication Critical patent/CN113703811A/en
Application granted granted Critical
Publication of CN113703811B publication Critical patent/CN113703811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The application provides a method, a device, equipment and a storage medium for downloading firmware remotely by a DSP, which are applied to the technical field of firmware downloading and comprise the following steps: the PC upper computer writes an IBL bootstrap program into a FLASH memory of the multi-core DSP board card; after programming is finished, parameter configuration is carried out on the IBL bootstrap program by serial port terminal software of the PC upper computer according to the JSON configuration file; the PC upper computer establishes network connection with the multi-core DSP board card through a TFTP Server program by using a parameter configuration result; and the TFTP Server program downloads a firmware program into the multi-core DSP board card through the established network connection, wherein the firmware program is in an ELF file format. The beneficial effect of this application mainly lies in: the multi-core DSP board card establishes network connection with the PC upper computer according to the programmed IBL bootstrap program, the network connection is not limited by space and distance, the operation is more convenient, and in different application environments, the network address and the network port can be changed without changing the parameter configuration of the IBL bootstrap program, so that the firmware program downloading is realized.

Description

Method, device and equipment for downloading firmware remotely by DSP and storage medium
Technical Field
The application relates to the technical field of firmware downloading, in particular to a method, a device, equipment and a storage medium for downloading firmware remotely by a DSP.
Background
Ti (texas instruments) texas instruments semiconductor provides innovative Digital Signal Processing (DSP) and analog device technologies, wherein C6000 series DSP has 8-core processor and higher CPU running speed, can process big data in real time, and is widely used in the fields of motion control, image processing, medicine, etc., however, after the development of integrated products, since the JTAG interface is located in the housing of the product package, it is necessary to download firmware by externally connecting an emulator through the JTAG interface, which is limited by the field space layout and occupies space, and there are disadvantages that the emulator connection is inconvenient, and sometimes even connection interruption occurs.
Disclosure of Invention
In view of this, an embodiment of the present application provides a method for downloading firmware remotely by a DSP, where a PC upper computer writes an IBL bootstrap program into a FLASH memory of a multi-core DSP board, and performs parameter configuration on the IBL bootstrap program through a JSON configuration file, so as to enable the multi-core DSP board to download a firmware program of a TFTP server remotely, and at the same time, start a firmware program of a kernel according to a program code of the multi-core DSP board, so as to implement a multi-kernel synchronous downloading function.
In a first aspect, an embodiment of the present application provides a method for downloading firmware remotely by a DSP, where the method includes:
the PC upper computer writes an IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to the installed simulator;
after programming is completed, parameter configuration is carried out on the IBL bootstrap program by serial port terminal software of the PC upper computer according to the JSON configuration file, and the parameter configuration comprises the following steps: network address configuration, network port configuration, firmware name configuration and physical address configuration;
the PC upper computer establishes network connection with the multi-core DSP board card through a TFTP Server program by using the parameter configuration result;
and the TFTP Server program downloads a firmware program into the multi-core DSP board card through the established network connection, wherein the firmware program is in an ELF file format.
In some embodiments, the burning, by the PC upper computer, the IBL boot program into the FLASH memory of the multi-core DSP board according to the installed emulator includes:
the PC upper computer responds to an instruction of an operator and selects the model of the corresponding multi-core DSP board card from the simulator;
the multi-core DSP board card converts IBL _ prj.out files of the IBL bootstrap program into IBL _ prj.bin files according to a conversion tool;
the converted ibl _ prj.bin file is programmed into FLASH memory according to the flashburntool.
In some embodiments, after the programming is completed, the parameter configuration of the IBL bootstrap program is performed by the serial port terminal software of the PC upper computer according to the JSON configuration file, including:
the FLASH memory analyzes the JSON configuration file according to the programmed IBL bootstrap program to obtain configuration parameters after analysis;
and the serial port terminal software of the PC upper computer sends the parameters of the JSON configuration file to the multi-core DSP board card according to a serial port Xmodem protocol.
In some embodiments, the establishing, by the PC upper computer, a network connection with the multi-core DSP board card through the TFTP Server program by using the result of the parameter configuration includes:
the PC upper computer creates a data exchange Socket descriptor of the TFTP Server program according to a parameter configuration result;
and the PC upper computer establishes network connection with the multi-core DSP board card through the physical address of the TFTP Server program.
In some embodiments, the TFTP Server program downloads a firmware program to the multi-core DSP board card through the established network connection, where the firmware program is in an ELF file format, and includes:
after network connection is established, the multi-core DSP board card acquires a firmware program according to a Socket descriptor of a TFTP Server program;
the TFTP Server program transmits the byte stream in the firmware program to the multi-core DSP board card in a sub-packet mode with the length of 512 bytes according to a network communication protocol;
the multi-core DSP board card analyzes the received firmware program file, and determines the position of a program header table in a firmware program after analysis, wherein the position is used as a link address of a Section tag of the program header table;
the TFTP Server program copies a link address of a Section label in a firmware program to an RAM memory of the multi-core DSP board card;
and after copying is finished, the multi-core DSP board card automatically runs a firmware program according to a program entry address, wherein the number of the multi-core DSP board card can be one or more.
In some embodiments, further comprising:
and the multi-core DSP board card starts a firmware program of the kernel.
In some embodiments, the multi-core DSP board starts a kernel firmware program, including:
judging the execution state of each kernel ID number address according to the program code of the kernel in the multi-kernel DSP board card, wherein the kernel comprises a slave kernel 0 to a slave kernel 7;
and the multi-core DSP board card starts a firmware program of the kernel according to the BOOT _ MAGIC _ ADDRESS ADDRESS of the program code.
In a second aspect, an embodiment of the present application provides an apparatus for remotely downloading firmware by a DSP, where the apparatus includes:
the write-in module is used for the PC upper computer to burn and write the IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to the installed simulator;
the configuration module is used for performing parameter configuration on the IBL bootstrap program by the serial port terminal software of the PC upper computer according to the JSON configuration file after programming is completed, wherein the parameter configuration comprises the following steps: network address configuration, network port configuration, firmware name configuration and physical address configuration;
a network establishing module for establishing network connection between the PC upper computer and the multi-core DSP board card through a TFTP Server program by utilizing the parameter configuration result;
and the downloading module is used for downloading a firmware program into the multi-core DSP board card through the established network connection by the TFTP Server program, wherein the firmware program is in an ELF file format.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method steps of remotely downloading firmware by a DSP according to any one of claims 1 to 7 when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform method steps such as downloading firmware remotely from a DSP.
The beneficial effect of this application mainly lies in: according to the scheme, the PC upper computer burns and writes an IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to an installed simulator; after programming is finished, parameter configuration is carried out on the IBL bootstrap program by serial port terminal software of the PC upper computer according to the JSON configuration file; the PC upper computer establishes network connection with the multi-core DSP board card through a TFTP Server program by using a parameter configuration result; and the TFTP Server program downloads the firmware program to the multi-core DSP board card through the established network connection. Specifically, by adopting the steps, the firmware program can be directly acquired from the TFTP Server program of the PC upper computer to the multi-core DSP board card through the network, the technical problem of remotely downloading the firmware program is realized, the problems of firmware program updating and repeated programming of the firmware program are avoided, meanwhile, the parameter configuration is carried out on the IBL bootstrap program according to the JSON configuration file, the network address and the network port can be changed without changing the configuration parameters of the IBL bootstrap program, the repeated programming work of the IBL bootstrap program is omitted, the PC upper computer and the multi-core DSP board card can be connected through building a local area network, and the limitation of space and distance is avoided.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a flowchart illustrating a method for remotely downloading firmware by a DSP according to an embodiment of the present application.
Fig. 2 shows a flowchart illustrating burning an IBL boot program onto a multi-core DSP board card according to an embodiment of the present disclosure.
Fig. 3 is a schematic flowchart illustrating a process of configuring an IBL bootstrap according to a JSON configuration file according to an embodiment of the present application.
Fig. 4 is a schematic flowchart illustrating a process of establishing a network connection between a TFTP Server program and a multi-core DSP board card according to an embodiment of the present application.
Fig. 5 is a schematic flowchart illustrating downloading a firmware program to a multi-core DSP board according to an embodiment of the present application.
Fig. 6 shows a flowchart of a firmware program of a multi-core DSP board startup kernel according to an embodiment of the present application.
Fig. 7 shows a schematic diagram of overall interaction between a PC upper computer and a multi-core DSP board card provided in the embodiment of the present application.
Fig. 8 shows a schematic structural diagram of an apparatus for remotely downloading firmware by a DSP according to an embodiment of the present application.
Fig. 9 shows a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations and, thus, the following detailed description of the embodiments of the present application, which is provided in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The multi-core DSP board card mainly comprises an IBL bootstrap program, a Flash memory and a network interface, adopts a Harvard structure with a firmware program and data separated inside, is widely applied to assembly line operation, and is used for providing special DSP instructions and realizing various digital signal processing.
The firmware program is mainly composed of a BIOS real-time embedded operating system, a communication and management program and a control program storage, is used for receiving instructions of a human-computer interaction interface or downloading firmware programming equipment, realizes dynamic loading of a protocol according to a multi-core DSP board card, automatically matches the firmware program, and is widely applied to motion control systems, including the fields of numerical control machines, industrial robots, medical equipment, IC circuit manufacturing equipment, IC packaging and the like.
In the prior art, after the product is integrated, a JTAG interface is required to be externally connected with a simulator for downloading firmware, the connection simulator is limited by a field space, when the use environment changes every time, IBL BOOT programs need to be repeatedly written, and the firmware program can be downloaded only by modifying program network addresses and network ports again by a server side, so that the operation is very inconvenient and low in efficiency.
The multi-core DSP board card establishes network connection with a PC upper computer according to a programmed IBL bootstrap program, and transmits firmware programs to the multi-core DSP board card in a sub-packet mode through a TFTP Server program according to the established network connection, the multi-core DSP board card automatically skips to run the firmware programs according to program entry addresses of configuration parameters, and the firmware programs are used for executing a BIOS real-time embedded operating system and have the advantages that:
1) the multi-core DSP board card downloads the firmware program from the PC upper computer through the network every time, the problem that a user updates the firmware program according to a user terminal is not involved, the control of the running firmware version is facilitated, and the firmware program version is controlled by the user.
2) After the firmware program is downloaded from the PC upper computer to the multi-core DSP board card through the network, the firmware program can automatically jump and be executed without power-off reset, the network downloading speed can be finished within a few seconds, the step of programming the firmware program is omitted, and the Flash memory resource is saved.
3) The JSON configuration file is used for configuring the IBL bootstrap program through the serial port, so that the network address and the network port can be changed without changing the configuration parameters of the IBL bootstrap program, and the repeated programming work of the IBL bootstrap program is saved.
4) By running a plurality of TFTP server programs on a PC upper computer, the technical problem of downloading firmware programs to a plurality of multi-core DSP board cards simultaneously is solved, and the downloading efficiency is improved.
5) The firmware program is downloaded through the TFTP server program, format conversion of the firmware program is not needed, and operation of a file conversion tool chain is omitted.
6) The firmware program is downloaded according to the network, and the method can be realized only after the PC upper computer and the multi-core DSP board card form a local area network, and the operation is more convenient without being limited by space and distance.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
FIG. 1 is a flowchart illustrating a method for downloading firmware remotely by a DSP according to an embodiment of the present application; as shown in fig. 1, the firmware downloading specifically includes the following steps:
and step S10, the PC upper computer writes the IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to the installed simulator.
Step S10, when the method is implemented specifically, the PC upper computer responds to an instruction of an operator, a corresponding multi-core DSP board model is selected from the internal simulator, the multi-core DSP board converts the IBL bootstrap program into a IBL _ prj.bin file format through a conversion tool, and the converted IBL _ prj.bin file is written into a FLASH memory of the multi-core DSP board through a FlashBurnTool.out programming program; the multi-core DSP board card downloads the firmware program from the PC upper computer through the network, does not relate to the problem that a user continuously updates the firmware program, and facilitates firmware version control.
And step S20, after programming is completed, parameter configuration is carried out on the IBL bootstrap program by the serial port terminal software of the PC upper computer according to the JSON configuration file.
In the specific implementation of step S20, after the IBL bootstrap program is programmed, the PC upper computer performs network address configuration, network port configuration, firmware name configuration, and physical address configuration on the IBL bootstrap program according to the JSON configuration file through the serial port terminal software, and configures the IBL bootstrap program, so that the network address and the network port can be changed without changing the IBL bootstrap program parameter configuration in different application environments, and in addition, the repeated programming work of the IBL bootstrap program is omitted.
And step S30, the PC upper computer establishes network connection with the multi-core DSP board card through the TFTP Server program by using the parameter configuration result.
When the step S30 is implemented specifically, the PC upper computer creates a data exchange Socket descriptor of the TFTP Server program according to the parameter configuration result of the IBL bootstrap program, the TFTP Server program establishes a network connection with the multi-core DSP board card according to the configured physical address, the PC upper computer and the multi-core DSP board card can realize the network connection after establishing the local area network, the download speed of the network connection can be within several seconds, and is not limited by the limitation of space and distance, and the memory resources of the multi-core DSP board card are effectively saved.
And step S40, the TFTP Server program downloads a firmware program into the multi-core DSP board card through the established network connection, and the firmware program is in an ELF file format.
Step S40 is implemented specifically, after the TFTP Server program establishes network connection with the multi-core DSP board, the multi-core DSP board obtains the firmware program according to the Socket descriptor of the TFTP Server program, and parses the program header table of the firmware program, and determines the location where the firmware file is mapped to the RAM memory segment during running, where the location is used as the link address of the Section tag in the program header table, and the TFTP Server program copies the link address of the Section tag in the firmware program to the RAM memory in the multi-core DSP board.
In addition, the program header table is divided into a read-only segment, a read/write segment and a debugging end, and transmission is not performed aiming at the Section label which is not mapped in the program header table, so that the firmware program transmitted according to the TFTP Server program can be greatly reduced, the transmission efficiency is improved, and the downloading time is shortened; the firmware program is downloaded through the TFTP server program, format conversion is not needed to be carried out on the firmware program, operation of a file conversion tool chain is omitted, automatic skip execution can be carried out according to the program entry address according to the firmware program, and the technical problem of remote downloading of the firmware program is solved.
In one possible implementation, fig. 2 shows a flow diagram provided by an embodiment of the present application; in step S10, the writing, by the PC upper computer, the IBL boot program into the FLASH memory of the multi-core DSP board card according to the installed emulator includes:
and S101, responding to an instruction of an operator by the PC upper computer, and selecting the model of the corresponding multi-core DSP board card from the simulator.
And S102, converting the IBL _ prj.out file of the IBL bootstrap program into a IBL _ prj.bin file by the multi-core DSP board card according to a conversion tool.
Step S103, according to the flashburntool.out program, the converted ibl _ prj.bin file is programmed into the FLASH memory.
When the steps S101, S102, and S103 are implemented specifically, the PC upper computer responds to an instruction of an operator, and selects a model of a multi-core DSP board from the internal simulator, the multi-core DSP board converts IBL _ prj.out file of the IBL bootstrap program into IBL _ prj.bin file according to a hex6x.exe file, bootload.rmd file, and bootload 2bin.bat file of the DSP bootloader conversion tool, and writes converted IBL _ prj.bin into the FLASH memory according to a flashburntool.out write program; the multi-core DSP board card downloads the firmware program from the PC upper computer through the network every time, the problem that a user updates the firmware program according to a user terminal is not involved, the control of the running firmware version is facilitated, the firmware program version is controlled by the user, the firmware program can be directly downloaded from the PC upper computer to the multi-core DSP board card, the firmware program can be automatically skipped to execute according to the network setting, the power-down reset is not needed, the network downloading speed can be finished within a few seconds, the downloading efficiency of the firmware program is improved, the firmware program can be downloaded according to the network, the method can be realized only after the PC upper computer and the multi-core DSP board card build a local area network, and the operation is not limited by space and distance and is more convenient.
In one possible implementation, fig. 3 shows a flow diagram provided by an embodiment of the present application; in step S20, the parameter configuration of the IBL bootstrap program by the serial port terminal software of the PC upper computer according to the JSON configuration file includes:
and step S201, the FLASH memory analyzes the JSON configuration file according to the programmed IBL bootstrap program to obtain configuration parameters after analysis.
Step S202, the serial port terminal software of the PC upper computer sends parameters of the JSON configuration file to the multi-core DSP board card according to a serial port Xmodem protocol.
When the steps S201 and S202 are implemented specifically, after the IBL bootstrap program is programmed, the JSON configuration file is analyzed, each parameter of the analyzed network address configuration, network port configuration, firmware name configuration and physical address configuration is copied to related variables of the multi-core DSP board card, the multi-core DSP board card is restarted after power is off, the programmed IBL bootstrap program is operated by the multi-core DSP board card, the serial port terminal software of the PC upper computer establishes communication connection with the multi-core DSP board card through a serial port Xmodem protocol, and the JSON configuration file is sent to the multi-core DSP board card; the JSON configuration file format is as follows:
{
“BootInfo_DspIp”:”192.168.2.100”,
“BootInfo_PcIp”:”192.168.2.8”,
“BootInfo_IpMask”:”255.255.255.0”,
“BootInfo_IpGate”:”192.168.2.1”,
“BootInfo_DspMacAddr”:”255.255.255.100.120.130”,
“BootInfo_FileName”:”app_prj.out”,
“BootInfo_ServerTftpPort”:”1450”
}。
according to the method, the IBL bootstrap program is configured through the JSON configuration file through the serial port, the network address and the network port can be changed without changing the configuration parameters of the IBL bootstrap program, repeated programming work of the IBL bootstrap program is omitted, the parameters of the JSON configuration file are sent to the multi-core DSP board card through the serial port Xmodem protocol by the serial port terminal software of the PC upper computer, automatic jump execution can be achieved according to the network configuration firmware program, power-down reset is not needed, the network downloading speed can be completed within a few seconds, and the downloading efficiency of the firmware program is improved.
In one possible implementation, fig. 4 shows a flow diagram provided by an embodiment of the present application; in step S30, the establishing, by the PC upper computer, a network connection with the multi-core DSP board card through the TFTP Server program using a result of the parameter configuration includes:
step S301, the PC upper computer creates a data exchange Socket descriptor of the TFTP Server program according to the parameter configuration result.
And step S302, the PC upper computer establishes network connection with the multi-core DSP board card through the physical address of the TFTP Server program.
In specific implementation of steps S301 and S302, the PC upper computer creates a data exchange Socket descriptor of the TFTP Server program according to the network address configuration, the network port configuration, the firmware name configuration, and the physical address configuration parameters that are analyzed by the IBL bootstrap program, and the PC upper computer establishes network connection with the multi-core DSP board card through the Socket descriptor of the physical address of the TFTP Server program. If the multi-core DSP board card does not receive the reply of the TFTP Server program, the multi-core DSP board card waits for 3S and then sends the acquisition request to the TFTP Server program again, if the multi-core DSP board card receives the reply of the TFTP Server program, the multi-core DSP board card receives the firmware program through the established network connection and replies response information, the firmware program is downloaded through the TFTP Server program, format conversion does not need to be carried out on the firmware program, and operation of a file conversion tool chain is omitted.
In one possible implementation, fig. 5 shows a flow diagram provided by an embodiment of the present application; in step S40, the TFTP Server program downloads a firmware program to the multi-core DSP board card through the established network connection, where the firmware program is in an ELF file format and includes:
step S401, after network connection is established, the multi-core DSP board card obtains a firmware program according to a Socket descriptor of a TFTP Server program;
step S402, the TFTP Server program transmits the byte stream in the firmware program to the multi-core DSP board card in a sub-packet mode with the length of 512 bytes according to a network communication protocol;
step S403, the multi-core DSP board card analyzes the received firmware program file, and determines the position of the program header table in the firmware program after analysis, wherein the position is used as a link address of a Section tag of the program header table;
step S404, the TFTP Server program copies the link address of the Section label in the firmware program to the RAM memory of the multi-core DSP board card;
step S405, after copying is completed, the multi-core DSP board card automatically runs the firmware program according to the program entry address, wherein one or more multi-core DSP board cards can be used.
When the steps S401, S402, S403, S404 and S405 are implemented specifically, a TFTP Server program acquires a firmware program according to a Socket descriptor, transmits a byte stream of the firmware program to a multi-core DSP board card by taking 512 bytes as a packet through a communication protocol, the multi-core DSP board card analyzes a program header of the received firmware program, determines and determines the position of a firmware file mapped to a RAM memory Section in operation after analysis, the position is used as a link address of a Section tag of a program header table, the TFTP Server program copies a network address and a network port link address of the Section tag in the firmware program to a shared RAM memory of the multi-core board card, the multi-core DSP board card automatically jumps to run the firmware program according to the Section tag address and a program entry address, the characteristics can be realized by downloading the program according to the network firmware as long as the PC upper computer and the multi-core DSP board card establish a local area network, and a plurality of TFTP server programs are operated on a PC upper computer, so that the technical problem of downloading the firmware programs to a plurality of multi-core DSP board cards simultaneously is solved, and the downloading efficiency is improved.
In one possible implementation, fig. 6 shows a flow diagram provided by an embodiment of the present application; the method also comprises a firmware program for starting the kernel by the multi-core DSP board card, and specifically comprises the following steps:
step S501, judging the execution state of each kernel ID number address according to the program code of the kernel in the multi-kernel DSP board card, wherein the kernel comprises a slave kernel 0 to a slave kernel 7;
in step S502, the multi-core DSP board starts a firmware program of the kernel according to the BOOT _ MAGIC _ ADDRESS of the program code.
In specific implementation, the steps S501 and S502 determine the execution state of each core ID number ADDRESS according to the program code of the core in the multi-core DSP board, and if the FLASH memory of the multi-core DSP board starts the firmware program of the slave core 1, write the program entry ADDRESS of the slave core 1 into the BOOT _ MAGIC _ ADDRESS of the program code of the slave core 1; if the FLASH memory starts the slave core 2, an IPC interrupt is sent from the core 0 to the slave core 1; the slave core 1 is interrupted by a firmware program, and the slave core 2 writes a program entry ADDRESS of the slave core 2 into a BOOT _ MAGIC _ ADDRESS ADDRESS of a program code according to a delay starting program; if the FLASH memory starts the slave core 3 or any other slave core, an IPC interrupt is sent from the core 0 to the slave core 1; and the slave core 1 is interrupted by the firmware program, and the program entry ADDRESS of the slave core 3 or any other slave core is written into the BOOT _ MAGIC _ ADDRESS ADDRESS of the program code according to the delayed starting program when the slave core 3 or any other slave core.
Fig. 8 is a schematic structural diagram illustrating an apparatus for remotely downloading firmware by a DSP according to an embodiment of the present application, where as shown in fig. 7, the apparatus includes:
the writing module 601 is used for the PC upper computer to write the IBL bootstrap program into the FLASH memory of the multi-core DSP board card according to the installed simulator;
a configuration module 602, configured to perform, after the programming is completed, parameter configuration on the IBL bootstrap program by the serial port terminal software of the PC upper computer according to the JSON configuration file, where the parameter configuration includes: network address configuration, network port configuration, firmware name configuration and physical address configuration;
a network establishing module 603, configured to establish a network connection between the PC upper computer and the multi-core DSP board card through a TFTP Server program according to the result of the parameter configuration;
and a downloading module 604, configured to download, by the TFTP Server program through the established network connection, a firmware program to the multi-core DSP board, where the firmware program is in an ELF file format.
The apparatus provided in the embodiments of the present application may be specific hardware on a device, or software or firmware installed on a device, etc. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Corresponding to the method for downloading firmware remotely from the DSP in fig. 1, an embodiment of the present invention further provides a computer device 70, as shown in fig. 9, which includes a memory 701, a processor 702, and a computer program stored in the memory 701 and executable on the processor 702, where the processor 702 implements the method when executing the computer program.
The PC upper computer writes an IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to the installed simulator;
after programming is completed, parameter configuration is carried out on the IBL bootstrap program by serial port terminal software of the PC upper computer according to the JSON configuration file, and the parameter configuration comprises the following steps: network address configuration, network port configuration, firmware name configuration and physical address configuration;
the PC upper computer establishes network connection with the multi-core DSP board card through a TFTP Server program by using the parameter configuration result;
and the TFTP Server program downloads a firmware program into the multi-core DSP board card through the established network connection, wherein the firmware program is in an ELF file format.
Corresponding to the method for downloading firmware remotely from a DSP in fig. 1, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the following steps:
the PC upper computer writes an IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to the installed simulator;
after programming is completed, parameter configuration is carried out on the IBL bootstrap program by serial port terminal software of the PC upper computer according to the JSON configuration file, and the parameter configuration comprises the following steps: network address configuration, network port configuration, firmware name configuration and physical address configuration;
the PC upper computer establishes network connection with the multi-core DSP board card through a TFTP Server program by using the parameter configuration result;
and the TFTP Server program downloads a firmware program into the multi-core DSP board card through the established network connection, wherein the firmware program is in an ELF file format.
In the embodiments of the present application, when being executed by a processor, the computer program may further execute other machine-readable instructions to perform other methods described in the present application, and for specific implementation steps and principles, reference is made to the above description, which is not repeated herein in detail.
In the embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope disclosed in the present application; such modifications, changes or substitutions do not depart from the spirit and scope of the present disclosure, which should be construed in light of the above teachings. Are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method for downloading firmware remotely from a DSP, the method comprising:
the PC upper computer writes an IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to the installed simulator;
after programming is completed, parameter configuration is carried out on the IBL bootstrap program by serial port terminal software of the PC upper computer according to the JSON configuration file, and the parameter configuration comprises the following steps: network address configuration, network port configuration, firmware name configuration and physical address configuration;
the PC upper computer establishes network connection with the multi-core DSP board card through a TFTP Server program by using the parameter configuration result;
and the TFTP Server program downloads a firmware program into the multi-core DSP board card through the established network connection, wherein the firmware program is in an ELF file format.
2. The method for remotely downloading firmware by a DSP according to claim 1, wherein the step of programming an IBL bootstrap program into a FLASH memory of a multi-core DSP board card by a PC upper computer according to an installed emulator comprises the following steps:
the PC upper computer responds to an instruction of an operator and selects the model of the corresponding multi-core DSP board card from the simulator;
the multi-core DSP board card converts IBL _ prj.out files of the IBL bootstrap program into IBL _ prj.bin files according to a conversion tool;
the converted ibl _ prj.bin file is programmed into FLASH memory according to the flashburntool.
3. The method of claim 1, wherein after the programming is completed, parameter configuration is performed on the IBL bootstrap program by serial port terminal software of the PC upper computer according to a JSON configuration file, and the parameter configuration comprises:
the FLASH memory analyzes the JSON configuration file according to the programmed IBL bootstrap program to obtain configuration parameters after analysis;
and the serial port terminal software of the PC upper computer sends the parameters of the JSON configuration file to the multi-core DSP board card according to a serial port Xmodem protocol.
4. The method of claim 1, wherein the PC upper computer establishes a network connection with a multi-core DSP board card through a TFTP Server program using the result of the parameter configuration, including:
the PC upper computer creates a data exchange Socket descriptor of the TFTP Server program according to a parameter configuration result;
and the PC upper computer establishes network connection with the multi-core DSP board card through the physical address of the TFTP Server program.
5. The method of claim 1, wherein the TFTP Server program downloads a firmware program to the multi-core DSP board card through the established network connection, wherein the firmware program is in an ELF file format and includes:
after network connection is established, the multi-core DSP board card acquires a firmware program according to a Socket descriptor of a TFTP Server program;
the TFTP Server program transmits the byte stream in the firmware program to the multi-core DSP board card in a sub-packet mode with the length of 512 bytes according to a network communication protocol;
the multi-core DSP board card analyzes the received firmware program file, and determines the position of a program header table in a firmware program after analysis, wherein the position is used as a link address of a Section tag of the program header table;
the TFTP Server program copies a link address of a Section label in a firmware program to an RAM memory of the multi-core DSP board card;
and after copying is finished, the multi-core DSP board card automatically runs a firmware program according to a program entry address, wherein the number of the multi-core DSP board card can be one or more.
6. The method of claim 1, further comprising:
and the multi-core DSP board card starts a firmware program of the kernel.
7. The method of claim 1, wherein the multi-core DSP board starts a kernel firmware program, comprising:
judging the execution state of each kernel ID number address according to the program code of the kernel in the multi-kernel DSP board card, wherein the kernel comprises a slave kernel 0 to a slave kernel 7;
and the multi-core DSP board card starts a firmware program of the kernel according to the BOOT _ MAGIC _ ADDRESS ADDRESS of the program code.
8. An apparatus for downloading firmware remotely from a DSP, the apparatus comprising:
the write-in module is used for the PC upper computer to burn and write the IBL bootstrap program into a FLASH memory of the multi-core DSP board card according to the installed simulator;
the configuration module is used for performing parameter configuration on the IBL bootstrap program by the serial port terminal software of the PC upper computer according to the JSON configuration file after programming is completed, wherein the parameter configuration comprises the following steps: network address configuration, network port configuration, firmware name configuration and physical address configuration;
a network establishing module for establishing network connection between the PC upper computer and the multi-core DSP board card through a TFTP Server program by utilizing the parameter configuration result;
and the downloading module is used for downloading a firmware program into the multi-core DSP board card through the established network connection by the TFTP Server program, wherein the firmware program is in an ELF file format.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of the preceding claims 1 to 7 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 7.
CN202111037396.3A 2021-09-06 2021-09-06 Method, device, equipment and storage medium for remotely downloading firmware by DSP Active CN113703811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111037396.3A CN113703811B (en) 2021-09-06 2021-09-06 Method, device, equipment and storage medium for remotely downloading firmware by DSP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111037396.3A CN113703811B (en) 2021-09-06 2021-09-06 Method, device, equipment and storage medium for remotely downloading firmware by DSP

Publications (2)

Publication Number Publication Date
CN113703811A true CN113703811A (en) 2021-11-26
CN113703811B CN113703811B (en) 2024-04-23

Family

ID=78660253

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111037396.3A Active CN113703811B (en) 2021-09-06 2021-09-06 Method, device, equipment and storage medium for remotely downloading firmware by DSP

Country Status (1)

Country Link
CN (1) CN113703811B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514018A (en) * 2013-10-08 2014-01-15 上海电力学院 Method for remotely downloading programs based on STM32F4 controller
US20140372744A1 (en) * 2013-06-14 2014-12-18 Futurewei Technologies, Inc. Bootstrapping From A Remote Disk Image Via A Network
CN108182079A (en) * 2017-12-21 2018-06-19 中国船舶重工集团公司第七0七研究所 A kind of TMS320C6748 program loading methods based on serial ports
CN109656605A (en) * 2018-12-12 2019-04-19 中国兵器装备集团自动化研究所 A kind of multiprocessor firmware under VPX framework mutual update method online

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372744A1 (en) * 2013-06-14 2014-12-18 Futurewei Technologies, Inc. Bootstrapping From A Remote Disk Image Via A Network
WO2014201350A1 (en) * 2013-06-14 2014-12-18 Huawei Technologies Co., Ltd. Bootstrapping from a remote disk image via a network
CN103514018A (en) * 2013-10-08 2014-01-15 上海电力学院 Method for remotely downloading programs based on STM32F4 controller
CN108182079A (en) * 2017-12-21 2018-06-19 中国船舶重工集团公司第七0七研究所 A kind of TMS320C6748 program loading methods based on serial ports
CN109656605A (en) * 2018-12-12 2019-04-19 中国兵器装备集团自动化研究所 A kind of multiprocessor firmware under VPX framework mutual update method online

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
张保龙;杜京义;王伟峰;: "基于ZigBee网络的车位传感器程序远程更新的方法", 企业技术开发, no. 06 *
欧斌;李敬超;高霞;徐彬彬;: "基于以太网传输的嵌入式多核DSP自启引导", 微处理机, no. 05 *
王璐;: "双DSP嵌入式系统远程SCI通信烧写技术", 电子技术与软件工程, no. 05 *
罗秋凤;叶慧;李勇;高源;: "DSP28335嵌入式系统的SCI在线编程方法实现", 河北科技大学学报, no. 04 *
郑连清;余红欣;刘和平;周念成;: "终端设备远程下载程序的实现方法", 电测与仪表, no. 02 *
郭勇;马超;路帅;刘意;马倩;: "一种2812内部FLASH程序远程更新的新方法", 航空计算技术, no. 06 *

Also Published As

Publication number Publication date
CN113703811B (en) 2024-04-23

Similar Documents

Publication Publication Date Title
US8966438B2 (en) System and methods for end-users to graphically program and manage computers and devices
US9746845B2 (en) Support device, recording medium, and method for facilitating data exchange between different types of progrrammable logic controllers
US9182998B2 (en) Remote bios update in system having multiple computers
US20090172219A1 (en) Device and method for automatically launching applications residing on usb flash drives
US20040244008A1 (en) Method of implementing Linux-based embedded system for mobile communication
Grokhotkov ESP8266 arduino core documentation
US20070168905A1 (en) Networked linux machine and windows software development system
CN112947977A (en) Software online upgrading method and system
Ramon Intel Galileo and Intel Galileo Gen 2: API Features and Arduino Projects for Linux Programmers
CN111382048A (en) Method and device for managing mobile equipment on real machine testing platform
JP6198843B2 (en) Hard disk system operating method, storage system, and processor
JP2019120974A (en) Computer system, baseboard management controller, OS installation method, and program
CN109426511B (en) Soft core updating method and system
CN116954752A (en) Differentiated system configuration and loading method and device and computer equipment
CN113703811A (en) Method, device and equipment for downloading firmware remotely by DSP and storage medium
Gerboles et al. AirSensEUR: an open data/software/hardware multi-sensor platform for air quality monitoring
JP7281275B2 (en) Module, information processing apparatus including same, and program data update method for updating program data of module
KR100463838B1 (en) Method for downloading and supporting nfs for uia boot loader
CN110990022A (en) Software project development method and device, processor and electronic device
Kyöstilä Reducing the boot time of embedded Linux systems
JP2014021540A (en) Digital signal processing system, digital signal processing system booting device and booting method of digital signal processing system
He et al. Software Implementation of the Data Acquisition System Based on µCLinux Embedded Operating System
CN115774561A (en) Application program upgrading method, electronic equipment, chip and readable storage medium
CN104461639A (en) Bootloader based CSFP optical module upgrading method
CN114385217A (en) Method, device and equipment for upgrading multi-channel CPU application program and storage medium

Legal Events

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