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.
Hello,
I would like to do a sin calculation with my CLA. After going and using the CLA_MATH_LIB_UG.pdf as a guide, my .map file does not seem to be correct as the CLA DATA ROM is empty.
I used the below configuration in the linker command file to instruct the linker to put the tables in the CLA DATA ROM
CLA1mathTables : LOAD = CLA1_DATAROM, /* Load to CLA DATA ROM, run from CLA math tables of the clamath RAM */
RUN = CLA1_DATAROM_RUN,
PAGE = 1
The above configuration was based on the example in ti\c2000\C2000Ware_4_03_00_00\libraries\boot_rom\f28004x\revB\rom_sources\F28004x_ROM\ClaROM\cmd
My codw builds well but after inspecting my .map file, it is not as expected.
1. The CLA1mathTables is missing in the .map file
2. The CLA1_DATAROM and CLA1_DATAROM_RUN memory areas are empty
CLA1_DATAROM 01001870 0000078a 00000000 0000078a RWIX
CLA1_DATAROM_RUN 0000f870 0000078a 00000000 0000078a RWIX
However it seems the tables are placed correctly
3. The tables are placed here below
abs 0000fd4a CLAsincosTable_Cos0
abs 0000fe4e CLAsincosTable_TABLE_SIZEDivTwoPi
abs 0000fe50 CLAsincosTable_TwoPiDivTABLE_SIZE
abs 0000fe52 CLAsincosTable_TABLE_MASK
abs 0000fe54 CLAsincosTable_Coef0
abs 0000fe56 CLAsincosTable_Coef1
abs 0000fe5a CLAsincosTable_Coef2
abs 0000fe5c CLAsincosTable_Coef3
4. The CLAsin is placed in the cla1 programe memory I defined
0008a3c6 00000038 cla2_math_library_datarom_fpu32_eabi.lib : CLAsin.obj (Cla1Prog:_CLAsin)
I woul like to verify why the 1 and 2 above are so and what I could be doing wrongly.
Thanks
The ROM tables are part of the device - stored in Read Only Memory (ROM). If you open a memory window to the "run" address when debugging the CLA you should see them. Likewise the c28x side they are in the "load" address. For the project, the memory allocation only tells the linker where the tables are so they can be accessed appropriately.
Hello Lori,
Thanks for the reply.
I checked the memory of the device as you suggested. The CLA1_DATAROM_RUN has a continous range of numbers in the memory region and same with the CLA flash memory area. However I need clarification on two points below:
1. For the CLAsin calculation in my code, in my .map file the symbols below are not present
_CLAsinTable
_CLAsinTableEnd
Is this normal?
Most of the symbols present were the one I posted in the previous thread.
2. What does all the numbes mean in the memory area?
Thanks
Hi,
I still have a question with the cla_sin example.
In the CLA task2 with the function below:
__attribute__((interrupt)) void Cla1Task2(void)
{
//
// Test inline function
// Project must use --opt_level= 0 or higher for inline to occur
//
__mdebugstop();
fResult2 = CLAsin_inline(fVal);
}
I could not find the CLAsin_inline function. Please where is the function located. I would like to study it and see if it helps me.
Thanks
If the symbols were defined in the linker .cmd file then they should be in the map file. I will try building the example tomorrow to check.
The source of the tables can be found in the C:\ti\c2000\C2000Ware<version>\libraries\math\CLAmath\c28\source folder
or in
C:\ti\c2000\C2000Ware<version>\libraries\boot_rom\f28004x\revB\rom_sources\F28004x_ROM\ClaROM\source
I could not find the CLAsin_inline function. Please where is the function located. I would like to study it and see if it helps me.
The inline versions are in the CLAmath.h file in the directory:
C:\ti\c2000\C2000Ware<version>\libraries\math\CLAmath\c28\include
1. For the CLAsin calculation in my code, in my .map file the symbols below are not present
_CLAsinTable
_CLAsinTableEnd
These symbols are created in the linker file to copy the tables from flash into CLA RAM. In this case, the tables are already available in CLA ROM so no copy is required. Thus the symbols are not used/needed.
In the .map you should see the table symbols in CLA ROM:
My CLA code now works well.
I had to go through the entire process to be sure my implementaiton was correct and also to properlly define the data sections for the data the CLA would use.