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:C 语言中的代码分支。

Guru**** 2563960 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1062142/tms320f280025-code-branch-in-c-language

器件型号:TMS320F280025

您好、查姆斯、

我的客户正在开发自己的引导加载程序、 并且能够在汇编代码分支下使用应用程序、

asm (" lb 0x82000");

他希望使用 C 代码来执行此代码分支、但他无法通过使用下面的 C 语句来执行此操作、

((void (*)()(*(uint32 *) 0x82000))();

您能否告知 C 代码无法分支的原因? 我们应该使用什么 C 语句分支到 C28x 中的特定地址?

谢谢、此致、

Luke

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

    Luke、

    看起来函数指针存在小问题。 它跳转到位于0x82000中的位置、而不是分支到0x82000。

    ((void(*)())((uint32 *)0x82000))();

    请使用反汇编和单步执行来查看实际情况。