TI's C6000 series DSP, implementation of flashboot[Copy link]
The so-called flashboot is to burn the user's main program into the flash chip, and then power on to realize the automatic loading and startup process of the main program. This article does not discuss the burning of the program to the flash. It is mainly to be familiar with some parameters of the flash chip, the burning rules, and the allocation of the storage start address. It can be realized by writing a simple C program, and the cmd file needs to be modified as necessary. The cmd file will be introduced in detail later. First, understand several methods of flash burning. Generally speaking, there are two methods. 1. Burn with built-in software. 2. Use the emulator and write your own program. This article mainly describes the latter method, that is, writing a burning program to realize the burning of the main program. Introduce your own development platform. A development board, a USB emulator, a PC, and the software is CCS2.2. To realize flashboot, you must also understand the system startup process. For the C6000 series, after powering on, the system will automatically load the data of the first 1K space of the flash and copy it to the address space starting from 0x0 of the memory, and start running the program from 0x0. Therefore, if our main program is larger than 1K, then a secondary boot is required to achieve loading. This article discusses secondary boot. To achieve secondary boot, a secondary loader must be added. The program must be less than 1K and is used to load the user program. It is generally implemented in assembly language. The source code is not discussed here, and you can refer to the program of Hezhongda. It mainly implements several functions: load the cinit segment and text segment of the user main program respectively, and jump to the entry address of the user main program to start execution after completion. It should be noted here that the user main program and the secondary loader are compiled as a whole project during compilation. The cmd file controls the memory space occupied by the two programs respectively, and then writes this mixed compiled program into the flash through the burning program to achieve the flash self-starting process.