Using CSL library in CCS v5, taking McBSP of DM642 as an example[Copy link]
Preliminary preparation: Download CSL header files and libraries. Since CCS v4 no longer has CSL, but is renamed CSLR and added to the BIOS, you need to download the CSL header file and library separately. After downloading, unzip and install. I installed it in: C:\ti\C6xCSL. After installation, the CSL header file is under the "/include/" folder, and the CSL library is under the "/lib_3x/" folder. Using CSL Library in CCSv5 Here we take the McBSP of DM642 as an example. First, create an empty project. The creation method can be seen in the previous log. Copy the following code into main.c. /////////////////////////////////////////////////////////////////////// #define CHIP_DM642 1 #include
#include
接下来要在工程设置中对build和link加入头文件和库的地址:
分别操作:
在Project-Properties-Build-C6000 Compiler-Include Options:
(Add dir to #include search path)中加入C6xCSL的位置,我的是"C:\ti\C6xCSL\include"。
在Project-Properties-Build-C6000 Linker-File Search Path:
(Include library file or command file as input)中加入cslDM642的库地址,我的是"C:\ti\C6xCSL\lib_3x\cslDM642.lib"
(Add to library search path), mine is "C:\ti\C6xCSL\include". Save. After that, compile and link, it should pass smoothly without any accidents. You should also customize the memory unit where the program segment is to be stored in the .cmd file, that is, define the location of .csldata in SECTION Added: For the configuration of registers, you can use the form of MCBSP_FMKS (SPCR, FREE, NO), MCBSP_FMKS is defined in the file csl_mcbsphal.h. If CCS5 issues an alarm for the corresponding statement, you can use the following method: Go to Window->Preferences->General->Editors->Text Editors->Annotations and uncheck all three checkboxes for "C/C++ Indexer Markers".