소스 검색

fix avrdude upload in makefile

Tim Hawkins 10 년 전
부모
커밋
5045d17a39
1개의 변경된 파일10개의 추가작업 그리고 7개의 파일을 삭제
  1. 10
    7
      Marlin/Makefile

+ 10
- 7
Marlin/Makefile 파일 보기

36
 # Note that all settings are set with ?=, this means you can override them
36
 # Note that all settings are set with ?=, this means you can override them
37
 # from the commandline with "make HARDWARE_MOTHERBOARD=71" for example
37
 # from the commandline with "make HARDWARE_MOTHERBOARD=71" for example
38
 
38
 
39
-# This defined the board you are compiling for (see Configuration.h for the options)
39
+# This defined the board you are compiling for (see boards.h for the options)
40
 HARDWARE_MOTHERBOARD ?= 11
40
 HARDWARE_MOTHERBOARD ?= 11
41
 
41
 
42
 # Arduino source install directory, and version number
42
 # Arduino source install directory, and version number
43
-ARDUINO_INSTALL_DIR  ?= /Applications/Arduino.app/Contents/Resources/Java
43
+# On most linuxes this will be /usr/share/arduino
44
+ARDUINO_INSTALL_DIR  ?= /usr/share/arduino
44
 ARDUINO_VERSION      ?= 105
45
 ARDUINO_VERSION      ?= 105
45
 
46
 
46
 # You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)
47
 # You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)
49
 #Programmer configuration
50
 #Programmer configuration
50
 UPLOAD_RATE        ?= 115200
51
 UPLOAD_RATE        ?= 115200
51
 AVRDUDE_PROGRAMMER ?= arduino
52
 AVRDUDE_PROGRAMMER ?= arduino
53
+# on most linuxes this will be /dev/ttyACM0 or /dev/ttyACM1 
52
 UPLOAD_PORT        ?= /dev/arduino
54
 UPLOAD_PORT        ?= /dev/arduino
53
 
55
 
54
-#Directory used to build files in, contains all the build files, from object files to the final hex file.
56
+#Directory used to build files in, contains all the build files, from object files to the final hex file
57
+#on linux it is best to put an absolute path like /home/username/tmp .
55
 BUILD_DIR          ?= applet
58
 BUILD_DIR          ?= applet
56
 
59
 
57
 # This defines whether Liquid_TWI2 support will be built
60
 # This defines whether Liquid_TWI2 support will be built
351
 
354
 
352
 # Programming support using avrdude. Settings and variables.
355
 # Programming support using avrdude. Settings and variables.
353
 AVRDUDE_PORT = $(UPLOAD_PORT)
356
 AVRDUDE_PORT = $(UPLOAD_PORT)
354
-AVRDUDE_WRITE_FLASH = -U flash:w:$(BUILD_DIR)/$(TARGET).hex:i
357
+AVRDUDE_WRITE_FLASH = -Uflash:w:$(BUILD_DIR)/$(TARGET).hex:i
355
 ifeq ($(shell uname -s), Linux)
358
 ifeq ($(shell uname -s), Linux)
356
 AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf
359
 AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avrdude.conf
357
 else
360
 else
358
 AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
361
 AVRDUDE_CONF = $(ARDUINO_INSTALL_DIR)/hardware/tools/avr/etc/avrdude.conf
359
 endif
362
 endif
360
-AVRDUDE_FLAGS = -D -C $(AVRDUDE_CONF) \
361
-	-p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) \
362
-	-b $(UPLOAD_RATE)
363
+AVRDUDE_FLAGS = -q -q -D -C$(AVRDUDE_CONF) \
364
+	-p$(MCU) -P$(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -cwiring\
365
+	-b$(UPLOAD_RATE)
363
 
366
 
364
 # Define all object files.
367
 # Define all object files.
365
 OBJ = ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}}
368
 OBJ = ${patsubst %.c, $(BUILD_DIR)/%.o, ${SRC}}

Loading…
취소
저장