工具/软件:Code Composer Studio
您好!
我尝试使用 uint64_t (unsigned long)类型、但 sizeof (uint64_t)为我提供4个字节、而不是8个字节。 将8个字节写入 uint64_t 指针会导致内存损坏。
不 支持 uint64_t?
我使用 CCS8和 TI v18.1.0.LTS 编译器。
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.
[引用 user="Rustem Avkhadiev"] sizeof (uint64_t)为我提供4个字节而不是8个字节[/引用]
我总是得到8。 对于您在看到4时编译的源文件、请按照文章 如何提交编译器测试用例中的说明提交测试用例。 如果不明显、请指明哪个函数获得4个字节的 sizeof (uint64_t)。
谢谢、此致、
乔治
我已经使用了 SDK 中的"cc1310 pinStandby"示例,并在 mainThread()函数中插入了以下代码:
长期试验;
int size = sizeof (test);
在调试器中、我看到该大小= 4。
我的附加项目:
e2e.ti.com/.../pinStandby_5F00_CC1310_5F00_LAUNCHXL_5F00_tirtos_5F00_ccs.rar