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.

[参考译文] TMS320F280037:许多 RAM 函数的编译器标记而非 pragma

Guru**** 2390735 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1347426/tms320f280037-compiler-marking-instead-of-pragma-for-many-ram-functions

器件型号:TMS320F280037

您好!

有没有更简单的方法可以将许多函数声明为在 while (1)之后调用的 RAM 函数、而是使用#pragma CODE_SECTION 声明所有函数

int main(void)
{
    //some code in flash
    
    //compiler mark like the #pragma CODE_SECTION( ..),
    //that function after that point would go into ramfunction
    
    while( 1 )
    {
        //some more code in RAM
    }
}

谢谢

大卫

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 David:

    目前、我们可以 通过以下方法来声明将进入 ramfunction 的函数:  

    #pragma code_section (".TI.ramfunc");
    您可以从 flash.h/.c 文件中的 driverlib 代码中获取参考
    谢谢
    阿斯温