AN4989
Printf debugging
Add printf Code
Above int main(void) (USER CODE 0 section), add:
extern void initialize_monitor_handles(void);
Then configure the semihosting system call: In int main(void) before the while(1) loop
(USER CODE 1 section) add:
Initialise_monitor_handles();
Then inside the while(1) loop, add:
Printf("Hello World!\n");
HAL_Delay(1000);
Click Project -> Build Project to compile and link everything.
AN4989 Rev 3
83/118
117
Need help?
Do you have a question about the STM32 and is the answer not in the manual?