EmbeddedRelated.com
Forums

LPC2458 printf/cout over UART

Started by boru2600 September 4, 2012
Greetings, community.
I'm currently working with a NXP LPC2458 using Red Suite. I'm trying to
get a basic hello world over UART program working using the method
outlined on their site (implementing a LPC2458-specific _write()
function) without success. If I call printf() or std::cout, execution
seems to hang on the device and I see no output in minicom (I don't have
a JTAG debugger just yet so I'm printf debugging over the UART). Here's
the reference for this method:
http://support.code-red-tech.com/CodeRedWiki/UartPrintf

If I call my implementation of _write() directly, I get the following
behaviour: when I reset the board whilst connected with minicom, I see
no output, but if I connect with minicom after I reset, I see a few
lines and then no output.
Do either of these behaviours seem familiar to anyone? Is there
something glaringly obvious that I'm missing or doing wrong? If I can
provide any further information, please let me know. I appreciate any
input or insights any of you might have in advance.
Thanks.


An Engineer's Guide to the LPC2100 Series

Hi

> seems to hang on the device and I see no output in minicom (I don't have

Be sure your Baud rate is configured correctly?(Check it on a scope)
However it might be your DTR and RTS, in some boards those signal are connected to Reset Pin so you should disable them on your computer.

Could be a uart driver issue, but sounds more likely to be due to not
having enough heap space defined.

Try increasing the heap and see if that helps.

From: l... [mailto:l...] On Behalf Of
Mohammad
Sent: 04 September 2012 18:08
To: l...
Subject: [lpc2000] Re: LPC2458 printf/cout over UART

Hi

> seems to hang on the device and I see no output in minicom (I don't have

Be sure your Baud rate is configured correctly?(Check it on a scope)
However it might be your DTR and RTS, in some boards those signal are
connected to Reset Pin so you should disable them on your computer.