简体   繁体   中英

Tera Term with Atmel Board in C

Trying to debug an issue using Atmel Mega 328p Board.

#include <stdio.h>
#include <avr/io.h>

void main() 
{
   while(1)
   {
      printf("hello world,");
   }
   return;
} 

Viewing this port in Tera Term returns nothing at all.

Warning : Implicit declaration of printf();

What could be the problem in our code?

You must initialize UART of the uC and write custom function for redirecting output on it, if you want to view output on tera-term. printf does not output on UART unless it is written in that way. However in this case, the output of the program can be viewed in the output console of the IDE which you are using.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM