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.

[参考译文] TMS320F2.8027万:功能C代码相同,但汇编代码不同

Guru**** 2582405 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/653726/tms320f28027-same-function-c-code-but-assembly-code-is-different

部件号:TMS320F2.8027万

您好,Champs:

我发现我写了两个代码,以便跳到Flash。 如果使用组装步骤,两个代码都可以跳转到闪存。 但是当我检查汇编代码时,我发现2个代码之间有差异。 请告诉我为什么? 谢谢!

#define Boot_load_add ((void(*)(void)))0x3F7000)
typedef void (* phfv)(void);
phfv shfv = 0x3F0000;//ggg; 

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

    这一个...

    boot_load_add(); 

    ...使用绝对常量地址。  该常量被加载到XAR7中。  然后是分支。

    这一个...

    shfv(); 

    ...在名为shfv的全局内存位置中使用指针值。  shfv地址的上位被加载到DP中。  然后将内存位置shfv的值加载到XAR7中。  然后是分支。

    谢谢,此致,

    -George