EasyManuals Logo

STMicroelectronics STM32 User Manual

STMicroelectronics STM32
118 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #76 background imageLoading...
Page #76 background image
Printf debugging AN4989
76/118 AN4989 Rev 3
library which split trace between stimulus based on their importance (info, debug,
error) or there source.
STM32CubeIDE
With STM32CubeIDE you also have to redirect printf to SWO by some piece of code.
With syscall.c integrated to the project:
#include "stdio.h"
int __io_putchar(int ch)
{
ITM_SendChar(ch);
return(ch);
}
Without syscall, add:
int _write(int file, char *ptr, int len)
{
int DataIdx;
for (DataIdx = 0; DataIdx < len; DataIdx++)
{
__io_putchar(*ptr++);
}
return len;
}
Enable SWD in Debug configuration ? Debugger pane (see Figure 55).
Core clock must be the same as Cortex clock. You can then start the debug session.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STMicroelectronics STM32 and is the answer not in the manual?

STMicroelectronics STM32 Specifications

General IconGeneral
BrandSTMicroelectronics
ModelSTM32
CategoryMicrocontrollers
LanguageEnglish

Related product manuals