X-Git-Url: http://git.linex4red.de/pub/USBaspLoader.git/blobdiff_plain/b1421ca602baf1bb522257138e218766a3359311..63878dfbade33d8294c36c3e6d9435e2f5f32c08:/firmware/bootloaderconfig.h?ds=sidebyside diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index 6a181df..97311dd 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -93,45 +93,15 @@ these macros are defined, the boot loader usees them. * to erase itself from the bootregion */ -#define HAVE_BLB11_SOFTW_BACKDOOR 1 +#define HAVE_SPMINTEREFACE 1 /* - * When "HAVE_BLB11_SOFTW_LOCKBIT" is enabled, this backdoor will allow writing - * to the BLS while JUMPER stays low. (keeps be pressed) - * If JUMPER is released (and after a short debouncing period) repressing it - * will have NO affect on disabling the writelock. - */ - -#define HAVE_DOSPM_TUNNELCMD 1 -/* - * When enabled, "HAVE_DOSPM_TUNNELCMD" will implement an PROGMEM ARRAY - * with up to 13 opcodes within BLS. - * This array will be called "bootloader__do_spm", and implements the - * "do_spm" subroutine from atmels "Instruction Set Manual" Rev.0856I, page 140. - * If additionally "HAVE_BLB11_SOFTW_BACKDOOR" is enabled, the array will just - * contain "NOP()" instructions, since other code can be flashed into via - * backdoor. - * -do_spm: -;input: spmcrval determines SPM action -;disable interrupts if enabled, store status -;temp1 will be register: r7 -;temp2 will be register: r8 -;spmcrval will be register: r9 - -in temp2, SREG ; --> has to be done before calling -cli ; --> has to be done before calling - ;check for previous SPM complete -wait: -in temp1, SPMCR -sbrc temp1, SPMEN -rjmp wait - ;SPM timed sequence -out SPMCR, spmcrval -spm - ;restore SREG (to enable interrupts if originally enabled) -out SREG, temp2 -ret - * + * 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 @@ -195,7 +165,8 @@ ret static inline void bootLoaderInit(void) { - PORTD |= (1 << JUMPER_BIT); /* activate pull-up */ + 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();