Make avrdude program configurable
This commit is contained in:
parent
252c619cd6
commit
5515a0634d
7
Makefile
7
Makefile
@ -2,11 +2,14 @@ OPTIMIZE = -O2
|
|||||||
CPPFLAGS += -DF_CPU=$(MCU_FREQ)
|
CPPFLAGS += -DF_CPU=$(MCU_FREQ)
|
||||||
override CFLAGS = -g --std=c99 -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET)
|
override CFLAGS = -g --std=c99 -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET)
|
||||||
override LDFLAGS =
|
override LDFLAGS =
|
||||||
|
AVRDUDE_ARGS =
|
||||||
|
|
||||||
|
# programs we are gonna use
|
||||||
CC = avr-gcc
|
CC = avr-gcc
|
||||||
OBJCOPY = avr-objcopy
|
OBJCOPY = avr-objcopy
|
||||||
OBJDUMP = avr-objdump
|
OBJDUMP = avr-objdump
|
||||||
SIZE = avr-size
|
SIZE = avr-size
|
||||||
AVRDUDE_ARGS =
|
AVRDUDE = avrdude
|
||||||
|
|
||||||
ifdef BOARD
|
ifdef BOARD
|
||||||
include boards/$(BOARD).mk
|
include boards/$(BOARD).mk
|
||||||
@ -60,5 +63,5 @@ endif
|
|||||||
|
|
||||||
ifdef AVRDUDE_TYPE
|
ifdef AVRDUDE_TYPE
|
||||||
flash: $(PROG).hex
|
flash: $(PROG).hex
|
||||||
avrdude $(AVRDUDE_ARGS) -U flash:w:$(PROG).hex
|
$(AVRDUDE) $(AVRDUDE_ARGS) -U flash:w:$(PROG).hex
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user