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

Debugging issue in IAR . Not hitting main()

Hey! . I am new to embedded developing and was trying to familiarize with nrf52 DK . 

Issue : When i try to run the BLE examples in sdk after clicking " download and debug " button, instead of compiler to hit the main function and wait for us to hit " go " button, it seems running where the " go " button is inactive and break button is active. I tried to fix break point just inside main and it is not invoked.

In disassembly window when i press break it stop at  0x5d0 :  0x3803       SUBS      R0,  #3

I am using nrf52832 kit and SDK 15

Since i am a fresher am expecting an elaborated answer. Thankyou

Parents
  • I can't provide support (I'm not Nordic) but I think I can get you started. Using IAR with a SoftDevice has always proved problematic for us. One way to get a debugging session running correctly in IAR is to first "erase all" flash and then load the Softdevice using either nRFGo Studio or nRFConnect. Then hit the Download and Debug button on IAR and the project will allow you to run, single-step and hit breakpoints. Note that debugging can crash after a breakpoint and then the whole sequence of Erase-Program SoftDevice-IAR Debug has to be repeated.

    SES works fine when the SoftDevice is specified as an additional load file. Specifying SoftDevice as an additional load file in IAR doesn't work for us (all versions of IAR, not tried v8.4.0 yet). We pay a lot for IAR; SES is free. IAR do not support Nordic parts correctly, in my view, and no longer supply any Nordic examples.

Reply
  • I can't provide support (I'm not Nordic) but I think I can get you started. Using IAR with a SoftDevice has always proved problematic for us. One way to get a debugging session running correctly in IAR is to first "erase all" flash and then load the Softdevice using either nRFGo Studio or nRFConnect. Then hit the Download and Debug button on IAR and the project will allow you to run, single-step and hit breakpoints. Note that debugging can crash after a breakpoint and then the whole sequence of Erase-Program SoftDevice-IAR Debug has to be repeated.

    SES works fine when the SoftDevice is specified as an additional load file. Specifying SoftDevice as an additional load file in IAR doesn't work for us (all versions of IAR, not tried v8.4.0 yet). We pay a lot for IAR; SES is free. IAR do not support Nordic parts correctly, in my view, and no longer supply any Nordic examples.

Children
Related