Can't get nRF52811 based sample projects to display on Segger J-Link RTT Viewer

Hi,

I am working on an FCC cert of our product which is nRF52811 based.  We are currently on SDK 2.0.0.  I have copied from the nrf samples bluetooth area the projects peripheral_uart and direct_test_mode and have been trying (in vain) to get them to send LOG_INF output to the RTT display.  Our main FW on nRF52811 sends the data fine but for some reason I can't get the other two test projects to do that.

I really need the direct_test_mode project to work that so I can test out the 52811 before we go to the RF Lab to check it out.  The peripheral_uart sample seems to be where our current pre-production FW originated from, so I have been trying to use that one to get the RTT display working.  I had to basically lobotomize it as far as BT is concerned since the 52811 is such a small SOC.

Here's the proj.conf from peripheral_uart:

#
# Copyright (c) 2018 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
CONFIG_SERIAL=y

CONFIG_GPIO=y

# Make sure printk is printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=n

CONFIG_HEAP_MEM_POOL_SIZE=2048

#CONFIG_BT=y
#CONFIG_BT_PERIPHERAL=y
#CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
#CONFIG_BT_DEVICE_APPEARANCE=833
#CONFIG_BT_MAX_CONN=1
#CONFIG_BT_MAX_PAIRED=1

# Enable the NUS service
#CONFIG_BT_NUS=y

# Enable bonding
#CONFIG_BT_SETTINGS=y
#CONFIG_FLASH=y
#CONFIG_FLASH_PAGE_LAYOUT=y
#CONFIG_FLASH_MAP=y
#CONFIG_NVS=y
#CONFIG_SETTINGS=y

# Enable DK LED and Buttons library
#CONFIG_DK_LIBRARY=y

# This example requires more workqueue stack
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n

CONFIG_ASSERT=y

# hml extra stuff:
CONFIG_BT_NUS_SECURITY_ENABLED=n
CONFIG_LOG_MODE_IMMEDIATE=n
CONFIG_RTT_CONSOLE=y
The main configs that seem to be important for RTT display appear to be CONFIG_SERIAL, CONFIG_LOG, and CONFIG_USE_SEGGER_RTT.
I have the log.h setup in my main.c and have the other setups.  Here's a partial in main:
#define LOG_MODULE_NAME peripheral_uart
LOG_MODULE_REGISTER(LOG_MODULE_NAME, LOG_LEVEL_INF);
void main(void)
{
while(true) {
k_msleep(1000);

LOG_INF("EXECUTING MAIN AFTER WAITING 5 SECONDS");
};
Any help would be appreciated.
h.
Parents
  • A little extra info.  On the J-Link RTT Viewer output, I can see that we are able to connect, but nothing displays:

    LOG: Connecting to J-Link via USB...
    LOG: Device "NRF52811_XXAA" selected.
    LOG: InitTarget() start
    LOG: InitTarget() end - Took 2.09ms
    LOG: Found SW-DP with ID 0x2BA01477
    LOG: DPIDR: 0x2BA01477
    LOG: CoreSight SoC-400 or earlier
    LOG: Scanning AP map to find all available APs
    LOG: AP[2]: Stopped AP scan as end of AP map has been reached
    LOG: AP[0]: AHB-AP (IDR: 0x24770011)
    LOG: AP[1]: JTAG-AP (IDR: 0x02880000)
    LOG: Iterating through AP map to find AHB-AP to use
    LOG: AP[0]: Core found
    LOG: AP[0]: AHB-AP ROM base: 0xE00FF000
    LOG: CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    LOG: Found Cortex-M4 r0p1, Little endian.
    LOG: FPUnit: 6 code (BP) slots and 2 literal slots
    LOG: CoreSight components:
    LOG: ROMTbl[0] @ E00FF000
    LOG: [0][0]: E000E000 CID B105E00D PID 000BB000 SCS
    LOG: [0][1]: E0001000 CID B105E00D PID 003BB002 DWT
    LOG: [0][2]: E0002000 CID B105E00D PID 002BB003 FPB
    LOG: RTT Viewer connected.

    It's setup correctly, with the USB and Serial number, target device correct, interface SWD at 4000kHz and Auto Detection.  And as I said before the same display will correctly display our current real app that originally used peripheral_uart as a template.  So it seems to be something with these sample apps...  

    h.

  • I found another devzone article with a zip file (minimal_log.zip) that has a project that just does what I need it to do.  I have downloaded it and built it, but it doesn't output any data either.  I do see it connect to the RTT display though:

    devzone.nordicsemi.com/.../how-to-enable-ncs-rtt-logging

    h.

Reply Children
No Data
Related