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.

[参考译文] 编译器/LAUNCHXL2-TMS57012:使用*地址操作无法获取存储器中存储的数据。

Guru**** 2589300 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/767473/compiler-launchxl2-tms57012-use-address-operation-could-not-get-the-data-stored-in-memory

器件型号:LAUNCHXL2-TMS57012

工具/软件:TI C/C++编译器

尊敬的所有人:

     我遇到一个奇怪的问题。 我在以下内容中进行了描述:

     我有一个子函数、在子函数内使用点参数、我想获取存储在地址中的数据。

     void SendMessage (MessageIdentifier udMessageId、ApplicationDataRef pudDataRef)

    {

   uint8        tmpMSGData;
   uint8*       tmpPtMSGData;

   tmpPtMSGData =(uint8*) putDataRef;
   tmpMSGData =(uint8)(* tmpPtMSGData);//MAXMSGUNI

然后我在 main 中调用子函数

void main()

           内径 mm = 45;
           SendMessage (2、&MM);

在调试过程中、我发现无法获取数据45、请参阅图文、tmpMSGData 不会更改为45。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    很抱歉,我找到了问题。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!
    谢谢更新!

    Bestr 此致、
    米罗