While using nRF Connect, I encountered an error when attempting to enter Debug mode with RTT active. Here are my J-Link specifications and log details:
My Jlink especifications: Application log started - J-Flash V8.12 (J-Flash compiled Dec 18 2024 15:44:37) - JLinkARM.dll V8.12 (DLL compiled Dec 18 2024 15:43:28) Reading flash device list [/home/santos/Documents/JLink/ETC/JFlash/Flash.csv] ... - List of flash devices read successfully (225 Devices) Reading MCU device list ... - List of MCU devices read successfully (11667 Devices)
When I have an RTT session open and then attempt to switch to Debug mode in nRF Connect, an error occurs. Any suggestions on how to resolve this issue?
-- west flash: rebuilding [0/5] Performing build step for 'nrfconnect' ninja: no work to do. [2/5] No install step for 'nrfconnect' [3/5] Completed 'nrfconnect' [4/5] cd /home/santos/Documents/nrfconnect/build/_sysbuild && /home/santos/ncs/toolchains/b77d8c1312/usr/local/bin/cmake -E true -- west flash: using runner nrfjprog -- runners.nrfjprog: reset after flashing requested -- runners.nrfjprog: Flashing file: /home/santos/Documents/nrfconnect/build/merged.hex [error] [ JLink] - Failed to initialize CPU module in firmware because probe is low on memory (heap). [error] [ Client] - Encountered error -11: Command read_device_info executed for 596 milliseconds with result -11 [error] [ Worker] - Could not connect to CPU core. This may indicate that AP protection is enabled. Emulator does not have enough memory to perform the requested operation. [error] [ Client] - Encountered error -104: Command read_memory_descriptors executed for 14 milliseconds with result -104 Failed to read device memories. [error] [ nRF52] - Device memory generation failed. [error] [ Worker] - JLinkARM.dll ReadMemU32 detected a read error 1. This typically indicates the read was blocked by a memory protection mechanism. ERROR: nrfjprog failed for an unknown reason. Run the same command again with ERROR: argument --log, contact Nordic Semiconductor and provide the generated ERROR: log.log file to them. NOTE: For additional output, try running again with logging enabled (--log). NOTE: Any generated log error messages will be displayed. FATAL ERROR: command exited with status 65: nrfjprog --program /home/santos/Documents/nrfconnect/build/merged.hex --sectoranduicrerase --verify -f NRF52 --snr 805251123 * The terminal process terminated with exit code: 65. * Terminal will be reused by tasks, press any key to close it.
My prj.conf
# Enable logging and RTT DEBUG output CONFIG_LOG=y CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=1 CONFIG_LOG_PRINTK=y CONFIG_LOG_MODE_DEFERRED=n CONFIG_UART_CONSOLE=n # Hardware info CONFIG_HWINFO=y # Debug CONFIG_DEBUG_THREAD_INFO=y CONFIG_DEBUG_OPTIMIZATIONS=y # Enable logging and RTT DEBUG output CONFIG_LOG=y CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_USE_SEGGER_RTT=y CONFIG_LOG_BACKEND_RTT=y CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=1 CONFIG_LOG_PRINTK=y CONFIG_LOG_MODE_DEFERRED=n # LVGL CONFIG_LV_Z_MEM_POOL_SIZE=16384 CONFIG_LV_Z_SHELL=y CONFIG_MAIN_STACK_SIZE=4096 CONFIG_DISPLAY=y CONFIG_DISPLAY_LOG_LEVEL_ERR=y CONFIG_LOG=y CONFIG_SHELL=y CONFIG_LVGL=y CONFIG_LV_USE_LOG=y CONFIG_LV_USE_LABEL=y CONFIG_LV_USE_ARC=y CONFIG_LV_USE_MONKEY=y CONFIG_LV_FONT_MONTSERRAT_14=y CONFIG_LV_LOG_LEVEL_TRACE=y CONFIG_LV_LOG_LEVEL_INFO=y CONFIG_LV_LOG_LEVEL_WARN=y CONFIG_LV_LOG_LEVEL_ERROR=y CONFIG_LV_LOG_PRINTF=y CONFIG_ST7789V=y CONFIG_PRINTK=y # Debug CONFIG_DEBUG_THREAD_INFO=y CONFIG_DEBUG=y CONFIG_DEBUG_OPTIMIZATIONS=y # MIPI CONFIG_MIPI_DBI=y CONFIG_PWM=y CONFIG_LED=y CONFIG_GPIO=y # SPI CONFIG_SPI=y CONFIG_SPI_NRFX=y CONFIG_NRF_APPROTECT_LOCK=n CONFIG_TRUSTED_EXECUTION_NONSECURE=y CONFIG_NEWLIB_LIBC=y CONFIG_LOG_BACKEND_UART=n