How to use printf function in iar like in icc and keil?

Status
Not open for further replies.

senthilkumar

Advanced Member level 1
Joined
Nov 24, 2001
Messages
401
Helped
27
Reputation
54
Reaction score
19
Trophy points
1,298
Location
india
Activity points
3,965
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");



}
}
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…