Rev 229 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 229 | Rev 231 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | PRG = main |
1 | PRG = main |
| 2 | OBJ = main.o |
2 | OBJ = main.o |
| 3 | MCU_TARGET = |
3 | MCU_TARGET = atmega8 |
| 4 | OPTIMIZE = -Os -mcall-prologues |
4 | OPTIMIZE = -Os -mcall-prologues |
| 5 | # grep bios.map for __bios_ram_end to retreive this value |
5 | # grep bios.map for __bios_ram_end to retreive this value |
| 6 | BIOS_RAM_END = 0x008000bd |
6 | BIOS_RAM_END = 0x008000bd |
| 7 | # In the future, this should be automatically inserted into *_app.ld at every bios compilation |
7 | # In the future, this should be automatically inserted into *_app.ld at every bios compilation |
| 8 | 8 | ||
| Line 12... | Line 12... | ||
| 12 | # You should not have to change anything below here. |
12 | # You should not have to change anything below here. |
| 13 | 13 | ||
| 14 | CC = avr-gcc |
14 | CC = avr-gcc |
| 15 | 15 | ||
| 16 | # Override is only needed by avr-lib build system. |
16 | # Override is only needed by avr-lib build system. |
| 17 | 17 | ||
| 18 | override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) |
18 | override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS) |
| 19 | override LDFLAGS = -v -Wl,-Map,$(PRG).map,-L../AVR-Bios,--defsym,__bios_ram_end=$(BIOS_RAM_END),-T$(MCU_TARGET)_app.ld |
19 | override LDFLAGS = -v -Wl,-Map,$(PRG).map,-L../AVR-Bios,--defsym,__bios_ram_end=$(BIOS_RAM_END),-T$(MCU_TARGET)_app.ld |
| 20 | override ASFLAGS = -x assembler-with-cpp -Wa,-gstabs -mmcu=$(MCU_TARGET) $(DEFS) |
20 | override ASFLAGS = -x assembler-with-cpp -Wa,-gstabs -mmcu=$(MCU_TARGET) $(DEFS) |
| 21 | 21 | ||
| 22 | OBJCOPY = avr-objcopy |
22 | OBJCOPY = avr-objcopy |
| 23 | OBJDUMP = avr-objdump |
23 | OBJDUMP = avr-objdump |
| 24 | SIZE = avr-size |
24 | SIZE = avr-size |
| 25 | SZFLAGS = |
25 | SZFLAGS = |
| 26 | UPLOAD = |
26 | UPLOAD = avrdude |
| 27 | ULFLAGS = - |
27 | ULFLAGS = -p $(MCU_TARGET) -D -P /dev/ttyUSB0 -c avrispv2 -b 115200 -U flash:w:$(PRG).hex |
| - | 28 | # -D disables erase! |
|
| 28 | 29 | ||
| 29 | default: $(PRG).elf lst |
30 | default: $(PRG).elf lst |
| 30 | @$(SIZE) $(SZFLAGS) $(PRG).elf |
31 | @$(SIZE) $(SZFLAGS) $(PRG).elf |
| 31 | 32 | ||
| 32 | all: $(PRG).elf lst text eeprom |
33 | all: $(PRG).elf lst text eeprom |