title: How to make printf work on STM32F103?
body: <p>I am new to the world of STM32F103. I have a demo code for STM32F103 and I am using arm-none-eabi to compile it.</p>
  
  <p>I tried what I could find on Google, but nothing worked so far. I have already spent three days on the problem.</p>
  
  <p>Anyone can give me a demo code for printf which works well?</p>
  
  <p>Part of my makefile:</p>
  
  <pre><code>CFLAG   = -mcpu=$(CPU) -mthumb -Wall -fdump-rtl-expand -specs=nano.specs --specs=rdimon.specs   -Wl,--start-group -lgcc -lc -lm -lrdimon -Wl,--end-group
  LDFLAG  = -mcpu=$(CPU) -T ./stm32_flash.ld -specs=nano.specs --specs=rdimon.specs   -Wl,--start-group -lgcc -lc -lm -lrdimon -Wl,--end-group
  </code></pre>