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

printing out debug statement

Is there an easier way to print out debugging statement that does not need an installation of a logging package in keil.

I am trying to place print statements within the code to debug the program. For an example, if I introduce a code and want to make sure it works, I would play a print statement after to see that it ran. If the print statement doesn't show up then I did something wrong.

Parents
  • A couple of options jump to mind for you:

    1. If you are using a Segger J-Link for programming/debugging you can print through the Segger RTT and use their RTT viewer on your computer to see the output. I've used this on a couple of projects and its a great help.

    2. Nordic also provides a NRF_LOG that can print out the UART to a terminal program. If you aren't using the UART this would be an option for you.

    There are examples of both in the SDK example projects.

Reply
  • A couple of options jump to mind for you:

    1. If you are using a Segger J-Link for programming/debugging you can print through the Segger RTT and use their RTT viewer on your computer to see the output. I've used this on a couple of projects and its a great help.

    2. Nordic also provides a NRF_LOG that can print out the UART to a terminal program. If you aren't using the UART this would be an option for you.

    There are examples of both in the SDK example projects.

Children
Related