System and method for burning Flash of DSP (Digital Signal Processor) board card
Through the innovative architecture of debugger, emulator and DSP board, combined with DebugServer and JTAG interfaces, efficient flash recording of DSP boards is achieved, solving the problem of inefficiency in traditional methods and improving data burning efficiency and convenience.
Patent Information
- Application Number
- CN202510478993.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-11
AI Technical Summary
The existing DSP board flash burning method is inefficient, especially when insufficient memory is burned during large-capacity data, causing data to be loaded repeatedly, which takes a long time and slow serial communication speed.
It adopts an innovative architecture design of debugger, emulator and DSP board. It communicates with the host computer software through the DebugServer debugging component, uses the JTAG interface to transmit burn control instructions, and uses the shared memory mechanism to achieve efficient flash burning.
It solves the memory bottleneck and inefficiency problems when burning large-capacity data, improves the efficiency and convenience of burning, and avoids the cumbersome operation steps and the slow serial communication speed in traditional methods.
Smart Images

Figure CN120295643A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of embedded chip memory programming, and particularly to a system for programming the Flash of a DSP board and a programming method thereof. Background Art
[0002] The Flash of a DSP board (such as SPI Flash, Norflash, NandFlash, EEPROM, etc.) is often used to store user programs and serves as the startup device of the DSP. After the system development is completed by developers, it is necessary to program the user program into the Flash memory.
[0003] Currently, the common programming methods for DSPs are as follows:
[0004] 1. To program data into the Flash of a DSP board, it is usually necessary to perform operations on the interface of the CCS (Code Composer Studio) development environment. On the premise that the debugging environment is ready, select Lunch Target Configuration on CCS to start the Debug service, Connect Target to connect to a specific DSP core, Load Program to load the DSP program (the DSP program is used to program data into the Flash), Load Memory to load the data into the memory space of the DSP, and Run to run the program (to program the data into the Flash of the board). Such operations involve many steps and are not very friendly to the production environment. If the amount of data to be programmed is large and exceeds the memory space of the DSP, it is also necessary to repeatedly load the data into the memory space and perform multiple programming operations.
[0005] 2. The programming program performs local file reading and writing operations. The DSP reads the content of the file from the debugger into the memory and then performs programming. The DSP reads the file on the debugger with low efficiency.
[0006] 3. By configuring the DSP as a serial port startup mode, the host computer sends the programming program to the DSP. After the DSP successfully starts and runs the programming program, the host computer continues to send the data to be programmed through the serial port. The programming program receives the data and programs the data into the Flash. The serial port communication speed is slow and the efficiency is low. Summary of the Invention
[0007] Based on this, in view of the above technical problems, it is necessary to provide a system for programming the Flash in a DSP board and a programming method thereof that can improve the programming efficiency of the Flash in the DSP board.
[0008] A system for programming the Flash of a DSP board, the system includes: a debugger, an emulator, and a DSP board.
[0009] The debugging machine is used to adopt the DebugServer debugging component as the background debugging service, and is respectively communicatively connected with the host computer software and the emulator, so as to drive the emulator to debug the DSP chip in the DSP board.
[0010] The emulator is used to communicatively connect with the DSP board through the data path of the JTAG interface, so as to transmit the programming control instruction of the host computer software to the DSP chip.
[0011] The DSP board is embedded with a DSP chip, several Flash memories and a read-only memory, and is used to start the DSP chip to execute the programming control instruction, and complete the programming of all the Flash memories by using shared memory.
[0012] In one embodiment, the system is pre-installed in the host computer client, and the host computer software on the local host computer of the host computer client is communicatively connected with the DebugServer debugging component through a socket connection. The host computer client is used to generate a programming control instruction according to the programming parameters configured by the host computer software, and then send it to the DebugServer debugging component to start programming and debugging, so as to drive the emulator to connect to the DSP chip and run the programming program.
[0013] A method for programming the FLASH of a DSP board, the method includes:
[0014] Obtain the programming configuration information of the user on the host computer operation interface.
[0015] Transmit the data to be programmed to the DSP board through the memory writing method of the DebugServer unit according to the programming configuration information.
[0016] Initialize the corresponding Flash peripheral interface and read-write interface through the DSP chip in the DSP board according to the working state of the lower computer programming program, and use shared memory to program the data frames written by the host computer during the programming process into the corresponding Flash embedded in the DSP board.
[0017] The above-mentioned system for programming the Flash of a DSP board and its programming method. Through innovative architecture design, the DSP board Flash programming system effectively solves the problems of memory bottleneck and low efficiency during large-capacity data programming. Aiming at the pain points of repeated data loading and long programming time caused by insufficient DSP memory in the traditional solution, the data path for programming data into Flash is improved, and the parameters that can be configured by the customized host computer are set, effectively solving the problem of data acquisition efficiency during the programming process, and improving the efficiency and convenience of programming the Flash of the board. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 System block diagram of a method for burning the FLASH of a DSP board in an embodiment
[0019] Figure 2 Flow schematic diagram of a method for burning the FLASH of a DSP board in an embodiment
[0020] Figure 3 Flow schematic diagram of the operation of the host computer software in an embodiment
[0021] Figure 4 Flow schematic diagram of the operation of the burning program in an embodiment
[0022] Figure 5 Data relationship diagram of shared data (global parameters and data frames) between the host computer and the burning program in an embodiment Specific implementation manners
[0023] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0024] In one embodiment, as Figure 1 shown, a system for burning the FLASH of a DSP board is provided, including: a debugger 102, an emulator 104, and a DSP board 106
[0025] The debugger 102 is used to use the DebugServer debugging component as a background debugging service, and communicate and connect with the host computer software and the emulator respectively to drive the debugging behavior of the DSP chip in the DSP board
[0026] The emulator 104 is used to communicate and connect with the DSP board through the data path of the JTAG interface to transmit the burning control instruction of the host computer software to the DSP chip
[0027] The DSP board 106 is embedded with a DSP chip, several Flash memories, and a read-only memory, and is used to start the DSP chip to execute the burning control instruction and complete the burning of all Flash memories by using shared memory
[0028] In one of the embodiments, the system is pre-installed in the host computer client, and the host computer software on the local host computer of the host computer client is communicated and connected with the DebugServer debugging component through a socket connection. The host computer client is used to generate a burning control instruction according to the burning parameters configured by the host computer software, and then send it to the DebugServer debugging component to start burning debugging, so as to drive the emulator to connect to the DSP chip to run the burning program
[0029] For the specific limitations of the system for burning the FLASH of the DSP board, reference can be made to the limitations of the method for burning the FLASH of the DSP board in the above text, which will not be elaborated here. Each module in the above system for burning the FLASH of the DSP board can be implemented in whole or in part by software, hardware, and their combinations. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or be stored in the memory in the computer device in software form so that the processor can call and execute the operations corresponding to each of the above modules.
[0030] Those skilled in the art can understand that Figure 1 the structure shown in is only a block diagram of some structures related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0031] In one embodiment, as Figure 2 shown, a method for burning the FLASH of the DSP board is provided. Taking the burning system in as an example, the method includes the following steps: Figure 1
[0032] Step 202, obtain the burning configuration information of the user on the upper computer operation interface.
[0033] Step 204, transfer the data to be burned to the DSP board through the memory writing method of the DebugServer unit according to the burning configuration information.
[0034] Step 206, initialize the corresponding Flash peripheral interface and read / write interface of the DSP chip in the DSP board according to the working state of the lower computer burning program, and burn the data frame written by the upper computer during the burning process to the corresponding Flash embedded in the DSP board by using shared memory.
[0035] The above method for burning the Flash of the DSP board effectively solves the problems of memory bottleneck and low efficiency during the burning of large-capacity data through innovative architecture design in the DSP board Flash burning system. Aiming at the pain points of repeated data loading and long burning time caused by insufficient DSP memory in the traditional solution, the data path for burning data to the Flash is improved, and the upper computer configurable parameters are customized, effectively solving the problem of data acquisition efficiency during the burning process and improving the efficiency and convenience of burning the Flash of the board.
[0036] In one of the embodiments, the burning configuration information includes: global parameters for running the burning program, data to be burned, Flash attribute information, DSP chip model, and CCS version.
[0037] In one embodiment, after connecting to the local DebugServer unit through a socket, the host computer client sends a programming instruction to the DebugServer unit to load the programming program according to the programming configuration information. The data to be programmed is split into several data frames according to the running state of the programming program and the preset tasks, and the data frames are written into the memory of the corresponding DSP chip in the DSP board in batches by the memory writing method of the DebugServer unit.
[0038] In one embodiment, the programming program acts as the lower computer, which is used to receive the programming configuration information sent by the host computer client and feedback the working state to the host computer client.
[0039] In one embodiment, according to the working state of the lower computer programming program, if the working state is idle, the DSP chip in the DSP board is matched according to the DSP chip model, and the data to be programmed and the global parameters are written into the DSP chip memory. Then, according to the Flash attribute information, the peripheral interfaces and read / write interfaces of the DSP chip and the corresponding Flash are initialized, and the data frames in the programming process written by the host computer are written into the corresponding Flash embedded in the DSP board by using the shared memory mechanism.
[0040] In one embodiment, according to the comparison result of the number of programmed data and the preset data length, if the number of programmed data frames is less than the preset data length, the next valid data frame is read, and the data of the next data frame is continued to be programmed into the corresponding Flash; if the number of programmed data is equal to the preset data length, the programmed data is read back. If the data frame written into the Flash is valid, the data frame data is read and written into the memory of the host computer, and the data frame is set to idle. If the number of read-back written data is less than the preset read-back length, the next data frame written into the Flash is read back. If the number of read-back written data is equal to the preset read-back length, the programmed data is compared with the data read from the Flash, and the operation of the programming program is stopped.
[0041] In one embodiment, as Figure 3 shown, a running process of the host computer software is provided, and the specific content is as follows:
[0042] Functions of the host computer client: manually configure parameters, save configuration parameters, load configuration parameters, etc.; connect to the local DebugServer through sockets, send commands from the host computer client to the DebugServer, load the burning program, control the operation of the burning program, perform read and write operations on the DSP memory, including writing parameters required for the operation of the burning program, data to be burned, etc. Judge the running status of the burning program, split the data to be burned into multiple data frames as needed, write to the DSP memory multiple times, and burn by the burning program multiple times, record the progress of the Flash burning process; the host computer can read and compare the data of the Flash as needed to confirm that the data is burned correctly.
[0043] Furthermore, in view of the types of Flash and parameter problems existing in different Flash, a host computer operation interface is designed to configure the DSP chip model, CCS version (different debuggers may install different CCS versions), Flash type (SPI Flash, NorFlash, etc.), Flash peripheral number used by the DSP (such as SPI0, SPI1), chip select (CS0, CS1, etc.), Flash address offset (starting from which position of the Flash), sector size (the sector sizes of different Flash may be different), etc. The host computer loads the corresponding burning program according to the selected DSP model. The interface configuration parameters of the host computer are numerous, can be saved locally, and are convenient for subsequent import.
[0044] In one of the embodiments, as Figure 4 shown, a running process of the burning program is provided. The burning program is designed as the lower computer to receive the parameters and data sent by the host computer and burn the data into the specified Flash. The burning program also needs to communicate with the host computer to tell the host computer the working status of the burning program, whether it is idle, whether it is burning data to the Flash, etc. The burning program initializes the corresponding Flash peripheral interface and read / write interface according to the parameter configuration written by the host computer to the shared memory. Whether to read the data from the Flash and return it to the host computer after the burning is completed as needed.
[0045] Further, a section of DSP memory is agreed upon for the shared memory used in the communication between the host computer and the programming program, including global parameters and data frame memory. Global parameters refer to the global information used for communication between the programming program and the host computer, such as the Flash type, Flash interface number, chip select, byte length of the data to be programmed, Flash ID returned by the programming program, byte length of the programmed data, etc. Data frame memory means that during the process of programming data, in order to handle the situation of a large amount of data, the data is split into frames for transmission. The data frame is filled with data by the sender (the host computer is the sender during the programming process, and the programming program is the sender when reading data), and the data frame header is marked. The data frame header marks the transmission direction of the data, the valid data command (marking the valid data frame), the length of the data, the memory address where the data is located, etc. The size of the data frame can be set to 64KB when the DSP memory capacity is sufficient (the sector size of common Flash is 64KB), and when the capacity is insufficient, it can be set to 4KB at the minimum. The data frame receiver determines the validity of the data frame, reads the data frame data, and clears the valid data command to mark the data frame as idle.
[0046] It is worth noting that the DebugServer provided by the development environment is used as the background service, with JTAG physical connection. Through the host computer software, interfaces such as connection, loading, running, writing memory data, and reading data memory are implemented. The process of the host computer software replacing the manual debugging operation, loading the corresponding programming program according to the configuration options of the programmed Flash, controlling the program operation, writing the data frame into the memory by writing to the memory, and the programming program burning the memory data of the data frame into the Flash to complete the programming of the board Flash data by the host computer. Compared with the traditional programming method, the traditional programming method requires, through debugging means, starting the DebugServer by the integrated development environment, successively loading the program on the debugging interface, importing data into the memory, running the programming program, and the programming program burning the data in the memory into the Flash. Since these operations must go through several steps and are cumbersome, it is very unfriendly during programming in the production environment. When the programming program dynamically selects the Flash category for programming, when there is a large amount of programming data and the memory is not sufficient, there may be a situation where all the data cannot be loaded into the memory at one time. This solution omits the processes of manual operation such as connecting, loading the program, and loading data into the memory. The host computer starts the DebugServer service, and the host computer triggers a series of actions such as connection, loading the programming program, writing configuration parameters to the memory, running the program, writing the data frame to the memory, and waiting for the programming program to complete the programming in sequence according to the process required for programming the Flash, avoiding the problems of slow speed of the DSP reading files on the debugger and slow serial communication speed, and improving the efficiency. The data relationship between the global parameters and the data frame as shared data between the host computer and the programming program is as Figure 5 shown.
[0047] It should be understood that although Figures 2 - 4 each step in the flowchart is shown in sequence according to the indication of the arrow, these steps are not necessarily executed in sequence according to the order indicated by the arrow. Unless otherwise explicitly stated in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 2 - 4 at least a part of the steps in
[0048] can include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential either, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0049] Those skilled in the art can understand that all or part of the processes in the above-described embodiments of the method can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-described embodiments of each method. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present invention can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0050] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the appended claims.
Claims
1. A system for burning the Flash of a DSP board, characterized in that, The system includes: a debugger, an emulator, and a DSP board; The debugger is used to use the DebugServer debugging component as the background debugging service, and communicate and connect with the host computer software and the emulator respectively to drive the emulator to debug the DSP chip in the DSP board; The emulator is used to communicate and connect with the DSP board through the data path of the JTAG interface to transmit the programming control instruction of the host computer software to the DSP chip; The DSP board is embedded with a DSP chip, several Flash memories, and a read-only memory, and is used to start the DSP chip to execute the programming control instruction, and complete the programming of all the Flash memories by using shared memory.
2. The system according to claim 1, wherein The system is pre-installed in the host computer client, and the host computer software on the local host computer of the host computer client is communicated and connected with the DebugServer debugging component through a socket connection; The host computer client is used to generate a programming control instruction according to the programming parameters configured by the host computer software, and then send it to the DebugServer debugging component to start programming and debugging, so as to drive the emulator to connect to the DSP chip to run the programming program.
3. The method for implementing the programming of the system according to any one of claims 1 to 2, characterized in that, The method includes: Obtain the programming configuration information of the user on the host computer operation interface; Transmit the data to be programmed to the DSP board through the memory writing method of the DebugServer unit according to the programming configuration information; Initialize the corresponding Flash peripheral interface and read-write interface according to the working state of the lower computer programming program through the DSP chip in the DSP board, and use shared memory to program the data frames written by the host computer during the programming process into the corresponding Flash embedded in the DSP board.
4. The method according to claim 3, wherein The programming configuration information includes: global parameters for running the programming program, data to be programmed, Flash attribute information, DSP chip model, and CCS version.
5. The method according to claim 4, wherein Transmitting the data to be programmed to the DSP board through the memory writing method of the DebugServer unit according to the programming configuration information includes: After connecting to the local DebugServer unit through a socket, send a programming instruction from the host computer client to the DebugServer unit to load the programming program according to the programming configuration information; Split the data to be programmed into several data frames according to the running state of the programming program and the preset tasks, and the data frames are written into the corresponding DSP chip in the DSP board in batches according to the DSP chip model through the memory writing method of the DebugServer unit.
6. The method according to claim 5, wherein After the step of transmitting the data to be programmed to the DSP board through the memory writing method of the DebugServer unit according to the programming configuration information, it further includes: The programming program is used as the lower computer to receive the programming configuration information sent by the host computer client and feedback the working state to the host computer client.
7. The method according to claim 6, wherein Initialize the corresponding Flash peripheral interface and read / write interface through the DSP chip in the DSP board according to the working state of the lower computer's programming procedure, and burn the data frame in the burning process written by the upper computer into the corresponding Flash embedded in the DSP board by using the shared memory mechanism, including: According to the working state of the lower computer's programming procedure, if the working state is idle, match the DSP chip in the DSP board according to the DSP chip model, write the data to be burned and the global parameters into the memory of the DSP chip, then initialize the peripheral interface and read / write interface of the DSP chip and the corresponding Flash according to the global parameter configuration information written by the upper computer, and burn the data frame in the burning process into the corresponding Flash embedded in the DSP board by using the shared memory mechanism.
8. The method according to claim 7, wherein After the step of burning the data frame in the burning process written by the upper computer into the corresponding Flash embedded in the DSP board by using the shared memory mechanism, it further includes: According to the comparison result between the number of burned data and the preset data length, if the number of burned data frames is less than the preset data length, read the next valid data frame and continue to burn the data of the next data frame into the corresponding Flash; if the number of burned data is equal to the preset data length, read back the burned data. If the data frame written into the Flash is valid, read the data frame data and write it into the memory of the upper computer, set the data frame to idle. If the number of read-back written data is less than the preset read-back length, read back the next data frame written into the Flash; if the number of read-back written data is equal to the preset read-back length, compare the burned data with the data read from the Flash and stop the operation of the programming procedure.