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.

Compiler/TMS320F28022: Want to move some functions to flash during debug

Part Number: TMS320F28022

Tool/software: TI C/C++ Compiler

CCS v6, Piccolo 28022, Win7 SP1 32bit.

I am debugging my C code, so I have the .text section located in ram.

It is getting to big to totally fit, so I have moved some debugged routines to flash. That seems to be working OK.

The processor does not have a FPU, so I am using the software floating point routines like pow, sin, etc... from the RTS lib 'RTS2800_ml.lib', and would like to move those routines to flash also.

I tried to place a #pragma CODE_SECTION in the math.h file, but it is still showing up in the text section.

Questions:

1) What is the easiest way to simply tell the linker I wish to place the those RTS routines in FLASH either piecemeal or in total?

2) Must I recompile the RTS code in order to get linker to locate those routines in FLASH. (I would think I should not have to do this.)

Thanks, Mark.

  • Mark

    Cool Javelin said:

    1) What is the easiest way to simply tell the linker I wish to place the those RTS routines in FLASH either piecemeal or in total?

    I suggest putting this in your linker (assigned to your flash section) and giving it a try.

    LIB_IN_FLASH : load = FLASH PAGE = 0
    {
            -lrts2800_ml.lib(.text)
    }

    Cool Javelin said:

    2) Must I recompile the RTS code in order to get linker to locate those routines in FLASH. (I would think I should not have to do this.)

    No, this shouldn't be necessary.

    Best Regards

    Chris

  • Thanks, Christopher.
    Works as advertised.
    Mark.