On Monday 13 December 2010 21:51:13 Peter Van Epp wrote:
> Thanks, it looks like that is the best bet, but so far I haven't been
> successfull there either :-). It looks like sdcdb won't run under Cygwin
> and the simulator (which seems to be happy with Cygwin) doesn't produce any
> output to a file when putchar is writing to the UART. Looks like I get to
> put SDCC on a Linux or FreeBSD box and try on there ... If I get something
> working I'll send a howto to the mailing list for the next poor soul :-).
> Peter Van Epp
the putchar function is target dependant. It is on BSP
support to provide one. There are probably some defaults
provided by SDCC, but I have written this function for my
hardware myself for our targets.
You can use next simple (non IRQ driven) version for simulator
PCON|=0x80; /* Bd = OSC/12/16/(256-TH1) */
RCLK=0; /* Timer 1 for serial 0 receiver */
TCLK=0; /* Timer 1 for serial 0 transmitter */
CKCON&=~0x10; /* T1M = 0 => timer 1 clock is f/12 else f/4 */
void putchar (char c)
static char is_init=0;
is_init = 1;
TI = 0;
SBUF = c;
It works fine form me in combination with S51.