@echo off echo This batch file can be used for flashing a A4WP system consisting of one PTU and several PRUs. For the flashing to work echo the segger serial numbers below must be redefined. SET PTUSN=48020xxxx SET PRUSN0=48020xxxx SET PRUSN1=48020xxxx SET PRUSN2=48020xxxx SET PRUSN3=48020xxxx SET PRUSN4=48020xxxx SET PRUSN5=48020xxxx SET PRUSN6=48020xxxx SET PRUSN7=48020xxxx SET PTUSDHEX=import\s120_nrf51822\s120_nrf51_2.0.0_softdevice.hex SET PTUHEX=board\pca10001\a4wp\ptu_app\arm\_build\ptu_app.hex SET PRUSDHEX=import\s110_nrf51822\s110_nrf51822_7.1.0_softdevice.hex SET PRUHEX=board\pca10001\a4wp\pru_app_wired_debug\arm\_build\pru_app_wired_debug.hex nrfjprog -s %PTUSN% --erase --program %PTUSDHEX% nrfjprog -s %PTUSN% --memwr 0x10001000 --val 0x1D000 nrfjprog -s %PTUSN% --program %PTUHEX% -r nrfjprog -s %PRUSN0% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN0% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN0% --program %PRUHEX% -r nrfjprog -s %PRUSN1% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN1% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN1% --program %PRUHEX% -r nrfjprog -s %PRUSN2% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN2% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN2% --program %PRUHEX% -r nrfjprog -s %PRUSN3% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN3% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN3% --program %PRUHEX% -r nrfjprog -s %PRUSN4% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN4% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN4% --program %PRUHEX% -r nrfjprog -s %PRUSN5% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN5% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN5% --program %PRUHEX% -r nrfjprog -s %PRUSN6% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN6% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN6% --program %PRUHEX% -r nrfjprog -s %PRUSN7% --erase --program %PRUSDHEX% nrfjprog -s %PRUSN7% --memwr 0x10001000 --val 0x16000 nrfjprog -s %PRUSN7% --program %PRUHEX% -r pause