Tool/software:
Hello Ti experts,
Can I see vx_print's outputs of TIOVX Kernel Process on A72 Linux Uart serial terminal?
I'd like to see add some prints in some TIOVX kernels like display, tidl, etc for debug purpose.
Regards,
Juhyun
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.
Tool/software:
Hello Ti experts,
Can I see vx_print's outputs of TIOVX Kernel Process on A72 Linux Uart serial terminal?
I'd like to see add some prints in some TIOVX kernels like display, tidl, etc for debug purpose.
Regards,
Juhyun
Hi Juhyun,
call the funtion tivx_set_debug_zone(VX_ZONE_INFO);
inside tivxKernelDrawBoxDetectionsCreate()
refer https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/exports/docs/tiovx/docs/user_guide/DEBUG_PRINT.html
then use this,
VX_PRINT(VX_ZONE_INFO, "print... %d", int_variable);
refer the source code in the following path
$(PSDKR_PATH)/c7x-mma-tidl/arm-tidl/tiovx_kernels/tidl/dsp/vx_tidl_target.c
Regards,
Gokul
Hi Gokul,
I modified tivxKernelDrawBoxDetectionsCreate() as you said.
static vx_status VX_CALLBACK tivxKernelDrawBoxDetectionsCreate ( tivx_target_kernel_instance kernel, tivx_obj_desc_t *obj_desc[], vx_uint16 num_params, void *priv_arg ) { vx_status status = VX_SUCCESS; uint32_t i; tivx_set_debug_zone(VX_ZONE_INFO); for (i = 0U; i < num_params; i ++) { VX_PRINT(VX_ZONE_INFO, "print... %d", i); VX_PRINT(VX_ZONE_ERROR, "print... %d", i); if (NULL == obj_desc[i]) { status = VX_FAILURE; break; } } return(status); }
But still the message doesn't appear.
root@j721s2-evm:/opt/vision_apps# ./run_app_tidl_od_cam.sh APP: Init ... !!! 93080.978217 s: MEM: Init ... !!! 93080.978472 s: MEM: Initialized DMA HEAP (fd=5) !!! 93080.978638 s: MEM: Init ... Done !!! 93080.978661 s: IPC: Init ... !!! 93081.021684 s: IPC: Init ... Done !!! REMOTE_SERVICE: Init ... !!! REMOTE_SERVICE: Init ... Done !!! 93081.031580 s: GTC Frequency = 200 MHz APP: Init ... Done !!! 93081.039202 s: VX_ZONE_INIT:Enabled 93081.039258 s: VX_ZONE_ERROR:Enabled 93081.039268 s: VX_ZONE_WARNING:Enabled 93081.052481 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0 93081.052633 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1 93081.052750 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2 93081.052846 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3 93081.052856 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!! 93081.053303 s: VX_ZONE_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!! 93081.065454 s: ISS: Enumerating sensors ... !!! 93084.894663 s: ISS: Enumerating sensors ... found 0 : IMX390-UB953_D3 93084.894702 s: ISS: Enumerating sensors ... found 1 : IMX390-UB953-DISCOVERY-NARROW 93084.894713 s: ISS: Enumerating sensors ... found 2 : IMX390-UB953-DISCOVERY-MID 93084.894720 s: ISS: Enumerating sensors ... found 3 : IMX390-UB953-DISCOVERY-WIDE 93084.894727 s: ISS: Enumerating sensors ... found 4 : AR0233-UB953_MARS 93084.894733 s: ISS: Enumerating sensors ... found 5 : AR0820-UB953_LI 93084.894740 s: ISS: Enumerating sensors ... found 6 : S5K1H1SB-GMSL2 93084.894746 s: ISS: Enumerating sensors ... found 7 : UB9xxx_RAW12_TESTPATTERN 93084.894751 s: ISS: Enumerating sensors ... found 8 : UB96x_UYVY_TESTPATTERN 93084.894757 s: ISS: Enumerating sensors ... found 9 : GW_AR0233_UYVY 10 sensor(s) found Supported sensor list: a : IMX390-UB953_D3 b : IMX390-UB953-DISCOVERY-NARROW c : IMX390-UB953-DISCOVERY-MID d : IMX390-UB953-DISCOVERY-WIDE e : AR0233-UB953_MARS f : AR0820-UB953_LI g : S5K1H1SB-GMSL2 h : UB9xxx_RAW12_TESTPATTERN i : UB96x_UYVY_TESTPATTERN j : GW_AR0233_UYVY Select a sensor above or press '0' to autodetect the sensor g Sensor selected : S5K1H1SB-GMSL2 Querying S5K1H1SB-GMSL2 93086.073189 s: ISS: Querying sensor [S5K1H1SB-GMSL2] ... !!! 93086.073358 s: ISS: Querying sensor [S5K1H1SB-GMSL2] ... Done !!! LDC Selection Yes(1)/No(0) Invalid selection . Try again LDC Selection Yes(1)/No(0) Invalid selection . Try again LDC Selection Yes(1)/No(0) 0 Max number of cameras supported by sensor S5K1H1SB-GMSL2 = 12 Please enter number of cameras to be enabled 1 93088.673328 s: ISS: Initializing sensor [S5K1H1SB-GMSL2], doing IM_SENSOR_CMD_PWRON ... !!! 93088.673520 s: ISS: Initializing sensor [S5K1H1SB-GMSL2], doing IM_SENSOR_CMD_CONFIG ... !!! 93091.520502 s: ISS: Initializing sensor [S5K1H1SB-GMSL2] ... Done !!! read_test_image_raw : Unable to open file /opt/vision_apps/test_data//img_test.raw, setting error message as all 0s Scaler output1 width = 1024 Scaler output1 height = 512 Scaler output2 width = 1024 Scaler output2 height = 512 93092.376983 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377036 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377061 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377162 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377185 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377197 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377216 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377305 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377324 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array [SCALER-MODULE] output1 [SCALER-MODULE] output2 [SCALER-MODULE] output3 none [SCALER-MODULE] output4 none [SCALER-MODULE] output5 none [SCALER-MODULE] tivxVpacMscScaleNode [SCALER-MODULE] tivxVpacMscScaleNode done! [SCALER-MODULE] 0 [SCALER-MODULE] 1 [SCALER-MODULE] 2 [SCALER-MODULE] 3 93092.377457 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377484 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377495 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array [SCALER-MODULE] 4 93092.377578 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377596 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377688 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377709 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377725 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377737 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377803 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377819 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.377830 s: VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array 93092.689815 s: ISS: Starting sensor [S5K1H1SB-GMSL2] ... !!! ========================================== TIDL Demo - Camera based Object Detection ========================================== s: Save intermediate outputs p: Print performance statistics x: Exit Enter Choice: 93092.699467 s: ISS: Starting sensor [S5K1H1SB-GMSL2] ... Done !!! raw_image_arr = 0xffff9c973c08, enqueueCnt = 0 raw_image_arr = 0xffff9c973db0, enqueueCnt = 1 raw_image_arr = 0xffff9c973f58, enqueueCnt = 2 raw_image_arr = 0xffff9c974100, enqueueCnt = 3 [dequeue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0 [enqueue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0 [dequeue] capture_input_image = 0xffff9c973db0, enqueueCnt = 1 [enqueue] capture_input_image = 0xffff9c973db0, enqueueCnt = 1 [dequeue] capture_input_image = 0xffff9c973f58, enqueueCnt = 2 [enqueue] capture_input_image = 0xffff9c973f58, enqueueCnt = 2 [dequeue] capture_input_image = 0xffff9c974100, enqueueCnt = 3 [enqueue] capture_input_image = 0xffff9c974100, enqueueCnt = 3 [dequeue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0 [enqueue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0 [dequeue] capture_input_image = 0xffff9c973db0, enqueueCnt = 1 [enqueue] capture_input_image = 0xffff9c973db0, enqueueCnt = 1 [dequeue] capture_input_image = 0xffff9c973f58, enqueueCnt = 2 [enqueue] capture_input_image = 0xffff9c973f58, enqueueCnt = 2 [dequeue] capture_input_image = 0xffff9c974100, enqueueCnt = 3 [enqueue] capture_input_image = 0xffff9c974100, enqueueCnt = 3 [dequeue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0 [enqueue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0 [dequeue] capture_input_image = 0xffff9c973db0, enqueueCnt = 1 [enqueue] capture_input_image = 0xffff9c973db0, enqueueCnt = 1 [dequeue] capture_input_image = 0xffff9c973f58, enqueueCnt = 2 [enqueue] capture_input_image = 0xffff9c973f58, enqueueCnt = 2 [dequeue] capture_input_image = 0xffff9c974100, enqueueCnt = 3 [enqueue] capture_input_image = 0xffff9c974100, enqueueCnt = 3 [dequeue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0 [enqueue] capture_input_image = 0xffff9c973c08, enqueueCnt = 0
In the above log, I can see below message which I added on the tiovx/source/framework/vx_node.c
VX_ZONE_ERROR:[vxReplicateNode:2043] reference type is object array
I checked the source code is compiled as below.
If i'm right, the compiled objects integrated in vx_app_rtos_linux_c7x_2.out and I updated the firmware binary and rebooted.
Even to check whether the firmware updated, I remarked the contents inside
void tivxAddTargetKernelDrawBoxDetections() { #if 0 vx_status status = (vx_status)VX_FAILURE; char target_name[TIVX_TARGET_MAX_NAME]; vx_enum self_cpu; VX_PRINT(VX_ZONE_ERROR, "tivxAddTargetKernelDrawBoxDetections!!\r\n"); self_cpu = tivxGetSelfCpuId(); if (self_cpu == TIVX_CPU_ID_MPU_0) { strncpy(target_name, TIVX_TARGET_MPU_0, TIVX_TARGET_MAX_NAME); status = (vx_status)VX_SUCCESS; } else { status = tivxKernelsTargetUtilsAssignTargetNameDsp(target_name); } if( (vx_status)VX_SUCCESS == status) { vx_DrawBoxDetections_kernel = tivxAddTargetKernelByName ( TIVX_KERNEL_DRAW_BOX_DETECTIONS_NAME, target_name, tivxKernelDrawBoxDetectionsProcess, tivxKernelDrawBoxDetectionsCreate, tivxKernelDrawBoxDetectionsDelete, NULL, NULL ); } #endif }
And rebuilt, updated firmware, reboot, then executed demo application I got the result as below.
So I know the modification of the source code is in effect, but still don't know why the vx_print doesn't show up.
Regards,
Juhyun
Hi Gokul,
I have found this thread,
And following the answer, I executed /opt/vx_app_arm_remote_log.out and I could see the prints from dsp.
Thank you for the support.
Regards,
Juhyun