Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Numerous errors compiling nrf_log_frontend.c

I wasn't receiving any log messages while debugging the ble_app_uart_c example using SES so I enabled appropriate logging functions and set them to level 4 in config.h.  Still didn't get any log messages so I added NRF_LOG_INFO() after the #defines section in main.c. 

Compiler is flagging many, many errors such as:  

                #define LOG_INTERNAL_X(N, ...) CONCAT_2(LOG_INTERNAL_, N), (__VA_ARGS__)       'LOG_INTERNAL_0' undeclared (first use in this function); did you mean 'LOG_INTERNAL_2'?

and:

                #define LOG_INTERNAL_X(N, ...) CONCAT_2(LOG_INTERNAL_, N), (__VA_ARGS__)       expected expression before ')' token 

I've been able to eliminate some errors simply by retyping the code but others keep popping up with each successive run.  

Please advise.

Parents Reply
  • Hi,

    There is only one compile error in this project, and it is not related to logging. The error is that you are missing a semicolon after the } on line 90 in main.c. There is also a warning which you should fix, which is that you redefine BLE_UUID_TYPE_BLE on line 72. So you should comment that out or delete the line. Lastly, I recommend you set NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED in your sdk_config.h to 0, to fix the new lines in the RTT log.

    With these changes, I get a sensible log from our application (the log indicates some problems, but that is a different matter altogether).

Children
Related