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

Using Keil, how do I see if the application is throwing an ASSERT?

In the Keil debug interface, how can I find if the application is throwing an ASSERT, and which it is? I'm using the S110 softdevice. (See other question for context devzone.nordicsemi.com/.../ )

Parents
  • You can add the ble_debug_assert_handler to your project and change the assert handler to call that rather than reset. You can then see if your code is in the ble_debug_assert_handler using the debugger and if it is you can see the file and line number that triggered the assert.

Reply
  • You can add the ble_debug_assert_handler to your project and change the assert handler to call that rather than reset. You can then see if your code is in the ble_debug_assert_handler using the debugger and if it is you can see the file and line number that triggered the assert.

Children
  • I commented in ble_debug_assert_handler but the debugger still behaves very strangely. It complains that the line of code that I insert a breakpoint in doesn't exist. I wish that there was a guide for doing this basic stuff... I'm a bit lost with this debugger.

  • By process of elimination it seems to fail with ble_stack_init(). The debugger's blue arrow points to { after main() and stays there after I hit 'run'. I'm not able to get any useful info from the debugger. I must be doing something wrong.

  • This solved my problem... devzone.nordicsemi.com/.../ Thanks for the help!