1610 views|0 replies

2015

Posts

0

Resources
The OP
 

Using CCS to develop code structure, power-on loading and online programming of DSP applications [Copy link]

1. There are three types of DSP application code structures: ○ Pure assembly; ○ Pure C language; ○ Assembly + C language. These three structures can also be inserted with DSP/BIOS API with or without CSL. In order to speed up the development of applications, current DSP programs generally use: assembly + C language + API with CSL. Among them, assembly code is used for special requirements, such as Flash programming and key parts with high speed requirements; C language is the main framework of the entire application, but it is mainly the calculation processing part; and all work dealing with hardware is completed by CSL API. There are two DSP application engineering modes: debugging simulation (debug) mode and application release (release) mode. ○ Simulation mode is used in the development and debugging stage. The simulator is used to download from the PC through the JTAG port to the DSP on-chip RAM for operation. Breakpoints can be set for debugging. Since it is stored in RAM, the program will be lost after power failure; ○ After the application is fully debugged, it must be written to the external Flash, and it will not be lost after power failure. After power is turned on, the boot program is loaded into the DSP on-chip RAM for operation. This is the release mode in the product production stage. Obviously, the DSP application project (release project) in the release mode is more complicated than the application project (simulation project) in the simulation debugging stage. In addition to the application itself, the release project also needs to add the following processing: ○ The built-in secondary boot program (when the application is larger than 1KB); ○ Flash online programming code; ○ COFF format file to Flash binary format file (BIN) conversion. In addition, the DSP/BIOS configuration file and connection address allocation file of the "release project" are also more complicated than those of the "simulation project". Fortunately, they can be set and generated through the dialogue method using the configuration tool that comes with CCS. 2. DSP application power-on loading (Bootload) process After the DSP is powered on and reset, the application is loaded from the external Flash into the DSP on-chip RAM to run. This process is called "power-on loading" or "boot loading" (Bootload), and its process is as follows: DSP power-on reset↓ The DSP built-in boot program loads the secondary boot program of the first 1KB (Flash-boot area) of the external Flash into the DSP on-chip RAM to run↓ The secondary boot program starts running↓ The secondary boot program loads the program/data area (Flash-rest area) of the external Flash address above 1KB into the DSP on-chip RAM, where the program part is placed in the on-chip program memory, starting from address 0; the data part is placed in the specified area of the on-chip data memory. After loading, jump to the application entry.↓ When the application starts running, it should be noted that the DSP application can be configured as several loading (Boot) methods, such as external memory (Flash, EEPROM, etc.), PCI, HPI, XBUS, etc., among which external Flash is the most commonly used. 3. Online Programming of DSP Applications After the DSP application is released, it is usually stored in the Flash of the target board. To write the application into Flash, the easiest way to think of is to use a general programmer, but this requires that the Flash is detachable and preferably in DIP package. If it is surface mounted and soldered to the target board, only the online programming method can be used. Unlike the general MCU online programming (ISP), TI does not provide tools to complete this work, and only users can program it themselves. There are usually two methods that can be used: ○ According to the Flash model used, design a dedicated DSP program, which is downloaded to the DSP chip RAM by the emulator and then writes the application target code file into Flash. ○ If there is a USB interface on the target board, a section of code dedicated to writing Flash can be inserted into the application. During the application, the PC transfers the application to be updated to the unused RAM area in the DSP chip through the USB port, and then the dedicated program in the application writes it into Flash to overwrite the original old program. After power-on reset, the new program is loaded and run.


This post is from Microcontroller MCU
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list