Add a roverif specific bootloader configuration.

* Set the bootloader status LED
 * Set the crystal to 12 MHz
 * Up the baud rate to 57600 using double rate
master
Michael Hope 9 years ago
parent aab625d7e6
commit e969717881
  1. 9
      bootloader/ATmegaBOOT_168.c
  2. 15
      bootloader/Makefile

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

@ -49,7 +49,7 @@ STK500-2 = $(STK500) -d$(MCU_TARGET) -ms -q -lCF -LCF -cUSB -I200kHz -s -wt
OBJ = $(PROGRAM).o
OPTIMIZE = -O2
OPTIMIZE = -Os
DEFS =
LIBS =
@ -115,6 +115,18 @@ pro16_isp: LFUSE = C6
pro16_isp: EFUSE = 00
pro16_isp: isp
roverif: TARGET = roverif_12MHz
roverif: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS' '-DROVERIF' '-DBAUD_RATE=57600' '-DDOUBLE_SPEED'
roverif: AVR_FREQ = 12000000L
roverif: $(PROGRAM)_roverif_12MHz.hex
roverif_isp: roverif
roverif_isp: TARGET = roverif_12MHz
roverif_isp: HFUSE = DE
roverif_isp: LFUSE = C6
roverif_isp: EFUSE = 00
roverif_isp: isp
pro20: TARGET = pro_20mhz
pro20: CFLAGS += '-DMAX_TIME_COUNT=F_CPU>>4' '-DNUM_LED_FLASHES=1' '-DWATCHDOG_MODS'
pro20: AVR_FREQ = 20000000L
@ -221,4 +233,3 @@ clean:
%.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@

Loading…
Cancel
Save