diff options
-rw-r--r-- | util/flash_fp_mcu | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu index 180f238e1a..a2f7b118a8 100644 --- a/util/flash_fp_mcu +++ b/util/flash_fp_mcu @@ -334,6 +334,11 @@ flash_fp_mcu_stm32() { warn_gpio "${gpio_nrst}" 0 \ "WARNING: One of the drivers changed NRST pin state on bind attempt." + if [[ ! -c "${device}" ]]; then + echo "Failed to bind raw device driver." >&2 + return "${EXIT_RUNTIME}" + fi + local attempt=0 local cmd_exit_status=1 local cmd="stm32mon ${stm32mon_flags}" |