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.

TMS320F28035: 在使用sprintf()时,%s格式化可以正常使用,%d %u %i 等都会导致程序跑飞。

Part Number: TMS320F28035


我在 CCS v6.1的环境下使用 sprintf()和snprintf()

已经包含了头文件 #include "stdio.h"

项目配置中 Build -> C2000 Compiler -> Advanced Options -> Library Function Assumptions 下 printf support 已经选为full

栈空间已经尽可能配置得大了,现在为0x800

但我使用  snprintf(buf, 64, "\r\nheart:%s", test_buf);是正常的

而 snprintf(buf, 64, "\r\nheart:%d", test_u);程序就会跑飞

sprintf()和snprintf()会出现同样的问题

请大家帮忙看看。