The PRINTF() macro in the “blinky” sample supports two types of debug interfaces: UART and RTT.
The developer can select the desired debug interface during the compilation process by setting the macro OUTPUT_INTERFACE in project settings. If the macro is set to -1, tracing is disabled. This is the default behavior in all sample applications.
Add “OUTPUT_INTERFACE=1” to the project settings preprocessor to enable RTT in the “blinky” application.
To view the messages, use the J-Link RTT Viewer, which can be found in the Installation folder of the SEGGER tool. Please make sure to select the RSL10 device when connecting the viewer to the RSL10 debug interface.
I am trying to enable RTT in this app and as you suggest I have added #define OUTPUT_INTERFACE OUTPUT_RTT in the app.h file. However the build fails with the message that there is “undefined reference to printf_init”, found in line 97 of app.c
Thank you for contacting. Please let me know which sample you are running. The best way to enable RTT is via project settings in eclipse.
To access project settings please right click on the project in Eclipse Project Explorer → Properties->C/C++ build-> Settings. In Cross Arm C compiler → Preprocessor add the following line for Configuration (Debug/Release)
OUTPUT_INTERFACE=OUTPUT_RTT (Click + on the right to Define Symbols (-D))
Please try it and let me know if you have more questions.
that was perfect advice, it completely solved the issue
You are welcome Nikos - please let me know if there are any other questions.