ik1wvq
Joined: 21 Feb 2004 Posts: 20
|
ICD problem with PRINTF function |
Posted: Sat Feb 21, 2004 4:30 pm |
|
|
hi friends,
i have a little problem with CCS debugger:
PCWH 3.184
PIC18F252
ICD-U40
i try with this trivial code:
#nclude <18F252.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP,WDT128,BROWNOUT,NOCPD
#device *=16 ADC=10 CCSICD=true
#opt 9
#IGNORE_WARNINGS 203
#use delay(clock=10000000,RESTART_WDT)
#use rs232(baud=9600,xmit=PIN_C6,rcv=PIN_C7,errors, restart_wdt)
int8 counter1=0;
void main(void)
{
disable_interrupts(global);
SET_UART_SPEED(9600);
while (true) // trivial loop
{
restart_wdt();
counter1++;
printf("hello %u \n\r",counter1);
delay_ms(1000);
}
}
if i execute "single step (f7)" or "step over (f8)" the target execution hang when executing the "PRINTF" instruction... i must stop the debugger execution and restart it.
I DONT USE THE TERMINAL WINDOWS OF THE DEBUGGER, BUT
A TERMINAL PROGRAM CONNECTED VIA SERIAL PORT TO MY BREADBOARD SERIAL OUTPUT.
note please what if i move the printf in a separate function the "step over" work Ok, but the "single step" hang again on the printf instruction.. this is the modified code:
void f1(void)
{
printf("hello %u \n\r",counter1);
}
void main(void)
{
disable_interrupts(global);
SET_UART_SPEED(9600);
while (true) // trivial loop
{
restart_wdt();
counter1++;
f1();
delay_ms(1000);
}
}
anyone know this problem and (possibly) a solution ???
sorry for my bad english !
thanks and regards
Mauro |
|