FDS 영역 보존 erase 옵션 추가
- cpd.bat: 기존 erase 옵션 설정 x, DEFAULT=ERASE_ALL(칩 전체 삭제)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user