소스 검색

Add a roverif specific bootloader configuration.

Michael Hope 4 년 전
부모
커밋
e969717881
2개의 변경된 파일20개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 2
      bootloader/ATmegaBOOT_168.c
  2. 13 2
      bootloader/Makefile

+ 7 - 2
bootloader/ATmegaBOOT_168.c 파일 보기

@@ -128,7 +128,12 @@
128 128
 
129 129
 /* onboard LED is used to indicate, that the bootloader was entered (3x flashing) */
130 130
 /* if monitor functions are included, LED goes on after monitor was entered */
131
-#if defined __AVR_ATmega128__ || defined __AVR_ATmega1280__
131
+#if defined ROVERIF
132
+#define LED_DDR  DDRD
133
+#define LED_PORT PORTD
134
+#define LED_PIN  PIND
135
+#define LED      PIND7
136
+#elif defined __AVR_ATmega128__ || defined __AVR_ATmega1280__
132 137
 /* Onboard LED is connected to pin PB7 (e.g. Crumb128, PROBOmega128, Savvy128, Arduino Mega) */
133 138
 #define LED_DDR  DDRB
134 139
 #define LED_PORT PORTB
@@ -583,7 +588,7 @@ int main(void)
583 588
 #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__)
584 589
 				while(bit_is_set(EECR,EEPE));			//Wait for previous EEPROM writes to complete
585 590
 #else
586
-				while(bit_is_set(EECR,EEWE));			//Wait for previous EEPROM writes to complete
591
+				while(bit_is_set(EECR,EEPE));			//Wait for previous EEPROM writes to complete
587 592
 #endif
588 593
 				asm volatile(
589 594
 					 "clr	r17		\n\t"	//page_word_count

+ 13 - 2
bootloader/Makefile 파일 보기

@@ -49,7 +49,7 @@ STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
49 49
 
50 50
 
51 51
 OBJ        = $(PROGRAM).o
52
-OPTIMIZE   = -O2
52
+OPTIMIZE   = -Os
53 53
 
54 54
 DEFS       = 
55 55
 LIBS       =
@@ -115,6 +115,18 @@ pro16_isp: LFUSE = C6
115 115
 pro16_isp: EFUSE = 00
116 116
 pro16_isp: isp
117 117
 
118
+roverif: TARGET = roverif_12MHz
119
+roverif: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS' '-DROVERIF' '-DBAUD_RATE=57600' '-DDOUBLE_SPEED'
120
+roverif: AVR_FREQ = 12000000L
121
+roverif: $(PROGRAM)_roverif_12MHz.hex
122
+
123
+roverif_isp: roverif
124
+roverif_isp: TARGET = roverif_12MHz
125
+roverif_isp: HFUSE = DE
126
+roverif_isp: LFUSE = C6
127
+roverif_isp: EFUSE = 00
128
+roverif_isp: isp
129
+
118 130
 pro20: TARGET = pro_20mhz
119 131
 pro20: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
120 132
 pro20: AVR_FREQ = 20000000L
@@ -221,4 +233,3 @@ clean:
221 233
 
222 234
 %.bin: %.elf
223 235
 	$(OBJCOPY) -j .text -j .data -O binary $< $@
224
-