See the manual.  You'll need to define your own putchar.  for example:

void putchar (char tx_data)
// write to registers to tx the data.  TX buffering, etc


On 10/5/2011 7:16 PM, Theo Tijssen wrote:
Hello! I have a simple program in C language that I was hoping to compile in the SDCC compiler so I could download it onto my 8051 microcontroller. The code is:

/* Hello World program */


    printf("Hello World");


The issue I am having is when I compile this in SDCC, the error reads:
?ASlink-Warning-Undefined Global '_putchar' referenced by module 'vprintf'

I tried putting in a general putchar code but that didn't work, it just gave me more errors in the compiler. Do you know how to fix this or what we need to add to our code in order for the compiler to properly compile it? Any help and/or suggestions are appreciated.

Thanks in advance!

All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.

Sdcc-user mailing list