RTT viewer is not working on nRF54L15

Hi Nordic team,

I tried to view logs from my custom nRF54L15-based MCU using J-Link RTT Viewer, but it's (printk) not working. The same prj.conf configuration was previously working fine with the nRF52832.

The following is my prj.conf:

# Enable LTO (Link Time Optimization)
CONFIG_LTO=y
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y

CONFIG_NCS_SAMPLES_DEFAULTS=y

# FMN configuration
CONFIG_FMNA_CAPABILITY_PLAY_SOUND_ENABLED=y
CONFIG_FMNA_CAPABILITY_BLE_SN_LOOKUP_ENABLED=y
CONFIG_FMNA_SERVICE_HIDDEN_MODE=y

# Set FMN Firmware version
CONFIG_FMNA_FIRMWARE_VERSION_MAJOR=1
CONFIG_FMNA_FIRMWARE_VERSION_MINOR=0
CONFIG_FMNA_FIRMWARE_VERSION_REVISION=0

# Bluetooth LE configuration
CONFIG_BT_EXT_ADV_MAX_ADV_SET=2
CONFIG_BT_ID_MAX=2
CONFIG_BT_MAX_CONN=3
CONFIG_BT_MAX_PAIRED=3
CONFIG_BT_PRIVACY=y
CONFIG_BT_BAS=y
CONFIG_BT_HRS=y
CONFIG_BT_HRS_DEFAULT_PERM_RW_AUTHEN=y
CONFIG_BT_DIS=y
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y

# Enable DK library for handling LEDs and buttons
CONFIG_DK_LIBRARY=y

# FMN configuration
CONFIG_FMNA=y
CONFIG_FMNA_NORDIC_PRODUCT_PLAN=n
CONFIG_FMNA_MANUFACTURER_NAME="Awiser Asia Limited"
CONFIG_FMNA_MODEL_NAME="Lock"
CONFIG_FMNA_CATEGORY=128
CONFIG_FMNA_CAPABILITY_PLAY_SOUND_ENABLED=y

CONFIG_FMNA_LOG_LEVEL_DBG=y

# Kernel dependent configuration required by FMN
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=4096

# Bluetooth dependent configuration required by FMN
CONFIG_BT_RX_STACK_SIZE=3072

# Error handling configuration
CONFIG_RESET_ON_FATAL_ERROR=n

# Reduce memory footprint
# CONFIG_USE_SEGGER_RTT=n


CONFIG_PWM=y
CONFIG_PWM_LOG_LEVEL_DBG=y

CONFIG_LED=y
# CONFIG_DT_HAS_PWM_LEDS_ENABLED=y
CONFIG_LED_PWM=y


CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_LOG_BACKEND_RTT=y


CONFIG_CONSOLE=y
CONFIG_PRINTK=y
# CONFIG_UART_CONSOLE=y
# CONFIG_SERIAL=y


CONFIG_UART_CONSOLE=n
CONFIG_LOG=y
# CONFIG_LOG_BACKEND_UART=n
# CONFIG_LOG_MODE_IMMEDIATE=y # Optional: helps in debug
# CONFIG_LOG_DEFAULT_LEVEL=4 # Ensure verbose logs

Is there any solution for this

Regards,

Barfi

  • Hello,

    Which NCS version are you using here? Have you tried the same application on an nRF54L15 DK? If so, did it go well?

    Kind Regards,

    Abhijith

  • We’re facing an issue with RTT logging when enabling MCUboot using the following macros:

    conf:
    CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y SB_CONFIG_BOOTLOADER_MCUBOOT=y

    RTT logging works correctly without these settings, but stops working when they're enabled.

    SDK version: 3.0.0

    Any guidance on resolving this would be appreciated.

  • Hello Jay,

    Sometimes enabling MCUboot can disable or interfere with RTT logging due to RAM buffer conflicts ,take a look at this old DevZone ticket. Also, I don't think Sai is facing the same issue as you. If it turns out to be the same, I’ll address both issues in this thread.

  • Hi Abhi,

    I'm using SDK NCS 3.0.0. The same RTT configuration that worked on the nRF52832 isn't working on the nRF54L15. I'm able to view logs over the COM port (UART), but not via RTT.

    Even though i tried with ncs 2.9.1 wiith binky example and that is not working with below configuration.

    CONFIG_GPIO=y

    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_LOG_BACKEND_RTT=y


    CONFIG_CONSOLE=y
    CONFIG_PRINTK=y

     

    while (1) {
    ret = gpio_pin_toggle_dt(&led);
    if (ret < 0) {
    return 0;
    }

    led_state = !led_state;
    printk("LED state: %s\n", led_state ? "ON" : "OFF");
    k_msleep(SLEEP_TIME_MS);
    }

    I'm using J-Link version 8.18, and whenever I try to view logs using RTT Viewer in nRF Connect, a pop-up appears asking me to select a board. I select nRF54L15, but the logs still don’t show up.

  • Hello Sai,

    I tried the Hello World sample from Zephyr to print output via RTT, and I was able to see the output. I'm attaching the screenshot and the prj.conf file I used for the nRF54L15DK.

    I used the J-Link RTT Viewer instead of the  VS Code extension. I'm not sure what is causing the issue on your end. Make sure one RTT client is active at a time, if more than one tool (e.g., RTT Viewer and VS Code RTT terminal) tries to connect to the RTT, control block simultaneously

    CONFIG_USE_SEGGER_RTT=y
    CONFIG_RTT_CONSOLE=y
    CONFIG_UART_CONSOLE=n

    Kind Regards,

    Abhijith

Related