diff options
author | cpldcpu <cpldcpu@gmail.com> | 2013-12-06 15:46:47 +0100 |
---|---|---|
committer | cpldcpu <cpldcpu@gmail.com> | 2013-12-06 15:46:47 +0100 |
commit | 5eec4f6815221e78c06cc132df258f38d5b46cd8 (patch) | |
tree | 6d889eb28478fce751f75ec96edfd4f2b666d840 /firmware/main.c | |
parent | 598ca1ed69747777b2df560f37529eb242b23c43 (diff) | |
download | micronucleus-5eec4f6815221e78c06cc132df258f38d5b46cd8.tar.gz micronucleus-5eec4f6815221e78c06cc132df258f38d5b46cd8.tar.bz2 micronucleus-5eec4f6815221e78c06cc132df258f38d5b46cd8.zip |
custom crt, remove tiny85flashinit, UNTESTED
Diffstat (limited to 'firmware/main.c')
-rw-r--r-- | firmware/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/main.c b/firmware/main.c index 8765c0c..be3ee04 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -215,7 +215,7 @@ static void writeWordToPageBuffer(uint16_t data) { } // fills the rest of this page with vectors - interrupt vector or tinyvector tables where needed -static void fillFlashWithVectors(void) { +static inline void fillFlashWithVectors(void) { //int16_t i; // // fill all or remainder of page with 0xFFFF (as if unprogrammed) @@ -235,7 +235,7 @@ static void fillFlashWithVectors(void) { } while (currentAddress % SPM_PAGESIZE); #endif - writeFlashPage(); + // writeFlashPage(); // BUG! Page 0 was written twice! } /* ------------------------------------------------------------------------ */ @@ -331,6 +331,7 @@ static inline void initForUsbConnectivity(void) { sei(); } +/* static inline void tiny85FlashInit(void) { // check for erased first page (no bootloader interrupt vectors), add vectors if missing // this needs to happen for usb communication to work later - essential to first run after bootloader @@ -341,7 +342,7 @@ static inline void tiny85FlashInit(void) { // TODO: necessary to reset currentAddress? currentAddress = 0; } - +*/ // Write page buffer to flash. May only be called for full pages. @@ -394,7 +395,7 @@ int main(void) { // MCUSR=0; /* clean wdt reset bit if reset occured due to wdt */ // wdt_disable(); wdt_enable(WDTO_1S); /* enable watchdog and set to 500ms. */ - tiny85FlashInit(); + // tiny85FlashInit(); bootLoaderInit(); # if AUTO_EXIT_NO_USB_MS |