Detect OS in Makefile to use the correct avrdude.conf path
This commit is contained in:
parent
a504c88346
commit
c0c4c97db6
@ -312,7 +312,12 @@ LDFLAGS = -lm
|
|||||||
# Programming support using avrdude. Settings and variables.
|
# Programming support using avrdude. Settings and variables.
|
||||||
AVRDUDE_PORT = $(UPLOAD_PORT)
|
AVRDUDE_PORT = $(UPLOAD_PORT)
|
||||||
AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i
|
AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i
|
||||||
AVRDUDE_FLAGS = -D -C $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf \
|
ifeq ($(shell uname -s), Linux)
|
||||||
|
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf
|
||||||
|
else
|
||||||
|
AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
|
||||||
|
endif
|
||||||
|
AVRDUDE_FLAGS = -D -C $(AVRDUDE_CONF) \
|
||||||
-p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
|
-p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
|
||||||
-b $(UPLOAD_RATE)
|
-b $(UPLOAD_RATE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user