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.

[参考译文] CCS/TM4C123GH6PM:错误#138:表达式必须是可修改的值

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/876982/ccs-tm4c123gh6pm-error-138-expression-must-be-a-modifiable-lvalue

器件型号:TM4C123GH6PM

工具/软件:Code Composer Studio

我尝试使用 USART 协议通过代码在 PuTTY 软件上打印字符。

这是我的主代码片段

  

我遇到此错误吗?  

USER_DATA 是使用 uart0.h 库中的结构定义的数据类型。

getsUart0 (&info);函数在 uart0.c 中编解码 我已附上 uart0.c 文件供您进一步参考

请帮助我消除此错误。 我不包括在内。

谢谢你

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

    不能为数组名称("str[]")分配。

    您可以将其声明为"char *str;"。 虽然我看不到 getsUart0()为其获取存储空间的代码,但这会进行编译。

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

    是的、我明白了。 感谢您的回答