cancel
Showing results for 
Search instead for 
Did you mean: 

show message on Console

Jessy J
Associate II
Posted on June 21, 2018 at 16:19

hello 

Iwant to display messages on Console.

I write printf but it is not displayed in the console 

I am using Atollictruestudio .

What to do please ? is there a configuration I shoud make ?? 

Thank you in advance for your reply

4 REPLIES 4
Posted on June 21, 2018 at 16:43

STM32479I EVAL board? or something else?

Configure the USART/pins associated with the ST-LINK VCP, check schematic and/or manual

https://www.st.com/en/evaluation-tools/stm32479i-eval.html

 

Some implementations use syscalls.c, and provide the __io_putchar() function

#ifdef __GNUC__

  /* With GCC, small printf (option LD Linker->Libraries->Small printf

     set to 'Yes') calls __io_putchar() */

  #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)

#else

  #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)

#endif /* __GNUC__ */

/**

  * @brief  Retargets the C library printf function to the USART.

  * @param  None

  * @retval None

  */

PUTCHAR_PROTOTYPE

{

  /* Place your implementation of fputc here */

  /* e.g. write a character to the EVAL_COM1 and Loop until the end of transmission */

  HAL_UART_Transmit(&UART_Handle, (uint8_t *)&ch, 1, 0xFFFF);

  return ch;

}

Or use ITM_SendChar(ch) to get out of the SWV via PB3/SWO

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 21, 2018 at 18:08

https://community.st.com/0D50X00009XkWF2SAN

'So perhaps you haven't correctly configured the right USART and pin, or you have forgotten to set the jumpers (JP15 and JP19 on the STM32479I-EVAL) to get the data out of the ST-LINK VCP vs the RS232 connector on the board.

USART1 PA9 and PA10'

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Jessy J
Associate II
Posted on June 22, 2018 at 10:04

Thank you for your reply 

In fact I am using STM32439 Eval board for the moment 

I did not get what you said well 

Posted on June 22, 2018 at 15:24

The STM32439I-EVAL board would require the connection of the RS232 Serial port to a dongle.

https://www.st.com/content/ccc/resource/technical/document/user_manual/60/0a/7f/c1/4f/f3/4f/b5/DM00093454.pdf/files/DM00093454.pdf/jcr:content/translations/en.DM00093454.pdf

 

Or are you talking about the SWV Viewer?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..