Rev 235 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 235 | Rev 236 | ||
|---|---|---|---|
| Line 3... | Line 3... | ||
| 3 | MCU_TARGET = atmega88 |
3 | MCU_TARGET = atmega88 |
| 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 | # In the future, this should be automatically inserted into *_app.ld at every bios compilation |
6 | # In the future, this should be automatically inserted into *_app.ld at every bios compilation |
| 7 | BIOS_RAM_END = 0x0080015d |
7 | BIOS_RAM_END = 0x0080015d |
| - | 8 | ifeq ($(MCU_TARGET),atmega88) |
|
| 8 | #uncomment this line if you're using m88, remove line when gcc-bug fixed |
9 | #uncomment this line if you're using m88, remove line when gcc-bug fixed |
| 9 | EXTRA_LD = avr-ld -m avr4 -o $(PRG).elf /usr/avr/lib/avr4/crtm88.o -L/usr/lib/gcc/avr/4.1.0/avr4 -L/usr/lib/gcc/avr/4.1.0/avr4 -L/usr/avr/lib/avr4 -Map $(PRG).map -L../AVR-Bios --defsym __bios_ram_end=$(BIOS_RAM_END) -T$(MCU_TARGET)_app.ld $(PRG).o -lgcc -lc -lgcc |
10 | EXTRA_LD = avr-ld -m avr4 -o $(PRG).elf /usr/avr/lib/avr4/crtm88.o -L/usr/lib/gcc/avr/4.1.0/avr4 -L/usr/lib/gcc/avr/4.1.0/avr4 -L/usr/avr/lib/avr4 -Map $(PRG).map -L../AVR-Bios --defsym __bios_ram_end=$(BIOS_RAM_END) -T$(MCU_TARGET)_app.ld $(PRG).o -lgcc -lc -lgcc |
| - | 11 | endif |
|
| 10 | 12 | ||
| 11 | DEFS = -I../AVR-Bios |
13 | DEFS = -I../AVR-Bios |
| 12 | LIBS = |
14 | LIBS = |
| 13 | 15 | ||
| 14 | # You should not have to change anything below here. |
16 | # You should not have to change anything below here. |
| Line 27... | Line 29... | ||
| 27 | SZFLAGS = |
29 | SZFLAGS = |
| 28 | UPLOAD = avrdude |
30 | UPLOAD = avrdude |
| 29 | ULFLAGS = -p $(MCU_TARGET) -D -P /dev/ttyUSB0 -c avrispv2 -b 115200 -U flash:w:$(PRG).hex |
31 | ULFLAGS = -p $(MCU_TARGET) -D -P /dev/ttyUSB0 -c avrispv2 -b 115200 -U flash:w:$(PRG).hex |
| 30 | # -D disables erase! |
32 | # -D disables erase! |
| 31 | 33 | ||
| 32 | default: $(PRG).elf lst |
34 | default: $(PRG).elf lst text |
| 33 | @$(SIZE) $(SZFLAGS) $(PRG).elf |
35 | @$(SIZE) $(SZFLAGS) $(PRG).elf |
| 34 | 36 | ||
| 35 | all: $(PRG).elf lst text eeprom |
37 | all: $(PRG).elf lst text eeprom |
| 36 | 38 | ||
| 37 | $(PRG).elf: $(OBJ) |
39 | $(PRG).elf: $(OBJ) |