nRF Profiler scripts can't seem to handle different RTT backend channel from default.

Development Setup:

- nRF Connect SDK v2.6.0
- Custom nRF9160 board
- OS: Debian Bookworm (running scripts in python virtual enviroment)

Currently application uses Shell and Logging both with RTT backend.  SHELL_BACKEND_RTT_BUFFER=0 and LOG_BACKEND_RTT_BUFFER=1
Shell logging backend is enabled or disabled based on debugging needs. Normal logging is used for long term capture of logs during test runs.

Scripts under the nRF Profiling will give following log when error occurs:

[INFO] Profiler Rtt to stream: Recognized device family: NRF91
[ERROR] Profiler Rtt to stream: Cannot find properly configured RTT channels
[INFO] Profiler model creator: Module closed before receiving event descriptions.
[INFO] Plot Nordic: Module closed before receiving event descriptions.

This error occurs if Shell logging backend is enabled or disabled.

When Shell is disabled and Logging and LOG_BACKEND_RTT_BUFFER=0 scripts run fine.

Any chance this is a bug? Or is this just not an implemented feature? Otherwise I can take this up at GitHub issues and have a go at the problem myself.

Parents
  • Hi

    I assume you mean the Profiler sample that demonstrates the nRF Profiler subsystem, correct?

    The error message you're seeing is that the RTT can't find properly configured channels. The RTT runs on the SWDIO pins, so if those are not connected to your USB/serial connector, then I assume this is the error message you'll see. 

    Best regards,

    Simon

Reply
  • Hi

    I assume you mean the Profiler sample that demonstrates the nRF Profiler subsystem, correct?

    The error message you're seeing is that the RTT can't find properly configured channels. The RTT runs on the SWDIO pins, so if those are not connected to your USB/serial connector, then I assume this is the error message you'll see. 

    Best regards,

    Simon

Children
  • Hi Simon,

    I haven't tried the Profiler sample, it looks like it also doesn't use the same configuration I'm trying to use for my application.

    I'll try to give a better description of the problem:

    The nRF Profiler, Application Event Manager profiler tracer, shell and logging libraries all work independently.

    To use the Shell and Logging feature at the same time I'm using RTT buffer(channel) 0 for the shell and RTT buffer(channel) 1 for the logging.

    When you add in the nRF Profiler part code compiles fine and has been verified working. Only the scripts in nrf/scripts/nrf_profiler/ don't seem to work with the Logging on a different channel than the default (channel 0).

    Shell also provides a means to handle logging using CONFIG_SHELL_LOG_BACKEND=y; Even though this works on RTT channel 0; the nrf_profiler scripts seemingly can't handle the SHELL_LOG_BACKEND, but only the standard Zephyr Logging library.

    So to further reply to your question. RTT functions correctly and I am able to use Shell, Logging and Profiler using the RTT backend, only it breaks when using them either all at the same time or in specific configurations.

    The thing that breaks is the nrf_profiler scripts so my assumption was that they can't handle different RTT channels. I've opened the support ticket to get confirmation on if this might be a bug or a missing feature.

    Thank you for your time and best regards,

    Matthijs

Related