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.

vsprintf Produces Garbage

Tool/software: TI C/C++ Compiler

Hi guys,

I have similar problem with vsprintf that is mentioned in the link below.

It works fine when I pass just a string, but it crushes when pass a string with value (e.g: "The value is %d", value)

Does someone have a solution for that?

Thanks in advance,

Hakan

  • Make sure you have enough stack and heap.  Does sprintf work?

    Thanks and regards,

    -George

  • George,

    Actually, both of them had size of 0x400, which was quite enough for my application. But then I increased them up to 0x1000. After that I had to change the section that I used, because they didn't fit in memory. So after that my problem is solved. Then I tried to decrease heap/stack size down to 0x400 again  while keeping them in the same section. It also worked fine. In a nutshell, either increasing heap/stack size or changing section solved my problem. (I placed them in the LSRAM by the way)

    Thanks for the advice.