Subversion Repositories Projects

Rev

Rev 82 | Rev 155 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 dhylands 1
###########################################################################
2
#
3
#	mkRules-avr.mk
4
#
5
#	This file contains rules for building under WinAVR
6
#
7
###########################################################################
8
 
110 dhylands 9
#MK_PRINT_ELF_SIZE = avr-size --mcu=$(MK_AVR_MCU_LONG) $@
10
MK_PRINT_ELF_SIZE = avr-size $@
33 dhylands 11
 
2 dhylands 12
include $(MK_RULES_DIR)/mkRules-gcc.mk
13
 
14
ifneq ($(MK_HEX_TARGET),)
15
 
49 dhylands 16
download d : mkdir_bin mkdir_obj d_target
17
 
18
d_target: $(call MK_HEX_NAME, $(MK_HEX_TARGET))
2 dhylands 19
	$(ECHO) "Downloading $< ..."
51 dhylands 20
	$(MK_$(MK_AVR_PROGRAMMER)_CMD)
2 dhylands 21
 
49 dhylands 22
MK_AVR_FUSES = $(MK_AVR_FUSES_$(MK_AVR_MCU))
2 dhylands 23
 
49 dhylands 24
fuses:
25
ifeq ($(MK_AVR_FUSES),)
26
	$(error Need to set MK_AVR_FUSES_$(MK_AVR_MCU))
27
else
28
	$(ECHO) "Programming fuses to $(MK_AVR_FUSES) ..."
51 dhylands 29
ifeq ($(MK_$(MK_AVR_PROGRAMMER)_CMD_FUSE),)
49 dhylands 30
	$(error Programmer $(MK_AVR_PROGRAMMER) doesn't support programming fuses)
2 dhylands 31
endif
51 dhylands 32
	$(MK_$(MK_AVR_PROGRAMMER)_CMD_FUSE)
57 dhylands 33
 
34
read-fuses:
35
	$(ECHO) "Reading fuses ..."
36
ifeq ($(MK_$(MK_AVR_PROGRAMMER)_RD_FUSE),)
37
	$(error Programmer $(MK_AVR_PROGRAMMER) doesn't support reading fuses)
38
endif
39
	$(MK_$(MK_AVR_PROGRAMMER)_RD_FUSE)
40
 
49 dhylands 41
 
42
endif
2 dhylands 43
 
49 dhylands 44
.PHONY: download d d_target fuses
45
 
46
endif
47
 
2 dhylands 48
mon:
49
	$(ECHO) "Launching BootHost ..."
82 dhylands 50
	$(Q)$(MK_BootHost) $(MK_BootHost_OPTS)
2 dhylands 51
 
52
.PHONY: mon
53