📄 main.lss
字号:
main.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000100c 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000016 00800060 0000100c 000010a0 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000107 00800076 00800076 000010b6 2**0
ALLOC
3 .debug_aranges 00000080 00000000 00000000 000010b6 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_pubnames 00000302 00000000 00000000 00001136 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_info 00000e02 00000000 00000000 00001438 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_abbrev 0000046f 00000000 00000000 0000223a 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 000008c9 00000000 00000000 000026a9 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 000001f0 00000000 00000000 00002f74 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_str 0000043e 00000000 00000000 00003164 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_loc 00000485 00000000 00000000 000035a2 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 d9 00 jmp 0x1b2 ; 0x1b2 <__ctors_end>
4: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
8: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
c: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
10: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
14: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
18: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
1c: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
20: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
24: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
28: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
2c: 0c 94 8d 01 jmp 0x31a ; 0x31a <__vector_11>
30: 0c 94 af 01 jmp 0x35e ; 0x35e <__vector_12>
34: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
38: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
3c: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
40: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
44: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
48: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
4c: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
50: 0c 94 f6 00 jmp 0x1ec ; 0x1ec <__bad_interrupt>
00000054 <table_exp>:
54: 06 39 cpi r16, 0x96 ; 150
56: 65 2c mov r6, r5
58: 03 3a cpi r16, 0xA3 ; 163
5a: a2 3b cpi r26, 0xB2 ; 178
5c: 59 3c cpi r21, 0xC9 ; 201
5e: 1e ba out 0x1e, r1 ; 30
60: e0 3d cpi r30, 0xD0 ; 208
62: 63 3b cpi r22, 0xB3 ; 179
64: f4 3e cpi r31, 0xE4 ; 228
66: 75 ff sbrs r23, 5
68: 4e 3f cpi r20, 0xFE ; 254
6a: 31 72 andi r19, 0x21 ; 33
6c: 11 3f cpi r17, 0xF1 ; 241
6e: 80 00 .word 0x0080 ; ????
...
00000072 <table_log>:
72: 05 40 sbci r16, 0x05 ; 5
74: b5 04 cpc r11, r5
76: f4 41 sbci r31, 0x14 ; 20
78: a0 00 .word 0x00a0 ; ????
7a: 01 41 sbci r16, 0x11 ; 17
7c: e2 46 sbci r30, 0x62 ; 98
7e: 32 41 sbci r19, 0x12 ; 18
80: a0 00 .word 0x00a0 ; ????
82: 00 40 sbci r16, 0x00 ; 0
84: e2 46 sbci r30, 0x62 ; 98
86: 30 3f cpi r19, 0xF0 ; 240
88: 80 00 .word 0x0080 ; ????
8a: 00 05 cpc r16, r0
8c: 41 77 andi r20, 0x71 ; 113
8e: 8c 4f sbci r24, 0xFC ; 252
90: 40 c3 rjmp .+1664 ; 0x712 <usart_SendDecDigit+0xdc>
92: 2c e2 ldi r18, 0x2C ; 44
94: 41 17 cp r20, r17
96: bf 24 eor r11, r15
98: c1 a4 ldd r12, Z+41 ; 0x29
9a: 8d d9 rcall .-3302 ; 0xfffff3b6 <__eeprom_end+0xff7ef3b6>
9c: c0 e1 ldi r28, 0x10 ; 16
9e: d8 a1 ldd r29, Y+32 ; 0x20
a0: c0 5b subi r28, 0xB0 ; 176
a2: 67 82 std Z+7, r6 ; 0x07
000000a4 <usartPGM0>:
a4: 20 3e 3e 20 41 56 52 20 50 72 6f 6a 65 63 74 20 >> AVR Project
b4: 3a 3a 20 41 56 52 20 2b 20 38 43 68 2d 31 32 42 :: AVR + 8Ch-12B
c4: 69 74 20 41 2f 44 0a 0d 00 it A/D...
000000cd <usartPGM1>:
cd: 20 3e 3e 20 4d 43 55 20 3a 20 41 54 4d 65 67 61 >> MCU : ATMega
dd: 31 36 20 2c 20 41 2f 44 20 44 65 76 69 63 65 20 16 , A/D Device
ed: 3a 20 4d 43 50 33 32 30 38 0a 0d 00 : MCP3208...
000000f9 <usartPGM2>:
f9: 20 3e 3e 20 62 79 20 77 6c 61 73 6f 69 40 68 6f >> by wlasoi@ho
109: 74 6d 61 69 6c 2e 63 6f 6d 0a 0d 00 tmail.com...
00000115 <usartPGM3>:
115: 20 43 6f 6d 6d 61 6e 64 20 30 2c 31 2c 32 2c 33 Command 0,1,2,3
125: 3a 20 22 30 22 20 2d 2d 3e 20 73 74 61 72 74 20 : "0" --> start
135: 41 2f 44 20 0a 0d 00 A/D ...
0000013c <usartPGM4>:
13c: 20 41 74 6f 44 20 31 32 42 69 74 20 70 72 6f 63 AtoD 12Bit proc
14c: 65 73 73 20 0a 0d 00 ess ...
00000153 <usartPGM5>:
153: 20 52 65 76 69 65 76 65 20 22 31 22 20 74 65 73 Revieve "1" tes
163: 74 20 0a 0d 00 t ...
00000168 <usartPGM6>:
168: 20 52 65 76 69 65 76 65 20 22 32 22 20 74 65 73 Revieve "2" tes
178: 74 20 0a 0d 00 t ...
0000017d <usartPGM7>:
17d: 20 52 65 76 69 65 76 65 20 22 33 22 20 74 65 73 Revieve "3" tes
18d: 74 20 0a 0d 00 t ...
00000192 <usartPointer>:
192: a4 00 cd 00 f9 00 15 01 3c 01 53 01 68 01 7d 01 ........<.S.h.}.
000001a2 <usarthex>:
1a2: 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 0123456789ABCDEF
000001b2 <__ctors_end>:
1b2: 11 24 eor r1, r1
1b4: 1f be out 0x3f, r1 ; 63
1b6: cf e5 ldi r28, 0x5F ; 95
1b8: d4 e0 ldi r29, 0x04 ; 4
1ba: de bf out 0x3e, r29 ; 62
1bc: cd bf out 0x3d, r28 ; 61
000001be <__do_copy_data>:
1be: 10 e0 ldi r17, 0x00 ; 0
1c0: a0 e6 ldi r26, 0x60 ; 96
1c2: b0 e0 ldi r27, 0x00 ; 0
1c4: ec e0 ldi r30, 0x0C ; 12
1c6: f0 e1 ldi r31, 0x10 ; 16
1c8: 02 c0 rjmp .+4 ; 0x1ce <.do_copy_data_start>
000001ca <.do_copy_data_loop>:
1ca: 05 90 lpm r0, Z+
1cc: 0d 92 st X+, r0
000001ce <.do_copy_data_start>:
1ce: a6 37 cpi r26, 0x76 ; 118
1d0: b1 07 cpc r27, r17
1d2: d9 f7 brne .-10 ; 0x1ca <.do_copy_data_loop>
000001d4 <__do_clear_bss>:
1d4: 11 e0 ldi r17, 0x01 ; 1
1d6: a6 e7 ldi r26, 0x76 ; 118
1d8: b0 e0 ldi r27, 0x00 ; 0
1da: 01 c0 rjmp .+2 ; 0x1de <.do_clear_bss_start>
000001dc <.do_clear_bss_loop>:
1dc: 1d 92 st X+, r1
000001de <.do_clear_bss_start>:
1de: ad 37 cpi r26, 0x7D ; 125
1e0: b1 07 cpc r27, r17
1e2: e1 f7 brne .-8 ; 0x1dc <.do_clear_bss_loop>
1e4: 0e 94 1a 01 call 0x234 ; 0x234 <main>
1e8: 0c 94 05 08 jmp 0x100a ; 0x100a <_exit>
000001ec <__bad_interrupt>:
1ec: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
000001f0 <MCP3208_ShowData>:
// ******************** Sub Function *************************** //
void MCP3208_ShowData(unsigned char ADcontrol,unsigned char ADchanel)
{
1f0: ff 92 push r15
1f2: 0f 93 push r16
1f4: 1f 93 push r17
1f6: f6 2e mov r15, r22
unsigned int temp16Bit;
temp16Bit = MCP3208_spiRead(ADcontrol,ADchanel);
1f8: 0e 94 28 04 call 0x850 ; 0x850 <MCP3208_spiRead>
1fc: 8c 01 movw r16, r24
usart_puts("CH-");
1fe: 80 e6 ldi r24, 0x60 ; 96
200: 90 e0 ldi r25, 0x00 ; 0
202: 0e 94 f3 01 call 0x3e6 ; 0x3e6 <usart_puts>
usart_SendInt(ADchanel);
206: 8f 2d mov r24, r15
208: 99 27 eor r25, r25
20a: 0e 94 93 03 call 0x726 ; 0x726 <usart_SendInt>
usart_puts(" = ");
20e: 84 e6 ldi r24, 0x64 ; 100
210: 90 e0 ldi r25, 0x00 ; 0
212: 0e 94 f3 01 call 0x3e6 ; 0x3e6 <usart_puts>
usart_SendInt(temp16Bit);
216: c8 01 movw r24, r16
218: 0e 94 93 03 call 0x726 ; 0x726 <usart_SendInt>
usart_puts(" , ");
21c: 88 e6 ldi r24, 0x68 ; 104
21e: 90 e0 ldi r25, 0x00 ; 0
220: 0e 94 f3 01 call 0x3e6 ; 0x3e6 <usart_puts>
gReciveHighByte=0;
224: 10 92 7b 01 sts 0x017B, r1
gReciveLowByte=0;
228: 10 92 7c 01 sts 0x017C, r1
22c: 1f 91 pop r17
22e: 0f 91 pop r16
230: ff 90 pop r15
232: 08 95 ret
00000234 <main>:
234: cf 93 push r28
236: df 93 push r29
238: 0e 94 1a 04 call 0x834 ; 0x834 <MCP3208_spiInit>
23c: 83 e3 ldi r24, 0x33 ; 51
23e: 90 e0 ldi r25, 0x00 ; 0
240: 0e 94 7c 01 call 0x2f8 ; 0x2f8 <USART_Init>
244: 78 94 sei
246: 84 ea ldi r24, 0xA4 ; 164
248: 90 e0 ldi r25, 0x00 ; 0
24a: 0e 94 27 02 call 0x44e ; 0x44e <usart_puts_p>
24e: 8d ec ldi r24, 0xCD ; 205
250: 90 e0 ldi r25, 0x00 ; 0
252: 0e 94 27 02 call 0x44e ; 0x44e <usart_puts_p>
256: 89 ef ldi r24, 0xF9 ; 249
258: 90 e0 ldi r25, 0x00 ; 0
25a: 0e 94 27 02 call 0x44e ; 0x44e <usart_puts_p>
25e: 85 e1 ldi r24, 0x15 ; 21
260: 91 e0 ldi r25, 0x01 ; 1
262: 42 c0 rjmp .+132 ; 0x2e8 <main+0xb4>
264: 0e 94 35 02 call 0x46a ; 0x46a <DataInReceiveBuffer>
268: 89 2b or r24, r25
26a: 21 f0 breq .+8 ; 0x274 <main+0x40>
26c: 0e 94 00 02 call 0x400 ; 0x400 <usart_getc>
270: 80 93 7a 01 sts 0x017A, r24
274: 80 91 7a 01 lds r24, 0x017A
278: 80 33 cpi r24, 0x30 ; 48
27a: 01 f5 brne .+64 ; 0x2bc <main+0x88>
27c: 8c e3 ldi r24, 0x3C ; 60
27e: 91 e0 ldi r25, 0x01 ; 1
280: 0e 94 27 02 call 0x44e ; 0x44e <usart_puts_p>
284: c0 e0 ldi r28, 0x00 ; 0
286: d0 e0 ldi r29, 0x00 ; 0
288: 6c 2f mov r22, r28
28a: 81 e0 ldi r24, 0x01 ; 1
28c: 0e 94 f8 00 call 0x1f0 ; 0x1f0 <MCP3208_ShowData>
290: 84 e6 ldi r24, 0x64 ; 100
292: 90 e0 ldi r25, 0x00 ; 0
294: 0e 94 e0 03 call 0x7c0 ; 0x7c0 <delay_us>
298: 21 96 adiw r28, 0x01 ; 1
29a: c8 30 cpi r28, 0x08 ; 8
29c: d1 05 cpc r29, r1
29e: a1 f7 brne .-24 ; 0x288 <main+0x54>
2a0: 8c e6 ldi r24, 0x6C ; 108
2a2: 90 e0 ldi r25, 0x00 ; 0
2a4: 0e 94 f3 01 call 0x3e6 ; 0x3e6 <usart_puts>
2a8: 63 ef ldi r22, 0xF3 ; 243
2aa: 71 e0 ldi r23, 0x01 ; 1
2ac: 80 e0 ldi r24, 0x00 ; 0
2ae: 90 e0 ldi r25, 0x00 ; 0
2b0: 0e 94 ee 03 call 0x7dc ; 0x7dc <delay_ms>
2b4: 0e 94 35 02 call 0x46a ; 0x46a <DataInReceiveBuffer>
2b8: 89 2b or r24, r25
2ba: 21 f3 breq .-56 ; 0x284 <main+0x50>
2bc: 80 91 7a 01 lds r24, 0x017A
2c0: 81 33 cpi r24, 0x31 ; 49
2c2: 21 f4 brne .+8 ; 0x2cc <main+0x98>
2c4: 83 e5 ldi r24, 0x53 ; 83
2c6: 91 e0 ldi r25, 0x01 ; 1
2c8: 0e 94 27 02 call 0x44e ; 0x44e <usart_puts_p>
2cc: 80 91 7a 01 lds r24, 0x017A
2d0: 82 33 cpi r24, 0x32 ; 50
2d2: 21 f4 brne .+8 ; 0x2dc <main+0xa8>
2d4: 88 e6 ldi r24, 0x68 ; 104
2d6: 91 e0 ldi r25, 0x01 ; 1
2d8: 0e 94 27 02 call 0x44e ; 0x44e <usart_puts_p>
2dc: 80 91 7a 01 lds r24, 0x017A
2e0: 83 33 cpi r24, 0x33 ; 51
2e2: 21 f4 brne .+8 ; 0x2ec <main+0xb8>
2e4: 8d e7 ldi r24, 0x7D ; 125
2e6: 91 e0 ldi r25, 0x01 ; 1
2e8: 0e 94 27 02 call 0x44e ; 0x44e <usart_puts_p>
2ec: 0e 94 35 02 call 0x46a ; 0x46a <DataInReceiveBuffer>
2f0: 89 2b or r24, r25
2f2: 09 f0 breq .+2 ; 0x2f6 <main+0xc2>
2f4: b7 cf rjmp .-146 ; 0x264 <main+0x30>
2f6: fa cf rjmp .-12 ; 0x2ec <main+0xb8>
000002f8 <USART_Init>:
#define usarthexDigits(i) pgm_read_byte(&usarthex[i])
const prog_char usarthex[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
void USART_Init( unsigned int baudrate )
{
2f8: 29 2f mov r18, r25
2fa: 33 27 eor r19, r19
2fc: 20 bd out 0x20, r18 ; 32
unsigned char x;
// Set the baud rate
UBRRH = (unsigned char) (baudrate>>8);
UBRRL = (unsigned char) baudrate;
2fe: 89 b9 out 0x09, r24 ; 9
// Enable UART receiver and transmitter
UCSRB = ( ( 1 << RXCIE ) | ( 1 << RXEN ) | ( 1 << TXEN ) );
300: 88 e9 ldi r24, 0x98 ; 152
302: 8a b9 out 0x0a, r24 ; 10
UCSRC = (1<<URSEL)|(1<<USBS)|(1<<UCSZ1)|(1<<UCSZ0); //For devices without Extended IO
304: 8e e8 ldi r24, 0x8E ; 142
306: 80 bd out 0x20, r24 ; 32
x = 0;
USART_RxTail = x;
308: 10 92 f7 00 sts 0x00F7, r1
USART_RxHead = x;
30c: 10 92 f6 00 sts 0x00F6, r1
USART_TxTail = x;
310: 10 92 79 01 sts 0x0179, r1
USART_TxHead = x;
314: 10 92 78 01 sts 0x0178, r1
318: 08 95 ret
0000031a <__vector_11>:
}
SIGNAL(USART_RECEIVE_INTERRUPT)
{
31a: 1f 92 push r1
31c: 0f 92 push r0
31e: 0f b6 in r0, 0x3f ; 63
320: 0f 92 push r0
322: 11 24 eor r1, r1
324: 2f 93 push r18
326: 8f 93 push r24
328: 9f 93 push r25
32a: ef 93 push r30
32c: ff 93 push r31
unsigned char data;
unsigned char tmphead;
data = UDR;
32e: 9c b1 in r25, 0x0c ; 12
tmphead = ( USART_RxHead + 1 ) & USART_RX_BUFFER_MASK;
330: 80 91 f6 00 lds r24, 0x00F6
334: 8f 5f subi r24, 0xFF ; 255
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -