cd ..

set BAT_HOME=%cd%

nrfutil settings generate --family NRF52 --application "%BAT_HOME%"/pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.hex  --application-version 1 --bootloader-version 1 --bl-settings-version 2 "%BAT_HOME%"/dfu_readme/app_setting_cp.hex

cd C:/Program Files (x86)/SEGGER/JLink/Scorp

c:

JLink.exe

si 1

speed 4000

device nrf52832_xxAA

erase 0x26000 0x74FFF

erase 0x7E000 0x7EFFF

loadfile "%BAT_HOME%"/dfu_readme/s132_nrf52_7.0.1_softdevice.hex 0x0

loadfile "%BAT_HOME%"/dfu_readme/central_and_peripheral_bootloader.hex 0x78000

loadfile "%BAT_HOME%"/dfu_readme/app_setting_cp.hex 0x7E000

loadfile "%BAT_HOME%"/pca10040/s132/arm5_no_packs/_build/nrf52832_xxaa.hex 0x26000

pause
