This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Debugging, NRF_LOG, Segger Embedded Studio Problems

I saw something in the list that might help but I have learned that if I go there I lose all the work I did to get here

I am having major problems with Segger Embedded Studio

  • NRF_LOG_x does not print either through the UART and putty OR RTT in SES [Manually set in the sdk_config.h file] since CMSIS Wizard is not present
  • The CMSIS Configuration Wizard is NOT present in my Tools.xml
  • Debug breakpoints are not hit unless it is in the main() part of main.c and when hit not in the code, only if a debug window to the left of the code
  • I can step line by line if I start and use F10/F11 from the start (do not use F5 and a break point) but never once I use F5 and a break point.

The only thing I can think of is that somehow the installation of SES got really corrupted or I am missing a major step. I have no idea how to fix.

Yet the code I have does partially run - it advertises, gets connected to, responds to service discovery, gets two characteristic descriptors enabled but then when I try and write from the client the write times out. I am not surprised that there are issues with the code as I have ported a SoftDevice only project from nRF51 and Keil.

But being unable to debug or even print to RTT (this is new for me) or via the UART and putty (the latter worked fine in the Keil project) is not helping.

Any help would be great. (Yes I have seen the debugging video and that's how I know my Tools.xml is corrupt).

Parents
  • Hi

    I understand your frustration, and I'm sorry you've had this much trouble with porting your project. I have reported a request to update this tutorial, but can't guarantee anything I'm afraid. Do you per chance have a link to the clarifying post? Thank you for your feedback!

    Best regards,

    Simon

  • I still can't get rid of the extra LF in my NRF_LOG statements (using putty via a UART). Latest SDK 17.0.2.

    I have the FPRINTF on in SDK_config.h (I think if I did not the build would fail - didn't need it in SDK 12.3.0 using Keil).

    I have 

    • NRF_FPRINTF_ENABLED 1
    • NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0
    • NRF_LOG_BACKEND_UART_ENABLED 1
    • NRF_LOG_ENABLED 1

    When I copy the log output from putty to Notepad++ and display all characters I see two LF 

    My actual log statements are the same as in the Keil 12.3.0 project and look like this:

    NRF_LOG_DEBUG("Main start GHS\r\n");

Reply
  • I still can't get rid of the extra LF in my NRF_LOG statements (using putty via a UART). Latest SDK 17.0.2.

    I have the FPRINTF on in SDK_config.h (I think if I did not the build would fail - didn't need it in SDK 12.3.0 using Keil).

    I have 

    • NRF_FPRINTF_ENABLED 1
    • NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0
    • NRF_LOG_BACKEND_UART_ENABLED 1
    • NRF_LOG_ENABLED 1

    When I copy the log output from putty to Notepad++ and display all characters I see two LF 

    My actual log statements are the same as in the Keil 12.3.0 project and look like this:

    NRF_LOG_DEBUG("Main start GHS\r\n");

Children
No Data
Related