-#if !HAVE_CHIP_ERASE
- if((currentAddress.w[0] & (SPM_PAGESIZE - 1)) == 0){ /* if page start: erase */
- DBG1(0x33, 0, 0);
-# ifndef NO_FLASH_WRITE
- cli();
- boot_page_erase(CURRENT_ADDRESS); /* erase page */
- sei();
- boot_spm_busy_wait(); /* wait until page is erased */
-# endif
- }
-#endif