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.

CCS/TMS320F28335: Fast rts library

Part Number: TMS320F28335


Tool/software: Code Composer Studio

Hello dear,

I want use Fast rts library in the microcontroller, the library is working in microcontroller.

But in the project I can not use the ROM table for sin and cos calculation, I need to cutomize the library for my use and use the look-table in RAM. 

I look the document for Fastrts; but I could not find the solution for customising the Fast rts but using just sin calculation file and Look-up table.

Can you guide that how I can do it?

Thank you in advance,

  • I believe the library is already structured to allow this and the examples contain build configurations to show both options. For example, the library places the tables in a section called FPUMathTables. The linker command file of the examples (E.g. sin_f32) will use the FPUMathTables (placed in RAM) if RAM_ROMTABLES is not defined. This will be true in the RAM build configuration and not the RAM_ROMTABLES build configuration. Therefore in the latter case, the tables in ROM will be used.

    Side note - I believe the RAM_ROMTABLES build configuration doesn't define the symbol RAM_ROMTABLES. This is probably oversight and needs to be corrected.

    Thanks,

    Sira

  • Thanks for your answer.

    It is possbile to copy the table from ROM to RAM and use it with this library.

    But I need to use my own lookup table.

    Can you write me that form where I can find the lookup table for Sin, Cos and atan?

    Thank you in advance.

    Mahdi

  • I find the FPU math table; Can you help how I can use it not from ROM;

    I want copy this lookup table in RAM by my self and use the assembly code of Fast rts.

    Thanks you,

    Mahdi

  • Mahdi,

    To use the tables from ROM, you have to add the BootROM symbols library (first picture above), and you have to ensure the linker cmd file does not allocate the FPUMathTables to a RAM section. To use the tables in RAM, you should not add the BootROM symbols library (second picture above), and you have to ensure the linker cmd file allocates the FPUMathTables to a RAM section.

    You can refer to the linker cmd file of one of the FPUFastRTS examples e.g. sin_f32 for how to do this. I am pasting below:

    #if !defined(RAM_ROMTABLES)
    FPUmathTables : >> RAMM0 | RAMM1 | RAMLS4567
    #endif

    As long as RAM_ROMTABLES is not defined, FPUmathTables will be allocated to RAM. You can simplify as follows:

    FPUmathTables : >> RAMM0 | RAMM1 | RAMLS4567

    Thanks,

    Sira