Rev 237 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 237 | Rev 240 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | PRG = bios |
1 | PRG = bios |
| 2 | OBJ = vectors.o bios.o flash.o |
2 | OBJ = vectors.o bios.o flash.o can.o mcp2515/mcp2515.o |
| 3 | MCU_TARGET = atmega8 |
3 | MCU_TARGET = atmega8 |
| 4 | OPTIMIZE = -Os -mcall-prologues |
4 | OPTIMIZE = -Os -mcall-prologues |
| 5 | BIOS_START = |
5 | BIOS_START = 0xd84 |
| 6 | BOOT_START = 0x1f00 |
6 | BOOT_START = 0x1f00 |
| 7 | 7 | ||
| 8 | DEFS = |
8 | DEFS = |
| 9 | LIBS = |
9 | LIBS = |
| 10 | 10 | ||
| 11 | TARGET_CLK_SRC = |
11 | TARGET_CLK_SRC = 0x24 |
| 12 | #TARGET_CLK_SRC for mega88 |
12 | #TARGET_CLK_SRC for mega88 |
| 13 | #0xe7 #CKDIV8=1, external crystal |
13 | #0xe7 #CKDIV8=1, external crystal |
| 14 | #0xe0 #CKDIV8=1, external clock |
14 | #0xe0 #CKDIV8=1, external clock |
| 15 | #0xe2 #CKDIV8=1, internal RC |
15 | #0xe2 #CKDIV8=1, internal RC |
| 16 | #TARGET_CLK_SRC for mega8 |
16 | #TARGET_CLK_SRC for mega8 |
| Line 32... | Line 32... | ||
| 32 | OBJCOPY = avr-objcopy |
32 | OBJCOPY = avr-objcopy |
| 33 | OBJDUMP = avr-objdump |
33 | OBJDUMP = avr-objdump |
| 34 | SIZE = avr-size |
34 | SIZE = avr-size |
| 35 | SZFLAGS = |
35 | SZFLAGS = |
| 36 | UPLOAD = avrdude |
36 | UPLOAD = avrdude |
| 37 | ULFLAGS = -p $(MCU_TARGET) -P /dev/ |
37 | ULFLAGS = -p $(MCU_TARGET) -P /dev/ttyS0 -c avr910 -b 115200 -U flash:w:$(PRG).hex |
| 38 | 38 | ||
| 39 | ifeq ($(MCU_TARGET),atmega88) |
39 | ifeq ($(MCU_TARGET),atmega88) |
| 40 | #BOOTRST=0, BOOTSZ0=1, BOOTSZ1=1 |
40 | #BOOTRST=0, BOOTSZ0=1, BOOTSZ1=1 |
| 41 | EXTFUSE = 0x06 |
41 | EXTFUSE = 0x06 |
| 42 | #BODLEVEL = 4.3V |
42 | #BODLEVEL = 4.3V |
| Line 60... | Line 60... | ||
| 60 | ifdef LOWFUSE |
60 | ifdef LOWFUSE |
| 61 | AVRDUDE_WRITE_FUSEBITS += -U lfuse:w:$(LOWFUSE):m |
61 | AVRDUDE_WRITE_FUSEBITS += -U lfuse:w:$(LOWFUSE):m |
| 62 | endif |
62 | endif |
| 63 | 63 | ||
| 64 | #comment this line for not programming fusebits |
64 | #comment this line for not programming fusebits |
| 65 |
|
65 | #ULFLAGS += $(AVRDUDE_WRITE_FUSEBITS) |
| 66 | 66 | ||
| 67 | default: $(PRG).elf lst |
67 | default: $(PRG).elf lst |
| 68 | @$(SIZE) $(SZFLAGS) $(PRG).elf |
68 | @$(SIZE) $(SZFLAGS) $(PRG).elf |
| 69 | 69 | ||
| 70 | all: $(PRG).elf lst text eeprom |
70 | all: $(PRG).elf lst text eeprom |