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

Can't Halt processor on Keil debug

When I try putting any breakpoint on my code to watch some variables, Keil will never halt that breakpoint. When I click pause in the debug session, the disassembler shows a loop on Branch + WFE, even though I'm not using sd_wait_event or something like that. I'm using the SoftDevice 8.

Any suggestions?

Parents
  • Did you check the IROM and IRAM settings of the projects? How did you make sure that your program is running? I am sorry for such basic questions, but we start from the basics , most of the time its some simple thing that is going wrong ;)

    update: (double click in keil to open map file)

    image description

    update 13.07.2015

    I am not sure what your whole project is doing, I just concentrated in trying to find why your project was not able to debug. In your bootloader_settings.c file you have this line

    uint32_t m_uicr_bootloader_start_address __attribute__((at(NRF_UICR_BOOT_START_ADDRESS))) = BOOTLOADER_REGION_START;
    

    which means that when you flash your code, 0x10001014 will be written with 0X3C000. When this register is written, softdevice tries to find the vector table there and if it did not find it, then it goes to sleep. Seems like you have merged application with bootloader, this is OK, but softdevice is still expecting bootloader at 0X3C000 because it sees that the register says that the bootloader is present at that address. If you remove the attribute on the variable i mentioned above, I was able to debug your application.

    you will be able to do the same

  • My code is based on the ble_example_uart from the SDK. Then I started a new project, copied the sources and went to Keil's Manage run-time environment and started adding the drivers and libraries. When I selected pstorage and changed the mode from default to RAW, the bootloader + DFU dependencies were not met, as seen here. After that, I clicked on resolve and continued my work as everything was running as expected, except the debugging part. When I read about you can't debug with SoftDevice, I just thought that problem was OK and used RTT instead.

Reply
  • My code is based on the ble_example_uart from the SDK. Then I started a new project, copied the sources and went to Keil's Manage run-time environment and started adding the drivers and libraries. When I selected pstorage and changed the mode from default to RAW, the bootloader + DFU dependencies were not met, as seen here. After that, I clicked on resolve and continued my work as everything was running as expected, except the debugging part. When I read about you can't debug with SoftDevice, I just thought that problem was OK and used RTT instead.

Children
No Data
Related