This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28377D: CLA Use; structure variable defines; CMD

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi everyone,

I'm using CLA module recently and learn it through the example which is "C:\ti\c2000\C2000Ware_5_03_00_00\device_support\f2837xd\examples\dual\cla_asin".

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "cla_asin_shared.h"
typedef struct
{
float Delt;
float P_Factor;
float I_Factor;
}st_ClaPidData;
st_ClaPidData st_ClaPid_DC;
float fDebug;
//
// function definitions
//
//Task 1 : Calculate asin(X)
// Description:
// Step(1): Calculate absolute of the input X
//
// Step(2): Use the upper 6-bits of input "X" value as an
// index into the table to obtain the coefficients
// for a second order equation:
//
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

As you can see, two variables are defined in the "cla_asin.cla" file.  After compiling, the float variable "fDebug" was assigned an address in the ".map file", but the structure variable "st_ClaPid_DC" can not be found in the ".map file"

So, is there something to be paid attention in using structure variable? For the CLA file, they are all global variable, should be allocated to local RAM which is defined in CMD file.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
******************************************************************************
TMS320C2000 Linker PC v20.2.2
******************************************************************************
>> Linked Mon Oct 28 10:24:24 2024
OUTPUT FILE NAME: <cla_asin_dc_cpu02.out>
ENTRY POINT SYMBOL: "_c_int00" address: 00082a6d
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
PAGE 0:
RAMM0 00000123 000002dd 00000000 000002dd RWIX
RAMLS0 00008000 00000800 00000180 00000680 RWIX
RAMLS1 00008800 00000800 0000010e 000006f2 RWIX
RAMLS4_5 0000a000 00001000 000000c8 00000f38 RWIX
RAMD0 0000b000 00000800 00000004 000007fc RWIX
RAMGS14 0001a000 00001000 00000000 00001000 RWIX
RAMGS15 0001b000 00000ff8 00000000 00000ff8 RWIX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

 

looking forward to your reply. Thanks.