Skip to main content
DRAME.1
Associate III
September 1, 2020
Question

Hi Team I am using STM32F401RE I wanted to print the message using the printf on the console But I am not able to see any prints Can you please let me know what is the settings that I have to change to enable printf on the console Kindly please help

  • September 1, 2020
  • 2 replies
  • 1930 views

..

This topic has been closed for replies.

2 replies

Olivier GALLIEN
Technical Moderator
September 1, 2020

Hi @DRAME.1​ 

Please have a look to AN4989 STM32 Debug Toolbox chapter 7 Printf Debugging

Hope it help

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
ANala.2
Associate III
September 1, 2020

0693W000003QVL9QAO.pngHi Oliver

Thanks for your response I have done the following settings.

I am trying to add the code below in the main file ,But i see that its giving an error

.\Objects\esfree_deepak_abhi.axf: Error: L6218E: Undefined symbol ITM_SendChar (referred from main.o).

I am not sure How to include this call Please let me know what files/library i have to enable to get this working

What are the other files to enable to get this working Screen shot shows the module enabled in my project

#include "stdio.h"
int fputc(int ch, FILE *f)
{
 ITM_SendChar(ch);
 return(ch);
}

Tesla DeLorean
Guru
September 1, 2020

Usually pulled in via stm32f4xx.h (compiler command line define for CPU STM32F401xE)

STM32Cube_FW_F4_V1.25.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f401xe.h

STM32Cube_FW_F4_V1.25.0\Drivers\CMSIS\Core\Include\core_cm4.h

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
waclawek.jan
Super User
September 1, 2020

What is "console" here? What's your hardware?

JW