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

SDK-8.1.0 bootloader does not flash

When I open the project dfu_dual_bank_ble_s110_pca10028 and configure it for nRF51822, it compiles fine, but flashing does not succeed. I get errors:

No Algorithm found for: 10001014H - 10001017H
Partial Erase Done (areas with no algorithms skipped!)
No Algorithm found for: 10001014H - 10001017H
Partial Programming Done (areas with no algorithms skipped!)

And the bootloader does not start. What could be wrong there? At IROM and IRAM fields I put the following:

IROM1: 0x3C000 0x3C00 (Startup)
IRAM1: 0x20002C00 0x5380
IRAM2: 0x20007F80 0x80  (No Init)
Parents
  • Start address of the bootloader must be set in the UICR.BOOTLOADERADDR register in order for the bootloader to be executed on startup (Master Boot Record (MBR) and SoftDevice reset behavior). However, the Jlink driver is not able to write to this register directly, hence the "no alghoritm" warning. Instead you should use nrjprog to program the bootlaoder for this register to be set as well, see programming the DFU bootloader here.

    Note, a limitation was introduced in the newer releases of nrjprog making it not possible to call both --reset and --program from the same instance. So you need to remove the --reset argument from the command line arguments, also mentioned in this thread.

Reply
  • Start address of the bootloader must be set in the UICR.BOOTLOADERADDR register in order for the bootloader to be executed on startup (Master Boot Record (MBR) and SoftDevice reset behavior). However, the Jlink driver is not able to write to this register directly, hence the "no alghoritm" warning. Instead you should use nrjprog to program the bootlaoder for this register to be set as well, see programming the DFU bootloader here.

    Note, a limitation was introduced in the newer releases of nrjprog making it not possible to call both --reset and --program from the same instance. So you need to remove the --reset argument from the command line arguments, also mentioned in this thread.

Children
  • Thanks, this really helped :) Now I just need to solve the issue that has kept me busy past five days: after OTA DFU:ing my application via bootloader into an "empty" target device, the procedure cannot be re-done. This is because when application runs thru reset_prepare() and bootloader is started, the bootloader simply jams into its event loop, never reacting any more to anything. I have debugged it really busy-loops at the bootloader.c/static void wait_for_events(void) -function...

  • I have started another discussion thread for that, please continue there if you have some ideas :)

    devzone.nordicsemi.com/.../

  • It is somehow unbelievable things can be that difficult. Maybe I am not the first-class programmer, but still I have been active programmer since VIC-20 and divided thru Nokia software-hell, and I have never hit system as complicated as the uVision + Nordic SDK. It is a kind of miracle if some of your customers have succeeded with DFU OTA... (I know some really are, just discussed with such a person - a very experienced programmer, no doubt)

  • Agree that the complexity of the bootloader is quite high, and it does take some time to get familiar with the design. I think this is a result of all the functionality in the bootloader, basically safe updates of softdevice+bootloader and application over the air. However, we very much appreciate feedback, and usability can always be improved (good documentation etc.). I'll have a look at the other thread you linked to.

  • Yes, I struggled with that thing whole last week and was eventually very frustrated. The needed information is very fragmented, some important things such as adding 0x64 for S110 8.0 into nrfutil command line I found just with a good luck. Also, my bootloader is still jamming after it enters there from application. I made a this kind of hack into the bootloader's main.c, so I can upload the application, although two upload tries is now needed from nRFTools:

    bool app_reset = (NRF_POWER->GPREGRET == BOOTLOADER_DFU_START);
    bool app_reset2 = (NRF_POWER->GPREGRET == ~BOOTLOADER_DFU_START);
    
    if (app_reset)
    {
        NRF_POWER->GPREGRET = ~BOOTLOADER_DFU_START;
    	NVIC_SystemReset();
    }
    else if (app_reset2)
    {
        NRF_POWER->GPREGRET = 0;
    }
    

    Plus a few of other changes needed to support "app_reset2". At least it works now somehow :)

Related