HELP: OM13093 eval board debug using printf() via USB PC terminal

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

HELP: OM13093 eval board debug using printf() via USB PC terminal

Jump to solution
1,132 Views
mi7engr
Contributor II

 

HELP: OM13093 eval board debug using printf() via USB PC terminal

Hello,

I found a similar post from 2018 but the question was not answered directly - how to setup OM13093 eval board hardware, LPC11C24 MCU, sample LPCopen project like /..._ccan_rom or /_uart projects to send debug printf messages out to the PC console terminal (not on MCUXpresso IDE console tab).

I'm asking for direct clear answers because I don't understand the links from help/manual sections of MCUXpresso, etc. and they are not specific to LPC11C24 and OM13093 eval board which does not have any R29 / R30 UART_TX/RX connections to USB right now.   E.g printf(), semihosting, VCOM, etc.  Clueless.

So please provide clear instruction on what to do in both HW and SW aspects of the matter.

* What to do on OM13093 eval board for connection?  Tiny silkscreen - I can't find where R29 and R30 are for shorting.  Please point it out on PCB.  

* what header / library files to use for the 11C24_* project to make UART->VCOM->USB -> Terraterm console to work?  (Is that series of interface correct or not?) 

* what library header functions to include in the project to use printf() or putc() or whatever else to do in the software project

*... and all other else are needed which I missed on the above list.

Thank you very much for the help.

mi7engr

0 Kudos
1 Solution
1,071 Views
mi7engr
Contributor II

Hi Alice,

I got your full answers on the Tech Support ticket I opened.  It worked.  Thank you.

I'm able to use DEBUGSTR(str) macro (non-printf) as enabled by the "DEBUG_ENABLE" define in properties and do the other steps summarized below.

The only extra effort I had to do outside of this matter is to implement an "itoa()" integer to ASCII function because DEBUGSTR cannot use formatting of integers/numbers ala-printf() style.  It only accepts ASCII strings.

So to summarize and for completeness with the hope of helping others who may ask about this matter, these are the 3 things that need to be done on the LPC11C24 eval board, OM13093UL:

1) Set/add DEBUG_ENABLE definition on the MCUX project's properties under Properties -> C/C++ Builds -> Settings -> Preprocessor (as shown on screenshot given before.

2) To use the USB J4 port to interface with a PC serial comm port terminal (e.g. Terraterm), put jumper/resister (0 ohm) on R29 and R30 on the eval board.

3) No work needed to connect RXD and TXD to PIO1_6 and PIO1_7 because they are already connected to the expansion JP2_9 & _20

Hope that helps.

Again, thanks Alice for the help even though I had to put separate pieces together.  I'm sorry if my question was incomplete to begin with so I had to follow-up with more posts.

Regards,

mi7engr

View solution in original post

0 Kudos
4 Replies
1,072 Views
mi7engr
Contributor II

Hi Alice,

I got your full answers on the Tech Support ticket I opened.  It worked.  Thank you.

I'm able to use DEBUGSTR(str) macro (non-printf) as enabled by the "DEBUG_ENABLE" define in properties and do the other steps summarized below.

The only extra effort I had to do outside of this matter is to implement an "itoa()" integer to ASCII function because DEBUGSTR cannot use formatting of integers/numbers ala-printf() style.  It only accepts ASCII strings.

So to summarize and for completeness with the hope of helping others who may ask about this matter, these are the 3 things that need to be done on the LPC11C24 eval board, OM13093UL:

1) Set/add DEBUG_ENABLE definition on the MCUX project's properties under Properties -> C/C++ Builds -> Settings -> Preprocessor (as shown on screenshot given before.

2) To use the USB J4 port to interface with a PC serial comm port terminal (e.g. Terraterm), put jumper/resister (0 ohm) on R29 and R30 on the eval board.

3) No work needed to connect RXD and TXD to PIO1_6 and PIO1_7 because they are already connected to the expansion JP2_9 & _20

Hope that helps.

Again, thanks Alice for the help even though I had to put separate pieces together.  I'm sorry if my question was incomplete to begin with so I had to follow-up with more posts.

Regards,

mi7engr

0 Kudos
1,110 Views
mi7engr
Contributor II

Hello Alice,

Thanks for referring me to the Properties to set _DEBUG_ENABLE.

Follow-up questions:

* When I connect LPC11C24 RXD & TXD (pins 46 and 47) to expansion headers with PIO1_6 and PIO1_7 (J2-9 and J2-10), I can then use the same USB port to connect to PC comm port and use Terraterm terminal to view the printfs?

* (please see schematic diagram attached) The USB micro-B connector, J4 is only directly connected to PIO1_7 and PIO1_6 through U2 CMSIS-DAP LS link debugger chip.  If I want to use THE SAME USB connector to go to the PC comm port, shouldn't I put on resistors R29 and R30 for PIO1_7 & _6 to "pass-through" debugger IC and go out to the USB connector?  If I do need to add R29 and R30 jumpers, please point out where on the eval board are these positions?

   Or else, how do I actually adapt another, separate USB connector to interface this eval board to PC Terraterm comm port if it is not through USB connector J4?

Please advise.

And please note:

1) I the particular LPCopen project I'm going to modify and also debug using printf is the "CCAN_ROM", nxp_lpcxpresso_11c24_periph_ccan_rom.  This means I should add the _DEBUG_ENABLE line in its properties, correct.

2) Also I'm using MCUXpresso IDE and in order to successfully build this CCAN_ROM project without errors, I also include the 2 libraries:

* lpc_chip_11cxx_lib

* nxp_lpcxpresso_11c24_board_lib

* main project:  nxp_lpcxpresso_11c24_periph_ccan_rom

Thanks again.

mi7engr

 

 

0 Kudos
1,094 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @mi7engr 

 

Have replied you in your private case.

 

BR

Alice

0 Kudos
1,117 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @mi7engr ,

 

1) Enable DEBUG_ENABLE of board_lib project as below:

Alice_Yang_0-1668416509045.png

 

2) Connect PIO1_6 (RXD) and PIO1_7(TXD) to PC using a UART to USB. 

Then you can see the characters printf() to terminal .

 

BR

Alice

 

0 Kudos