Skip to content

jklimcak/ess2020

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ess2020

How to use printf for debugging

in main.c

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

and in project settings

->Debug->Settings(on the right side)->Trace

in this page, change core clock to 168.000 MHz, tick "Trace Enable"

Now you can add printf in your code

in debugging mode, open Debug(printf) Viewer, you can see the message you print with the code here.

If you are printing too fast it may stuck so don't forget to add break points.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.0%
  • Assembly 5.1%
  • HTML 2.1%
  • Other 0.8%