diff --git a/platform/avr-atmega128rfa1/contiki-main.c b/platform/avr-atmega128rfa1/contiki-main.c index bd35a13fe..995960151 100644 --- a/platform/avr-atmega128rfa1/contiki-main.c +++ b/platform/avr-atmega128rfa1/contiki-main.c @@ -45,14 +45,6 @@ #define PRINTD(...) #endif -/* Track interrupt flow through mac, rdc and radio driver */ -#if DEBUGFLOWSIZE -uint8_t debugflowsize,debugflow[DEBUGFLOWSIZE]; -#define DEBUGFLOW(c) if (debugflowsize<(DEBUGFLOWSIZE-1)) debugflow[debugflowsize++]=c -#else -#define DEBUGFLOW(c) -#endif - #include #include #include @@ -98,6 +90,15 @@ uint8_t debugflowsize,debugflow[DEBUGFLOWSIZE]; #include "net/rime.h" +/* Track interrupt flow through mac, rdc and radio driver */ +//#define DEBUGFLOWSIZE 32 +#if DEBUGFLOWSIZE +uint8_t debugflowsize,debugflow[DEBUGFLOWSIZE]; +#define DEBUGFLOW(c) if (debugflowsize<(DEBUGFLOWSIZE-1)) debugflow[debugflowsize++]=c +#else +#define DEBUGFLOW(c) +#endif + /* Get periodic prints from idle loop, from clock seconds or rtimer interrupts */ /* Use of rtimer will conflict with other rtimer interrupts such as contikimac radio cycling */ /* STAMPS will print ENERGEST outputs if that is enabled. */ @@ -187,8 +188,12 @@ void initialize(void) /* Second rs232 port for debugging or slip alternative */ rs232_init(RS232_PORT_1, USART_BAUD_57600,USART_PARITY_NONE | USART_STOP_BITS_1 | USART_DATA_BITS_8); - /* Redirect stdout to second port */ + /* Redirect stdout */ +#if RF230BB_CONF_LEDONPORTE1 || defined(RAVEN_LCD_INTERFACE) rs232_redirect_stdout(RS232_PORT_1); +#else + rs232_redirect_stdout(RS232_PORT_0); +#endif clock_init(); if(MCUSR & (1<