Does single bank bootloader in SDK7.1 support ZIP-file ?

lubos.pejchal gravatar image

asked 2017-04-04 07:08:15 +0100

updated 2017-04-04 14:32:40 +0100

Does single bank bootloader in SDK7.1 support ZIP-file ? I get error REMOTE DFU INVALID CRC ERROR in the end of flashing by nRF Toolbox when I use ZIP. If I use hex-file without init file I will send file without this error.

UPDATE 4.4.2017: App:deufol17.zip Bootloader:bootloader.hex

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
bjorn-spockeli gravatar image

answered 2017-04-04 11:38:05 +0100

updated 2017-04-21 10:31:09 +0100

Hi Jackxl,

the single bank bootloader supports the zip file format, but it has to be generated using the old nrfutil tool bundled with Master Control Panel v3.9.0 or v3.8.0 since the format has changed as new SDKs have been released. You can download the older versions from here(x64) or here(x86).

How to use the nrfutil tool is explained in this guide.

UPDATE 05.04.17

You can convert the dual bank bootloader example in SDK v7.1 by replacing dfu_dual_bank.c with dfu_single_bank.c. Both are located in \components\libraries\bootloader_dfu

you also need to set the BOOTLOADER_REGION_START and BOOTLOADER_SETTINGS_ADDRESS in dfu_types.h to the values below in order for the bootloader to run properly on the nRF51822 xxAB

#define BOOTLOADER_REGION_START         0x0001C000                                                       

you also have to set the following IROM1, IRAM1 and IRAM2 settings

IROM1 Start: 0x1C000 Size: 0x3C00
IRAM1 Start: 0x20002000 Size:0x1F80
IRAM2 Start: 0x20003F80 Size:0x80

UPDATE 20.04.17

I have attached a working single bank bootloader based on the dual bank bootloader from SDK v7.1

Attachment: bootloader_single_bank_sdk_v7_1.zip

Best regards


edit flag offensive delete publish link more


It doesn't work for new version 3.10 ?

Jackxl ( 2017-04-04 11:46:01 +0100 )editconvert to answer

No, there was a change in the init package format in SDK v9.0.0 or SDK v10.0.0.

Bjørn Spockeli ( 2017-04-04 12:35:26 +0100 )editconvert to answer

OK.Thank you. I get no error now. But I can't start application which I flashed by bootloader now.

Jackxl ( 2017-04-04 12:38:00 +0100 )editconvert to answer

Are you able to debug the bootloader and check if it reaches the bootloader_app_start(DFU_BANK_0_REGION_START) statement at the end of main?

Bjørn Spockeli ( 2017-04-04 12:43:41 +0100 )editconvert to answer

Not yet, but I don't have settup for low level of optimalization. I get strange behavior after I flashed application. All LED blinking (I don't use led in my app), but It doesn't advertise and I can't operate with nrf51822xxAB anymore. I have to Recover it.

Jackxl ( 2017-04-04 13:08:56 +0100 )editconvert to answer

If your application does not use the LEDs, then I suspect that the bootloader throws an error somewhere and ends up in its error handler, which lights all the leds indicating an error. Could you attach the hex file and .zip file you generated to the question so that I can try to reproduce the behavior.

Bjørn Spockeli ( 2017-04-04 14:11:48 +0100 )editconvert to answer

I have used bootloader SingleBankBLE witch I have downloaded here https://github.com/NordicSemiconducto...

Jackxl ( 2017-04-04 14:41:11 +0100 )editconvert to answer

The bootloader you're referring to has not been maintained in 2 years so I strongly recommend that you move to SDK v9.0.0 if possible, where you can convert the dual bank bootloader to a single bank bootloader by replacing one .c file.

Bjørn Spockeli ( 2017-04-04 15:29:45 +0100 )editconvert to answer

SDK9 means that I will have to overwrite whole application and I will have less space for application, because SoftDevice is bigger.

Jackxl ( 2017-04-05 06:37:17 +0100 )editconvert to answer

I did some testing and it is possible to convert the dual bank bootloader using S110 v7.0 in SDK v7.1 to a single bank bootloader the same way as in SDK v9.0. Thus, you do not have to migrate to SDK v9.0 and S110 v8.0. I will edit my answer and list the necessary changes.

Bjørn Spockeli ( 2017-04-05 14:27:58 +0100 )editconvert to answer

I tried it in past and now. I get error REMOTE DFU OPERATION FAILED. I only switched from dfu_dual_bank to dfu_single_bank in pack. Memory settings is same as your. I found out, that Dual Bank bootloader doesn't work for nrf51822_xxAB too. The error is same. I have softdevice 7.1.0.

Jackxl ( 2017-04-10 11:20:35 +0100 )editconvert to answer

Hmm, I did not have any issues. Could you download the non-packs version of SDK v7.1 and implement the needed modifications? Also I assume that you're still using the deufol17.zip as the update image?

Bjørn Spockeli ( 2017-04-18 16:37:10 +0100 )editconvert to answer

I have tested the single bank bootloader(created using the approach above) on a PCA10028 with the given memory settings and I did not see any issues with the deufol17.zip image I attach you the hex file to my answer if you like.

Bjørn Spockeli ( 2017-04-21 10:23:48 +0100 )editconvert to answer

It didn' work for me. I didn't test it on PCA10028. I have tested on board with nRF51822_xxAB.

Jackxl ( 2017-04-21 10:40:54 +0100 )editconvert to answer

I adjusted the memory setings so its compatible with a nRF51822_xxAB, even though the PCA10028 has a QFAC variant. So, then I you got the same error REMOTE DFU OPERATION FAILED using the deufol17.zip image?

Bjørn Spockeli ( 2017-04-21 11:08:16 +0100 )editconvert to answer

I had changed memory settings.

Jackxl ( 2017-04-21 11:43:33 +0100 )editconvert to answer

So it works?

Bjørn Spockeli ( 2017-04-21 12:29:55 +0100 )editconvert to answer

It didn't work on board with nrf51822_xxAB, but problem wasn't memory settings. Problem was that preprocessor directives set starting address of application for SoftDevice S310, not for S110 (0x16000). Second problem was that ZIP-file which I changed as you recommand me.

Jackxl ( 2017-04-21 12:38:28 +0100 )editconvert to answer

Are you using gcc or Keil? I only modified the Keil project. The second problem, using the nrfutil tool bundled with Master Control Panel v3.9.0 or v3.8.0?

Bjørn Spockeli ( 2017-04-21 13:04:47 +0100 )editconvert to answer

Keil... I used older MCP as you told me. This figured problem wih uploading, but then I had problem wih starting of application. There is no definition of S310 in keil settings, so I didn't find it and I expected that it works for S110.

Jackxl ( 2017-04-21 13:23:08 +0100 )editconvert to answer

You're using the S310 SoftDevice? If yes then you'll have to perform steps mentioned in this answer.

Bjørn Spockeli ( 2017-04-21 13:31:01 +0100 )editconvert to answer

NO. I using S110. But original bootloader is for S310.

Jackxl ( 2017-04-21 13:57:49 +0100 )editconvert to answer

Do you mean the one I sent you or the bootloader that's already on the device that you want to update?

Bjørn Spockeli ( 2017-04-21 13:59:46 +0100 )editconvert to answer

Booloader witch you sent...I don't know if you made some changes, but I have downloaded from Nordic page with the same name.

Jackxl ( 2017-04-21 14:21:40 +0100 )editconvert to answer

No, the bootloader I sent is for the S110 ( bootloader_single_bank_sdk_v7_1.zip\bootloader\pca10028\dual_bank_ble_s110\arm). Just extract it in the examples\dfu and you should be able to compile it and flash it to your device.

Bjørn Spockeli ( 2017-04-21 14:25:29 +0100 )editconvert to answer

I will not solve this again. It works for me after small changes. Somebody can have same problem as me. Still Your ansver and comments was very helpful.

Jackxl ( 2017-04-21 14:41:42 +0100 )editconvert to answer

Ok, glad to hear that you managed to get it to work.

Bjørn Spockeli ( 2017-04-21 15:03:54 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower


Asked: 2017-04-04 07:08:15 +0100

Seen: 79 times

Last updated: april 21