I have been running some of the examples and have noticed none of the logging ever works on the Debug Terminal. I am using SES with Nordic SDK 17. When I run any of the SDK’s sample applications which use nRF_log, nothing outputs to the Debug terminal in SES or the JLINK RTT viewer. The example I have been mainly working with is ESB - PTX. I’ve tried two different boards (BL654 from Laird) with multiple versions of Nordic SDK(15.2, 16, 17) and multiple versions of JLINK (6.70, 6.80a, 6.80b).
I have the following config settings set.
NRF_LOG_BACKEND_RTT_ENABLED = 1
NRF_LOG_BACKEND_UART_ENABLED = 0
NRF_LOG_ENABLED = 1
NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED = 0
I also tried using the nRF Connect SDK, and the debug terminal does work but uses the Zepher log library instead. I have been trying to use the PDM examples from Thingy52 repo, which all use libraries from the Nordic SDK, making porting to NCS a major pain (unless there is an easier way to do this), so I would like to use Nordic SDK until I am able to get some proof of concepts working.
As a side note: It would be really helpful and much appreciated, to get some PDM sample programs for NCS using the NRFX library.
Hello,Are you using deferred logging ( #define NRF_LOG_DEFERRED 1 )?In that case, you will need to call NRF_LOG_PROCESS() at a place in your code where you would like log processing to take place - please see the "Deferred logging" section of the logger module documentation for further information about this.If you are not using deferred logging, or in the case that you have accounted for this and regularly call NRF_LOG_PROCESS without receiving anything in your RTT viewer - could you tell me what you NRF_LOG_DEFAULT_LEVEL is defined to? If you are using the NRF_LOG_INFO call for your logs, it will need to be at 3 or 4.If you are not using NRF_LOG_INFO and rather is attempting to print using prinf, you need to make sure RETARGET_ENABLE is defined 1.Looking forward to solving this issue together,Best regards,Karl
Thank you Karl!!
Setting NRF_LOG_DEFERRED = 0 was the trick I needed. For testing, I don't need to defer the logging, but that is a useful trick for later. The PTX example never calls NRF_LOG_PROCESS() since it never enters an Idle state and the PRX example, I never set the Log level to 4.
Jared.Romano said:Thank you Karl!!
No problem at all, I am happy to hear this solved your issue!Please do not hesitate to open a new ticket if you should encounter any issues or questions in the future.Good luck with your development!Best regards,Karl