This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printf on lpc2129

I can't seem to get printf going on my system. I've declared putchar as extern and written a routine called putchar to output to the serial port, but the application dies whenever I try to printf. I dare say I'm not doing something fairly fundamental!

Parents
  • There is a generic GNU example that shows printf I/O in the folder:
    Keil\ARM\GNU\Examples\Hello.

    It is written for a Atmel device, but can be easily adapted to any other part. Change the following:

    • UART initalization at the beginning of main.
    • I/O functions in SERIAL.C.

    Basically you may take a look to the Keil ARM C example (part of DKARM V1.3) in the folder Keil\ARM\Examples\Hello. This variant of the "Hello World" program is already configured for an LPC21xx device.

Reply
  • There is a generic GNU example that shows printf I/O in the folder:
    Keil\ARM\GNU\Examples\Hello.

    It is written for a Atmel device, but can be easily adapted to any other part. Change the following:

    • UART initalization at the beginning of main.
    • I/O functions in SERIAL.C.

    Basically you may take a look to the Keil ARM C example (part of DKARM V1.3) in the folder Keil\ARM\Examples\Hello. This variant of the "Hello World" program is already configured for an LPC21xx device.

Children
No data