|
@@ -3,36 +3,40 @@ optiboot_atmega1280.elf: file format elf32-avr
|
|
|
|
|
|
Sections:
|
|
Sections:
|
|
Idx Name Size VMA LMA File off Algn
|
|
Idx Name Size VMA LMA File off Algn
|
|
- 0 .text 000001e6 0001fc00 0001fc00 00000054 2**1
|
|
|
|
|
|
+ 0 .text 0000025c 0001fc00 0001fc00 00000074 2**1
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
- 1 .version 00000002 0001fffe 0001fffe 0000023a 2**0
|
|
|
|
- CONTENTS, READONLY
|
|
|
|
- 2 .debug_aranges 00000028 00000000 00000000 0000023c 2**0
|
|
|
|
|
|
+ 1 .version 00000002 0001fffe 0001fffe 000002d0 2**0
|
|
|
|
+ CONTENTS, ALLOC, LOAD, DATA
|
|
|
|
+ 2 .stab 00000180 00000000 00000000 000002d4 2**2
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 3 .debug_pubnames 0000005f 00000000 00000000 00000264 2**0
|
|
|
|
|
|
+ 3 .stabstr 000000bb 00000000 00000000 00000454 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 4 .debug_info 00000294 00000000 00000000 000002c3 2**0
|
|
|
|
|
|
+ 4 .debug_aranges 00000028 00000000 00000000 0000050f 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 5 .debug_abbrev 0000016b 00000000 00000000 00000557 2**0
|
|
|
|
|
|
+ 5 .debug_pubnames 00000074 00000000 00000000 00000537 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 6 .debug_line 0000040f 00000000 00000000 000006c2 2**0
|
|
|
|
|
|
+ 6 .debug_info 000003df 00000000 00000000 000005ab 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 7 .debug_frame 00000080 00000000 00000000 00000ad4 2**2
|
|
|
|
|
|
+ 7 .debug_abbrev 000001ea 00000000 00000000 0000098a 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 8 .debug_str 00000131 00000000 00000000 00000b54 2**0
|
|
|
|
|
|
+ 8 .debug_line 0000044b 00000000 00000000 00000b74 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 9 .debug_loc 00000256 00000000 00000000 00000c85 2**0
|
|
|
|
|
|
+ 9 .debug_frame 00000080 00000000 00000000 00000fc0 2**2
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
- 10 .debug_ranges 00000078 00000000 00000000 00000edb 2**0
|
|
|
|
|
|
+ 10 .debug_str 00000172 00000000 00000000 00001040 2**0
|
|
|
|
+ CONTENTS, READONLY, DEBUGGING
|
|
|
|
+ 11 .debug_loc 000003b3 00000000 00000000 000011b2 2**0
|
|
|
|
+ CONTENTS, READONLY, DEBUGGING
|
|
|
|
+ 12 .debug_ranges 000000d0 00000000 00000000 00001565 2**0
|
|
CONTENTS, READONLY, DEBUGGING
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
|
Disassembly of section .text:
|
|
Disassembly of section .text:
|
|
|
|
|
|
0001fc00 <main>:
|
|
0001fc00 <main>:
|
|
-# define UART_SRL UBRR3L
|
|
|
|
-# define UART_UDR UDR3
|
|
|
|
|
|
+#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+
|
|
/* main program starts here */
|
|
/* main program starts here */
|
|
int main(void) {
|
|
int main(void) {
|
|
1fc00: 11 24 eor r1, r1
|
|
1fc00: 11 24 eor r1, r1
|
|
@@ -46,537 +50,630 @@ int main(void) {
|
|
MCUSR = 0;
|
|
MCUSR = 0;
|
|
1fc04: 14 be out 0x34, r1 ; 52
|
|
1fc04: 14 be out 0x34, r1 ; 52
|
|
if (!(ch & _BV(EXTRF))) appStart(ch);
|
|
if (!(ch & _BV(EXTRF))) appStart(ch);
|
|
- 1fc06: 81 ff sbrs r24, 1
|
|
|
|
- 1fc08: e8 d0 rcall .+464 ; 0x1fdda <appStart>
|
|
|
|
|
|
+ 1fc06: 81 fd sbrc r24, 1
|
|
|
|
+ 1fc08: 01 c0 rjmp .+2 ; 0x1fc0c <main+0xc>
|
|
|
|
+ 1fc0a: 0c d1 rcall .+536 ; 0x1fe24 <appStart>
|
|
|
|
|
|
#if LED_START_FLASHES > 0
|
|
#if LED_START_FLASHES > 0
|
|
// Set up Timer 1 for timeout counter
|
|
// Set up Timer 1 for timeout counter
|
|
TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
|
|
TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
|
|
- 1fc0a: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
- 1fc0c: 80 93 81 00 sts 0x0081, r24
|
|
|
|
|
|
+ 1fc0c: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
+ 1fc0e: 80 93 81 00 sts 0x0081, r24
|
|
UCSRA = _BV(U2X); //Double speed mode USART
|
|
UCSRA = _BV(U2X); //Double speed mode USART
|
|
UCSRB = _BV(RXEN) | _BV(TXEN); // enable Rx & Tx
|
|
UCSRB = _BV(RXEN) | _BV(TXEN); // enable Rx & Tx
|
|
UCSRC = _BV(URSEL) | _BV(UCSZ1) | _BV(UCSZ0); // config USART; 8N1
|
|
UCSRC = _BV(URSEL) | _BV(UCSZ1) | _BV(UCSZ0); // config USART; 8N1
|
|
UBRRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
|
|
UBRRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
|
|
#else
|
|
#else
|
|
UART_SRA = _BV(U2X0); //Double speed mode USART0
|
|
UART_SRA = _BV(U2X0); //Double speed mode USART0
|
|
- 1fc10: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
- 1fc12: 80 93 c0 00 sts 0x00C0, r24
|
|
|
|
|
|
+ 1fc12: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
+ 1fc14: 80 93 c0 00 sts 0x00C0, r24
|
|
UART_SRB = _BV(RXEN0) | _BV(TXEN0);
|
|
UART_SRB = _BV(RXEN0) | _BV(TXEN0);
|
|
- 1fc16: 88 e1 ldi r24, 0x18 ; 24
|
|
|
|
- 1fc18: 80 93 c1 00 sts 0x00C1, r24
|
|
|
|
|
|
+ 1fc18: 88 e1 ldi r24, 0x18 ; 24
|
|
|
|
+ 1fc1a: 80 93 c1 00 sts 0x00C1, r24
|
|
UART_SRC = _BV(UCSZ00) | _BV(UCSZ01);
|
|
UART_SRC = _BV(UCSZ00) | _BV(UCSZ01);
|
|
- 1fc1c: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
- 1fc1e: 80 93 c2 00 sts 0x00C2, r24
|
|
|
|
|
|
+ 1fc1e: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
+ 1fc20: 80 93 c2 00 sts 0x00C2, r24
|
|
UART_SRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
|
|
UART_SRL = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
|
|
- 1fc22: 80 e1 ldi r24, 0x10 ; 16
|
|
|
|
- 1fc24: 80 93 c4 00 sts 0x00C4, r24
|
|
|
|
|
|
+ 1fc24: 80 e1 ldi r24, 0x10 ; 16
|
|
|
|
+ 1fc26: 80 93 c4 00 sts 0x00C4, r24
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
|
|
// Set up watchdog to trigger after 500ms
|
|
// Set up watchdog to trigger after 500ms
|
|
watchdogConfig(WATCHDOG_1S);
|
|
watchdogConfig(WATCHDOG_1S);
|
|
- 1fc28: 8e e0 ldi r24, 0x0E ; 14
|
|
|
|
- 1fc2a: c1 d0 rcall .+386 ; 0x1fdae <watchdogConfig>
|
|
|
|
|
|
+ 1fc2a: 8e e0 ldi r24, 0x0E ; 14
|
|
|
|
+ 1fc2c: e5 d0 rcall .+458 ; 0x1fdf8 <watchdogConfig>
|
|
|
|
|
|
#if (LED_START_FLASHES > 0) || defined(LED_DATA_FLASH)
|
|
#if (LED_START_FLASHES > 0) || defined(LED_DATA_FLASH)
|
|
/* Set LED pin as output */
|
|
/* Set LED pin as output */
|
|
LED_DDR |= _BV(LED);
|
|
LED_DDR |= _BV(LED);
|
|
- 1fc2c: 27 9a sbi 0x04, 7 ; 4
|
|
|
|
- 1fc2e: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
|
|
+ 1fc2e: 27 9a sbi 0x04, 7 ; 4
|
|
|
|
+ 1fc30: 86 e0 ldi r24, 0x06 ; 6
|
|
}
|
|
}
|
|
|
|
|
|
#if LED_START_FLASHES > 0
|
|
#if LED_START_FLASHES > 0
|
|
void flash_led(uint8_t count) {
|
|
void flash_led(uint8_t count) {
|
|
do {
|
|
do {
|
|
TCNT1 = -(F_CPU/(1024*16));
|
|
TCNT1 = -(F_CPU/(1024*16));
|
|
- 1fc30: 20 e3 ldi r18, 0x30 ; 48
|
|
|
|
- 1fc32: 3c ef ldi r19, 0xFC ; 252
|
|
|
|
|
|
+ 1fc32: 20 e3 ldi r18, 0x30 ; 48
|
|
|
|
+ 1fc34: 3c ef ldi r19, 0xFC ; 252
|
|
TIFR1 = _BV(TOV1);
|
|
TIFR1 = _BV(TOV1);
|
|
- 1fc34: 91 e0 ldi r25, 0x01 ; 1
|
|
|
|
|
|
+ 1fc36: 91 e0 ldi r25, 0x01 ; 1
|
|
}
|
|
}
|
|
|
|
|
|
#if LED_START_FLASHES > 0
|
|
#if LED_START_FLASHES > 0
|
|
void flash_led(uint8_t count) {
|
|
void flash_led(uint8_t count) {
|
|
do {
|
|
do {
|
|
TCNT1 = -(F_CPU/(1024*16));
|
|
TCNT1 = -(F_CPU/(1024*16));
|
|
- 1fc36: 30 93 85 00 sts 0x0085, r19
|
|
|
|
- 1fc3a: 20 93 84 00 sts 0x0084, r18
|
|
|
|
|
|
+ 1fc38: 30 93 85 00 sts 0x0085, r19
|
|
|
|
+ 1fc3c: 20 93 84 00 sts 0x0084, r18
|
|
TIFR1 = _BV(TOV1);
|
|
TIFR1 = _BV(TOV1);
|
|
- 1fc3e: 96 bb out 0x16, r25 ; 22
|
|
|
|
|
|
+ 1fc40: 96 bb out 0x16, r25 ; 22
|
|
while(!(TIFR1 & _BV(TOV1)));
|
|
while(!(TIFR1 & _BV(TOV1)));
|
|
- 1fc40: b0 9b sbis 0x16, 0 ; 22
|
|
|
|
- 1fc42: fe cf rjmp .-4 ; 0x1fc40 <main+0x40>
|
|
|
|
|
|
+ 1fc42: b0 9b sbis 0x16, 0 ; 22
|
|
|
|
+ 1fc44: fe cf rjmp .-4 ; 0x1fc42 <main+0x42>
|
|
#if defined(__AVR_ATmega8__) || defined (__AVR_ATmega32__)
|
|
#if defined(__AVR_ATmega8__) || defined (__AVR_ATmega32__)
|
|
LED_PORT ^= _BV(LED);
|
|
LED_PORT ^= _BV(LED);
|
|
#else
|
|
#else
|
|
LED_PIN |= _BV(LED);
|
|
LED_PIN |= _BV(LED);
|
|
- 1fc44: 1f 9a sbi 0x03, 7 ; 3
|
|
|
|
|
|
+ 1fc46: 1f 9a sbi 0x03, 7 ; 3
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
// Watchdog functions. These are only safe with interrupts turned off.
|
|
// Watchdog functions. These are only safe with interrupts turned off.
|
|
void watchdogReset() {
|
|
void watchdogReset() {
|
|
__asm__ __volatile__ (
|
|
__asm__ __volatile__ (
|
|
- 1fc46: a8 95 wdr
|
|
|
|
|
|
+ 1fc48: a8 95 wdr
|
|
LED_PORT ^= _BV(LED);
|
|
LED_PORT ^= _BV(LED);
|
|
#else
|
|
#else
|
|
LED_PIN |= _BV(LED);
|
|
LED_PIN |= _BV(LED);
|
|
#endif
|
|
#endif
|
|
watchdogReset();
|
|
watchdogReset();
|
|
} while (--count);
|
|
} while (--count);
|
|
- 1fc48: 81 50 subi r24, 0x01 ; 1
|
|
|
|
- 1fc4a: a9 f7 brne .-22 ; 0x1fc36 <main+0x36>
|
|
|
|
- 1fc4c: ee 24 eor r14, r14
|
|
|
|
- 1fc4e: ff 24 eor r15, r15
|
|
|
|
- ch = SPM_PAGESIZE / 2;
|
|
|
|
- do {
|
|
|
|
- uint16_t a;
|
|
|
|
- a = *bufPtr++;
|
|
|
|
- a |= (*bufPtr++) << 8;
|
|
|
|
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
|
|
|
|
- 1fc50: bb 24 eor r11, r11
|
|
|
|
- 1fc52: b3 94 inc r11
|
|
|
|
- addrPtr += 2;
|
|
|
|
- } while (--ch);
|
|
|
|
-
|
|
|
|
- // Write from programming buffer
|
|
|
|
- __boot_page_write_short((uint16_t)(void*)address);
|
|
|
|
- 1fc54: a5 e0 ldi r26, 0x05 ; 5
|
|
|
|
- 1fc56: ca 2e mov r12, r26
|
|
|
|
- boot_spm_busy_wait();
|
|
|
|
-
|
|
|
|
|
|
+ 1fc4a: 81 50 subi r24, 0x01 ; 1
|
|
|
|
+ 1fc4c: a9 f7 brne .-22 ; 0x1fc38 <main+0x38>
|
|
|
|
+ 1fc4e: cc 24 eor r12, r12
|
|
|
|
+ 1fc50: dd 24 eor r13, r13
|
|
|
|
+ */
|
|
|
|
+ do {
|
|
|
|
+ uint16_t a;
|
|
|
|
+ a = *bufPtr++;
|
|
|
|
+ a |= (*bufPtr++) << 8;
|
|
|
|
+ __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
|
|
|
|
+ 1fc52: 88 24 eor r8, r8
|
|
|
|
+ 1fc54: 83 94 inc r8
|
|
|
|
+ } while (len -= 2);
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Actually Write the buffer to flash (and wait for it to finish.)
|
|
|
|
+ */
|
|
|
|
+ __boot_page_write_short((uint16_t)(void*)address);
|
|
|
|
+ 1fc56: 25 e0 ldi r18, 0x05 ; 5
|
|
|
|
+ 1fc58: a2 2e mov r10, r18
|
|
|
|
+ boot_spm_busy_wait();
|
|
#if defined(RWWSRE)
|
|
#if defined(RWWSRE)
|
|
- // Reenable read access to flash
|
|
|
|
- boot_rww_enable();
|
|
|
|
- 1fc58: f1 e1 ldi r31, 0x11 ; 17
|
|
|
|
- 1fc5a: df 2e mov r13, r31
|
|
|
|
|
|
+ // Reenable read access to flash
|
|
|
|
+ boot_rww_enable();
|
|
|
|
+ 1fc5a: 91 e1 ldi r25, 0x11 ; 17
|
|
|
|
+ 1fc5c: 99 2e mov r9, r25
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- /* Forever loop */
|
|
|
|
|
|
+ /* Forever loop: exits by causing WDT reset */
|
|
for (;;) {
|
|
for (;;) {
|
|
/* get character from UART */
|
|
/* get character from UART */
|
|
ch = getch();
|
|
ch = getch();
|
|
- 1fc5c: 9c d0 rcall .+312 ; 0x1fd96 <getch>
|
|
|
|
|
|
+ 1fc5e: c0 d0 rcall .+384 ; 0x1fde0 <getch>
|
|
|
|
|
|
if(ch == STK_GET_PARAMETER) {
|
|
if(ch == STK_GET_PARAMETER) {
|
|
- 1fc5e: 81 34 cpi r24, 0x41 ; 65
|
|
|
|
- 1fc60: 61 f4 brne .+24 ; 0x1fc7a <main+0x7a>
|
|
|
|
|
|
+ 1fc60: 81 34 cpi r24, 0x41 ; 65
|
|
|
|
+ 1fc62: 61 f4 brne .+24 ; 0x1fc7c <main+0x7c>
|
|
unsigned char which = getch();
|
|
unsigned char which = getch();
|
|
- 1fc62: 99 d0 rcall .+306 ; 0x1fd96 <getch>
|
|
|
|
- 1fc64: 08 2f mov r16, r24
|
|
|
|
|
|
+ 1fc64: bd d0 rcall .+378 ; 0x1fde0 <getch>
|
|
|
|
+ 1fc66: 18 2f mov r17, r24
|
|
verifySpace();
|
|
verifySpace();
|
|
- 1fc66: a9 d0 rcall .+338 ; 0x1fdba <verifySpace>
|
|
|
|
|
|
+ 1fc68: cd d0 rcall .+410 ; 0x1fe04 <verifySpace>
|
|
if (which == 0x82) {
|
|
if (which == 0x82) {
|
|
- 1fc68: 02 38 cpi r16, 0x82 ; 130
|
|
|
|
- 1fc6a: 41 f1 breq .+80 ; 0x1fcbc <main+0xbc>
|
|
|
|
|
|
+ 1fc6a: 12 38 cpi r17, 0x82 ; 130
|
|
|
|
+ 1fc6c: 51 f1 breq .+84 ; 0x1fcc2 <main+0xc2>
|
|
/*
|
|
/*
|
|
* Send optiboot version as "minor SW version"
|
|
* Send optiboot version as "minor SW version"
|
|
*/
|
|
*/
|
|
putch(OPTIBOOT_MINVER);
|
|
putch(OPTIBOOT_MINVER);
|
|
} else if (which == 0x81) {
|
|
} else if (which == 0x81) {
|
|
- 1fc6c: 01 38 cpi r16, 0x81 ; 129
|
|
|
|
- 1fc6e: 11 f4 brne .+4 ; 0x1fc74 <main+0x74>
|
|
|
|
|
|
+ 1fc6e: 11 38 cpi r17, 0x81 ; 129
|
|
|
|
+ 1fc70: 11 f4 brne .+4 ; 0x1fc76 <main+0x76>
|
|
putch(OPTIBOOT_MAJVER);
|
|
putch(OPTIBOOT_MAJVER);
|
|
- 1fc70: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
- 1fc72: 01 c0 rjmp .+2 ; 0x1fc76 <main+0x76>
|
|
|
|
|
|
+ 1fc72: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
+ 1fc74: 01 c0 rjmp .+2 ; 0x1fc78 <main+0x78>
|
|
} else {
|
|
} else {
|
|
/*
|
|
/*
|
|
* GET PARAMETER returns a generic 0x03 reply for
|
|
* GET PARAMETER returns a generic 0x03 reply for
|
|
* other parameters - enough to keep Avrdude happy
|
|
* other parameters - enough to keep Avrdude happy
|
|
*/
|
|
*/
|
|
putch(0x03);
|
|
putch(0x03);
|
|
- 1fc74: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
- 1fc76: 87 d0 rcall .+270 ; 0x1fd86 <putch>
|
|
|
|
- 1fc78: 83 c0 rjmp .+262 ; 0x1fd80 <main+0x180>
|
|
|
|
|
|
+ 1fc76: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
+ 1fc78: ab d0 rcall .+342 ; 0x1fdd0 <putch>
|
|
|
|
+ 1fc7a: a7 c0 rjmp .+334 ; 0x1fdca <main+0x1ca>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(ch == STK_SET_DEVICE) {
|
|
else if(ch == STK_SET_DEVICE) {
|
|
- 1fc7a: 82 34 cpi r24, 0x42 ; 66
|
|
|
|
- 1fc7c: 11 f4 brne .+4 ; 0x1fc82 <main+0x82>
|
|
|
|
|
|
+ 1fc7c: 82 34 cpi r24, 0x42 ; 66
|
|
|
|
+ 1fc7e: 11 f4 brne .+4 ; 0x1fc84 <main+0x84>
|
|
// SET DEVICE is ignored
|
|
// SET DEVICE is ignored
|
|
getNch(20);
|
|
getNch(20);
|
|
- 1fc7e: 84 e1 ldi r24, 0x14 ; 20
|
|
|
|
- 1fc80: 03 c0 rjmp .+6 ; 0x1fc88 <main+0x88>
|
|
|
|
|
|
+ 1fc80: 84 e1 ldi r24, 0x14 ; 20
|
|
|
|
+ 1fc82: 03 c0 rjmp .+6 ; 0x1fc8a <main+0x8a>
|
|
}
|
|
}
|
|
else if(ch == STK_SET_DEVICE_EXT) {
|
|
else if(ch == STK_SET_DEVICE_EXT) {
|
|
- 1fc82: 85 34 cpi r24, 0x45 ; 69
|
|
|
|
- 1fc84: 19 f4 brne .+6 ; 0x1fc8c <main+0x8c>
|
|
|
|
|
|
+ 1fc84: 85 34 cpi r24, 0x45 ; 69
|
|
|
|
+ 1fc86: 19 f4 brne .+6 ; 0x1fc8e <main+0x8e>
|
|
// SET DEVICE EXT is ignored
|
|
// SET DEVICE EXT is ignored
|
|
getNch(5);
|
|
getNch(5);
|
|
- 1fc86: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
- 1fc88: a0 d0 rcall .+320 ; 0x1fdca <getNch>
|
|
|
|
- 1fc8a: 7a c0 rjmp .+244 ; 0x1fd80 <main+0x180>
|
|
|
|
|
|
+ 1fc88: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
+ 1fc8a: c4 d0 rcall .+392 ; 0x1fe14 <getNch>
|
|
|
|
+ 1fc8c: 9e c0 rjmp .+316 ; 0x1fdca <main+0x1ca>
|
|
}
|
|
}
|
|
else if(ch == STK_LOAD_ADDRESS) {
|
|
else if(ch == STK_LOAD_ADDRESS) {
|
|
- 1fc8c: 85 35 cpi r24, 0x55 ; 85
|
|
|
|
- 1fc8e: 91 f4 brne .+36 ; 0x1fcb4 <main+0xb4>
|
|
|
|
|
|
+ 1fc8e: 85 35 cpi r24, 0x55 ; 85
|
|
|
|
+ 1fc90: a1 f4 brne .+40 ; 0x1fcba <main+0xba>
|
|
// LOAD ADDRESS
|
|
// LOAD ADDRESS
|
|
uint16_t newAddress;
|
|
uint16_t newAddress;
|
|
newAddress = getch();
|
|
newAddress = getch();
|
|
- 1fc90: 82 d0 rcall .+260 ; 0x1fd96 <getch>
|
|
|
|
|
|
+ 1fc92: a6 d0 rcall .+332 ; 0x1fde0 <getch>
|
|
newAddress = (newAddress & 0xff) | (getch() << 8);
|
|
newAddress = (newAddress & 0xff) | (getch() << 8);
|
|
- 1fc92: 08 2f mov r16, r24
|
|
|
|
- 1fc94: 10 e0 ldi r17, 0x00 ; 0
|
|
|
|
- 1fc96: 7f d0 rcall .+254 ; 0x1fd96 <getch>
|
|
|
|
- 1fc98: e8 2e mov r14, r24
|
|
|
|
- 1fc9a: ff 24 eor r15, r15
|
|
|
|
- 1fc9c: fe 2c mov r15, r14
|
|
|
|
- 1fc9e: ee 24 eor r14, r14
|
|
|
|
- 1fca0: e0 2a or r14, r16
|
|
|
|
- 1fca2: f1 2a or r15, r17
|
|
|
|
|
|
+ 1fc94: 08 2f mov r16, r24
|
|
|
|
+ 1fc96: 10 e0 ldi r17, 0x00 ; 0
|
|
|
|
+ 1fc98: a3 d0 rcall .+326 ; 0x1fde0 <getch>
|
|
|
|
+ 1fc9a: e8 2e mov r14, r24
|
|
|
|
+ 1fc9c: ff 24 eor r15, r15
|
|
|
|
+ 1fc9e: fe 2c mov r15, r14
|
|
|
|
+ 1fca0: ee 24 eor r14, r14
|
|
|
|
+ 1fca2: e0 2a or r14, r16
|
|
|
|
+ 1fca4: f1 2a or r15, r17
|
|
#ifdef RAMPZ
|
|
#ifdef RAMPZ
|
|
// Transfer top bit to RAMPZ
|
|
// Transfer top bit to RAMPZ
|
|
RAMPZ = (newAddress & 0x8000) ? 1 : 0;
|
|
RAMPZ = (newAddress & 0x8000) ? 1 : 0;
|
|
- 1fca4: 8f 2d mov r24, r15
|
|
|
|
- 1fca6: 88 1f adc r24, r24
|
|
|
|
- 1fca8: 88 27 eor r24, r24
|
|
|
|
- 1fcaa: 88 1f adc r24, r24
|
|
|
|
- 1fcac: 8b bf out 0x3b, r24 ; 59
|
|
|
|
|
|
+ 1fca6: 8f 2d mov r24, r15
|
|
|
|
+ 1fca8: 88 1f adc r24, r24
|
|
|
|
+ 1fcaa: 88 27 eor r24, r24
|
|
|
|
+ 1fcac: 88 1f adc r24, r24
|
|
|
|
+ 1fcae: 8b bf out 0x3b, r24 ; 59
|
|
#endif
|
|
#endif
|
|
newAddress += newAddress; // Convert from word address to byte address
|
|
newAddress += newAddress; // Convert from word address to byte address
|
|
- 1fcae: ee 0c add r14, r14
|
|
|
|
- 1fcb0: ff 1c adc r15, r15
|
|
|
|
- 1fcb2: 65 c0 rjmp .+202 ; 0x1fd7e <main+0x17e>
|
|
|
|
|
|
+ 1fcb0: ee 0c add r14, r14
|
|
|
|
+ 1fcb2: ff 1c adc r15, r15
|
|
address = newAddress;
|
|
address = newAddress;
|
|
verifySpace();
|
|
verifySpace();
|
|
|
|
+ 1fcb4: a7 d0 rcall .+334 ; 0x1fe04 <verifySpace>
|
|
|
|
+ 1fcb6: 67 01 movw r12, r14
|
|
|
|
+ 1fcb8: 88 c0 rjmp .+272 ; 0x1fdca <main+0x1ca>
|
|
}
|
|
}
|
|
else if(ch == STK_UNIVERSAL) {
|
|
else if(ch == STK_UNIVERSAL) {
|
|
- 1fcb4: 86 35 cpi r24, 0x56 ; 86
|
|
|
|
- 1fcb6: 21 f4 brne .+8 ; 0x1fcc0 <main+0xc0>
|
|
|
|
|
|
+ 1fcba: 86 35 cpi r24, 0x56 ; 86
|
|
|
|
+ 1fcbc: 21 f4 brne .+8 ; 0x1fcc6 <main+0xc6>
|
|
// UNIVERSAL command is ignored
|
|
// UNIVERSAL command is ignored
|
|
getNch(4);
|
|
getNch(4);
|
|
- 1fcb8: 84 e0 ldi r24, 0x04 ; 4
|
|
|
|
- 1fcba: 87 d0 rcall .+270 ; 0x1fdca <getNch>
|
|
|
|
|
|
+ 1fcbe: 84 e0 ldi r24, 0x04 ; 4
|
|
|
|
+ 1fcc0: a9 d0 rcall .+338 ; 0x1fe14 <getNch>
|
|
putch(0x00);
|
|
putch(0x00);
|
|
- 1fcbc: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
- 1fcbe: db cf rjmp .-74 ; 0x1fc76 <main+0x76>
|
|
|
|
|
|
+ 1fcc2: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
+ 1fcc4: d9 cf rjmp .-78 ; 0x1fc78 <main+0x78>
|
|
}
|
|
}
|
|
/* Write memory, length is big endian and is in bytes */
|
|
/* Write memory, length is big endian and is in bytes */
|
|
else if(ch == STK_PROG_PAGE) {
|
|
else if(ch == STK_PROG_PAGE) {
|
|
- 1fcc0: 84 36 cpi r24, 0x64 ; 100
|
|
|
|
- 1fcc2: 09 f0 breq .+2 ; 0x1fcc6 <main+0xc6>
|
|
|
|
- 1fcc4: 42 c0 rjmp .+132 ; 0x1fd4a <main+0x14a>
|
|
|
|
|
|
+ 1fcc6: 84 36 cpi r24, 0x64 ; 100
|
|
|
|
+ 1fcc8: 09 f0 breq .+2 ; 0x1fccc <main+0xcc>
|
|
|
|
+ 1fcca: 52 c0 rjmp .+164 ; 0x1fd70 <main+0x170>
|
|
// PROGRAM PAGE - we support flash programming only, not EEPROM
|
|
// PROGRAM PAGE - we support flash programming only, not EEPROM
|
|
|
|
+ uint8_t desttype;
|
|
uint8_t *bufPtr;
|
|
uint8_t *bufPtr;
|
|
- uint16_t addrPtr;
|
|
|
|
-
|
|
|
|
- getch(); /* getlen() */
|
|
|
|
- 1fcc6: 67 d0 rcall .+206 ; 0x1fd96 <getch>
|
|
|
|
- length = getch();
|
|
|
|
- 1fcc8: 66 d0 rcall .+204 ; 0x1fd96 <getch>
|
|
|
|
- 1fcca: 08 2f mov r16, r24
|
|
|
|
- getch();
|
|
|
|
- 1fccc: 64 d0 rcall .+200 ; 0x1fd96 <getch>
|
|
|
|
-
|
|
|
|
- // If we are in RWW section, immediately start page erase
|
|
|
|
- if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
|
|
|
|
- 1fcce: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
- 1fcd0: e8 16 cp r14, r24
|
|
|
|
- 1fcd2: 80 ee ldi r24, 0xE0 ; 224
|
|
|
|
- 1fcd4: f8 06 cpc r15, r24
|
|
|
|
- 1fcd6: 20 f4 brcc .+8 ; 0x1fce0 <main+0xe0>
|
|
|
|
- 1fcd8: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
- 1fcda: f7 01 movw r30, r14
|
|
|
|
- 1fcdc: 87 bf out 0x37, r24 ; 55
|
|
|
|
- 1fcde: e8 95 spm
|
|
|
|
- 1fce0: c0 e0 ldi r28, 0x00 ; 0
|
|
|
|
- 1fce2: d2 e0 ldi r29, 0x02 ; 2
|
|
|
|
-
|
|
|
|
- // While that is going on, read in page contents
|
|
|
|
|
|
+ uint16_t savelength;
|
|
|
|
+
|
|
|
|
+ length = getch()<<8; /* getlen() */
|
|
|
|
+ 1fccc: 89 d0 rcall .+274 ; 0x1fde0 <getch>
|
|
|
|
+ 1fcce: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
+ 1fcd0: 18 2f mov r17, r24
|
|
|
|
+ 1fcd2: 00 27 eor r16, r16
|
|
|
|
+ length |= getch();
|
|
|
|
+ 1fcd4: 85 d0 rcall .+266 ; 0x1fde0 <getch>
|
|
|
|
+ 1fcd6: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
+ 1fcd8: 08 2b or r16, r24
|
|
|
|
+ 1fcda: 19 2b or r17, r25
|
|
|
|
+ savelength = length;
|
|
|
|
+ desttype = getch();
|
|
|
|
+ 1fcdc: 81 d0 rcall .+258 ; 0x1fde0 <getch>
|
|
|
|
+ 1fcde: b8 2e mov r11, r24
|
|
|
|
+ 1fce0: e8 01 movw r28, r16
|
|
|
|
+ 1fce2: e1 2c mov r14, r1
|
|
|
|
+ 1fce4: a2 e0 ldi r26, 0x02 ; 2
|
|
|
|
+ 1fce6: fa 2e mov r15, r26
|
|
|
|
+
|
|
|
|
+ // read a page worth of contents
|
|
bufPtr = buff;
|
|
bufPtr = buff;
|
|
do *bufPtr++ = getch();
|
|
do *bufPtr++ = getch();
|
|
- 1fce4: 58 d0 rcall .+176 ; 0x1fd96 <getch>
|
|
|
|
- 1fce6: 89 93 st Y+, r24
|
|
|
|
|
|
+ 1fce8: 7b d0 rcall .+246 ; 0x1fde0 <getch>
|
|
|
|
+ 1fcea: f7 01 movw r30, r14
|
|
|
|
+ 1fcec: 81 93 st Z+, r24
|
|
|
|
+ 1fcee: 7f 01 movw r14, r30
|
|
while (--length);
|
|
while (--length);
|
|
- 1fce8: 0c 17 cp r16, r28
|
|
|
|
- 1fcea: e1 f7 brne .-8 ; 0x1fce4 <main+0xe4>
|
|
|
|
-
|
|
|
|
- // If we are in NRWW section, page erase has to be delayed until now.
|
|
|
|
- // Todo: Take RAMPZ into account (not doing so just means that we will
|
|
|
|
- // treat the top of both "pages" of flash as NRWW, for a slight speed
|
|
|
|
- // decrease, so fixing this is not urgent.)
|
|
|
|
- if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
|
|
|
|
- 1fcec: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
- 1fcee: ef 16 cp r14, r31
|
|
|
|
- 1fcf0: f0 ee ldi r31, 0xE0 ; 224
|
|
|
|
- 1fcf2: ff 06 cpc r15, r31
|
|
|
|
- 1fcf4: 20 f0 brcs .+8 ; 0x1fcfe <main+0xfe>
|
|
|
|
- 1fcf6: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
- 1fcf8: f7 01 movw r30, r14
|
|
|
|
- 1fcfa: 87 bf out 0x37, r24 ; 55
|
|
|
|
- 1fcfc: e8 95 spm
|
|
|
|
|
|
+ 1fcf0: 21 97 sbiw r28, 0x01 ; 1
|
|
|
|
+ 1fcf2: d1 f7 brne .-12 ; 0x1fce8 <main+0xe8>
|
|
|
|
|
|
// Read command terminator, start reply
|
|
// Read command terminator, start reply
|
|
verifySpace();
|
|
verifySpace();
|
|
- 1fcfe: 5d d0 rcall .+186 ; 0x1fdba <verifySpace>
|
|
|
|
-
|
|
|
|
- // If only a partial page is to be programmed, the erase might not be complete.
|
|
|
|
- // So check that here
|
|
|
|
- boot_spm_busy_wait();
|
|
|
|
- 1fd00: 07 b6 in r0, 0x37 ; 55
|
|
|
|
- 1fd02: 00 fc sbrc r0, 0
|
|
|
|
- 1fd04: fd cf rjmp .-6 ; 0x1fd00 <main+0x100>
|
|
|
|
- 1fd06: a7 01 movw r20, r14
|
|
|
|
- 1fd08: a0 e0 ldi r26, 0x00 ; 0
|
|
|
|
- 1fd0a: b2 e0 ldi r27, 0x02 ; 2
|
|
|
|
- bufPtr = buff;
|
|
|
|
- addrPtr = (uint16_t)(void*)address;
|
|
|
|
- ch = SPM_PAGESIZE / 2;
|
|
|
|
- do {
|
|
|
|
- uint16_t a;
|
|
|
|
- a = *bufPtr++;
|
|
|
|
- 1fd0c: 2c 91 ld r18, X
|
|
|
|
- 1fd0e: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
- a |= (*bufPtr++) << 8;
|
|
|
|
- 1fd10: 11 96 adiw r26, 0x01 ; 1
|
|
|
|
- 1fd12: 8c 91 ld r24, X
|
|
|
|
- 1fd14: 11 97 sbiw r26, 0x01 ; 1
|
|
|
|
- 1fd16: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
- 1fd18: 98 2f mov r25, r24
|
|
|
|
- 1fd1a: 88 27 eor r24, r24
|
|
|
|
- 1fd1c: 82 2b or r24, r18
|
|
|
|
- 1fd1e: 93 2b or r25, r19
|
|
|
|
-# define UART_SRL UBRR3L
|
|
|
|
-# define UART_UDR UDR3
|
|
|
|
|
|
+ 1fcf4: 87 d0 rcall .+270 ; 0x1fe04 <verifySpace>
|
|
|
|
+ * void writebuffer(memtype, buffer, address, length)
|
|
|
|
+ */
|
|
|
|
+static inline void writebuffer(int8_t memtype, uint8_t *mybuff,
|
|
|
|
+ uint16_t address, uint16_t len)
|
|
|
|
+{
|
|
|
|
+ switch (memtype) {
|
|
|
|
+ 1fcf6: f5 e4 ldi r31, 0x45 ; 69
|
|
|
|
+ 1fcf8: bf 16 cp r11, r31
|
|
|
|
+ 1fcfa: 89 f4 brne .+34 ; 0x1fd1e <main+0x11e>
|
|
|
|
+ 1fcfc: e6 01 movw r28, r12
|
|
|
|
+ 1fcfe: e1 2c mov r14, r1
|
|
|
|
+ 1fd00: f2 e0 ldi r31, 0x02 ; 2
|
|
|
|
+ 1fd02: ff 2e mov r15, r31
|
|
|
|
+ 1fd04: 08 c0 rjmp .+16 ; 0x1fd16 <main+0x116>
|
|
|
|
+ 1fd06: ce 01 movw r24, r28
|
|
|
|
+ case 'E': // EEPROM
|
|
|
|
+#if defined(SUPPORT_EEPROM) || defined(BIGBOOT)
|
|
|
|
+ while(len--) {
|
|
|
|
+ eeprom_write_byte((uint8_t *)(address++), *mybuff++);
|
|
|
|
+ 1fd08: 21 96 adiw r28, 0x01 ; 1
|
|
|
|
+ 1fd0a: f7 01 movw r30, r14
|
|
|
|
+ 1fd0c: 61 91 ld r22, Z+
|
|
|
|
+ 1fd0e: 7f 01 movw r14, r30
|
|
|
|
+ 1fd10: 97 d0 rcall .+302 ; 0x1fe40 <__eewr_byte_m1280>
|
|
|
|
+ 1fd12: 01 50 subi r16, 0x01 ; 1
|
|
|
|
+ 1fd14: 10 40 sbci r17, 0x00 ; 0
|
|
|
|
+ uint16_t address, uint16_t len)
|
|
|
|
+{
|
|
|
|
+ switch (memtype) {
|
|
|
|
+ case 'E': // EEPROM
|
|
|
|
+#if defined(SUPPORT_EEPROM) || defined(BIGBOOT)
|
|
|
|
+ while(len--) {
|
|
|
|
+ 1fd16: 01 15 cp r16, r1
|
|
|
|
+ 1fd18: 11 05 cpc r17, r1
|
|
|
|
+ 1fd1a: a9 f7 brne .-22 ; 0x1fd06 <main+0x106>
|
|
|
|
+ 1fd1c: 56 c0 rjmp .+172 ; 0x1fdca <main+0x1ca>
|
|
|
|
+ * Start the page erase and wait for it to finish. There
|
|
|
|
+ * used to be code to do this while receiving the data over
|
|
|
|
+ * the serial link, but the performance improvement was slight,
|
|
|
|
+ * and we needed the space back.
|
|
|
|
+ */
|
|
|
|
+ __boot_page_erase_short((uint16_t)(void*)address);
|
|
|
|
+ 1fd1e: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
+ 1fd20: f6 01 movw r30, r12
|
|
|
|
+ 1fd22: 87 bf out 0x37, r24 ; 55
|
|
|
|
+ 1fd24: e8 95 spm
|
|
|
|
+ boot_spm_busy_wait();
|
|
|
|
+ 1fd26: 07 b6 in r0, 0x37 ; 55
|
|
|
|
+ 1fd28: 00 fc sbrc r0, 0
|
|
|
|
+ 1fd2a: fd cf rjmp .-6 ; 0x1fd26 <main+0x126>
|
|
|
|
+ 1fd2c: b8 01 movw r22, r16
|
|
|
|
+ 1fd2e: a6 01 movw r20, r12
|
|
|
|
+ 1fd30: a0 e0 ldi r26, 0x00 ; 0
|
|
|
|
+ 1fd32: b2 e0 ldi r27, 0x02 ; 2
|
|
|
|
+ /*
|
|
|
|
+ * Copy data from the buffer into the flash write buffer.
|
|
|
|
+ */
|
|
|
|
+ do {
|
|
|
|
+ uint16_t a;
|
|
|
|
+ a = *bufPtr++;
|
|
|
|
+ 1fd34: 2c 91 ld r18, X
|
|
|
|
+ 1fd36: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
+ a |= (*bufPtr++) << 8;
|
|
|
|
+ 1fd38: 11 96 adiw r26, 0x01 ; 1
|
|
|
|
+ 1fd3a: 8c 91 ld r24, X
|
|
|
|
+ 1fd3c: 11 97 sbiw r26, 0x01 ; 1
|
|
|
|
+ 1fd3e: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
+ 1fd40: 98 2f mov r25, r24
|
|
|
|
+ 1fd42: 88 27 eor r24, r24
|
|
|
|
+ 1fd44: 82 2b or r24, r18
|
|
|
|
+ 1fd46: 93 2b or r25, r19
|
|
|
|
+#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+
|
|
/* main program starts here */
|
|
/* main program starts here */
|
|
int main(void) {
|
|
int main(void) {
|
|
- 1fd20: 12 96 adiw r26, 0x02 ; 2
|
|
|
|
- ch = SPM_PAGESIZE / 2;
|
|
|
|
- do {
|
|
|
|
- uint16_t a;
|
|
|
|
- a = *bufPtr++;
|
|
|
|
- a |= (*bufPtr++) << 8;
|
|
|
|
- __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
|
|
|
|
- 1fd22: fa 01 movw r30, r20
|
|
|
|
- 1fd24: 0c 01 movw r0, r24
|
|
|
|
- 1fd26: b7 be out 0x37, r11 ; 55
|
|
|
|
- 1fd28: e8 95 spm
|
|
|
|
- 1fd2a: 11 24 eor r1, r1
|
|
|
|
- addrPtr += 2;
|
|
|
|
- 1fd2c: 4e 5f subi r20, 0xFE ; 254
|
|
|
|
- 1fd2e: 5f 4f sbci r21, 0xFF ; 255
|
|
|
|
- } while (--ch);
|
|
|
|
- 1fd30: f3 e0 ldi r31, 0x03 ; 3
|
|
|
|
- 1fd32: a0 30 cpi r26, 0x00 ; 0
|
|
|
|
- 1fd34: bf 07 cpc r27, r31
|
|
|
|
- 1fd36: 51 f7 brne .-44 ; 0x1fd0c <main+0x10c>
|
|
|
|
-
|
|
|
|
- // Write from programming buffer
|
|
|
|
- __boot_page_write_short((uint16_t)(void*)address);
|
|
|
|
- 1fd38: f7 01 movw r30, r14
|
|
|
|
- 1fd3a: c7 be out 0x37, r12 ; 55
|
|
|
|
- 1fd3c: e8 95 spm
|
|
|
|
- boot_spm_busy_wait();
|
|
|
|
- 1fd3e: 07 b6 in r0, 0x37 ; 55
|
|
|
|
- 1fd40: 00 fc sbrc r0, 0
|
|
|
|
- 1fd42: fd cf rjmp .-6 ; 0x1fd3e <main+0x13e>
|
|
|
|
-
|
|
|
|
|
|
+ 1fd48: 12 96 adiw r26, 0x02 ; 2
|
|
|
|
+ */
|
|
|
|
+ do {
|
|
|
|
+ uint16_t a;
|
|
|
|
+ a = *bufPtr++;
|
|
|
|
+ a |= (*bufPtr++) << 8;
|
|
|
|
+ __boot_page_fill_short((uint16_t)(void*)addrPtr,a);
|
|
|
|
+ 1fd4a: fa 01 movw r30, r20
|
|
|
|
+ 1fd4c: 0c 01 movw r0, r24
|
|
|
|
+ 1fd4e: 87 be out 0x37, r8 ; 55
|
|
|
|
+ 1fd50: e8 95 spm
|
|
|
|
+ 1fd52: 11 24 eor r1, r1
|
|
|
|
+ addrPtr += 2;
|
|
|
|
+ 1fd54: 4e 5f subi r20, 0xFE ; 254
|
|
|
|
+ 1fd56: 5f 4f sbci r21, 0xFF ; 255
|
|
|
|
+ } while (len -= 2);
|
|
|
|
+ 1fd58: 62 50 subi r22, 0x02 ; 2
|
|
|
|
+ 1fd5a: 70 40 sbci r23, 0x00 ; 0
|
|
|
|
+ 1fd5c: 59 f7 brne .-42 ; 0x1fd34 <main+0x134>
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Actually Write the buffer to flash (and wait for it to finish.)
|
|
|
|
+ */
|
|
|
|
+ __boot_page_write_short((uint16_t)(void*)address);
|
|
|
|
+ 1fd5e: f6 01 movw r30, r12
|
|
|
|
+ 1fd60: a7 be out 0x37, r10 ; 55
|
|
|
|
+ 1fd62: e8 95 spm
|
|
|
|
+ boot_spm_busy_wait();
|
|
|
|
+ 1fd64: 07 b6 in r0, 0x37 ; 55
|
|
|
|
+ 1fd66: 00 fc sbrc r0, 0
|
|
|
|
+ 1fd68: fd cf rjmp .-6 ; 0x1fd64 <main+0x164>
|
|
#if defined(RWWSRE)
|
|
#if defined(RWWSRE)
|
|
- // Reenable read access to flash
|
|
|
|
- boot_rww_enable();
|
|
|
|
- 1fd44: d7 be out 0x37, r13 ; 55
|
|
|
|
- 1fd46: e8 95 spm
|
|
|
|
- 1fd48: 1b c0 rjmp .+54 ; 0x1fd80 <main+0x180>
|
|
|
|
-#endif
|
|
|
|
|
|
+ // Reenable read access to flash
|
|
|
|
+ boot_rww_enable();
|
|
|
|
+ 1fd6a: 97 be out 0x37, r9 ; 55
|
|
|
|
+ 1fd6c: e8 95 spm
|
|
|
|
+ 1fd6e: 2d c0 rjmp .+90 ; 0x1fdca <main+0x1ca>
|
|
|
|
+ writebuffer(desttype, buff, address, savelength);
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
/* Read memory block mode, length is big endian. */
|
|
/* Read memory block mode, length is big endian. */
|
|
else if(ch == STK_READ_PAGE) {
|
|
else if(ch == STK_READ_PAGE) {
|
|
- 1fd4a: 84 37 cpi r24, 0x74 ; 116
|
|
|
|
- 1fd4c: 61 f4 brne .+24 ; 0x1fd66 <main+0x166>
|
|
|
|
- // READ PAGE - we only read flash
|
|
|
|
- getch(); /* getlen() */
|
|
|
|
- 1fd4e: 23 d0 rcall .+70 ; 0x1fd96 <getch>
|
|
|
|
- length = getch();
|
|
|
|
- 1fd50: 22 d0 rcall .+68 ; 0x1fd96 <getch>
|
|
|
|
- 1fd52: 08 2f mov r16, r24
|
|
|
|
- getch();
|
|
|
|
- 1fd54: 20 d0 rcall .+64 ; 0x1fd96 <getch>
|
|
|
|
|
|
+ 1fd70: 84 37 cpi r24, 0x74 ; 116
|
|
|
|
+ 1fd72: f1 f4 brne .+60 ; 0x1fdb0 <main+0x1b0>
|
|
|
|
+ uint8_t desttype;
|
|
|
|
+ length = getch()<<8; /* getlen() */
|
|
|
|
+ 1fd74: 35 d0 rcall .+106 ; 0x1fde0 <getch>
|
|
|
|
+ 1fd76: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
+ 1fd78: d8 2f mov r29, r24
|
|
|
|
+ 1fd7a: cc 27 eor r28, r28
|
|
|
|
+ length |= getch();
|
|
|
|
+ 1fd7c: 31 d0 rcall .+98 ; 0x1fde0 <getch>
|
|
|
|
+ 1fd7e: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
+ 1fd80: c8 2b or r28, r24
|
|
|
|
+ 1fd82: d9 2b or r29, r25
|
|
|
|
+ desttype = getch();
|
|
|
|
+ 1fd84: 2d d0 rcall .+90 ; 0x1fde0 <getch>
|
|
|
|
+ 1fd86: 18 2f mov r17, r24
|
|
|
|
|
|
verifySpace();
|
|
verifySpace();
|
|
- 1fd56: 31 d0 rcall .+98 ; 0x1fdba <verifySpace>
|
|
|
|
- __asm__ ("elpm %0,Z+\n" : "=r" (ch), "=z" (address): "1" (address));
|
|
|
|
|
|
+ 1fd88: 3d d0 rcall .+122 ; 0x1fe04 <verifySpace>
|
|
|
|
+
|
|
|
|
+static inline void read_mem(uint8_t memtype, uint16_t address, uint16_t length)
|
|
|
|
+{
|
|
|
|
+ uint8_t ch;
|
|
|
|
+
|
|
|
|
+ switch (memtype) {
|
|
|
|
+ 1fd8a: 15 34 cpi r17, 0x45 ; 69
|
|
|
|
+ 1fd8c: 49 f4 brne .+18 ; 0x1fda0 <main+0x1a0>
|
|
|
|
+ 1fd8e: 86 01 movw r16, r12
|
|
|
|
+ 1fd90: c8 01 movw r24, r16
|
|
|
|
+
|
|
|
|
+#if defined(SUPPORT_EEPROM) || defined(BIGBOOT)
|
|
|
|
+ case 'E': // EEPROM
|
|
|
|
+ do {
|
|
|
|
+ putch(eeprom_read_byte((uint8_t *)(address++)));
|
|
|
|
+ 1fd92: 0f 5f subi r16, 0xFF ; 255
|
|
|
|
+ 1fd94: 1f 4f sbci r17, 0xFF ; 255
|
|
|
|
+ 1fd96: 4c d0 rcall .+152 ; 0x1fe30 <__eerd_byte_m1280>
|
|
|
|
+ 1fd98: 1b d0 rcall .+54 ; 0x1fdd0 <putch>
|
|
|
|
+ } while (--length);
|
|
|
|
+ 1fd9a: 21 97 sbiw r28, 0x01 ; 1
|
|
|
|
+ 1fd9c: c9 f7 brne .-14 ; 0x1fd90 <main+0x190>
|
|
|
|
+ 1fd9e: 15 c0 rjmp .+42 ; 0x1fdca <main+0x1ca>
|
|
|
|
+ 1fda0: 86 01 movw r16, r12
|
|
|
|
+ __asm__ ("elpm %0,Z+\n" : "=r" (ch), "=z" (address): "1" (address));
|
|
#else
|
|
#else
|
|
- // read a Flash byte and increment the address
|
|
|
|
- __asm__ ("lpm %0,Z+\n" : "=r" (ch), "=z" (address): "1" (address));
|
|
|
|
|
|
+ // read a Flash byte and increment the address
|
|
|
|
+ __asm__ ("lpm %0,Z+\n" : "=r" (ch), "=z" (address): "1" (address));
|
|
#endif
|
|
#endif
|
|
- putch(ch);
|
|
|
|
- 1fd58: f7 01 movw r30, r14
|
|
|
|
- 1fd5a: 87 91 elpm r24, Z+
|
|
|
|
- 1fd5c: 7f 01 movw r14, r30
|
|
|
|
- 1fd5e: 13 d0 rcall .+38 ; 0x1fd86 <putch>
|
|
|
|
- } while (--length);
|
|
|
|
- 1fd60: 01 50 subi r16, 0x01 ; 1
|
|
|
|
- 1fd62: d1 f7 brne .-12 ; 0x1fd58 <main+0x158>
|
|
|
|
- 1fd64: 0d c0 rjmp .+26 ; 0x1fd80 <main+0x180>
|
|
|
|
|
|
+ putch(ch);
|
|
|
|
+ 1fda2: f8 01 movw r30, r16
|
|
|
|
+ 1fda4: 87 91 elpm r24, Z+
|
|
|
|
+ 1fda6: 8f 01 movw r16, r30
|
|
|
|
+ 1fda8: 13 d0 rcall .+38 ; 0x1fdd0 <putch>
|
|
|
|
+ } while (--length);
|
|
|
|
+ 1fdaa: 21 97 sbiw r28, 0x01 ; 1
|
|
|
|
+ 1fdac: d1 f7 brne .-12 ; 0x1fda2 <main+0x1a2>
|
|
|
|
+ 1fdae: 0d c0 rjmp .+26 ; 0x1fdca <main+0x1ca>
|
|
|
|
+
|
|
|
|
+ read_mem(desttype, address, length);
|
|
}
|
|
}
|
|
|
|
|
|
/* Get device signature bytes */
|
|
/* Get device signature bytes */
|
|
else if(ch == STK_READ_SIGN) {
|
|
else if(ch == STK_READ_SIGN) {
|
|
- 1fd66: 85 37 cpi r24, 0x75 ; 117
|
|
|
|
- 1fd68: 31 f4 brne .+12 ; 0x1fd76 <main+0x176>
|
|
|
|
|
|
+ 1fdb0: 85 37 cpi r24, 0x75 ; 117
|
|
|
|
+ 1fdb2: 31 f4 brne .+12 ; 0x1fdc0 <main+0x1c0>
|
|
// READ SIGN - return what Avrdude wants to hear
|
|
// READ SIGN - return what Avrdude wants to hear
|
|
verifySpace();
|
|
verifySpace();
|
|
- 1fd6a: 27 d0 rcall .+78 ; 0x1fdba <verifySpace>
|
|
|
|
|
|
+ 1fdb4: 27 d0 rcall .+78 ; 0x1fe04 <verifySpace>
|
|
putch(SIGNATURE_0);
|
|
putch(SIGNATURE_0);
|
|
- 1fd6c: 8e e1 ldi r24, 0x1E ; 30
|
|
|
|
- 1fd6e: 0b d0 rcall .+22 ; 0x1fd86 <putch>
|
|
|
|
|
|
+ 1fdb6: 8e e1 ldi r24, 0x1E ; 30
|
|
|
|
+ 1fdb8: 0b d0 rcall .+22 ; 0x1fdd0 <putch>
|
|
putch(SIGNATURE_1);
|
|
putch(SIGNATURE_1);
|
|
- 1fd70: 87 e9 ldi r24, 0x97 ; 151
|
|
|
|
- 1fd72: 09 d0 rcall .+18 ; 0x1fd86 <putch>
|
|
|
|
- 1fd74: 7f cf rjmp .-258 ; 0x1fc74 <main+0x74>
|
|
|
|
|
|
+ 1fdba: 87 e9 ldi r24, 0x97 ; 151
|
|
|
|
+ 1fdbc: 09 d0 rcall .+18 ; 0x1fdd0 <putch>
|
|
|
|
+ 1fdbe: 5b cf rjmp .-330 ; 0x1fc76 <main+0x76>
|
|
putch(SIGNATURE_2);
|
|
putch(SIGNATURE_2);
|
|
}
|
|
}
|
|
else if (ch == STK_LEAVE_PROGMODE) { /* 'Q' */
|
|
else if (ch == STK_LEAVE_PROGMODE) { /* 'Q' */
|
|
- 1fd76: 81 35 cpi r24, 0x51 ; 81
|
|
|
|
- 1fd78: 11 f4 brne .+4 ; 0x1fd7e <main+0x17e>
|
|
|
|
|
|
+ 1fdc0: 81 35 cpi r24, 0x51 ; 81
|
|
|
|
+ 1fdc2: 11 f4 brne .+4 ; 0x1fdc8 <main+0x1c8>
|
|
// Adaboot no-wait mod
|
|
// Adaboot no-wait mod
|
|
watchdogConfig(WATCHDOG_16MS);
|
|
watchdogConfig(WATCHDOG_16MS);
|
|
- 1fd7a: 88 e0 ldi r24, 0x08 ; 8
|
|
|
|
- 1fd7c: 18 d0 rcall .+48 ; 0x1fdae <watchdogConfig>
|
|
|
|
|
|
+ 1fdc4: 88 e0 ldi r24, 0x08 ; 8
|
|
|
|
+ 1fdc6: 18 d0 rcall .+48 ; 0x1fdf8 <watchdogConfig>
|
|
verifySpace();
|
|
verifySpace();
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
// This covers the response to commands like STK_ENTER_PROGMODE
|
|
// This covers the response to commands like STK_ENTER_PROGMODE
|
|
verifySpace();
|
|
verifySpace();
|
|
- 1fd7e: 1d d0 rcall .+58 ; 0x1fdba <verifySpace>
|
|
|
|
|
|
+ 1fdc8: 1d d0 rcall .+58 ; 0x1fe04 <verifySpace>
|
|
}
|
|
}
|
|
putch(STK_OK);
|
|
putch(STK_OK);
|
|
- 1fd80: 80 e1 ldi r24, 0x10 ; 16
|
|
|
|
- 1fd82: 01 d0 rcall .+2 ; 0x1fd86 <putch>
|
|
|
|
- 1fd84: 6b cf rjmp .-298 ; 0x1fc5c <main+0x5c>
|
|
|
|
|
|
+ 1fdca: 80 e1 ldi r24, 0x10 ; 16
|
|
|
|
+ 1fdcc: 01 d0 rcall .+2 ; 0x1fdd0 <putch>
|
|
|
|
+ 1fdce: 47 cf rjmp .-370 ; 0x1fc5e <main+0x5e>
|
|
|
|
|
|
-0001fd86 <putch>:
|
|
|
|
|
|
+0001fdd0 <putch>:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
void putch(char ch) {
|
|
void putch(char ch) {
|
|
- 1fd86: 98 2f mov r25, r24
|
|
|
|
|
|
+ 1fdd0: 98 2f mov r25, r24
|
|
#ifndef SOFT_UART
|
|
#ifndef SOFT_UART
|
|
while (!(UART_SRA & _BV(UDRE0)));
|
|
while (!(UART_SRA & _BV(UDRE0)));
|
|
- 1fd88: 80 91 c0 00 lds r24, 0x00C0
|
|
|
|
- 1fd8c: 85 ff sbrs r24, 5
|
|
|
|
- 1fd8e: fc cf rjmp .-8 ; 0x1fd88 <putch+0x2>
|
|
|
|
|
|
+ 1fdd2: 80 91 c0 00 lds r24, 0x00C0
|
|
|
|
+ 1fdd6: 85 ff sbrs r24, 5
|
|
|
|
+ 1fdd8: fc cf rjmp .-8 ; 0x1fdd2 <putch+0x2>
|
|
UART_UDR = ch;
|
|
UART_UDR = ch;
|
|
- 1fd90: 90 93 c6 00 sts 0x00C6, r25
|
|
|
|
|
|
+ 1fdda: 90 93 c6 00 sts 0x00C6, r25
|
|
[uartBit] "I" (UART_TX_BIT)
|
|
[uartBit] "I" (UART_TX_BIT)
|
|
:
|
|
:
|
|
"r25"
|
|
"r25"
|
|
);
|
|
);
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
- 1fd94: 08 95 ret
|
|
|
|
|
|
+ 1fdde: 08 95 ret
|
|
|
|
|
|
-0001fd96 <getch>:
|
|
|
|
|
|
+0001fde0 <getch>:
|
|
[uartBit] "I" (UART_RX_BIT)
|
|
[uartBit] "I" (UART_RX_BIT)
|
|
:
|
|
:
|
|
"r25"
|
|
"r25"
|
|
);
|
|
);
|
|
#else
|
|
#else
|
|
while(!(UART_SRA & _BV(RXC0)))
|
|
while(!(UART_SRA & _BV(RXC0)))
|
|
- 1fd96: 80 91 c0 00 lds r24, 0x00C0
|
|
|
|
- 1fd9a: 87 ff sbrs r24, 7
|
|
|
|
- 1fd9c: fc cf rjmp .-8 ; 0x1fd96 <getch>
|
|
|
|
|
|
+ 1fde0: 80 91 c0 00 lds r24, 0x00C0
|
|
|
|
+ 1fde4: 87 ff sbrs r24, 7
|
|
|
|
+ 1fde6: fc cf rjmp .-8 ; 0x1fde0 <getch>
|
|
;
|
|
;
|
|
if (!(UART_SRA & _BV(FE0))) {
|
|
if (!(UART_SRA & _BV(FE0))) {
|
|
- 1fd9e: 80 91 c0 00 lds r24, 0x00C0
|
|
|
|
- 1fda2: 84 fd sbrc r24, 4
|
|
|
|
- 1fda4: 01 c0 rjmp .+2 ; 0x1fda8 <getch+0x12>
|
|
|
|
|
|
+ 1fde8: 80 91 c0 00 lds r24, 0x00C0
|
|
|
|
+ 1fdec: 84 fd sbrc r24, 4
|
|
|
|
+ 1fdee: 01 c0 rjmp .+2 ; 0x1fdf2 <getch+0x12>
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
// Watchdog functions. These are only safe with interrupts turned off.
|
|
// Watchdog functions. These are only safe with interrupts turned off.
|
|
void watchdogReset() {
|
|
void watchdogReset() {
|
|
__asm__ __volatile__ (
|
|
__asm__ __volatile__ (
|
|
- 1fda6: a8 95 wdr
|
|
|
|
|
|
+ 1fdf0: a8 95 wdr
|
|
* don't care that an invalid char is returned...)
|
|
* don't care that an invalid char is returned...)
|
|
*/
|
|
*/
|
|
watchdogReset();
|
|
watchdogReset();
|
|
}
|
|
}
|
|
|
|
|
|
ch = UART_UDR;
|
|
ch = UART_UDR;
|
|
- 1fda8: 80 91 c6 00 lds r24, 0x00C6
|
|
|
|
|
|
+ 1fdf2: 80 91 c6 00 lds r24, 0x00C6
|
|
LED_PIN |= _BV(LED);
|
|
LED_PIN |= _BV(LED);
|
|
#endif
|
|
#endif
|
|
#endif
|
|
#endif
|
|
|
|
|
|
return ch;
|
|
return ch;
|
|
}
|
|
}
|
|
- 1fdac: 08 95 ret
|
|
|
|
|
|
+ 1fdf6: 08 95 ret
|
|
|
|
|
|
-0001fdae <watchdogConfig>:
|
|
|
|
|
|
+0001fdf8 <watchdogConfig>:
|
|
"wdr\n"
|
|
"wdr\n"
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
void watchdogConfig(uint8_t x) {
|
|
void watchdogConfig(uint8_t x) {
|
|
WDTCSR = _BV(WDCE) | _BV(WDE);
|
|
WDTCSR = _BV(WDCE) | _BV(WDE);
|
|
- 1fdae: e0 e6 ldi r30, 0x60 ; 96
|
|
|
|
- 1fdb0: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
- 1fdb2: 98 e1 ldi r25, 0x18 ; 24
|
|
|
|
- 1fdb4: 90 83 st Z, r25
|
|
|
|
|
|
+ 1fdf8: e0 e6 ldi r30, 0x60 ; 96
|
|
|
|
+ 1fdfa: f0 e0 ldi r31, 0x00 ; 0
|
|
|
|
+ 1fdfc: 98 e1 ldi r25, 0x18 ; 24
|
|
|
|
+ 1fdfe: 90 83 st Z, r25
|
|
WDTCSR = x;
|
|
WDTCSR = x;
|
|
- 1fdb6: 80 83 st Z, r24
|
|
|
|
|
|
+ 1fe00: 80 83 st Z, r24
|
|
}
|
|
}
|
|
- 1fdb8: 08 95 ret
|
|
|
|
|
|
+ 1fe02: 08 95 ret
|
|
|
|
|
|
-0001fdba <verifySpace>:
|
|
|
|
|
|
+0001fe04 <verifySpace>:
|
|
do getch(); while (--count);
|
|
do getch(); while (--count);
|
|
verifySpace();
|
|
verifySpace();
|
|
}
|
|
}
|
|
|
|
|
|
void verifySpace() {
|
|
void verifySpace() {
|
|
if (getch() != CRC_EOP) {
|
|
if (getch() != CRC_EOP) {
|
|
- 1fdba: ed df rcall .-38 ; 0x1fd96 <getch>
|
|
|
|
- 1fdbc: 80 32 cpi r24, 0x20 ; 32
|
|
|
|
- 1fdbe: 19 f0 breq .+6 ; 0x1fdc6 <verifySpace+0xc>
|
|
|
|
|
|
+ 1fe04: ed df rcall .-38 ; 0x1fde0 <getch>
|
|
|
|
+ 1fe06: 80 32 cpi r24, 0x20 ; 32
|
|
|
|
+ 1fe08: 19 f0 breq .+6 ; 0x1fe10 <verifySpace+0xc>
|
|
watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
|
|
watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
|
|
- 1fdc0: 88 e0 ldi r24, 0x08 ; 8
|
|
|
|
- 1fdc2: f5 df rcall .-22 ; 0x1fdae <watchdogConfig>
|
|
|
|
- 1fdc4: ff cf rjmp .-2 ; 0x1fdc4 <verifySpace+0xa>
|
|
|
|
|
|
+ 1fe0a: 88 e0 ldi r24, 0x08 ; 8
|
|
|
|
+ 1fe0c: f5 df rcall .-22 ; 0x1fdf8 <watchdogConfig>
|
|
|
|
+ 1fe0e: ff cf rjmp .-2 ; 0x1fe0e <verifySpace+0xa>
|
|
while (1) // and busy-loop so that WD causes
|
|
while (1) // and busy-loop so that WD causes
|
|
; // a reset and app start.
|
|
; // a reset and app start.
|
|
}
|
|
}
|
|
putch(STK_INSYNC);
|
|
putch(STK_INSYNC);
|
|
- 1fdc6: 84 e1 ldi r24, 0x14 ; 20
|
|
|
|
|
|
+ 1fe10: 84 e1 ldi r24, 0x14 ; 20
|
|
}
|
|
}
|
|
- 1fdc8: de cf rjmp .-68 ; 0x1fd86 <putch>
|
|
|
|
|
|
+ 1fe12: de cf rjmp .-68 ; 0x1fdd0 <putch>
|
|
|
|
|
|
-0001fdca <getNch>:
|
|
|
|
|
|
+0001fe14 <getNch>:
|
|
::[count] "M" (UART_B_VALUE)
|
|
::[count] "M" (UART_B_VALUE)
|
|
);
|
|
);
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
void getNch(uint8_t count) {
|
|
void getNch(uint8_t count) {
|
|
- 1fdca: 1f 93 push r17
|
|
|
|
- 1fdcc: 18 2f mov r17, r24
|
|
|
|
|
|
+ 1fe14: 1f 93 push r17
|
|
|
|
+ 1fe16: 18 2f mov r17, r24
|
|
do getch(); while (--count);
|
|
do getch(); while (--count);
|
|
- 1fdce: e3 df rcall .-58 ; 0x1fd96 <getch>
|
|
|
|
- 1fdd0: 11 50 subi r17, 0x01 ; 1
|
|
|
|
- 1fdd2: e9 f7 brne .-6 ; 0x1fdce <getNch+0x4>
|
|
|
|
|
|
+ 1fe18: e3 df rcall .-58 ; 0x1fde0 <getch>
|
|
|
|
+ 1fe1a: 11 50 subi r17, 0x01 ; 1
|
|
|
|
+ 1fe1c: e9 f7 brne .-6 ; 0x1fe18 <getNch+0x4>
|
|
verifySpace();
|
|
verifySpace();
|
|
- 1fdd4: f2 df rcall .-28 ; 0x1fdba <verifySpace>
|
|
|
|
|
|
+ 1fe1e: f2 df rcall .-28 ; 0x1fe04 <verifySpace>
|
|
}
|
|
}
|
|
- 1fdd6: 1f 91 pop r17
|
|
|
|
- 1fdd8: 08 95 ret
|
|
|
|
|
|
+ 1fe20: 1f 91 pop r17
|
|
|
|
+ 1fe22: 08 95 ret
|
|
|
|
|
|
-0001fdda <appStart>:
|
|
|
|
|
|
+0001fe24 <appStart>:
|
|
|
|
|
|
void appStart(uint8_t rstFlags) {
|
|
void appStart(uint8_t rstFlags) {
|
|
// save the reset flags in the designated register
|
|
// save the reset flags in the designated register
|
|
// This can be saved in a main program by putting code in .init0 (which
|
|
// This can be saved in a main program by putting code in .init0 (which
|
|
// executes before normal c init code) to save R2 to a global variable.
|
|
// executes before normal c init code) to save R2 to a global variable.
|
|
__asm__ __volatile__ ("mov r2, %0\n" :: "r" (rstFlags));
|
|
__asm__ __volatile__ ("mov r2, %0\n" :: "r" (rstFlags));
|
|
- 1fdda: 28 2e mov r2, r24
|
|
|
|
|
|
+ 1fe24: 28 2e mov r2, r24
|
|
|
|
|
|
watchdogConfig(WATCHDOG_OFF);
|
|
watchdogConfig(WATCHDOG_OFF);
|
|
- 1fddc: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
- 1fdde: e7 df rcall .-50 ; 0x1fdae <watchdogConfig>
|
|
|
|
|
|
+ 1fe26: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
+ 1fe28: e7 df rcall .-50 ; 0x1fdf8 <watchdogConfig>
|
|
__asm__ __volatile__ (
|
|
__asm__ __volatile__ (
|
|
- 1fde0: ee 27 eor r30, r30
|
|
|
|
- 1fde2: ff 27 eor r31, r31
|
|
|
|
- 1fde4: 09 94 ijmp
|
|
|
|
|
|
+ 1fe2a: ee 27 eor r30, r30
|
|
|
|
+ 1fe2c: ff 27 eor r31, r31
|
|
|
|
+ 1fe2e: 09 94 ijmp
|
|
|
|
+
|
|
|
|
+0001fe30 <__eerd_byte_m1280>:
|
|
|
|
+ 1fe30: f9 99 sbic 0x1f, 1 ; 31
|
|
|
|
+ 1fe32: fe cf rjmp .-4 ; 0x1fe30 <__eerd_byte_m1280>
|
|
|
|
+ 1fe34: 92 bd out 0x22, r25 ; 34
|
|
|
|
+ 1fe36: 81 bd out 0x21, r24 ; 33
|
|
|
|
+ 1fe38: f8 9a sbi 0x1f, 0 ; 31
|
|
|
|
+ 1fe3a: 99 27 eor r25, r25
|
|
|
|
+ 1fe3c: 80 b5 in r24, 0x20 ; 32
|
|
|
|
+ 1fe3e: 08 95 ret
|
|
|
|
+
|
|
|
|
+0001fe40 <__eewr_byte_m1280>:
|
|
|
|
+ 1fe40: 26 2f mov r18, r22
|
|
|
|
+
|
|
|
|
+0001fe42 <__eewr_r18_m1280>:
|
|
|
|
+ 1fe42: f9 99 sbic 0x1f, 1 ; 31
|
|
|
|
+ 1fe44: fe cf rjmp .-4 ; 0x1fe42 <__eewr_r18_m1280>
|
|
|
|
+ 1fe46: 1f ba out 0x1f, r1 ; 31
|
|
|
|
+ 1fe48: 92 bd out 0x22, r25 ; 34
|
|
|
|
+ 1fe4a: 81 bd out 0x21, r24 ; 33
|
|
|
|
+ 1fe4c: 20 bd out 0x20, r18 ; 32
|
|
|
|
+ 1fe4e: 0f b6 in r0, 0x3f ; 63
|
|
|
|
+ 1fe50: f8 94 cli
|
|
|
|
+ 1fe52: fa 9a sbi 0x1f, 2 ; 31
|
|
|
|
+ 1fe54: f9 9a sbi 0x1f, 1 ; 31
|
|
|
|
+ 1fe56: 0f be out 0x3f, r0 ; 63
|
|
|
|
+ 1fe58: 01 96 adiw r24, 0x01 ; 1
|
|
|
|
+ 1fe5a: 08 95 ret
|