/* This is the port where the USB bus is connected. When you configure it to
* "B", the registers PORTB, PINB and DDRB will be used.
*/
-#define USB_CFG_DMINUS_BIT 4
+#define JUMPER_BIT 7 /* old value was 0 */
+/*
+ * jumper is connected to this bit in port D, active low
+ */
+#define USB_CFG_DMINUS_BIT 6 /* old value was 4 */
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This may be any bit in the port.
*/
/* ---------------------- feature / code size options ---------------------- */
/* ------------------------------------------------------------------------- */
+#define HAVE_READ_LOCK_FUSE 1
+/*
+ * enable the loaders capability to load its lfuse, hfuse and lockbits
+ * ...However, programming of these is prohibited...
+ */
+
+#define HAVE_BLB11_SOFTW_LOCKBIT 1
+/*
+ * The IC itself do not need to prgra BLB11, but the bootloader will avaoid
+ * to erase itself from the bootregion
+ */
+
+#define HAVE_SPMINTEREFACE 1
+/*
+ * Since code within normal section of application memory (rww-section) is
+ * not able to call spm for programming flash-pages, this option (when
+ * enabled) will insert a small subroutine into the bootloader-section
+ * to enable applications to circumvent this limitation and make them
+ * able to program the flash in a similar way as the bootloader does, too.
+ * For further details see "spminterface.h", which implements this
+ * feature.
+ */
+
#define HAVE_EEPROM_PAGED_ACCESS 1
/* If HAVE_EEPROM_PAGED_ACCESS is defined to 1, page mode access to EEPROM is
* compiled in. Whether page mode or byte mode access is used by AVRDUDE
* signature) does not support page mode for EEPROM. It is required for
* accessing the EEPROM on the ATMega8. Costs ~54 bytes.
*/
-#define BOOTLOADER_CAN_EXIT 1
+#define BOOTLOADER_CAN_EXIT 0
/* If this macro is defined to 1, the boot loader will exit shortly after the
* programmer closes the connection to the device. Costs ~36 bytes.
*/
#ifndef __ASSEMBLER__ /* assembler cannot parse function definitions */
-#define JUMPER_BIT 7 /* jumper is connected to this bit in port D, active low */
-
#ifndef MCUCSR /* compatibility between ATMega8 and ATMega88 */
# define MCUCSR MCUSR
#endif
static inline void bootLoaderInit(void)
{
- PORTD |= (1 << JUMPER_BIT); /* activate pull-up */
- if(!(MCUCSR & (1 << EXTRF))) /* If this was not an external reset, ignore */
- leaveBootloader();
+ DDRD = 0;
+ PORTD = (1 << JUMPER_BIT); /* activate pull-up */
+// deactivated by Stephan - reset after each avrdude op is annoing!
+// if(!(MCUCSR & (1 << EXTRF))) /* If this was not an external reset, ignore */
+// leaveBootloader();
MCUCSR = 0; /* clear all reset flags for next time */
}
PORTD = 0; /* undo bootLoaderInit() changes */
}
-#define bootLoaderCondition() ((PIND & (1 << JUMPER_BIT)) == 0)
+#define bootLoaderCondition() ((PIND & (1 << JUMPER_BIT)) == 0)
#endif /* __ASSEMBLER__ */