?? main.lss
字號:
main.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000116 00800100 000045a4 00004638 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 000045a4 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 00000872 00800216 00800216 0000474e 2**0
ALLOC
3 .stab 00000408 00000000 00000000 00004750 2**2
CONTENTS, READONLY, DEBUGGING
4 .stabstr 00000084 00000000 00000000 00004b58 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_aranges 00000020 00000000 00000000 00004bdc 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_pubnames 0000011e 00000000 00000000 00004bfc 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_info 00000ec3 00000000 00000000 00004d1a 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_abbrev 00000253 00000000 00000000 00005bdd 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_line 00000768 00000000 00000000 00005e30 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_frame 000000e0 00000000 00000000 00006598 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_str 00000051 00000000 00000000 00006678 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 46 00 jmp 0x8c ; 0x8c <__ctors_end>
4: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
8: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
10: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
14: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
18: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
1c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
20: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
24: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
28: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
2c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
30: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
34: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
38: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
3c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
40: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
44: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
48: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
4c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
50: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
54: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
58: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
5c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
60: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
64: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
68: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
6c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
70: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
74: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
78: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
7c: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
80: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
84: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
88: 0c 94 63 00 jmp 0xc6 ; 0xc6 <__bad_interrupt>
0000008c <__ctors_end>:
8c: 11 24 eor r1, r1
8e: 1f be out 0x3f, r1 ; 63
90: cf ef ldi r28, 0xFF ; 255
92: d0 e1 ldi r29, 0x10 ; 16
94: de bf out 0x3e, r29 ; 62
96: cd bf out 0x3d, r28 ; 61
00000098 <__do_copy_data>:
98: 12 e0 ldi r17, 0x02 ; 2
9a: a0 e0 ldi r26, 0x00 ; 0
9c: b1 e0 ldi r27, 0x01 ; 1
9e: e4 ea ldi r30, 0xA4 ; 164
a0: f5 e4 ldi r31, 0x45 ; 69
a2: 00 e0 ldi r16, 0x00 ; 0
a4: 0b bf out 0x3b, r16 ; 59
a6: 02 c0 rjmp .+4 ; 0xac <__do_copy_data+0x14>
a8: 07 90 elpm r0, Z+
aa: 0d 92 st X+, r0
ac: a6 31 cpi r26, 0x16 ; 22
ae: b1 07 cpc r27, r17
b0: d9 f7 brne .-10 ; 0xa8 <__do_copy_data+0x10>
000000b2 <__do_clear_bss>:
b2: 1a e0 ldi r17, 0x0A ; 10
b4: a6 e1 ldi r26, 0x16 ; 22
b6: b2 e0 ldi r27, 0x02 ; 2
b8: 01 c0 rjmp .+2 ; 0xbc <.do_clear_bss_start>
000000ba <.do_clear_bss_loop>:
ba: 1d 92 st X+, r1
000000bc <.do_clear_bss_start>:
bc: a8 38 cpi r26, 0x88 ; 136
be: b1 07 cpc r27, r17
c0: e1 f7 brne .-8 ; 0xba <.do_clear_bss_loop>
c2: 0c 94 e2 04 jmp 0x9c4 ; 0x9c4 <main>
000000c6 <__bad_interrupt>:
c6: 0c 94 00 00 jmp 0 ; 0x0 <__vectors>
000000ca <xQueryInterrupt>:
#ifndef NO_DEFAULT_CH375_INT /* 在應用程序中定義NO_DEFAULT_CH375_INT可以禁止默認的中斷處理程序,然后用自行編寫的程序代替它 */
#if LIB_CFG_INT_EN == 0 /* CH375的INT#引腳連接方式為"查詢方式" */
void xQueryInterrupt( void ) /* 查詢CH375中斷并更新中斷狀態 */
{
ca: cf 93 push r28
cc: df 93 push r29
ce: cd b7 in r28, 0x3d ; 61
d0: de b7 in r29, 0x3e ; 62
#ifdef CH375_INT_WIRE /* 查詢中斷引腳 */
while ( CH375_INT_WIRE ); /* 如果CH375的中斷引腳輸出高電平則等待 */
d2: e0 e3 ldi r30, 0x30 ; 48
d4: f0 e0 ldi r31, 0x00 ; 0
d6: 80 81 ld r24, Z
d8: 99 27 eor r25, r25
da: 81 70 andi r24, 0x01 ; 1
dc: 90 70 andi r25, 0x00 ; 0
de: 88 23 and r24, r24
e0: c1 f7 brne .-16 ; 0xd2 <xQueryInterrupt+0x8>
#else /* 對于CH375B芯片還可以查詢命令端口的位7 */
while ( xReadCH375Cmd( ) & 0x80 ); /* 查詢CH375B的命令端口的位7為1說明中斷引腳輸出高電平則等待 */
#endif
xWriteCH375Cmd( CMD_GET_STATUS ); /* 獲取當前中斷狀態,發出命令后至少延時2uS */
e2: 82 e2 ldi r24, 0x22 ; 34
e4: 0e 94 f8 00 call 0x1f0 ; 0x1f0 <xWriteCH375Cmd>
CH375IntStatus = xReadCH375Data( ); /* 獲取中斷狀態 */
e8: 0e 94 58 03 call 0x6b0 ; 0x6b0 <xReadCH375Data>
ec: 80 93 44 0a sts 0x0A44, r24
if ( CH375IntStatus == USB_INT_DISCONNECT ) CH375DiskStatus = DISK_DISCONNECT; /* 檢測到USB設備斷開事件 */
f0: 80 91 44 0a lds r24, 0x0A44
f4: 86 31 cpi r24, 0x16 ; 22
f6: 21 f4 brne .+8 ; 0x100 <xQueryInterrupt+0x36>
f8: 81 e0 ldi r24, 0x01 ; 1
fa: 80 93 61 0a sts 0x0A61, r24
fe: 07 c0 rjmp .+14 ; 0x10e <xQueryInterrupt+0x44>
else if ( CH375IntStatus == USB_INT_CONNECT ) CH375DiskStatus = DISK_CONNECT; /* 檢測到USB設備連接事件 */
100: 80 91 44 0a lds r24, 0x0A44
104: 85 31 cpi r24, 0x15 ; 21
106: 19 f4 brne .+6 ; 0x10e <xQueryInterrupt+0x44>
108: 82 e0 ldi r24, 0x02 ; 2
10a: 80 93 61 0a sts 0x0A61, r24
10e: df 91 pop r29
110: cf 91 pop r28
112: 08 95 ret
00000114 <xDelay100uS>:
}
#else /* LIB_CFG_INT_EN != 0, CH375的INT#引腳連接方式為"中斷方式" */
void xQueryInterrupt( void ) /* 查詢中斷狀態,等待硬件中斷 */
{
while ( CH375IntStatus == 0 ); /* 子程序庫調用該子程序之前CH375IntStatus=0,硬件中斷后,由中斷服務程序置為非0的實際中斷狀態后返回 */
}
void CH375Interrupt( void ) __attribute__ ((signal));
void CH375Interrupt( void ) /* CH375中斷服務程序,由CH375的INT#的低電平或者下降沿觸發單片機中斷 */
{
xWriteCH375Cmd( CMD_GET_STATUS ); /* 獲取中斷狀態并取消中斷請求 */
CH375IntStatus = xReadCH375Data( ); /* 獲取中斷狀態 */
if ( CH375IntStatus == USB_INT_DISCONNECT ) CH375DiskStatus = DISK_DISCONNECT; /* 檢測到USB設備斷開事件 */
else if ( CH375IntStatus == USB_INT_CONNECT ) CH375DiskStatus = DISK_CONNECT; /* 檢測到USB設備連接事件 */
#ifdef CLEAR_INT_MARK
CLEAR_INT_MARK( ); /* 某些單片機需要由軟件清除中斷標志 */
#endif
}
#endif
#endif
#ifndef NO_DEFAULT_DELAY_100US /* 在應用程序中定義NO_DEFAULT_DELAY_100US可以禁止默認的延時100uS子程序,然后用自行編寫的程序代替它 */
void xDelay100uS( void ) /* 延時100uS */
{
114: cf 93 push r28
116: df 93 push r29
118: cd b7 in r28, 0x3d ; 61
11a: de b7 in r29, 0x3e ; 62
11c: 22 97 sbiw r28, 0x02 ; 2
11e: 0f b6 in r0, 0x3f ; 63
120: f8 94 cli
122: de bf out 0x3e, r29 ; 62
124: 0f be out 0x3f, r0 ; 63
126: cd bf out 0x3d, r28 ; 61
// UINT16 count;
// for ( count = 330; count != 0; count -- ); /* 延時100uS,6x50nS@20MHz */
// 以上代碼會被優化掉,所以用嵌入式匯編
UINT16 count = 500; /* 延時100uS,4x50nS@20MHz */
128: 84 ef ldi r24, 0xF4 ; 244
12a: 91 e0 ldi r25, 0x01 ; 1
12c: 9a 83 std Y+2, r25 ; 0x02
12e: 89 83 std Y+1, r24 ; 0x01
__asm__ volatile (
130: 89 81 ldd r24, Y+1 ; 0x01
132: 9a 81 ldd r25, Y+2 ; 0x02
134: 01 97 sbiw r24, 0x01 ; 1
136: f1 f7 brne .-4 ; 0x134 <xDelay100uS+0x20>
138: 9a 83 std Y+2, r25 ; 0x02
13a: 89 83 std Y+1, r24 ; 0x01
13c: 22 96 adiw r28, 0x02 ; 2
13e: 0f b6 in r0, 0x3f ; 63
140: f8 94 cli
142: de bf out 0x3e, r29 ; 62
144: 0f be out 0x3f, r0 ; 63
146: cd bf out 0x3d, r28 ; 61
148: df 91 pop r29
14a: cf 91 pop r28
14c: 08 95 ret
0000014e <xDelayAfterWrite>:
"1: sbiw %0,1" "\n\t"
"brne 1b"
: "=w" (count)
: "0" (count)
);
}
#endif
#ifdef EN_DISK_WRITE
#ifndef NO_DEFAULT_DELAY_WRITE /* 在應用程序中定義NO_DEFAULT_DELAY_WRITE可以禁止默認的寫操作后延時程序,然后用自行編寫的程序代替它 */
void xDelayAfterWrite( void ) /* 寫操作后延時 */
{
14e: cf 93 push r28
150: df 93 push r29
152: cd b7 in r28, 0x3d ; 61
154: de b7 in r29, 0x3e ; 62
156: 22 97 sbiw r28, 0x02 ; 2
158: 0f b6 in r0, 0x3f ; 63
15a: f8 94 cli
15c: de bf out 0x3e, r29 ; 62
15e: 0f be out 0x3f, r0 ; 63
160: cd bf out 0x3d, r28 ; 61
// UINT16 count;
// for ( count = 650; count != 0; count -- ); /* 延時200uS左右 */
// 以上代碼會被優化掉,所以用嵌入式匯編
UINT16 count = 1000; /* 延時200uS,4x50nS@20MHz */
162: 88 ee ldi r24, 0xE8 ; 232
164: 93 e0 ldi r25, 0x03 ; 3
166: 9a 83 std Y+2, r25 ; 0x02
168: 89 83 std Y+1, r24 ; 0x01
__asm__ volatile (
16a: 89 81 ldd r24, Y+1 ; 0x01
16c: 9a 81 ldd r25, Y+2 ; 0x02
16e: 01 97 sbiw r24, 0x01 ; 1
170: f1 f7 brne .-4 ; 0x16e <xDelayAfterWrite+0x20>
172: 9a 83 std Y+2, r25 ; 0x02
174: 89 83 std Y+1, r24 ; 0x01
176: 22 96 adiw r28, 0x02 ; 2
178: 0f b6 in r0, 0x3f ; 63
17a: f8 94 cli
17c: de bf out 0x3e, r29 ; 62
17e: 0f be out 0x3f, r0 ; 63
180: cd bf out 0x3d, r28 ; 61
182: df 91 pop r29
184: cf 91 pop r28
186: 08 95 ret
00000188 <xFileNameEnumer>:
"1: sbiw %0,1" "\n\t"
"brne 1b"
: "=w" (count)
: "0" (count)
);
}
#endif
#endif
#ifndef NO_DEFAULT_FILE_ENUMER /* 在應用程序中定義NO_DEFAULT_FILE_ENUMER可以禁止默認的文件名枚舉回調程序,然后用自行編寫的程序代替它 */
void xFileNameEnumer( void ) /* 文件名枚舉回調子程序 */
{
188: cf 93 push r28
18a: df 93 push r29
18c: cd b7 in r28, 0x3d ; 61
18e: de b7 in r29, 0x3e ; 62
190: df 91 pop r29
192: cf 91 pop r28
194: 08 95 ret
00000196 <CH375LibInit>:
/* 如果指定枚舉序號CH375vFileSize為0xFFFFFFFF后調用FileOpen,那么每搜索到一個文件FileOpen都會調用本回調程序,
回調程序xFileNameEnumer返回后,FileOpen遞減CH375vFileSize并繼續枚舉直到搜索不到文件或者目錄。建議做法是,
在調用FileOpen之前定義一個全局變量為0,當FileOpen回調本程序后,本程序由CH375vFdtOffset得到結構FAT_DIR_INFO,
分析結構中的DIR_Attr以及DIR_Name判斷是否為所需文件名或者目錄名,記錄相關信息,并將全局變量計數增量,
當FileOpen返回后,判斷返回值如果是ERR_MISS_FILE或ERR_FOUND_NAME都視為操作成功,全局變量為搜索到的有效文件數。
如果在本回調程序xFileNameEnumer中將CH375vFileSize置為1,那么可以通知FileOpen提前結束搜索。以下是回調程序例子 */
#if 0
#ifdef FILE_DATA_BUF_LEN
UINT8 i;
UINT16 FileCount;
P_FAT_DIR_INFO pFileDir;
PUINT8 NameBuf;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -