Tool/software:
Hello experts,
I am trying to get some serial debug console output from the IPC examples.
* SDK 9
* Custom board where main_uart7 should be attached to mcu2_0.
* Using ipc_echo_test_freertos as test application
What I've done:
* Stripped the pinmux to only include the UART7:
static pinmuxPerCfg_t gUart7PinCfg[] =
{
/* MyUART7 -> UART7_RTSn -> R24 */
{
PIN_MMC1_DAT0, PIN_MODE(1) | \
((PIN_PULL_DISABLE) & (~PIN_PULL_DIRECTION & ~PIN_INPUT_ENABLE))
},
/* MyUART7 -> UART7_RXD -> R26 */
{
PIN_MMC1_DAT3, PIN_MODE(1) | \
((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
},
/* MyUART7 -> UART7_TXD -> R25 */
{
PIN_MMC1_DAT2, PIN_MODE(1) | \
((PIN_PULL_DISABLE) & (~PIN_PULL_DIRECTION & ~PIN_INPUT_ENABLE))
},
{PINMUX_END}
};
static pinmuxModuleCfg_t gUartPinCfg[] =
{
{7, 1, gUart7PinCfg},
{PINMUX_END}
};
pinmuxBoardCfg_t gJ721E_MainPinmuxData[] =
{
{0, gUartPinCfg},
// {0, gDebugssPinCfg},
// {1, gDpPinCfg},
// {2, gGpioPinCfg},
// {3, gI2cPinCfg},
// {4, gMcanPinCfg},
// {5, gMdioPinCfg},
// {6, gMlbPinCfg},
// {7, gMmcsdPinCfg},
// {8, gSystemPinCfg},
// {9, gUartPinCfg},
// {10, gUsbPinCfg},
// {11, gMcaspPinCfg},
{PINMUX_END}
};
pinmuxBoardCfg_t gJ721E_WkupPinmuxData[] =
{
// {0, gMcu_i2cPinCfg},
// {1, gMcu_i3cPinCfg},
// {2, gMcu_mcanPinCfg},
// {3, gMcu_mdioPinCfg},
// {4, gMcu_fss0_ospiPinCfg},
// {5, gMcu_rgmiiPinCfg},
// {6, gMcu_uartPinCfg},
// {7, gWkup_debugssPinCfg},
// {8, gWkup_gpioPinCfg},
// {9, gWkup_i2cPinCfg},
// {10, gWkup_systemPinCfg},
// {11, gWkup_uartPinCfg},
// {12, gMcu_adcPinCfg},
{PINMUX_END}
};
pinmuxBoardCfg_t gJ721E_WkupPinmuxDataHpb[] =
{
// {0, gMcu_fss0_hpbPinCfg},
{PINMUX_END}
};
int32_t Ipc_Trace_printf(const char *format, ...)
{
char buffer[IPC_TRACE_MAX_LINE_LENGTH];
va_list args;
uint8_t i = 0;
va_start(args, format);
vsprintf(buffer, format, args);
va_end(args);
// #if defined(ENABLE_UART_PRINT)
if(gBoardinit==1)
{
UART_printf("%s\n",buffer);
}
// #endif
for (i = 0; i < strlen(buffer); i++)
{
Ipc_traceBuffer[gTraceBufIndex++] = buffer[i];
if (gTraceBufIndex == IPC_TRACE_BUFFER_MAX_SIZE) {
gTraceBufIndex = 0;
}
}
return 0;
}
root@AS-P-3-340009:~# ./rpmsg_char_simple -r 2 -n 10
_rpmsg_char_find_ctrldev: could not find the matching rpmsg_ctrl device for virtio0.rpmsg_chrdev.-1.14
Can't create an endpoint device: Invalid argument
TEST STATUS: FAILED
root@AS-P-3-340009:~# cat /sys/kernel/debug/remoteproc/remoteproc0/trace0
root@AS-P-3-340009:~# ./rpmsg_char_simple -r 2 -n 10
Created endpt device rpmsg-char-2-551, fd = 4 port = 1025
Exchanging 10 messages with rpmsg device rpmsg-char-2-551 on rproc id 2 ...
Sending message #0: hello there 0!
Received message #0: round trip delay(usecs) = 229030
hello there 0!
Sending message #1: hello there 1!
Received message #1: round trip delay(usecs) = 116940
hello there 1!
Sending message #2: hello there 2!
Received message #2: round trip delay(usecs) = 107650
hello there 2!
Sending message #3: hello there 3!
Received message #3: round trip delay(usecs) = 94695
hello there 3!
Sending message #4: hello there 4!
Received message #4: round trip delay(usecs) = 93935
hello there 4!
Sending message #5: hello there 5!
Received message #5: round trip delay(usecs) = 91095
hello there 5!
Sending message #6: hello there 6!
Received message #6: round trip delay(usecs) = 91130
hello there 6!
Sending message #7: hello there 7!
Received message #7: round trip delay(usecs) = 94775
hello there 7!
Sending message #8: hello there 8!
Received message #8: round trip delay(usecs) = 91645
hello there 8!
Sending message #9: hello there 9!
Received message #9: round trip delay(usecs) = 108880
hello there 9!
Communicated 10 messages successfully on rpmsg-char-2-551
TEST STATUS: PASSED
root@AS-P-3-340009:~# cat /sys/kernel/debug/remoteproc/remoteproc0/trace0
ipc_boardInit done.
IPC_echo_test BOSSE (core : mcu2_0) .....
mcu2_0 <--> mpu1_0 : hello there 0! recvd
mcu2_0 <--> mpu1_0 : hello there 1! recvd
mcu2_0 <--> mpu1_0 : hello there 2! recvd
mcu2_0 <--> mpu1_0 : hello there 3! recvd
mcu2_0 <--> mpu1_0 : hello there 4! recvd
mcu2_0 <--> mpu1_0 : hello there 5! recvd
mcu2_0 <--> mpu1_0 : hello there 6! recvd
mcu2_0 <--> mpu1_0 : hello there 7! recvd
mcu2_0 <--> mpu1_0 : hello there 8! recvd
mcu2_0 <--> mpu1_0 : hello there 9! recvd