-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d409024
commit d653ec6
Showing
5 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
SETLOCAL | ||
REM @echo on | ||
|
||
|
||
REM assign the segger id | ||
SET seggerid=%~1 | ||
|
||
|
||
REM Erase the nRF52 | ||
nrfjprog -s %seggerid% --eraseall --family NRF52 | ||
|
||
nrfjprog -s %seggerid% --program ..\softdevices_nRF51_nRF52\s132_nrf52_3.0.0\s132_nrf52_3.0.0_softdevice.hex --family NRF52 | ||
REM Program nRF52 with softdevice hex file | ||
nrfjprog -s %seggerid% --program ..\softdevices\s132_nrf52_3.0.0\s132_nrf52_3.0.0_softdevice.hex --family NRF52 | ||
|
||
REM Program nRF52 with bootloader hex file | ||
nrfjprog -s %seggerid% --program .\bin\bootloader_serial_nrf52_xxAA.hex --family NRF52 | ||
|
||
REM Generate a fresh device page for nRF52 | ||
del .\pc-util\example52.hex | ||
.\pc-util\device_page .\pc-util\example52 --nrf52 | ||
|
||
REM Program nRF52 with device page | ||
nrfjprog -s %seggerid% --program .\pc-util\example52.hex --family NRF52 | ||
|
||
REM Program nRF52 with application hex | ||
nrfjprog -s %seggerid% --program ..\examples\BLE_Gateway\bin\rbc_gateway_example_serial_nRF52832_xxAA.hex --family NRF52 | ||
|
||
REM Generate the DFU package | ||
SET new_application=..\examples\BLE_Gateway\bin\rbc_gateway_example_serial_blinky_PCA10040_nRF52832_xxAA.hex | ||
.\pc-util\nrfutil.exe dfu genpkg --application %new_application% --company-id 0x00000059 --application-id 1 --application-version 2 --sd-req 0x0084 --mesh dfu_test.zip | ||
|
||
|
||
.\pc-util\nrfutil.exe dfu genpkg --application ..\examples\BLE_Gateway\bin\rbc_gateway_example_serial_blinky_PCA10040_nRF52832_xxAA.hex --company-id 0x00000059 --application-id 1 --application-version 2 --sd-req 0x0084 --mesh dfu_test.zip | ||
|
||
|
||
|
||
REM Reset the nRF5x to get it ready for DFU | ||
REM Reset the nRF52 to get it ready for DFU | ||
nrfjprog -s %seggerid% --reset --family NRF52 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
SETLOCAL | ||
ECHO ON | ||
|
||
|
||
REM Store the segger ids of all connected nRF51 devices | ||
nrfjprog -i > .\tmp_remove_me.txt | ||
|
||
REM Program each nRF51 device with new hex files | ||
FOR /f %%i IN (.\tmp_remove_me.txt) DO .\pc-util\flash_open_mesh_nRF51.bat %%i | ||
|
||
REM Delete the temporary file | ||
del .\tmp_remove_me.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
SETLOCAL | ||
ECHO ON | ||
|
||
|
||
REM Store the segger ids of all connected nRF52 devices in a temporary file | ||
nrfjprog -i > .\tmp_remove_me.txt | ||
|
||
REM Program each nRF52 device with new hex files | ||
FOR /f %%i IN (.\tmp_remove_me.txt) DO .\pc-util\flash_open_mesh_nRF52.bat %%i | ||
|
||
REM Delete the temporary file | ||
del .\tmp_remove_me.txt |