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.

[参考译文] TMS320F280025:代码优化以及 RAM 和闪存中代码执行之间的差异?

Guru**** 2582405 points
Other Parts Discussed in Thread: C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1026990/tms320f280025-code-optimization-and-the-difference-between-code-executon-in-ram-and-flash

器件型号:TMS320F280025
主题中讨论的其他器件:C2000WARE

尊敬的专家:

   在我编译代码后、建议如下所示:

   

  如果我更改相对设置作为说明、它会提高代码的运行速度吗?

  此外、在 RAM 和闪存中调试代码时、它们之间的时间间隔非常不同、在 RAM 中:

在闪存中:

  这是否意味着、如果我在 RAM 中分配了一些重要代码、我的项目将更高效?当我在 RAM 中分配 ADCA 中断函数时、如下所示:

  这是否意味 着 ADCA 中断中的应用程序也与 ADCA 中断函数一起在 RAM 中分配?

  我想问 的是、RAM 中的代码优化和代码执行是否会对代码的运行速度产生双重影响?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    [引用 userid="492637" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1026990/tms320f280025-code-optimization-and-the-difference-between-code-executon-in-ram-and-flash "]如果我更改相对设置作为说明,它是否会提高代码的运行速度?

    在几乎所有情况下、都是这样。  它永远不会使它变慢。

    [引用 userid="492637" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1026990/tms320f280025-code-optimization-and-the-difference-between-code-executon-in-ram-and-flash?这是否意味着如果我在 RAM 中分配一些重要代码、我的项目将更高效

    在几乎所有情况下、都是这样。   重要的是、我假设您是指最常执行的函数。

    [引用 userid="492637" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1026990/tms320f280025-code-optimization-and-the-difference-between-code-executon-in-ram-and-flash "]这是否意味 着 ADCA 中断中的应用程序也会随 ADCA 中断函数一起分配到 RAM 中?

    我假设您使用来自 TI 的链接器命令文件、例如来自 C2000Ware 的链接器命令文件。  在这种情况下、这意味着函数 adcA1ISR 将加载到闪存中。  在系统启动期间、它从闪存复制到 RAM。  然后、每当调用它时、它都会从 RAM 执行。

    [引用 userid="492637" URL"~/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1026990/tms320f280025-code-optimization-and-the-difference-between-code-executon-in-ram-and-flash "] 代码优化和 RAM 中的代码执行速度是否会对代码的运行速度产生双重影响?

    在几乎所有情况下、都是这样。

    谢谢、此致、

    乔治