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.

TDA4VE-Q1: How to use weston-debug on J721s2

Part Number: TDA4VE-Q1
Other Parts Discussed in Thread: SK-TDA4VM

Dear export,

I am trying to use weston-debug to output a file or fd. But it didn't work on my EVM ,need your help to check and let me know how to use weston-debug tools to output a file and fd. Thanks in advance

root@j721s2-evm:/opt/vision_apps# weston-debug 
Error: no options given.

Usage: weston-debug [options] [names]
Where options may be:
  -h, --help
     This help text, and exit with success.
  -l, --list
     Print a list of available debug streams to stderr.
  -a, --all-streams
     Bind to all available streams.
  -o FILE, --output FILE
     Direct output to file named FILE. Use - for stdout.
     Stdout is the default. Mutually exclusive with -f.
  -f FD, --outfd FD
     Direct output to the file descriptor FD.
     Stdout (1) is the default. Mutually exclusive with -o.
Names are whatever debug stream names the compositor supports.

Regards,

Fredy Zhang

  • Hi Fredy,

    I see in the logs that vision_apps is set up, so I assume Processor SDK RTOS is being used. Two issues I currently see:

    1. PSDK RTOS and PSDK Linux has differences in display driver. In PSDK Linux the display driver is hosted on the A72 core so Wayland/Weston is supported. However, in PSDK RTOS the display driver runs on the R5F core. 
    2. On PSDK Linux image for SK-TDA4VM (different device but the driver should be similar), I see the following log, which seems like there is no support for weston-debug with the default build.
      root@j7-evm:/opt/edge_ai_apps# weston-debug -a
      The Wayland server does not support weston_debug_v1 interface.
      root@j7-evm:/opt/edge_ai_apps

    So my first question to you is, is there a requirement to use Processor SDK RTOS instead of Processor SDK Linux?

    Regards,

    Takuma

  • Takuma, 

    I have enabled the linux display on RTOS SDK. So We can assume that we are using the PROCESSOR SDK Linux. 

    Pls help to check how to use the weson-debug function. If not support, Can you pls help to check the reason why we don't support the feature. 

    If we want to debug the weston output, any method we can capture the weston output and FD. Thanks in advance. 

    Regards,

    Fredy Zhang 

  • Hi Fredy,

    Understood. Assuming display is being controlled through Linux, I did some experiments:

    • Run "cat /var/volatile/log/weston.log" to print out weston logs created when trying to launch weston at runtime. This would be the easiest way to get some extra debug logs when debugging weston. Otherwise, to run weston-debug using TI's prebuilt image, the next few bullet points will go through the procedure.
    • Run "export WAYLAND_DEBUG=1" to enable debug logs with weston-debug
    • If weston is already started, end weston with "systemctl stop weston"
    • Restart weston with the debug option. For example, this worked for me: "weston --tty=1 --debug &"
    • For how weston-debug can be used, I would recommend reading the man page: https://manpages.debian.org/unstable/weston/weston-debug.1.en.html. For example, "weston-debug -l" will print out available debug streams. I found that this listed out some streams and you can bind to a stream like drm-backend with "weston-debug drm-backend".

    I would assume there is no TI-specific changes done to weston-debug, so behavior and usage should be the same as what can be found online for how to use weston-debug.

    Regards,

    Takuma