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.

[TDA4VM]log print in the demos

Other Parts Discussed in Thread: TDA4VM

Now we have some TDA4VM/j721EX boards and "psdk_rtos_auto_j7_06_01_00_15" sdk.

We connect the uart to ubuntu pc, and the /dev/ttyUSB0 is for A72, and the /dev/ttyUSB2 is for main mcu and dsp. Is it right?

In the vision_apps demo, the demo in mcu2_1 and the demo in dsp will send logs to linux console if we run source /opt/vision_apps/vision_apps_init.sh in linux.

How can we make the demo in mcu2_1 and the demo in dsp output their logs to /dev/ttyUSB2? 

In the pdk/packages/ti/drv/gpio/test/led_blink demos, we want to use printf to show our log, but we cannot see any log from /dev/ttyUSB2. How can we see mcu and dsp log from tty?

Thank you!

  • Hi Subin,

    Let me clarify with the UART ports.

    When you connect the MCU uart port (the one close to the eDP port) to your PC, you should see two COM ports -> first one is for the DMSC Cortex M3 (You wouldn't need this mostly), and the second one will be for all the MCU-RFs.

    When you connect the other MAIN uart port, you should see 4 COM ports -> first one is to be used for A72/Main R5Fs/DSPs.

    If your application runs on MCU2_1/DSP, it the output of UART_printf() should come in this MAIN port. The /dev/ttyUSBx number may change, you can't hardcode that.

    You can however find which one is it by doing "dmesg | grep ttyUSB" in your Ubuntu terminal after you connect the UART port to your PC. It will show you which are the ones connected. In the image attached, I'm pointing to the one corresponding to the MAIN uart in my setup

  • Hi, Anand, thanks for your reply.

    We have tried the ethfw demo in the "psdk_rtos_auto_j7_06_01_00_15" sdk. After building, the demo output app_remoteswitchcfg_server.xer5f, which run on mcu2_0.

    When I made the binary run on mcu2_0, the /dev/ttyUSB2 of MAIN uart output logs.

    So I think that you said "you should see 4 COM ports -> first one is to be used for A72/Main R5Fs/DSPs" is not right.

    And we want to know how we can output log to ttyUSB0/1/2/3 according to our needs.

  • Hi Subin,

    Good to know that you're getting the logs. Can you please send me the output of "dmesg | grep ttyUSB" after connecting the main UART? As I previously mentioned, the ttyUSB number can be anything. You have to choose the correct one by looking at the dmesg log.

  • As you can see in the picture, the linux log output to ttyUSB0, the log from ethfw which run on mcu2_0 output to ttyUSB2, and "dmeg | grep ttyUSB" output nothing.

  • Hi Subin,

    I'm afraid you mistook my instruction. Please do dmesg | grep in your linux PC terminal, not in the EVM's prompt. That should ideally give you a similar output as I have shown.

  • Hi Anand

    I get the message you said. But I still don't know the difference between ttyUSB0/1/2/3 . And why the linux log output to ttyUSB0, the log from ethfw which run on mcu2_0 output to ttyUSB2? Where are these settings?

  • Hi Subin,

    Thanks for clarifying. As you can see, 4 UART instances are there in the main UART. The prints from ethfw in MCU2_0 comes in main the 3rd UART instance because UART for cpsw is initialized with the UART instance ID 2 (The ports follow 0,1,2,3). In the case of ethfw, you can check the file pdk/packages/ti/drv/cpsw/examples/cpsw_appboardutils_j721e_gesi.c line 109. You will find that the UART is initialized with instance 2. If my understanding is correct, the A72 UART is hardcoded to instance 0. I hope this answers your question. If yes, please mark the thread as resolved :)