diff options
Diffstat (limited to 'util/flash_ec')
-rwxr-xr-x | util/flash_ec | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec index 9f6ee74736..0fc8856d75 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -1049,6 +1049,16 @@ function flash_npcx_uut() { BUILD_PATH="${EC_DIR}/build/${BOARD}" MONITOR_PATH="${BUILD_PATH}/chip/npcx/spiflashfw" MON="${MONITOR_PATH}/npcx_monitor.bin" + + if [[ ! -f "$MON" ]]; then + MON="$(dirname "$IMG")/npcx_monitor.bin" + fi + + if [[ ! -f "$MON" ]]; then + echo "Failed to find npcx_monitor.bin" + exit 1 + fi + # The start address to restore monitor firmware binary MON_ADDR="0x200C3020" |