added sudo_*** and raw_sudo_*** and added them to the .PHONY list
This commit is contained in:
parent
69be5fe9fd
commit
bbc0ca1a69
1 changed files with 19 additions and 2 deletions
|
@ -405,7 +405,8 @@ ifdef ARDUINO_DIR
|
||||||
ifndef AVR_TOOLS_DIR
|
ifndef AVR_TOOLS_DIR
|
||||||
BUNDLED_AVR_TOOLS_DIR := $(call dir_if_exists,$(ARDUINO_DIR)/hardware/tools/avr)
|
BUNDLED_AVR_TOOLS_DIR := $(call dir_if_exists,$(ARDUINO_DIR)/hardware/tools/avr)
|
||||||
ifdef BUNDLED_AVR_TOOLS_DIR
|
ifdef BUNDLED_AVR_TOOLS_DIR
|
||||||
AVR_TOOLS_DIR = $(BUNDLED_AVR_TOOLS_DIR)
|
AVR_TOOLS_DIR = $(BUNDLED_AVR_TOOLS_DIR)
|
||||||
|
AVRDUDE_CONF = $(AVR_TOOLS_DIR)/../avrdude.conf
|
||||||
$(call show_config_variable,AVR_TOOLS_DIR,[BUNDLED],(in Arduino distribution))
|
$(call show_config_variable,AVR_TOOLS_DIR,[BUNDLED],(in Arduino distribution))
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -969,20 +970,36 @@ $(DEP_FILE): $(OBJDIR) $(DEPS)
|
||||||
error_on_leonardo:
|
error_on_leonardo:
|
||||||
$(ERROR_ON_LEONARDO)
|
$(ERROR_ON_LEONARDO)
|
||||||
|
|
||||||
|
%supload: $(TARGET_HEX) verify_size
|
||||||
|
sudo $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
||||||
|
$(AVRDUDE_UPLOAD_HEX)
|
||||||
|
|
||||||
%upload: $(TARGET_HEX) verify_size
|
%upload: $(TARGET_HEX) verify_size
|
||||||
$(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
$(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
||||||
$(AVRDUDE_UPLOAD_HEX)
|
$(AVRDUDE_UPLOAD_HEX)
|
||||||
|
|
||||||
|
|
||||||
upload: reset %upload
|
upload: reset %upload
|
||||||
raw_upload: error_on_leonardo %upload
|
raw_upload: error_on_leonardo %upload
|
||||||
|
sudo_upload: reset %supload
|
||||||
|
raw_sudo_upload: error_on_leonardo %supload
|
||||||
|
|
||||||
%eeprom: $(TARGET_EEP) $(TARGET_HEX)
|
%eeprom: $(TARGET_EEP) $(TARGET_HEX)
|
||||||
$(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
$(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
||||||
$(AVRDUDE_UPLOAD_EEP)
|
$(AVRDUDE_UPLOAD_EEP)
|
||||||
|
|
||||||
|
%seeprom: $(TARGET_EEP) $(TARGET_HEX)
|
||||||
|
sudo $(AVRDUDE) $(AVRDUDE_COM_OPTS) $(AVRDUDE_ARD_OPTS) \
|
||||||
|
$(AVRDUDE_UPLOAD_EEP)
|
||||||
|
|
||||||
eeprom: reset %eeprom
|
eeprom: reset %eeprom
|
||||||
|
|
||||||
raw_eeprom: error_on_leonardo %eeprom
|
raw_eeprom: error_on_leonardo %eeprom
|
||||||
|
|
||||||
|
sudo_eeprom: reset %seeprom
|
||||||
|
|
||||||
|
raw_sudo_eeprom: error_on_leonardo %seeprom
|
||||||
|
|
||||||
# the last part is for leonardo.
|
# the last part is for leonardo.
|
||||||
# wait until leonardo reboots and establish a new connection.
|
# wait until leonardo reboots and establish a new connection.
|
||||||
reset:
|
reset:
|
||||||
|
@ -1042,7 +1059,7 @@ verify_size: $(TARGET_HEX) $(TARGET_HEX).sizeok
|
||||||
generated_assembly: $(OBJDIR)/$(TARGET).s
|
generated_assembly: $(OBJDIR)/$(TARGET).s
|
||||||
@$(ECHO) Compiler-generated assembly for the main input source has been dumped to $(OBJDIR)/$(TARGET).s
|
@$(ECHO) Compiler-generated assembly for the main input source has been dumped to $(OBJDIR)/$(TARGET).s
|
||||||
|
|
||||||
.PHONY: all upload raw_upload reset reset_stty ispload clean depends size show_boards monitor disasm symbol_sizes generated_assembly verify_size
|
.PHONY: all upload raw_upload sudo_upload raw_sudo_upload raw_eeprom sudo_eeprom raw_sudo_eeprom error_on_leonardo reset reset_stty ispload clean depends size show_boards monitor disasm symbol_sizes generated_assembly verify_size
|
||||||
|
|
||||||
# added - in the beginning, so that we don't get an error if the file is not present
|
# added - in the beginning, so that we don't get an error if the file is not present
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
|
Loading…
Reference in a new issue