Hello guys.
I'm new with nodic nRF52 SDK and I tried to enable debug by setting 1 on "NRF_LOG_ENABLED" in sdk_config.h, but nothing happens in com port criated by Jtag (pca10040).
Where is my error? What is the correctly procedure?
Hello guys.
I'm new with nodic nRF52 SDK and I tried to enable debug by setting 1 on "NRF_LOG_ENABLED" in sdk_config.h, but nothing happens in com port criated by Jtag (pca10040).
Where is my error? What is the correctly procedure?
Line 273 of the makefile had the following line:
#CFLAGS += NRF_LOG_ENABLED=1 # Use if RTT output is desired.
I uncommented it and added the -D in front. Maybe I'm trying to compile the wrong version of the Thingy FW.
I compiled the debug version of the Thingy FW.
Are there two different FW versions in the Nordic-Thingy52-FW-master directory, one for debugging and the other for release? Or did you mean that the firmware was made into a debug version by applying the changes to the sdk_config.h file? Right now I'm compiling from Nordic-Thingy52-FW-master\project\pca20020_s132\armgcc. There's another directory (Nordic-Thingy52-FW-master\project\bootloader_secure\pca20020_debug) that obviously has something to do with debugging, but there's no makefile and is too large to build in my version of Keil.
Thanks again!
Never mind! It's working now! I was expecting some debug information on Thingy startup, but I had to go into one of the Thingy services in the smartphone app so that sensor data was being collected.
Thanks for your help!
Great to hear that you figured it out! I am not sure how exactly it works when you use gcc & makefiles, but in Keil & Segger Embedded Studio, you can often choose between a Release Build that could be more optimized for size or a debug build that is easier to debug with. See this link for a good explanation of the difference between the two.
I do not think you would have needed to change the line:
#CFLAGS += NRF_LOG_ENABLED=1 # Use if RTT output is desired.
to include a -D in front of it.
I believe the code optimization could be changed by taking a look at line 268 in the makefile:
CFLAGS += -Wall -Werror -O3 -g3
It seems that -g3 includes debug symbols in the .out file & you can change -03 to -O0 to decrease optimization, I believe (see link).