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

How to fix UART behavior in segger?

Still playing with my app. Since RTT (or whatever it was, when printf was printing info to segger debug console) was ruining the debug process, I just switched off RTT and disabled uart module. But now I need some way to print out some debug info. So, I connected an rx pin of my usb-serial interface to pin9 of 51822. However, printf still prints out to segger debug console, not to my usb-uart, and probably still causing crashes when run not in debug mode. Is there a way to check what could be wrong?

Parents
  • That's really nice video! Thank you! Now I see what debug messages are, and what I get in debug console there is definitely not nrf log messages. Speaking of what's suggested in that video, I can't find any sdk-config.h files or any occurances of such but for in /components/libraries/mem_manager/mem_manager.c and /components/libraries/mem_manager/mem_manager.h and in email messages. Moreover, I don't have that 'open in a wizard' menu on my macos version of segger.

    Now I tried using the same aproach to debug what causes it restart, and got the following result: in debug mode, even without uart_config(), I can see printf messages in segger debug console, everything works fine, it doesn't reach the breakpoint in app_error file. When in normal run, it works okay even with uart_config, but when I do printf - it hangs.

    There are several build configurations in segger - could it be caused by some mess there? I have public/private, with common and internal in private, and there are some differences between them.

Reply
  • That's really nice video! Thank you! Now I see what debug messages are, and what I get in debug console there is definitely not nrf log messages. Speaking of what's suggested in that video, I can't find any sdk-config.h files or any occurances of such but for in /components/libraries/mem_manager/mem_manager.c and /components/libraries/mem_manager/mem_manager.h and in email messages. Moreover, I don't have that 'open in a wizard' menu on my macos version of segger.

    Now I tried using the same aproach to debug what causes it restart, and got the following result: in debug mode, even without uart_config(), I can see printf messages in segger debug console, everything works fine, it doesn't reach the breakpoint in app_error file. When in normal run, it works okay even with uart_config, but when I do printf - it hangs.

    There are several build configurations in segger - could it be caused by some mess there? I have public/private, with common and internal in private, and there are some differences between them.

Children
No Data
Related