Хорошая статья здесь по prinft и отладочному выводу через SWO в IAR Studio:
http://microsin.net/programming/arm/iar-stm32-terminal-debug-output.html