kaboard/optiboot/optiboot_kaboard.lst

329 lines
12 KiB
Plaintext

optiboot_kaboard.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 000001bc 00001e00 00001e00 00000074 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .version 00000002 00001ffe 00001ffe 00000230 2**0
CONTENTS, READONLY
2 .data 00000000 00800060 00001fbc 00000230 2**0
CONTENTS, ALLOC, LOAD, DATA
3 .stab 00000a74 00000000 00000000 00000234 2**2
CONTENTS, READONLY, DEBUGGING
4 .stabstr 00000899 00000000 00000000 00000ca8 2**0
CONTENTS, READONLY, DEBUGGING
5 .comment 00000011 00000000 00000000 00001541 2**0
CONTENTS, READONLY
Disassembly of section .text:
00001e00 <main>:
1e00: 11 24 eor r1, r1
1e02: 8f e5 ldi r24, 0x5F ; 95
1e04: 94 e0 ldi r25, 0x04 ; 4
1e06: 9e bf out 0x3e, r25 ; 62
1e08: 8d bf out 0x3d, r24 ; 61
1e0a: 84 b7 in r24, 0x34 ; 52
1e0c: 14 be out 0x34, r1 ; 52
1e0e: 81 ff sbrs r24, 1
1e10: d0 d0 rcall .+416 ; 0x1fb2 <appStart>
1e12: 82 e0 ldi r24, 0x02 ; 2
1e14: 8b b9 out 0x0b, r24 ; 11
1e16: 88 e1 ldi r24, 0x18 ; 24
1e18: 8a b9 out 0x0a, r24 ; 10
1e1a: 86 e8 ldi r24, 0x86 ; 134
1e1c: 80 bd out 0x20, r24 ; 32
1e1e: 80 e1 ldi r24, 0x10 ; 16
1e20: 89 b9 out 0x09, r24 ; 9
1e22: 8e e0 ldi r24, 0x0E ; 14
1e24: b3 d0 rcall .+358 ; 0x1f8c <watchdogConfig>
1e26: bd 9a sbi 0x17, 5 ; 23
1e28: 81 2c mov r8, r1
1e2a: 91 2c mov r9, r1
1e2c: ee 24 eor r14, r14
1e2e: e3 94 inc r14
1e30: 95 e0 ldi r25, 0x05 ; 5
1e32: d9 2e mov r13, r25
1e34: 21 e1 ldi r18, 0x11 ; 17
1e36: c2 2e mov r12, r18
1e38: 33 e0 ldi r19, 0x03 ; 3
1e3a: f3 2e mov r15, r19
1e3c: a0 d0 rcall .+320 ; 0x1f7e <getch>
1e3e: 81 34 cpi r24, 0x41 ; 65
1e40: 89 f4 brne .+34 ; 0x1e64 <main+0x64>
1e42: 9d d0 rcall .+314 ; 0x1f7e <getch>
1e44: 89 83 std Y+1, r24 ; 0x01
1e46: a6 d0 rcall .+332 ; 0x1f94 <verifySpace>
1e48: 89 81 ldd r24, Y+1 ; 0x01
1e4a: 82 38 cpi r24, 0x82 ; 130
1e4c: 19 f4 brne .+6 ; 0x1e54 <main+0x54>
1e4e: 84 e0 ldi r24, 0x04 ; 4
1e50: 92 d0 rcall .+292 ; 0x1f76 <putch>
1e52: 8e c0 rjmp .+284 ; 0x1f70 <main+0x170>
1e54: 81 38 cpi r24, 0x81 ; 129
1e56: 19 f4 brne .+6 ; 0x1e5e <main+0x5e>
1e58: 84 e0 ldi r24, 0x04 ; 4
1e5a: 8d d0 rcall .+282 ; 0x1f76 <putch>
1e5c: 89 c0 rjmp .+274 ; 0x1f70 <main+0x170>
1e5e: 83 e0 ldi r24, 0x03 ; 3
1e60: 8a d0 rcall .+276 ; 0x1f76 <putch>
1e62: 86 c0 rjmp .+268 ; 0x1f70 <main+0x170>
1e64: 82 34 cpi r24, 0x42 ; 66
1e66: 19 f4 brne .+6 ; 0x1e6e <main+0x6e>
1e68: 84 e1 ldi r24, 0x14 ; 20
1e6a: 9c d0 rcall .+312 ; 0x1fa4 <getNch>
1e6c: 81 c0 rjmp .+258 ; 0x1f70 <main+0x170>
1e6e: 85 34 cpi r24, 0x45 ; 69
1e70: 19 f4 brne .+6 ; 0x1e78 <main+0x78>
1e72: 85 e0 ldi r24, 0x05 ; 5
1e74: 97 d0 rcall .+302 ; 0x1fa4 <getNch>
1e76: 7c c0 rjmp .+248 ; 0x1f70 <main+0x170>
1e78: 85 35 cpi r24, 0x55 ; 85
1e7a: 49 f4 brne .+18 ; 0x1e8e <main+0x8e>
1e7c: 80 d0 rcall .+256 ; 0x1f7e <getch>
1e7e: 88 2e mov r8, r24
1e80: 7e d0 rcall .+252 ; 0x1f7e <getch>
1e82: 91 2c mov r9, r1
1e84: 98 2a or r9, r24
1e86: 88 0c add r8, r8
1e88: 99 1c adc r9, r9
1e8a: 84 d0 rcall .+264 ; 0x1f94 <verifySpace>
1e8c: 71 c0 rjmp .+226 ; 0x1f70 <main+0x170>
1e8e: 86 35 cpi r24, 0x56 ; 86
1e90: 29 f4 brne .+10 ; 0x1e9c <main+0x9c>
1e92: 84 e0 ldi r24, 0x04 ; 4
1e94: 87 d0 rcall .+270 ; 0x1fa4 <getNch>
1e96: 80 e0 ldi r24, 0x00 ; 0
1e98: 6e d0 rcall .+220 ; 0x1f76 <putch>
1e9a: 6a c0 rjmp .+212 ; 0x1f70 <main+0x170>
1e9c: 84 36 cpi r24, 0x64 ; 100
1e9e: 09 f0 breq .+2 ; 0x1ea2 <main+0xa2>
1ea0: 3d c0 rjmp .+122 ; 0x1f1c <main+0x11c>
1ea2: 6d d0 rcall .+218 ; 0x1f7e <getch>
1ea4: 6c d0 rcall .+216 ; 0x1f7e <getch>
1ea6: b8 2e mov r11, r24
1ea8: 6a d0 rcall .+212 ; 0x1f7e <getch>
1eaa: 81 14 cp r8, r1
1eac: 88 e1 ldi r24, 0x18 ; 24
1eae: 98 06 cpc r9, r24
1eb0: 30 f4 brcc .+12 ; 0x1ebe <main+0xbe>
1eb2: f4 01 movw r30, r8
1eb4: f7 be out 0x37, r15 ; 55
1eb6: e8 95 spm
1eb8: 00 e0 ldi r16, 0x00 ; 0
1eba: 11 e0 ldi r17, 0x01 ; 1
1ebc: 02 c0 rjmp .+4 ; 0x1ec2 <main+0xc2>
1ebe: 00 e0 ldi r16, 0x00 ; 0
1ec0: 11 e0 ldi r17, 0x01 ; 1
1ec2: 5d d0 rcall .+186 ; 0x1f7e <getch>
1ec4: f8 01 movw r30, r16
1ec6: 81 93 st Z+, r24
1ec8: 8f 01 movw r16, r30
1eca: be 12 cpse r11, r30
1ecc: fa cf rjmp .-12 ; 0x1ec2 <main+0xc2>
1ece: 81 14 cp r8, r1
1ed0: f8 e1 ldi r31, 0x18 ; 24
1ed2: 9f 06 cpc r9, r31
1ed4: 18 f0 brcs .+6 ; 0x1edc <main+0xdc>
1ed6: f4 01 movw r30, r8
1ed8: f7 be out 0x37, r15 ; 55
1eda: e8 95 spm
1edc: 5b d0 rcall .+182 ; 0x1f94 <verifySpace>
1ede: 07 b6 in r0, 0x37 ; 55
1ee0: 00 fc sbrc r0, 0
1ee2: fd cf rjmp .-6 ; 0x1ede <main+0xde>
1ee4: f4 01 movw r30, r8
1ee6: a0 e0 ldi r26, 0x00 ; 0
1ee8: b1 e0 ldi r27, 0x01 ; 1
1eea: 8c 91 ld r24, X
1eec: 11 96 adiw r26, 0x01 ; 1
1eee: 2c 91 ld r18, X
1ef0: 11 97 sbiw r26, 0x01 ; 1
1ef2: 90 e0 ldi r25, 0x00 ; 0
1ef4: 92 2b or r25, r18
1ef6: 12 96 adiw r26, 0x02 ; 2
1ef8: 0c 01 movw r0, r24
1efa: e7 be out 0x37, r14 ; 55
1efc: e8 95 spm
1efe: 11 24 eor r1, r1
1f00: 32 96 adiw r30, 0x02 ; 2
1f02: a0 34 cpi r26, 0x40 ; 64
1f04: 81 e0 ldi r24, 0x01 ; 1
1f06: b8 07 cpc r27, r24
1f08: 81 f7 brne .-32 ; 0x1eea <main+0xea>
1f0a: f4 01 movw r30, r8
1f0c: d7 be out 0x37, r13 ; 55
1f0e: e8 95 spm
1f10: 07 b6 in r0, 0x37 ; 55
1f12: 00 fc sbrc r0, 0
1f14: fd cf rjmp .-6 ; 0x1f10 <main+0x110>
1f16: c7 be out 0x37, r12 ; 55
1f18: e8 95 spm
1f1a: 2a c0 rjmp .+84 ; 0x1f70 <main+0x170>
1f1c: 84 37 cpi r24, 0x74 ; 116
1f1e: b9 f4 brne .+46 ; 0x1f4e <main+0x14e>
1f20: 2e d0 rcall .+92 ; 0x1f7e <getch>
1f22: 2d d0 rcall .+90 ; 0x1f7e <getch>
1f24: b8 2e mov r11, r24
1f26: 2b d0 rcall .+86 ; 0x1f7e <getch>
1f28: 35 d0 rcall .+106 ; 0x1f94 <verifySpace>
1f2a: f4 01 movw r30, r8
1f2c: a8 2c mov r10, r8
1f2e: ab 0c add r10, r11
1f30: 8f 01 movw r16, r30
1f32: 0f 5f subi r16, 0xFF ; 255
1f34: 1f 4f sbci r17, 0xFF ; 255
1f36: 84 91 lpm r24, Z
1f38: 1e d0 rcall .+60 ; 0x1f76 <putch>
1f3a: f8 01 movw r30, r16
1f3c: a0 12 cpse r10, r16
1f3e: f8 cf rjmp .-16 ; 0x1f30 <main+0x130>
1f40: ff ef ldi r31, 0xFF ; 255
1f42: 8f 1a sub r8, r31
1f44: 9f 0a sbc r9, r31
1f46: ba 94 dec r11
1f48: 8b 0c add r8, r11
1f4a: 91 1c adc r9, r1
1f4c: 11 c0 rjmp .+34 ; 0x1f70 <main+0x170>
1f4e: 85 37 cpi r24, 0x75 ; 117
1f50: 41 f4 brne .+16 ; 0x1f62 <main+0x162>
1f52: 20 d0 rcall .+64 ; 0x1f94 <verifySpace>
1f54: 8e e1 ldi r24, 0x1E ; 30
1f56: 0f d0 rcall .+30 ; 0x1f76 <putch>
1f58: 83 e9 ldi r24, 0x93 ; 147
1f5a: 0d d0 rcall .+26 ; 0x1f76 <putch>
1f5c: 87 e0 ldi r24, 0x07 ; 7
1f5e: 0b d0 rcall .+22 ; 0x1f76 <putch>
1f60: 07 c0 rjmp .+14 ; 0x1f70 <main+0x170>
1f62: 81 35 cpi r24, 0x51 ; 81
1f64: 21 f4 brne .+8 ; 0x1f6e <main+0x16e>
1f66: 88 e0 ldi r24, 0x08 ; 8
1f68: 11 d0 rcall .+34 ; 0x1f8c <watchdogConfig>
1f6a: 14 d0 rcall .+40 ; 0x1f94 <verifySpace>
1f6c: 01 c0 rjmp .+2 ; 0x1f70 <main+0x170>
1f6e: 12 d0 rcall .+36 ; 0x1f94 <verifySpace>
1f70: 80 e1 ldi r24, 0x10 ; 16
1f72: 01 d0 rcall .+2 ; 0x1f76 <putch>
1f74: 63 cf rjmp .-314 ; 0x1e3c <main+0x3c>
00001f76 <putch>:
}
}
void putch(char ch) {
#ifndef SOFT_UART
while (!(UCSR0A & _BV(UDRE0)));
1f76: 5d 9b sbis 0x0b, 5 ; 11
1f78: fe cf rjmp .-4 ; 0x1f76 <putch>
UDR0 = ch;
1f7a: 8c b9 out 0x0c, r24 ; 12
1f7c: 08 95 ret
00001f7e <getch>:
[uartBit] "I" (UART_RX_BIT)
:
"r25"
);
#else
while(!(UCSR0A & _BV(RXC0)))
1f7e: 5f 9b sbis 0x0b, 7 ; 11
1f80: fe cf rjmp .-4 ; 0x1f7e <getch>
;
if (!(UCSR0A & _BV(FE0))) {
1f82: 5c 99 sbic 0x0b, 4 ; 11
1f84: 01 c0 rjmp .+2 ; 0x1f88 <getch+0xa>
}
#endif
// Watchdog functions. These are only safe with interrupts turned off.
void watchdogReset() {
__asm__ __volatile__ (
1f86: a8 95 wdr
* don't care that an invalid char is returned...)
*/
watchdogReset();
}
ch = UDR0;
1f88: 8c b1 in r24, 0x0c ; 12
LED_PIN |= _BV(LED);
#endif
#endif
return ch;
}
1f8a: 08 95 ret
00001f8c <watchdogConfig>:
"wdr\n"
);
}
void watchdogConfig(uint8_t x) {
WDTCSR = _BV(WDCE) | _BV(WDE);
1f8c: 98 e1 ldi r25, 0x18 ; 24
1f8e: 91 bd out 0x21, r25 ; 33
WDTCSR = x;
1f90: 81 bd out 0x21, r24 ; 33
1f92: 08 95 ret
00001f94 <verifySpace>:
do getch(); while (--count);
verifySpace();
}
void verifySpace() {
if (getch() != CRC_EOP) {
1f94: f4 df rcall .-24 ; 0x1f7e <getch>
1f96: 80 32 cpi r24, 0x20 ; 32
1f98: 19 f0 breq .+6 ; 0x1fa0 <verifySpace+0xc>
watchdogConfig(WATCHDOG_16MS); // shorten WD timeout
1f9a: 88 e0 ldi r24, 0x08 ; 8
1f9c: f7 df rcall .-18 ; 0x1f8c <watchdogConfig>
1f9e: ff cf rjmp .-2 ; 0x1f9e <verifySpace+0xa>
while (1) // and busy-loop so that WD causes
; // a reset and app start.
}
putch(STK_INSYNC);
1fa0: 84 e1 ldi r24, 0x14 ; 20
1fa2: e9 cf rjmp .-46 ; 0x1f76 <putch>
00001fa4 <getNch>:
::[count] "M" (UART_B_VALUE)
);
}
#endif
void getNch(uint8_t count) {
1fa4: cf 93 push r28
1fa6: c8 2f mov r28, r24
do getch(); while (--count);
1fa8: ea df rcall .-44 ; 0x1f7e <getch>
1faa: c1 50 subi r28, 0x01 ; 1
1fac: e9 f7 brne .-6 ; 0x1fa8 <getNch+0x4>
verifySpace();
}
1fae: cf 91 pop r28
}
#endif
void getNch(uint8_t count) {
do getch(); while (--count);
verifySpace();
1fb0: f1 cf rjmp .-30 ; 0x1f94 <verifySpace>
00001fb2 <appStart>:
WDTCSR = _BV(WDCE) | _BV(WDE);
WDTCSR = x;
}
void appStart() {
watchdogConfig(WATCHDOG_OFF);
1fb2: 80 e0 ldi r24, 0x00 ; 0
1fb4: eb df rcall .-42 ; 0x1f8c <watchdogConfig>
__asm__ __volatile__ (
1fb6: ee 27 eor r30, r30
1fb8: ff 27 eor r31, r31
1fba: 09 94 ijmp