printf of Redlib(semihost) doesn't work

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

printf of Redlib(semihost) doesn't work

1,046 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rajgonvl on Sun Jun 14 04:53:54 MST 2015
Hi tech-support,

I'm experimenting semihosted printf functionality on LPC 1343 and facing a trouble. It doesn't display anything on the LPCXpresso console in combination with LPCOpen and Redlib(semihost).

I inserted printf("Toggle!\n"); at the end of the if-clause of TIMER32_0_IRQHandler in timer.c (between line 61 and 62) in periph_timer sample project included in lpcopen_2_05_lpcxpresso_nxp_lpcxpresso_1343. When I choose Newlib(semihost) or Newlibnano(semihost) with Quick Settings, the "Toggle!\n" string appears, but with Redlib(semihost) nothing shows up. Why?

My environment is as follows:
IDE: LPCXpresso v7.7.2 [Build 379]
Defined symbols:
DEBUG
CR_INTEGER_PRINTF
CR_PRINTF_CHAR
__CODE_RED
__USE_LPCOPEN
CORE_M3
__REDLIB__
Board: LPCXpresso LPC1343 Rev A
Build Configuration: Debug (Debug build)
Host: Windows7 Professional SP1 32bit on Intel Core i7-4790 @ 3.60GHz
Debugger: both LPC-Link and LPC-Link2
Recognized as USB Device with DFU Capabilities with Driver Philips(NXP) 3.12.0.0 (2010/03/11)

Thank you.

0 Kudos
Reply
1 Reply

842 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Sun Jun 14 07:24:41 MST 2015
Your board library is probably redirecting Redlib's output to the serial port:

http://www.lpcware.com/content/faq/lpcopen-debug-inputoutput-support

PS - you probably don't want a semihosting operation inside an interrupt handler:

http://www.lpcware.com/content/faq/lpcxpresso/semihosting

HTH!
0 Kudos
Reply