Skip to main content
zhentong liu
Visitor II
March 16, 2018
Question

How to use the function printf on TrueSTUDIO

  • March 16, 2018
  • 1 reply
  • 617 views
Posted on March 16, 2018 at 09:14

The function printf is not work on TrueSTUDIO, but the same code is wrok on KEIL

    This topic has been closed for replies.

    1 reply

    Andrew Neil
    Super User
    March 16, 2018
    Posted on March 16, 2018 at 13:09

    They are different compilers - with different runtime support libraries - so it is not to be expected that this would work the same way.

    You need to search the TrueStudio documentation (or, more specifically, the GCC documentation) to find out how to do this in 

    TrueStudio (which used GCC).

    Or you could just sprintf() to a buffer, and write a simple put_string() to send that string wherever you want it ...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.