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

nrf51 gcc gnu flashing dfu_bootloader, softdevice s130 and application

Hi

I don't understand how to correctly flash all three parts so that the app runs on boot.

At the moment if I flash them all the nrf51 (51822) boots to the dfu bootloader.

If I use dfu then to load the app. The app will then run ok

If I flash just the app and softdevice the app boots ok.

I've noticed quite a few questions like this on the forum - but none seem to work

If I do flash like this

  1. s130_nrf51_2.0.0_softdevice.hex
  2. bootloader.hex
  3. app.hex
  4. app_valid_setting_apply.hex

Then the app runs on boot - the dfu will start but the dfu app download fails

Any ideas?

Parents
  • The problem was partly cause by me - I was using a raspberry pi to program the target - and also as BLE central listening to target advertising for test purposes. The rpi was physically very close to the target (1") and the dfu BLE central was 1 meter away. This setup seems to cause dfu <-> target comms issues.

    The solution to the initial programming issue is to use app_valid_setting_apply.hex but I don't understand what this actually does - anyway the following (openocd) sequence successfully programs the target.

    Program - soft device - add verify to test

    program s130_nrf51_2.0.0_softdevice.hex

    program - bootloader

    program dfu_test_bootloader_b_s130.hex

    Program - application

    program app.hex

    program app_valid_setting_apply.hex

Reply
  • The problem was partly cause by me - I was using a raspberry pi to program the target - and also as BLE central listening to target advertising for test purposes. The rpi was physically very close to the target (1") and the dfu BLE central was 1 meter away. This setup seems to cause dfu <-> target comms issues.

    The solution to the initial programming issue is to use app_valid_setting_apply.hex but I don't understand what this actually does - anyway the following (openocd) sequence successfully programs the target.

    Program - soft device - add verify to test

    program s130_nrf51_2.0.0_softdevice.hex

    program - bootloader

    program dfu_test_bootloader_b_s130.hex

    Program - application

    program app.hex

    program app_valid_setting_apply.hex

Children
No Data
Related