/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to arduino.mk

  • Committer: edam
  • Date: 2012-02-16 00:13:13 UTC
  • Revision ID: edam@waxworlds.org-20120216001313-5w52cnns4cqofb6e
updated arduino.mk

Show diffs side-by-side

added added

removed removed

176
176
 
177
177
# no serial device? make a poor attempt to detect an arduino
178
178
ifeq ($(SERIALDEV), )
179
 
SERIALDEV := $(firstword $(wildcard /dev/ttyACM? /dev/ttyUSB?))
 
179
SERIALDEV := $(firstword $(wildcard \
 
180
        /dev/ttyACM? /dev/ttyUSB? /dev/tty.usbmodem*))
180
181
endif
181
182
 
182
183
# software
230
231
AVRDUDEFLAGS += -c $(BOARD_UPLOAD_PROTOCOL) -b $(BOARD_UPLOAD_SPEED)
231
232
LINKFLAGS := -Os -Wl,--gc-sections -mmcu=$(BOARD_BUILD_MCU)
232
233
 
 
234
# figure out which arg to use with stty
 
235
STTYFARG := $(shell stty --help > /dev/null 2>&1 && echo -F || echo -f)
 
236
 
233
237
# default rule
234
238
.DEFAULT_GOAL := all
235
239
 
247
251
        @test -n "$(SERIALDEV)" || { \
248
252
                echo "error: SERIALDEV could not be determined automatically." >&2; \
249
253
                exit 1; }
250
 
        stty -F $(SERIALDEV) hupcl
 
254
        stty $(STTYFARG) $(SERIALDEV) hupcl
251
255
        $(AVRDUDE) $(AVRDUDEFLAGS) -U flash:w:$(TARGET).hex:i
252
256
 
253
257
clean: