Fortune Telling Collection - Fortune-telling birth date - Do DSP projects need command files?

Do DSP projects need command files?

Look at what the cmd file is for first, and then you will know:

The professional name of CMD is linker configuration file, which stores the configuration information of linker. We call it the command file for short. As can be seen from its name, the function of this file is to indicate how to link programs.

Then we know that when writing a TI DSP program, the program can be divided into many segments, such as text, bss and so on. And the role of each paragraph is different. Actually, when running in the film, the position is different. For example, text codes should usually be put in flash, while bss variables should be put in ram. Wait a minute. But for different chips, the starting and ending addresses of each memory are different, and the linker doesn't know where the user wants to put a certain segment, especially the user-defined segment. In order to tell the linker the allocation of internal memory space in the chip and the specific storage location of the program segment, it is necessary to write a configuration file, that is, a CMD file.

So the most important thing in the CMD file is two sections, that is, two sections of configuration, memory and section specified by two pseudo-instructions. Simply put, memory is the model used to establish the target memory, and the SECTIONS instruction arranges the position of each segment according to this model.