senthilkumar
Advanced Member level 1
hai,
how can i use printf function in iar like in icc and keil?
in iccavr after init uart i directly put printf it will give output in uart.
but in iaravr not like that.
any one give some useful idea.
my pgm look like
#include <iom103.h>
#include <stdio.h>
void main(){
MCUCR = 0x00;
EICR = 0x00; //external interrupts sources
EIMSK = 0x00;
TIMSK = 0x00; //timer interrupt sources
DDRD=0xff;
UCR = 0x00; //disable while setting baud rate
UBRR = 0x17; //set baud rate
UCR = 0x18; //enable
while(1){
PORTD^=0xff;
// UDR='r';
printf("test\n");
}
}
how can i use printf function in iar like in icc and keil?
in iccavr after init uart i directly put printf it will give output in uart.
but in iaravr not like that.
any one give some useful idea.
my pgm look like
#include <iom103.h>
#include <stdio.h>
void main(){
MCUCR = 0x00;
EICR = 0x00; //external interrupts sources
EIMSK = 0x00;
TIMSK = 0x00; //timer interrupt sources
DDRD=0xff;
UCR = 0x00; //disable while setting baud rate
UBRR = 0x17; //set baud rate
UCR = 0x18; //enable
while(1){
PORTD^=0xff;
// UDR='r';
printf("test\n");
}
}