This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Bootloader debugging

I want my application to cooperate with DFU. I am using example DFU project from SDK (6.1) (from nrf6310 folder, i simplified it so it could work on PCA10000), but i need some bigger changes.

My problem is that i cannot start debug session in keil. Is bootloader debugging the same as normal application debugging? I can start application, but i cannot set traps and check where the program is at the moment. Should i do some extra settings in keil?

What i do is: erase chip -> flash s110 SD (v7) -> load bootloader by keil -> start debugging -> no profit :(

Parents
  • I have try according to your suggestion but i am not able to start point at main function.

    I have also put break point immediate after main function in my code but i am not able to reach breakpoint.

    I am using keil.

Reply
  • I have try according to your suggestion but i am not able to start point at main function.

    I have also put break point immediate after main function in my code but i am not able to reach breakpoint.

    I am using keil.

Children
  • Hi, are you able to make the debugger work right now? Could you please tell me what the trick is if you resolved this problem? I am having the exact same issue as you described above. Thanks in advance.

  • As far as i remember, Stefan post solved this problem for me. Turning off optimization is the key.

  • Thanks for the reply! I followed all the steps mentioned above but result is that the bootloader runs as expected but the debugger lose track of the process: Not hitting breakpoints or resetting to the start of main function. I wonder if the setting in Keil is incorrect so that the debugger cannot locate which line it is running.

  • @Questchin: You may need to erase the whole chip when you change the address of the bootloader because the address of the (old) bootloader is written in UICR and an chip Erase All is needed to change that.

  • Hi, Hung Bui. Thank you for the input! I found that the issue is my dfu_dual_bank.c and some other files are linking to the library file "dfu_type.h" and even if I erase all the chip it still starts from 0x3C000. Writing UICR using nrfjprog will resolve the problem. But I think the linking issue is really confusing regarding this problem.

Related