enable modem trace logs.

Hi,

i want collect modem trace logs for nRF9160, can you please help with steps how to collect modem trace logs

BR,

Pradeep Gamidi

Parents
  • Thanks Runar for update,
    I'm currently working on enabling modem trace logs for the nRF9160 using nRF Connect SDK version 1.7.0 and modem firmware version 1.3.0. I’ve followed the recommended configurations by adding the following macros to my prj.conf file:

    # Enable modem trace CONFIG_NRF_MODEM_LIB_TRACE=y # Select the backend for trace output CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_RTT=y

    However, I am encountering the following errors:

    prj.conf:189: warning: attempt to assign the value 'y' to the undefined symbol NRF_MODEM_LIB_TRACE error: Aborting due to Kconfig warnings CMake Error at C:/H565935/CL5G_R200/zephyr/cmake/kconfig.cmake:268 (message): command failed with return code: 1 Call Stack (most recent call first): C:/H565935/CL5G_R200/zephyr/cmake/app/boilerplate.cmake:554 (include) C:/H565935/CL5G_R200/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include) C:/H565935/CL5G_R200/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate) CMakeLists.txt:31 (find_package) -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: 'C:\H565935\CL5G_R200\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=C:\H565935\CL5G_R200\toolchain\opt\bin\python.exe' '-BC:\H565935\CL5G_R200\cp_r200_app\build' '-SC:\H565935\CL5G_R200\cp_r200_app' -GNinja -DBOARD=nrf9160_cl5gmns

    It appears that the NRF_MODEM_LIB_TRACE and NRF_MODEM_LIB_TRACE_BACKEND_RTT symbols are not recognized. Could you please provide guidance on how to properly enable modem trace logging with this SDK version? If these features are not supported in SDK 1.7.0, is there an alternative approach.

    Thank you for your assistance.

  • Hi

    Try to use CONFIG_NRF_MODEM_LIB_TRACE_ENABLED instead of CONFIG_NRF_MODEM_LIB_TRACE. If you want RTT you can use CONFIG_NRF_MODEM_LIB_TRACE_MEDIUM_RTT

    Regards

    Runar

  • Hi,

    As mentioned above i have used CONFIG_NRF_MODEM_LIB_TRACE_ENABLED  and CONFIG_NRF_MODEM_LIB_TRACE_MEDIUM_RTT, but i was facing below error

    Error

    c:/h565935/cl5g_r200/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: modules/nrf/lib/nrf_modem_lib/lib..__nrf__lib__nrf_modem_lib.a(nrf_modem_os.c.obj): in function `nrf_modem_os_trace_put':
    C:/H565935/CL5G_R200/nrf/lib/nrf_modem_lib/nrf_modem_os.c:706: undefined reference to `SEGGER_RTT_ASM_WriteSkipNoLock'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\H565935\CL5G_R200\toolchain\opt\bin\cmake.EXE' --build 'C:\H565935\CL5G_R200\cp_r200_app\build'

    It appears that the linker is unable to locate the SEGGER_RTT_ASM_WriteSkipNoLock function, can you help to solve this issue.

    Thanks and Regards,
    Pradeep Gamidi.

  • Hi

    I need to check regarding the SEGGER_RTT_ASM_WriteSkipNoLock. However regarding CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y is not the same as CONFIG_NRF_MODEM_LIB_TRACE=y

    Regards

    Runar

  • Hi Runar,

    can you please suggest a solution for solving this issue.

    Thanks and Regards,
    Pradeep Gamidi.

  • Could you post your prj.conf? 

    Since the issue seems to be related to RTT, do it work if you do not output the modem trace over RTT? Did you also test with CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y?

    Regards

    Runar

Reply Children
  • Yes i have tested 'CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y' ,I am encountering error as shown below, posted prj.cnf  for reference .

    ERROR

    c:/h565935/cl5g_r200/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: modules/nrf/lib/nrf_modem_lib/lib..__nrf__lib__nrf_modem_lib.a(nrf_modem_os.c.obj): in function `nrf_modem_os_trace_put':
    C:/H565935/CL5G_R200/nrf/lib/nrf_modem_lib/nrf_modem_os.c:706: undefined reference to `SEGGER_RTT_ASM_WriteSkipNoLock'
    collect2.exe: error: ld returned 1 exit status
    [381/394] No install step for 'mcuboot_subimage'
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\H565935\CL5G_R200\toolchain\opt\bin\cmake.EXE' --build 'C:\H565935\CL5G_R200\cp_r200_app\build'

    25318.prj.conf

  • Hi

    Could you try to enable CONFIG_LOG_BACKEND_RTT? According to this case it might fix the issue

    Regards

    Runar

  • Thanks to your guidance, I successfully enabled modem trace logging on the nRF9160 by updating the configuration with CONFIG_LOG_BACKEND_RTT=y. The build and flash processes completed successfully.

    Following the instructions in Lesson 7: Debugging with a Modem Trace, I performed the following steps:

    1. Built and flashed the firmware from my workspace.
    2. Sent the AT command AT%XMODEMTRACE=1,2<CR><LF>.
    3. Downloaded the Cellular Monitor application from nRF Connect for Desktop to decode trace logs.

    However, the Cellular Monitor application is not detecting the COM port for my device. Could you please assist me in resolving this issue so I can view the trace logs?

  • Hi 

    In the current release of Cellular Monitor, the RTT interface is not supported for traces capture. You can only view RTT modem traces captured outside of the tool.

    To view RTT modem traces captured outside of the tool in Cellular Monitor, complete the following steps:

    1. Enable the RTT trace backend in your device’s application using the Kconfig option CONFIG_NRF_MODEM_LIB_TRACE_BACKEND_RTT in the prj.conf file.
    2. Ensure your device is running supported modem firmware, see Minimum requirements and limitations, and note the version for playback.
    3. Use the J-Link RTT logger to collect the trace or traces and save in binary (.bin) format.
      See SEGGER Real Time Transfer (RTT) for more information.
    4. Load and playback the trace in Cellular Monitor.
      See Loading modem traces for playback for more information.

    Regards

    Runar

  • Hi Runar,

    As mentioned in the Minimum Requirements and Limitations, my modem firmware version is 1.3.1 and SDK version is 1.7.0, which do not meet the minimum requirements for modem trace logging.

    We are currently blocked by an eDRX issue and urgently need modem trace logs to resolve it. Could you please suggest any alternative methods to obtain these logs? If necessary, we can arrange a call to discuss this high-priority issue.

Related