I'm using a modified at_client program running on an nRF9160. It runs ok as a nonsecure application, under spm. The program can flashed, breakpoints set, single stepped etc. - debugger connection is working ok under SES.
I've tried different prj.conf parameters as found in Zephyr documentation and e.g. https://devzone.nordicsemi.com/f/nordic-q-a/41742/nrf91-zephyr-enable-lte-logging but never managed to get RTT logging output. The printf/printk functions should write to a RTT channel, right? The following lines have been added to prj.conf
CONFIG_TRUSTED_EXECUTION_NONSECURE=y #CONFIG_NO_OPTIMIZATIONS=y
CONFIG_PRINTK=y CONFIG_CONSOLE=y # UART logging as in devzone.nordicsemi.com/.../nrf91-zephyr-enable-lte-logging #CONFIG_LOG=y #CONFIG_SERIAL=y #CONFIG_STDOUT_CONSOLE=y #CONFIG_UART_INTERRUPT_DRIVEN=y # or disable it #CONFIG_SERIAL=n CONFIG_STDOUT_CONSOLE=y #docs.zephyrproject.org/.../nordic_segger.html #CONFIG_UART_CONSOLE=n CONFIG_RTT_CONSOLE=y CONFIG_HAS_SEGGER_RTT=y CONFIG_USE_SEGGER_RTT=y #CONFIG_LOG_BACKEND_RTT=y #CONFIG_SHELL_BACKEND_RTT=y #CONFIG_LOG_BACKEND_RTT_FORCE_PRINTK=y
and several of the compinations commented out have been tried. Still no output on SES windows or to JLinkRTTClient
Any hints what else needs to be added?
The environment:
- nrf9160_sica on our own PCB.
- We have our own board .dts. But the same (no RTT output) happens if compiled with zephyr/boards/arm/nrf9160_pca10090ns board definitions
- Latest SDK 0.3.99
- Segger SES 4.16
- SWD 6-pin debugger connector. Segger JLink Ultra+.
- The connection works, If I compile the SES sample programs for nRF5 and run e.g. the hello_workl, I get the printf / printk output to both SES output window and to JLinkRTTClient
- Seems that the output does not get sent to UART0 either (but need more testing on that)
Pertti