Subversion Repositories HomeAutomation

Rev

Rev 223 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 223 Rev 228
Line 1... Line 1...
1
PRG            = bios
1
PRG            = bios
2
OBJ            = bios.o
2
OBJ            = vectors.o bios.o flash.o
3
MCU_TARGET     = atmega8
3
MCU_TARGET     = atmega8
4
OPTIMIZE       = -Os -mcall-prologues
4
OPTIMIZE       = -Os -mcall-prologues
-
 
5
BIOS_START     = 0x100
-
 
6
BOOT_START     = 0x1f00
5
 
7
 
6
DEFS           = 
8
DEFS           =
7
LIBS           =
9
LIBS           =
8
 
10
 
9
# You should not have to change anything below here.
11
# You should not have to change anything below here.
Line 11... Line 13...
11
CC             = avr-gcc
13
CC             = avr-gcc
12
 
14
 
13
# Override is only needed by avr-lib build system.
15
# Override is only needed by avr-lib build system.
14
 
16
 
15
override CFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
17
override CFLAGS        = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
-
 
18
override LDFLAGS       = -Wl,-Map,$(PRG).map,--defsym,__bios_start=$(BIOS_START),--defsym,__boot_start=$(BOOT_START),-T$(MCU_TARGET)_bios.ld,--cref
16
override LDFLAGS       = -Wl,-Map,$(PRG).map,-T$(MCU_TARGET)_bios.ld,--cref
19
override ASFLAGS       = -x assembler-with-cpp -Wa,-gstabs -mmcu=$(MCU_TARGET) $(DEFS)
17
 
20
 
18
OBJCOPY        = avr-objcopy
21
OBJCOPY        = avr-objcopy
19
OBJDUMP        = avr-objdump
22
OBJDUMP        = avr-objdump
20
SIZE           = avr-size
23
SIZE           = avr-size
21
SZFLAGS        = 
24
SZFLAGS        = 
Line 46... Line 49...
46
hex:  $(PRG).hex
49
hex:  $(PRG).hex
47
bin:  $(PRG).bin
50
bin:  $(PRG).bin
48
srec: $(PRG).srec
51
srec: $(PRG).srec
49
 
52
 
50
%.hex: %.elf
53
%.hex: %.elf
51
	$(OBJCOPY) -j .text -j .data -O ihex $< $@
54
	$(OBJCOPY) -j .text -j .data -j .bootloader -O ihex $< $@
52
 
55
 
53
%.srec: %.elf
56
%.srec: %.elf
54
	$(OBJCOPY) -j .text -j .data -O srec $< $@
57
	$(OBJCOPY) -j .text -j .data -j .bootloader -O srec $< $@
55
 
58
 
56
%.bin: %.elf
59
%.bin: %.elf
57
	$(OBJCOPY) -j .text -j .data -O binary $< $@
60
	$(OBJCOPY) -j .text -j .data -j .bootloader -O binary $< $@
58
 
61
 
59
# Rules for uploading rom images to flash
62
# Rules for uploading rom images to flash
60
 
63
 
61
install: hex
64
install: hex
62
	$(UPLOAD) $(ULFLAGS)
65
	$(UPLOAD) $(ULFLAGS)