From 5db067f483eef9292c5541512ba6d98b9599cef3 Mon Sep 17 00:00:00 2001 From: jhChun Date: Fri, 27 Mar 2026 08:53:27 +0900 Subject: [PATCH] =?UTF-8?q?FDS=20=EC=98=81=EC=97=AD=20=EB=B3=B4=EC=A1=B4?= =?UTF-8?q?=20erase=20=EC=98=B5=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - cpd.bat: 기존 erase 옵션 설정 x, DEFAULT=ERASE_ALL(칩 전체 삭제) --- project/ble_peripheral/ble_app_bladder_patch/hex/cpd.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project/ble_peripheral/ble_app_bladder_patch/hex/cpd.bat b/project/ble_peripheral/ble_app_bladder_patch/hex/cpd.bat index e4cebce..37b77a6 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/hex/cpd.bat +++ b/project/ble_peripheral/ble_app_bladder_patch/hex/cpd.bat @@ -132,8 +132,8 @@ echo Flashing: program → reset (NO erase, FDS preserved) REM recover - SKIP to preserve internal flash data REM erase - SKIP to preserve FDS/fstorage data -REM program (sector-erase only for hex regions, FDS pages untouched) -nrfutil device program --firmware hex\firmware_all.hex --serial-number %SERIALNUMBER% +REM program (hex 데이터가 있는 영역만 erase, FDS 보존) +nrfutil device program --firmware hex\firmware_all.hex --options chip_erase_mode=ERASE_RANGES_TOUCHED_BY_FIRMWARE --serial-number %SERIALNUMBER% if %errorlevel% neq 0 ( echo. echo [WARNING] Program failed - device may have Readback Protection enabled. @@ -145,7 +145,7 @@ if %errorlevel% neq 0 ( nrfutil device recover --serial-number %SERIALNUMBER% if %errorlevel% neq 0 goto flash_fail echo Re-programming... - nrfutil device program --firmware hex\firmware_all.hex --serial-number %SERIALNUMBER% + nrfutil device program --firmware hex\firmware_all.hex --options chip_erase_mode=ERASE_RANGES_TOUCHED_BY_FIRMWARE --serial-number %SERIALNUMBER% if %errorlevel% neq 0 goto flash_fail ) else ( goto flash_fail