I'm using "nrf5_SDK_for_Mesh_v0.9.2-Alpha".
How can I debug print out to UART print at printf, not RTT ?
I'm using "nrf5_SDK_for_Mesh_v0.9.2-Alpha".
How can I debug print out to UART print at printf, not RTT ?
Jake,
in ["mesh/core/api/nrf_mesh_config_core.h"] line 307 you can see that rtt is the default:
#ifndef LOG_CALLBACK_DEFAULT #if defined(NRF51) || defined(NRF52_SERIES) #define LOG_CALLBACK_DEFAULT log_callback_rtt #else #define LOG_CALLBACK_DEFAULT log_callback_stdout #endif #endif
override this at compile time with a cmake argument.
cmake .. -G Ninja -DLOG_CALLBACK_DEFAULT=log_callback_stdout
Thank you thst.
I already did your comment. But, I can not change UART pin. I want to use p0.04 and 5 for UART TX/RX. How can I change it?
Have you looked at the uart example in the sdk?
The pca10040 devkit default UART pins are 8/6 [examples/bsp/pca10040.h:69]
PSELRTS 0x508 Pin select for RTS
PSELTXD 0x50C Pin select for TXD
PSELCTS 0x510 Pin select for CTS
PSELRXD 0x514 Pin select for RXD
Thank you thst.
But, I can not find "examples/bsppca10040.h" file in "nrf5_SDK_for_Mesh_v0.9.2-Alpha". I see the file in "examples/hal/include/pca10040.h". In this file, I see below.
#define RX_PIN_NUMBER 8
#define TX_PIN_NUMBER 6
#define CTS_PIN_NUMBER 7
#define RTS_PIN_NUMBER 5
#define HWFC true
But, I can not find who uses these defines.
I'm sorry I forgot that mesh got the SDK label. The UART example is in examples/peripherals of the nrf5 SDK (nRF5_SDK)
Debug print over UART is not implemented in the Mesh SDK.
Support can be added by merging the UART example from the nRF_SDK with the log_callback_stdout() in the Mesh.
-Tom