Radio Test example on nrf52811 how to type commands over RTT Console?

Testing the RADIO TEXT example on 52811.

1. 52811 is not a supported target - so I must select all targets then the unsupported dts (nrf52840/nrf52811)

2. I add a Build, with the included prj.conf, optimize for size and use sysbuild.

3. Build and Debug.

4. Code Halts at:

/**
  \brief   Set Base Priority
  \details Assigns the given value to the Base Priority register.
  \param [in]    basePri  Base Priority value to set
 */
__STATIC_FORCEINLINE void __set_BASEPRI(uint32_t basePri)
{
  __ASM volatile ("MSR basepri, %0" : : "r" (basePri) : "memory");
}
with stack as shown:
This is the first halt - thus it may be the first opportunity after booting to halt code.
after run and later pause:
The break is always here:
The main problem is that I am unable to get a break on this line in main.c
The hardware is based on the design files here:
https://www.nordicsemi.com/Products/nRF52811/Download#infotabs
Download nRF52811 CAAA Reference Layout v1.0 [ZIP]
Now I have updated the pjr.conf as follows:

CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_PRINTK=y
CONFIG_ASSERT=n
#CONFIG_ASSERT=n

# Console
CONFIG_PRINTK=y
CONFIG_EARLY_CONSOLE=y
CONFIG_CONSOLE=y
CONFIG_RTT_CONSOLE=y
#CONFIG_STDOUT_CONSOLE=y


#RC LF Clock
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_LF_ALWAYS_ON=y


CONFIG_HEAP_MEM_POOL_SIZE=1024

CONFIG_BT=n

# Enable the NUS service
#CONFIG_BT_NUS=y

# Enable bonding
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y

# Drivers and peripherals
CONFIG_I2C=n
CONFIG_WATCHDOG=n
CONFIG_SPI=n
CONFIG_GPIO=y

# Power management

# Interrupts
CONFIG_DYNAMIC_INTERRUPTS=n
CONFIG_IRQ_OFFLOAD=n

# Memory protection
CONFIG_THREAD_STACK_INFO=n
CONFIG_THREAD_CUSTOM_DATA=n
CONFIG_FPU=n

# Boot
CONFIG_NCS_BOOT_BANNER=n
CONFIG_BOOT_BANNER=n
CONFIG_BOOT_DELAY=0


# Build
#CONFIG_SIZE_OPTIMIZATIONS=y

# ARM
CONFIG_ARM_MPU=n

# In order to correctly tune the stack sizes for the threads the following
# Configurations can enabled to print the current use:
#CONFIG_THREAD_NAME=y
#CONFIG_THREAD_ANALYZER=y
#CONFIG_THREAD_ANALYZER_AUTO=y
#CONFIG_THREAD_ANALYZER_RUN_UNLOCKED=y
#CONFIG_THREAD_ANALYZER_USE_PRINTK=y
#CONFIG_CONSOLE=y
#CONFIG_UART_CONSOLE=y
#CONFIG_SERIAL=y
#CONFIG_PRINTK=y

# Example output of thread analyzer
#SDC RX              : unused 800 usage 224 / 1024 (21 %)
#BT ECC              : unused 216 usage 888 / 1104 (80 %)
#BT RX               : unused 1736 usage 464 / 2200 (21 %)
#BT TX               : unused 1008 usage 528 / 1536 (34 %)
#ble_write_thread_id : unused 688 usage 336 / 1024 (32 %)
#sysworkq            : unused 1912 usage 136 / 2048 (6 %)
#MPSL signal         : unused 928 usage 96 / 1024 (9 %)
#idle 00             : unused 224 usage 96 / 320 (30 %)
#main                : unused 568 usage 456 / 1024 (44 %)
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=536
CONFIG_MPSL_WORK_STACK_SIZE=256
CONFIG_MAIN_STACK_SIZE=464
CONFIG_IDLE_STACK_SIZE=128
CONFIG_ISR_STACK_SIZE=524
#CONFIG_BT_NUS_THREAD_STACK_SIZE=428

# Disable features not needed
CONFIG_TIMESLICING=n
CONFIG_COMMON_LIBC_MALLOC=n


# Disable Bluetooth features not needed
CONFIG_BT_DEBUG_NONE=y
CONFIG_BT_ASSERT=n
CONFIG_BT_DATA_LEN_UPDATE=n
CONFIG_BT_PHY_UPDATE=n
CONFIG_BT_GATT_CACHING=n
CONFIG_BT_GATT_SERVICE_CHANGED=n
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y
CONFIG_BT_HCI_VS=n

# Disable Bluetooth controller features not needed
CONFIG_BT_CTLR_PRIVACY=n
CONFIG_BT_CTLR_PHY_2M=n



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

CONFIG_CONSOLE_HANDLER=y
CONFIG_SHELL=y

CONFIG_DYNAMIC_INTERRUPTS=y

CONFIG_NRFX_TIMER0=y
CONFIG_CLOCK_CONTROL=y

CONFIG_ENTROPY_GENERATOR=y
CONFIG_NRF_SECURITY=y

CONFIG_FEM_AL_LIB=y
CONFIG_PICOLIBC_IO_FLOAT=y


This compiles, loads, and runs to a break in main.
After I stop (disconnect the debugger)
I can connect RTT, and I get the expected Console Out.
So My Issue is: How do I type commands across the RTT link?

On my screen, I am unable to type or send commands in RTT terminal within Visual Code (After Connected Devices - > connect RTT)
Parents
  • Hi

    I tested on a 52840dk, to get it up and running i added the following to the prj.conf


    CONFIG_USE_SEGGER_RTT=y
    CONFIG_SHELL_BACKEND_RTT=y (this is missing from your prj.conf)
    Then I used the RTT connection under connected devices
    You can also use RTTviewer from segger if you prefer. There is no reason to go into debug mode. 
    Regards
    Runar
Reply
  • Hi

    I tested on a 52840dk, to get it up and running i added the following to the prj.conf


    CONFIG_USE_SEGGER_RTT=y
    CONFIG_SHELL_BACKEND_RTT=y (this is missing from your prj.conf)
    Then I used the RTT connection under connected devices
    You can also use RTTviewer from segger if you prefer. There is no reason to go into debug mode. 
    Regards
    Runar
Children
Related