@echo off rem The process of generating DFU files set name="yingying" set BLE_DFU_ENANBLE_flag=0 set BleNameHoldOn_ENANBLE_flag=0 set BleNameHoldOn_ENANBLE_flag=0 set RTT_DEBUG_EN_flag=0 set USE_FIFO_FLAG=0 echo= echo **********************Ready To generate Application DFU zip FILE***************** echo= cd .. rem KEIL directory set UV=C:\Keil_v5\UV4\UV4.exe rem Current directory set Front_PRO_PATH=%cd% rem Project directory set UV_PRO_PATH=%Front_PRO_PATH%\pca10040\s132\arm5_no_packs\ble_app_uart_c_pca10040_s132.uvprojx rem Project output directory set BUILD_HEX_NAME=%Front_PRO_PATH%\pca10040\s132\arm5_no_packs\_build\nrf52832_xxaa.hex rem Directory of file names for DFU enabled in the current project set USR_CONFIG_PACH=%Front_PRO_PATH%\system\usr_config.h rem Directory to store dfu files and settings set DFU_CONFIG_FILE_NAME=%cd%\dfu_readme rem bootloader name set BOOTLOADER_NAME=%DFU_CONFIG_FILE_NAME%\central_and_peripheral_bootloader.hex rem Generate the name of the DFU file set DFU_FILE_NAME=%DFU_CONFIG_FILE_NAME%\app_dfu_package.zip rem Clear previous DFU files and compiled HEX files if exist %DFU_FILE_NAME% del %DFU_FILE_NAME% if exist %BUILD_HEX_NAME% del %BUILD_HEX_NAME% findstr /c:"BleNameHoldOn_ENANBLE 1" %USR_CONFIG_PACH%>nul if %errorlevel% equ 0 set /a BleNameHoldOn_ENANBLE_flag=1 findstr /c:"BLE_DFU_ENANBLE 1" %USR_CONFIG_PACH%>nul if %errorlevel% equ 0 set /a BLE_DFU_ENANBLE_flag=1 findstr /c:"JS_RTT_DEBUG_EN 1" %USR_CONFIG_PACH%>nul if %errorlevel% equ 0 set /a RTT_DEBUG_EN_flag=1 findstr /c:"USEFIFO 1" %USR_CONFIG_PACH%>nul if %errorlevel% equ 0 set /a USE_FIFO_FLAG=1 if %BLE_DFU_ENANBLE_flag% equ 1 ( if %BleNameHoldOn_ENANBLE_flag% equ 0 ( echo= echo Compile firmware in progress ---------------- echo= %UV% -j0 -b %UV_PRO_PATH% -l %cd%\build_log.txt if exist %BUILD_HEX_NAME% ( nrfutil pkg generate --hw-version 52 --application-version 2 --application %BUILD_HEX_NAME% --sd-req 0xcb --key-file .\dfu_readme\private.key %DFU_FILE_NAME% echo= echo file generated successfully echo= echo ================Firmware information============================ echo | set /p="hardware version " findstr "\