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/TMS320F2.8335万:使用DSS编写浮点变量

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/584609/ccs-tms320f28335-writing-floating-point-variables-using-dss

部件号:TMS320F2.8335万

工具/软件:Code Composer Studio

您好,我正在尝试通过我的DSS脚本设置浮点值。

在我的C代码应用程序中,有一个定义如下的变量

静态浮点myVariable = 0.0f; 

使用DSS API,我可以通过以下任何方式将此变量设置为任意整数(我以'25'为例,但任何整数都可以使用):

myDebugSession.expression.Evaluate ("myVariable=25")

var myVariableAddress = myDebugSession.symbol.getAddress("myVariable")

myDebugSession.memory.writeData (第9章,myVariableAddress,25,32)

我可以使用.memory.writeWord()函数

它们都可以成功写入整数值。  但是我想写值0.0.0225万 (十六进制0x396BEDFA)

使用上述任何方法都不起作用。  是否有人知道如何做到这一点?

我正在使用CCS版本7.1 .0.0.0014万

谢谢!

千斤顶

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Jack,您好!
    您应该能够执行以下操作:

    myDebugSession.memory.writeWord(pagenum, myVariableAddress, parseInt(0x396BEDFA));

    这对我来说很成功。

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

    我看到您在F2.8335万上。 请执行以下操作:

    myDebugSession.memory.writeData(pagenum, myVariableAddress, parseInt(0x396BEDFA), 32);

    该设备上的单词大小为16位,因此您需要使用writeData。


    谢谢
    KI
x 出现错误。请重试或与管理员联系。