Lab 9: CLA Floating-Point FIR Filter
TMS320F2837xD Microcontroller Workshop - Control Law Accelerator 9 - 19
Procedure
Open the Project
1. A project named Lab9 has been created for this lab exercise. Open the project by
clicking on Project Import CCS Projects. The “Import CCS Eclipse Projects”
window will open then click Browse… next to the “Select search-directory” box. Navigate
to: C:\C28x\Labs\Lab9\cpu01 and click OK. Then click Finish to import the project.
All build options have been configured the same as the previous lab exercise. The files
used in this lab exercise are:
F2837xD_GlobalVariableDefs.c
F2837xD_Headers_nonBIOS_cpu1.cmd
Note: The ClaTasks.asm file will be added during the lab exercise.
Enabling CLA Support in CCS
2. Open the build options by right-clicking on Lab9 in the Project Explorer window and
select Properties. Then under “C2000 Compiler” select “Processor Options”.
Notice the “Specify CLA support” is set to cla1. This is needed to compile and
assemble CLA code. Click OK to close the Properties window.
Inspect Lab_9.cmd
3. Open and inspect Lab_9.cmd. Notice that a section called “Cla1Prog” is being linked
to RAMLS4. This section links the CLA program tasks to the CPU memory space. Two
other sections called “Cla1Data1” and “Cla1Data2” are being linked to RAMLS1 and
RAMLS2, respectively, for the CLA data. These memory spaces will be mapped to the
CLA memory space during initialization. Also, notice the two message RAM sections
used to pass data between the CPU and CLA.
We are linking CLA code directly to the CLA program RAM because we are not yet using
the flash memory. CCS will load the code for us into RAM, and therefore the CPU will
not need to copy the CLA code into the CLA program RAM. In the flash programming lab
exercise later in this workshop, we will modify the linking so that the CLA code is loaded
into flash, and the CPU will do the copy.
4. The CLA C compiler uses a section called .scratchpad for storing local and compiler
generated temporary variables. This scratchpad memory area is allocated using the
linker command file. Notice .scratchpad is being linked to RAMLS0. Close the
Lab_9.cmd linker command file.