This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to redirect console in usb demo code example

Other Parts Discussed in Thread: OMAPL138

Hi,

I have successfully built and run the usb host mass storage example in the C6748 starterware (usb_host_msc_c674x_c6748_lcdkC6748 example), and I am now looking to port this simple example to a custom board.  However, my custom board uses UART1 instead of UART 2.  This usb example uses the UARTprintf(), UARTStdioInit(), and UARTConsoleInit() functions, which appear to be defined in uartConsole.c (under platform\lcdkC6748\) and uartStdio.c (under utils).  I found a couple of simple #define statements (UART_STDIO_INSTANCE and UART_CONSOLE_BASE) in the uartConsole.c file.  It looks like I can simply change these two #defines to re-direct the console out my UART1 instead of the original UART2.  However, when I build the code, I don't see anything on UART1.  If I step through the code, when it gets to the UARTConsoleInit() function, it still thinks UART_STDIO_INSTANCE is 2. I know UART1 is connected and working on my custom board as I have other code functional that uses UART1. 

Is there any easy way to include the modified uartConsole.c and uartStdio.c files in my build or are these part of the pre-built binaries?  Is there an easier way to re-direct the console to UART1?

Thanks,

Tobyn

  • Hi,
    Your changes seems to be correct.
    You would find the UART files in "platform" folder.
    C:\ti\OMAPL138_StarterWare_1_10_04_01\platform\lcdkOMAPL138
    C:\ti\OMAPL138_StarterWare_1_10_04_01\drivers

    You have to rebuild the "platform" and "drivers" projects which is linked to your "usb_mass_storage" example code.
    C:\ti\OMAPL138_StarterWare_1_10_04_01\build\c674x\cgt_ccs\omapl138\lcdkOMAPL138\platform
    C:\ti\OMAPL138_StarterWare_1_10_04_01\build\c674x\cgt_ccs\omapl138\drivers

    Also please make sure that you have pinmuxed for UART1 pins while running the program via emulator (CCS debug).