diff options
Diffstat (limited to 'make-scripts')
-rw-r--r-- | make-scripts/Arduino.mk | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/make-scripts/Arduino.mk b/make-scripts/Arduino.mk index 3ac40a5..b272332 100644 --- a/make-scripts/Arduino.mk +++ b/make-scripts/Arduino.mk @@ -421,19 +421,8 @@ else $(call show_config_variable,DEVICE_PATH,[AUTODETECTED]) endif -ifndef FORCE_MONITOR_PORT - $(call show_config_variable,FORCE_MONITOR_PORT,[DEFAULT]) -else - $(call show_config_variable,FORCE_MONITOR_PORT,[USER]) -endif - -ifdef FORCE_MONITOR_PORT - # Skips the DEVICE_PATH existance check. - get_monitor_port = $(DEVICE_PATH) -else - # Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors. - get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!)) -endif +# Returns the Arduino port (first wildcard expansion) if it exists, otherwise it errors. +get_monitor_port = $(if $(wildcard $(DEVICE_PATH)),$(firstword $(wildcard $(DEVICE_PATH))),$(error Arduino port $(DEVICE_PATH) not found!)) # Command for avr_size: do $(call avr_size,elffile,hexfile) ifneq (,$(findstring AVR,$(shell $(SIZE) --help))) @@ -693,6 +682,9 @@ error_on_caterina: # Use submake so we can guarantee the reset happens # before the upload, even with make -j upload: $(TARGET_HEX) verify_size +ifeq ($(DEVICE_PATH),) + echo $(error Error: No Arduino device is connected) +endif $(MAKE) reset $(MAKE) do_upload |