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.

F28M35H52C: How can I run FPUmathtables from RAM?

Part Number: F28M35H52C

I just want to know how to do what  suggests in the last paragraph of his first answer here: 

putting .lib functions into RAM - C2000 microcontrollers forum - C2000™︎ microcontrollers - TI E2E support...

e2e.ti.com
Other Parts Discussed in Thread: TMS320F28335 I’m working with a 28335 FPU processor and CCS5. I have some intense computations to perform in a brief period of

I tried this but I am not really sure if it worked:

FPUmathTables : LOAD > FPUTABLES, PAGE = 0, TYPE = NOLOAD,
RUN >> RAMS,
table(BINIT)
  • Hi,

    I would like to tell you two things here.

    1. FPUmath tables are present in ROM.
    2. FPUmath tables are present in the FastRTS library.

    Now, if you simply want to run(access in this case) FPUtables from the RAM using your Flash, you can use the following like Brandon mentioned. This goes into your linker command file.

       FPUmathTables   : LOAD = FLASHB,
                         RUN = RAMLS5,
                         RUN_START(_FPUmathTablesRunStart),
                         LOAD_START(_FPUmathTablesLoadStart),
                         LOAD_SIZE(_FPUmathTablesLoadSize),
                         PAGE = 1

    This simply loads all the Tables to Flash, and then copies into RAM. Now you can extern any table from your C code and it will be accessible to you. This method assumes that you are using Flash for running your program.

    Now if you are running your program in RAM, then it's simple:

    FPUmathTables   : > RAMGS3,    PAGE = 1

    RAMGS3 is a global RAM section. You will need to see where your RAM section lies in the device and then define RAMGS3 appropriately.

    Please let me know if you need further help.

    Ritvik

  • Hello, Ritvik.
    I think I understand your answers but, as far as I know, there are some problems with what you suggest.
    The first option does not take advantage of the fact that the FPUmathTables are already in ROM so it should not be necessary to load them in FLASH I guess (I may be wrong but I imagine there is a way to avoid wasting that memory, even though it is not a lot).
    The second option will not allow me to use the functions that need the FPUmathTables section if I power up the chip an want it to work in a standalone mode, without having it connected to the PC an without the debugger.
    I would like to add that I am not an expert so I could be making a mistake with what I am saying.
  • Hi,

    I understand that utilizing flash space isn't a good idea. I assumed that you ran your code either on Flash or on RAM, using a debugger.

    I am not fully aware of the working of standalone mode. But I guess your concern with standalone mode is that it ignores Globals while initializing the space (I think so!!).

    You can follow the second approach I suggested, but try putting your Tables in some other RAM section(other than global) which is not utilized and then run your program.

    I am not sure if this will work because I need to test it myself. Only then can I give you a concrete solution.

    Also, it would be great if you could send me a small sample code (or pseudo code) of what you are trying to in standalone mode. Probably I can help you better then.

    Regards

    Ritvik

  • Hi,

    I haven’t heard from you for three weeks, so I’m assuming you were able to resolve your issue. If this isn’t the case, please reject this resolution and reply to this thread. If this thread locks, please make a new thread describing the current status of your issue.

    Ritvik
  • Hello. I am sorry for the delay.
    I could solve the issue with what I described in the question:
    FPUmathTables : LOAD > FPUTABLES, PAGE = 0, TYPE = NOLOAD,
    RUN >> RAMS,
    table(BINIT)