How to upload application without erasing bootloader data? (with segger embedded studio)

Hello everyone,

I'm trying to use the buttonless dfu functionality on nRF52 DK. However, I can't seem to test the functionality when there is no bootloader flashed, but if I do flash the bootloader, when I flash my application Segger Embedded Studio erases previous memory data. Is there any way to flash everything all at once or, in a better case, just flash my app and debug it without having to delete bootloader?

Thanks

edit: I'm using SDK v17.1.0, with S132. Also, i don't want to debug the bootloader, just the bluetooth connection, or at least the code before the connection

Parents
  • Hi,

    I can't seem to test the functionality when there is no bootloader flashed,

    Yes, that is expected. Refering to the buttonless DFU template application, the call to ble_dfu_buttonless_async_svci_init() will fail if the booloader is missing. If you comment it out, you should be able to test your application without a bootloader (except for the buttonless DFU feature of course).

    but if I do flash the bootloader, when I flash my application Segger Embedded Studio erases previous memory data.

    As long as the application and bootloader does not overlap (which they cannot do), programming one should not erase the other. Are you sure that is what happens? If so, can you make sure you don't do a recover or erase all operation when you program the other? That said, testing an application with a bootloaer can be a bit of a hazzle, as the bootlaoder will validate the application and only start a valid application. So whenver you progrem an application, you also need to generate and program the bootloader settings page (alternatively you can modify the bootloader to start the application without checking if it is valid).

  • when i try to download my code into the 52DK, a pop-up dialog says the device is secured, and its flash needs to be erased. when i do this, there's no bootloader left in my code.

    Are you sure that is what happens?
Reply Children
Related