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.

[参考译文] 编译器/TMS320F28379D:sprintf 不工作、系统崩溃(重新引导)

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/875957/compiler-tms320f28379d-sprintf-does-not-work-and-the-system-crasches-reboot

器件型号:TMS320F28379D

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

旧问题:

sprintf /__TI_printfi 正在破坏堆栈[c2000]

32995
Sal Pezzino

答复: 2.

意见 :869)

ti-cgt-C2000_6.4.2\lib\src\sprintf.c

我看到 sprintf 损坏了堆栈。  它将0x200字的0x0020填充到堆栈中。

我不知道为什么会这样做。 我们使用的是 LDRA 测试套件、该套件插入了 sprintf、以便通过 SCI/UART 与主机 PC 进行通信。  而 sprintf 会破坏堆栈。

是否有人知道问题可能是什么?

有人可以解决这个问题吗?

我已经将我的系统堆栈增加到0x700并在 printf 上完全支持下运行、但它没有解决问题。

此致

Carsten

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

    已将堆栈增加至0x800、现在它可以正常工作... :-)

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

    文章 使用 printf 的提示 讨论了使用 printf 函数系列时常见问题的解决方案。

    谢谢、此致、

    乔治