Added avrdude support in ATmega Makefile.
This commit is contained in:
@@ -3,8 +3,8 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
## General Flags
|
## General Flags
|
||||||
PROJECT = bacnet
|
|
||||||
MCU = atmega168
|
MCU = atmega168
|
||||||
|
AVRDUDE_MCU = m168
|
||||||
TARGET = bacnet
|
TARGET = bacnet
|
||||||
## Tools
|
## Tools
|
||||||
CC = avr-gcc
|
CC = avr-gcc
|
||||||
@@ -12,8 +12,22 @@ AR = avr-ar
|
|||||||
OBJCOPY = avr-objcopy
|
OBJCOPY = avr-objcopy
|
||||||
OBJDUMP = avr-objdump
|
OBJDUMP = avr-objdump
|
||||||
SIZE = avr-size
|
SIZE = avr-size
|
||||||
|
AVRDUDE = avrdude
|
||||||
LINT = splint
|
LINT = splint
|
||||||
|
|
||||||
|
# programmer id--check the avrdude for complete list
|
||||||
|
# # of available opts. These should include stk500,
|
||||||
|
# # avr910, avrisp, bsd, pony and more. Set this to
|
||||||
|
# # one of the valid "-c PROGRAMMER-ID" values
|
||||||
|
# # described in the avrdude info page.
|
||||||
|
# #
|
||||||
|
AVRDUDE_PROGRAMMERID = avrispmkII
|
||||||
|
#
|
||||||
|
# # port--serial or parallel port to which your
|
||||||
|
# # hardware programmer is attached
|
||||||
|
# #
|
||||||
|
AVRDUDE_PORT = /dev/ttyUSB0
|
||||||
|
|
||||||
# Source locations
|
# Source locations
|
||||||
BACNET_CORE = ../../src
|
BACNET_CORE = ../../src
|
||||||
BACNET_INCLUDE = ../../include
|
BACNET_INCLUDE = ../../include
|
||||||
@@ -171,11 +185,16 @@ $(LIBRARY): $(COREOBJ) Makefile
|
|||||||
|
|
||||||
size: ${TARGET_ELF}
|
size: ${TARGET_ELF}
|
||||||
@echo
|
@echo
|
||||||
@${SIZE} -C --mcu=${MCU} ${TARGET_ELF}
|
@${SIZE} ${TARGET_ELF}
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(LINT) $(BFLAGS) $(CSRC)
|
$(LINT) $(BFLAGS) $(CSRC)
|
||||||
|
|
||||||
|
install: $(TARGET_ELF)
|
||||||
|
$(AVRDUDE) -c $(AVRDUDE_PROGRAMMERID) \
|
||||||
|
-p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -e \
|
||||||
|
-U flash:w:$(TARGET).hex
|
||||||
|
|
||||||
## Clean target
|
## Clean target
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user