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.

TMDS64GPEVM: Output of DebugP_log

Part Number: TMDS64GPEVM
Other Parts Discussed in Thread: SYSCONFIG

Hello all,

I am working with TMDS64GPEVM – AM64x General Purpose Evaluation Module and have MCU+SDK version 8 on my PC. I am booting the R5F core using Linux kernel in A53 core using SSH. While running the ipc_rpmsg_echo_linux example, i could not see any output that was to be displayed by DebugP_log on the command prompt. Can someone tell me where this output can be seen?

Please do refer to the below code snippet.

void frertos_main(void *args)
{
int32_t status;
//int32_t status;

RPMessage_CreateParams createParams;
TaskP_Params taskParams;

//Drivers_open();
//Board_driversOpen();


DebugP_log("[IPC RPMSG ECHO] %s %s\r\n", __DATE__, __TIME__);

  • Hello,

    It is expected that you will not see any output from the R5 core on the Linux command prompt. Let me send your question over to one of our RTOS experts to comment on where to see DebugP_log outputs. Please ping the thread if they have not responded in a day or so.

    Regards,

    Nick

  • Hi Aaron,

    As Nick mentioned in his response, MCU+ SDK is designed for R5F/M4 cores running on FreeRTOS or NoRTOS. The DebugP_log has three options: UART0, CCS console, or memory log (Can be viewed by ROV through CCS). When you run the IPC RPMSG example, A53 is running Linux. In this case, the both A53 core running Linux and R5F cores use the same UART0. There will be a conflict in resource between A53 and R5F cores. I think the Linux wins the competition, so the Debug log from R5F cores will not be displayed You can play with the Debug_log and UART (UART Instance: USART0 or USART1) in SysConfig. 

    Notice that there 4 UART ports available on AM64x GP EVM. Make sure you have them all connected to the Tera Term or other UART emulator with correct settings.

    Best regards,

    Ming

  • Hi Aaron,

    you should be able to see the output from your MCU+ SDK application when you look into /sys/kernel/debug/remoteproc/remoteproc0/trace0 in Linux. You might have to put the call to Driver_open() back in.

    The DebugP logging has a "Memory log" logging target that Ming already mentioned. It seems that target is always enabled (when IPC is enabled? when nothing else is enabled?). That "Memory log" can be viewed with ROV (as Ming mentioned), but this is also linked in the RPMessage_ResourceTable when the IPC driver is included via Syscfg.

    There's code in the Linux kernel that allows you to view the content of that buffer via the sysfs interface.

    You should note that this is very rudimentary, i.e. you can't "block" for new loggings, and reading and writing from that buffer isn't synchronized. Linux also always displays the buffer from start to end, so if the buffer in the R5f application wrapped, you'll see a mixture of older and newer messages.

    At least this is how it's working for me - please correct me if I'm wrong.

    Regards,

    Dominic

  • Hi Ming,

    Thank you for your reply. Can you suggest a UART port which the R5F core can access and is exposed on to the GPIO pins in the AM64x general purpose evalution board?. This is so that we can connect a UART to TTL converter and observe the output of DebugP_log in real time. Also please give the steps that needs to be followed in order to setup such a UART connection.

    Thank you. 

  • Hi Aaron,

    Both UART0 and UART1 are supported via J26 UART. You just need to pick the the one which is not used by Linux. I think UART1 is not used by Linux.

    Best regards,

    Ming

  • Hi Ming,

    Thank you for your reply. If my understanding is correct, the DebugP_log automatically outputs to UART0, which as you mentioned above, is being used by the Linux core A53. Please give the steps to follow so that the output of DebugP_log can been seen when using UART1.  Also, how do we configure which UART (0 or 1) uses the J26 UART port ?.

    Thank you.

  • Hi Aaron,

    As I mentioned before, to change the DebugP_log from UART0 to UART1, you need to change the "UART Instance" from USART0 to USART1 in Sysconfig. Showed below. And rebuild the project.

    Best regards,

    Ming

  • Hi Ming,

    Thanks for you reply. You mentioned above that UART 0 and UART 1 are both supported via J26 UART.  I would like to know about the functionality of J24 USB port.

    Thank you

  • Hi Aaron,

    J24 USB port is for the USB module in AM64x. It has nothing to do with the UART. J26 UART however is the USB connector to support multiple virtual UART ports (4 ports via FTDI chip)

    Best regards,

    Ming

  • Hi Ming,

    Thank you for the reply. We have setup linux  in A53 core and FreeRTOS in R5F core . We need the UART0 for linux debugging. We also need the UART1 for viewing ouput from DebugP_log of R5F core. Can both of the UARTS be used simultaneously from the J26 UART port ? .

    Is there any UART port which is exposed on to the male headers that can be used for R5F debugging?

    Thank you. 

  • Hi Aaron,

    Yes. Both UART0 and UART1 are available via J26 UART at the same time. In fact, there are 3 virtual UART ports via J26 UART:

    SOC_MAIN_UART0

    SOC_MCU_UART0

    SOC_MAIN_UART1

    You do need a separate UART emulation instance for each UART port (COMnn).  

    See "3.4.7 UART Interfaces" in  spruix0d.pdf for details.

    I am not aware any male connector for UART port on AM64x EVM

    According to the spruix0d.pdf, SOC_MAIN_UART4 is connected to the HSE connector to provide additional connectivity options, but HSE is not male connector.

    Best regards,

    Ming