DEBUGSTR works but DEBUGOUT does not

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

DEBUGSTR works but DEBUGOUT does not

295 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rocketdawg on Tue Mar 04 13:40:39 MST 2014
I am using LPCOpen 2.04 for LPC4330
DEBUGSTR does indeed work, strings are transmitted and displayed in TeraTerm

It looks like retarget.h in lpc_board_...  should be directing the __sys_write to the WRITEFUNC()  which should direct printf() to output to the UART.
But no output.



BTW, Board_Debug_Init() calls Chip_UART_SetBaud(DEBUG_UART, 115200);
which fails miserably

replacing that call with
Chip_UART_SetBaudFDR(DEBUG_UART, 115200);
does work and sets the baud rate correctly

edit using LPCOpen 2.04
Labels (1)
0 Kudos
1 Reply

256 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Thu Mar 06 11:17:33 MST 2014
I can't speak for the Chip_UART_SetBaudFDR() function, but I'd guess the DEBUGOUT doesn't work because of library selection. You'll need to use the redlib (nohost) library to use DEBUGOUT.
DEBUGOUT maps to printf(), while DEBUGSTR maps to a direct UART output function.

DEBUGSTR will work with redlib (none), but you can only output a simple string (unformatted) with it.

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

You can also route those functions via semihosting using redlib (senihosting) and enabling the DEBUG_SEMIHOSTING definition in board.h.
0 Kudos