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/TMS320F28069M: __attribute__((ramfunc)) Problems loading functions into RAM

Part Number: TMS320F28069M
Other Parts Discussed in Thread: C2000WARE

Tool/software: TI C/C++ Compiler

I have been working on a project that is based on the InstaSPIN projects which uses the method for putting the ISR into RAM which looks like:

#pragma CODE_SECTION(somefxn, "ramfuncs")

// Copy fxns from flash to ram at startup
mem_copy(....)

and I'm trying to move away from that to the more straight-forward approach that is talked about here: http://processors.wiki.ti.com/index.php/Placing_functions_in_RAM . I can see in my .map file, that the functions are placed in the right place, also when I run the code and use a breakpoint in the debugger, I see that my ISR is being run, and the program counter shows the right address, but for some reason a lot of things suddenly start breaking. My eQEP module stops counting, I no longer get interrupts on my SCI interface(which is being run from flash) and I can't send information out of the SCI, I use a blocking write call and it happily allows me to write to the Tx buffer but nothing ever comes out the other end. Any ideas on what's going on here?

  • Daniel,

    Check out chapter 4 in this app note that goes over running an application from internal flash (www.ti.com/.../spra958l.pdf). You should be able to update following this guide. Additionally, you can reference the flash examples provided in C2000Ware for the F2806x.

    Regards,
    Ozino
  • This is what I mentioned, this is the way the project did it originally, however when you try to link in functions that are C++ and are name-mangled this doesn't work. I'm asking why the resource I linked doesn't work.
    Thanks!
  • After Undoing everything I did to migrate from the Ramfuncs section to using the .TI.ramfunc method, I went back and redid the changes and it ended up working, I believe some other code that I changed had caused problems or something with the method I used. Thanks for the help
  • Daniel,

    The use of the .TI.ramfunc is now requried due to changes in newer version of compiler starting from v16. So ramfuncs only works with older versions.

    Thanks for sharing your feedback.

    Regards,
    Ozino