Pvrcarbon Trace File Not Generated for mainHmi on TI AM62P5

Hi Team,

We are using the TI AM62P5 SoC on a custom board.


Description:

Our application team is attempting to trace a custom mainHmi application using PVRCarbon and record it into a file named mainHmi_capture.pvrcbn on our custom hardware running Linux. The intention is to copy this recording to a Windows host and open it in the PVRCarbon GUI Tool.

Currently, the Yocto build does not include either libPVRCarbon.so or libPVRCapture.so. We manually copied libPVRCarbon.so to /usr/lib on the target.

The mainHmi application is built separately using CMake (not via Yocto), and the build does not include any flags or definitions for PVRCarbon tracing.


Steps Taken / Observations:

  1. Verified libPVRCarbon.so is missing from /usr/lib in the Yocto build.

  2. Manually transferred the file from the SDK to /usr/lib and set proper permissions.

  3. Configured environment variables:

export LD_PRELOAD="/usr/lib/libEGL.so:/usr/lib/libGLESv2.so:/usr/lib/libPVRCarbon.so:$LD_PRELOAD"
export LD_LIBRARY_PATH="/usr/lib/:$LD_LIBRARY_PATH"
export PVRCARBON_host_library_egl=/usr/lib/libEGL.so
export PVRCARBON_host_library_glesv2=/usr/lib/libGLESv2.so
export PVRCARBON_align_memory=false

  1. Attempted to launch mainHmi with PVRCarbon. No .pvrcbn file was generated.

  2. Created a manual pvrcarbon.json in /tmp with the following content:

{
  "Application": {
    "Executable": "/app/usr/bin/mainHmi",
    "Arguments": "",
    "WorkingDirectory": "/app/usr/bin"
  },
  "Recording": {
    "OutputFile": "mainHmi_capture.pvrcbn",
    "FrameStart": 0,
    "FrameCount": 600,
    "RecordDebugInfo": true
  }
}

  1. Restarted mainHmi after reboot; still no .pvrcbn file was generated.

  2. Verified binary using nm and strings; no reference to PVRCarbon found:

nm ./GP/7XXD_B/release/install/aarch64le/usr/bin/mainHmi | grep -i carbon
strings ./GP/7XXD_B/release/install/aarch64le/usr/bin/mainHmi | grep -i carbon

Both commands returned no results.


Impact:

  • pvrcbn file is not generated.

  • Unable to capture graphics API calls for mainHmi using PVRCarbon.

  • Limits debugging and profiling of the application on Linux.


Request:

  1. Confirm whether mainHmi should generate pvrcarbon trace files.

  2. Provide guidance on proper steps or environment configurations to enable PVRCarbon tracing.

  3. Specify any required changes in the CMake build or additional dependencies needed.


Regards,
Naveen

Hi cmcnaveen9999,

Thanks for your message, and welcome to the PowerVR Developer Forum!

After asking the Tools Team, there are several points to cover:

  1. Make sure to copy all the libraries (not just libPVRCarbon.so) to /usr/lib/ (libEGL.so, libEGL.so.1, libGLESv2.so, libGLESv2.so.2). Otherwise, Carbon will not be able to intercept any calls for recording.

  2. Regarding:
    export PVRCARBON_host_library_egl=/usr/lib/libEGL.so
    export PVRCARBON_host_library_glesv2=/usr/lib/libGLESv2.so
    These variables should point to the platform’s driver libraries, and not the the PVRCarbon libraries.

  3. The .json format does not seem to be correct. There is an example in our online documentation, under https://docs.imgtec.com/tools-manuals/pvrcarbon-manual/html/topics/pvrcarbon-recorder/appendices.html

I would advice doing the changes mentioned and trying to take a recording with PVRCarbon GUI (and no .json file). If no luck, please verify the console output for any Carbon errors logged. If the issues are not easy / straightforward to fix, try with the .json file option.

If you still have any issues please let me know.

Best regards,
Alejandro

Hi @AlejandroC

Thanks for the response.

Yes, I have verified. We have all the files available in the target.

Yes. We are using libEGL.so & libGLESv2.so from the ti-sdk. Only libPVRCarbon.so is from the PVRCarbon library.

Target:

Platform Driver => ti-sdk

PVRCarbon Library => Windows (Where I got this after installing PVRCarbon GUI tool)

Path: C:\Program Files\Imgtec\PowerVR_Tools\PVRCarbon\Recorder\GLES

We have updated the pvrcarbon.json file as attached above in the screenshot.

Reference: Appendices

We have kept a copy of the same JSON in the following locations, as mentioned here (For us Linux)

image

Still, when I relaunch the HMI application manually, the hmi.pvrcbn file is not generated in the /ota_cache path. Whereas the HMI application is running & rendering is happening properly on the TFT.

Kindly support us in getting the .pvrcbn file for our custom HMI application. Correct me if I have done anything wrong.

Regards,
Naveen

Hi Naveen,

Thanks for the detailed reply. After asking the Tools Team, they pointed out the variable setup might not be correct.

You should:

  • Take the PVRCarbon libraries and copy all including libEGL and libGLES to a folder like /tmp/carbon
  • Setup the LD_LIBRARY_PATH to point at that location.
  • You can then start the recording.

If the driver is located in /usr/lib there might be no need to set the other variables as PVRCarbon should find them automatically.

Please let me know if you still have issues after these changes.

Best regards,
Alejandro

Hi,

Myself Prabhu and Naveen is my colleague.

I have tried to create path /tmp/carbon and palced the libPVRCarbon.so file in that path. Also, other paths and json files are set as mentioned in the previous response.

Still the issue is not resolved. No capturing starts.

Can we have a joint debugging session to resolve the issue ?

Regards,

Prabhu

Hi,

Please, let us know if there is any update.

Regards,

Prabhu

all the required libraries are in the respective place. Still the capturing is not successufl.

Hi pkrish12,

Looking at the last image provided, the contents under /tmp/carbon show two files which are not part of the PVRCarbon release:

  • libEGL.so.1.0.0
  • libGLESv2.so.2.0.0

Perhaps you copied them from the libEGL and libGLESv2 files present in your system? Please make sure to copy to /tmp/carbon only the files present in Recorder/GLES/Linux_armv8_64/

Best regards,
Alejandro