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.
Hi,
I'm trying to load CLA math tables to RAM. I have CLA functions perfectly works and compiled using "cla1_math_library_datarom.lib".
I want to use "cla1_math_library.lib" and load the tables to RAM for faster execution rate.
in main() I have;
extern uint32_t CLA1mathTablesRunStart, CLA1mathTablesLoadStart, CLA1mathTablesLoadSize;
memcpy((uint32_t *)&CLA1mathTablesRunStart, (uint32_t *)&CLA1mathTablesLoadStart,
(uint32_t)&CLA1mathTablesLoadSize); //Use with "2837xD_FLASH_CLA_C_lnk.cmd"
and in linker cmd. file;
...
#if !(CLA_MATH_TABLES_IN_ROM)
CLA1mathTables : > RAMLS1, PAGE = 1
#endif
#if !(CLA_MATH_TABLES_IN_ROM)
//Load tables to Flash and copy over to RAM
/* CLA Math Tables in ROM*/
CLA1mathTables : LOAD = FLASHN, //FLASHN
RUN = RAMLS1, //RAMGS5
RUN_START(_CLA1mathTablesRunStart),
LOAD_START(_CLA1mathTablesLoadStart),
LOAD_SIZE(_CLA1mathTablesLoadSize),
PAGE = 1, ALIGN(4)
#endif //CLA_MATH_TABLES_IN_ROM
...
When I compile project using "cla1_math_library.lib" there is no error and my functions works well. When I examine the .map file I see that "cla1_math_library.lib" is used for linking CLAdiv.obj files. But the map files show FLASHN is empty, also in CCS memory allocation tool show in RAMLS1, CLA1MathTables empty. I'm not sure tables are loaded correctly to RAM, but CLA and my functions works.
How can I verify tables are loaded into RAM?
Another Question, "CLA-MATH-LIB-UG" says "Some devices, like the F2837x and F2805x, have all the lookup tables in a special data ROM (CLA
Data ROM)". I'm using F28377D, where the CLA tables are located, can we read it using CPU and view through CCS memory browser?
Hi,
CEM KOOSE said:How can I verify tables are loaded into RAM?
Make sure CLA_MATH_TABLES_IN_ROM is not defined in either your linker command file or int eh project properties C2000 Linker->command file preprocessing-> --define
In the library examples look at "acos" it has a FLASH_NOROM build configuration that you can use. Once you build it check the map file you should see something liek this
CLA1mathTables * 1 000bc000 00000184 RUN ADDR = 0000a000 000bc000 00000184 cla1_math_library.lib : CLAacosineTable.obj (CLA1mathTables)
No that shouldnt be the case. In my original response that showed the map file you see the origin is 0xbc000 which is FLASHB. If i were to look at FLASHB
FLASHB 000bc000 00002000 00000184 00001e7c RWIX
The second highlighted portion shows that some memory is used. this is the table. You should see something similar for FLASHN