Implementing Console Print in debug???

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Implementing Console Print in debug???

1,227 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Thu May 12 10:35:33 MST 2011
Recently i heard about printing o/p from target MCU to the Console in IDE while debugging. I have tried a lot googling but still I cant implement it. I have an LPC Xpresso kit with LPC 1114 MCU. IDE version v3.6.3.
0 Kudos
6 Replies

786 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jharwood on Thu May 12 22:28:00 MST 2011

Quote: akhilpo
Using printf() suddenly increases the file size from 6k to 18k. Is there any way to reduce that? I have already selected Redlib (semihost) in the project properties.



Did you read the FAQ?

Quote:

To enable the non-floating-point printf from Redlib, define the symbol "CR_INTEGER_PRINTF".

0 Kudos

786 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Thu May 12 21:34:57 MST 2011
Using printf() suddenly increases the file size from 6k to 18k. Is there any way to reduce that? I have already selected Redlib (semihost) in the project properties.
0 Kudos

786 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu May 12 11:38:59 MST 2011

Quote: akhilpo
Recently i heard about printing o/p from target MCU to the Console in IDE while debugging. I have tried a lot googling but still I cant implement it. I have an LPC Xpresso kit with LPC 1114 MCU. IDE version v3.6.3.



If you use the project wizard to create a "Semihosting C project" everything will be set up so that the printf will write "Hello World" out to the console of the IDE for you.

For more information see the C library FAQs....
http://support.code-red-tech.com/CodeRedWiki/CodeRedFAQ#CLibrary

Regards,
CodeRedSupport
0 Kudos

786 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu May 12 11:33:58 MST 2011
If it's printing to your Console, it's obvious working :)
0 Kudos

786 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by akhilpo on Thu May 12 11:30:09 MST 2011
It suddenly started working. I am using printf() and putchar() functions. Is that correct?
0 Kudos

786 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu May 12 10:44:52 MST 2011
Look for 'semihosting' and 'printf'

Try:

http://support.code-red-tech.com/CodeRedWiki/UsingPrintf
0 Kudos