PUSHD %~dp0
nrfutil settings generate --family NRF52840 --application ble_app_buttonless_dfu_pca10056_s140.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 settings.hex

mergehex.exe --merge settings.hex secure_bootloader_ble_s140_pca10056.hex --output my_bootloader.hex

nrfutil pkg generate --hw-version 52 --application-version 1 --application ble_app_buttonless_dfu_pca10056_s140.hex --softdevice s140_nrf52_6.1.0_softdevice.hex --bootloader my_bootloader.hex  --bootloader-version 1 --sd-req 0xAE --sd-id 0xAE --key-file private.pem app_dfu_package.zip

nrfjprog.exe -e
nrfjprog.exe --family NRF52 --program s140_nrf52_6.1.0_softdevice.hex --verify
nrfjprog.exe --family NRF52 --program ble_app_buttonless_dfu_pca10056_s140.hex --verify –r
nrfjprog.exe --program my_bootloader.hex --verify –r
nrfjprog.exe --reset
POPD
PAUSE