📄 ymodem.lst
字号:
\ 000001A8 0000E0E3 MVN R0,#+0
\ 000001AC 640000EA B ??Ymodem_Receive_8
181 }
182 /* Erase the needed sectors */
183 Sector_Mask = FLASH_SectorMask(size);
\ ??Ymodem_Receive_18:
\ 000001B0 00009DE5 LDR R0,[SP, #+0]
\ 000001B4 ........ _BLF FLASH_SectorMask,??FLASH_SectorMask??rA
\ 000001B8 00B0B0E1 MOVS R11,R0
184 FLASH_SectorErase(Sector_Mask);
\ 000001BC 0B00B0E1 MOVS R0,R11
\ 000001C0 ........ _BLF FLASH_SectorErase,??FLASH_SectorErase??rA
185
186 Send_Byte(ACK);
\ 000001C4 0600A0E3 MOV R0,#+6
\ 000001C8 ........ BL Send_Byte
187 Send_Byte(CRC16);
\ 000001CC 4300A0E3 MOV R0,#+67
\ 000001D0 ........ BL Send_Byte
\ 000001D4 3D0000EA B ??Ymodem_Receive_19
188 }
189 else /* Filename packet is empty; end session */
190 {
191 Send_Byte(ACK);
\ ??Ymodem_Receive_12:
\ 000001D8 0600A0E3 MOV R0,#+6
\ 000001DC ........ BL Send_Byte
192 file_done = 1;
\ 000001E0 0100A0E3 MOV R0,#+1
\ 000001E4 0070B0E1 MOVS R7,R0
193 session_done = 1;
\ 000001E8 0110A0E3 MOV R1,#+1
\ 000001EC 08108DE5 STR R1,[SP, #+8]
194 break;
\ 000001F0 4D0000EA B ??Ymodem_Receive_9
195 }
196 }
197 else /* Data packet */
198 {
199 memcpy(buf_ptr, packet_data + PACKET_HEADER, packet_length);
\ ??Ymodem_Receive_11:
\ 000001F4 04209DE5 LDR R2,[SP, #+4]
\ 000001F8 23108DE2 ADD R1,SP,#+35
\ 000001FC 0C009DE5 LDR R0,[SP, #+12]
\ 00000200 ........ _BLF memcpy,??memcpy??rA
200 Ram_Source = 0x20002000;
\ 00000204 48019FE5 LDR R0,??Ymodem_Receive_15+0x4 ;; Ram_Source
\ 00000208 8015A0E3 MOV R1,#+536870912
\ 0000020C 801D81E3 ORR R1,R1,#0x2000
\ 00000210 001080E5 STR R1,[R0, #+0]
201 for (j=0;(j<packet_length)&&(Flash_Destination < Flash_Offset + size);j+=4)
\ 00000214 0000A0E3 MOV R0,#+0
\ 00000218 0060B0E1 MOVS R6,R0
\ ??Ymodem_Receive_20:
\ 0000021C 04009DE5 LDR R0,[SP, #+4]
\ 00000220 000056E1 CMP R6,R0
\ 00000224 270000AA BGE ??Ymodem_Receive_21
\ 00000228 28019FE5 LDR R0,??Ymodem_Receive_15+0x8 ;; Flash_Destination
\ 0000022C 000090E5 LDR R0,[R0, #+0]
\ 00000230 00109DE5 LDR R1,[SP, #+0]
\ 00000234 4024A0E3 MOV R2,#+1073741824
\ 00000238 802D82E3 ORR R2,R2,#0x2000
\ 0000023C 011092E0 ADDS R1,R2,R1
\ 00000240 010050E1 CMP R0,R1
\ 00000244 1F00002A BCS ??Ymodem_Receive_21
202 {
203 /* Program the data received into Flash */
204 FLASH_WordWrite(Flash_Destination,*(u32*)Ram_Source);
\ 00000248 04019FE5 LDR R0,??Ymodem_Receive_15+0x4 ;; Ram_Source
\ 0000024C 000090E5 LDR R0,[R0, #+0]
\ 00000250 001090E5 LDR R1,[R0, #+0]
\ 00000254 FC009FE5 LDR R0,??Ymodem_Receive_15+0x8 ;; Flash_Destination
\ 00000258 000090E5 LDR R0,[R0, #+0]
\ 0000025C ........ _BLF FLASH_WordWrite,??FLASH_WordWrite??rA
205 if(*(u32*)Flash_Destination != *(u32*)Ram_Source)
\ 00000260 F0009FE5 LDR R0,??Ymodem_Receive_15+0x8 ;; Flash_Destination
\ 00000264 000090E5 LDR R0,[R0, #+0]
\ 00000268 000090E5 LDR R0,[R0, #+0]
\ 0000026C E0109FE5 LDR R1,??Ymodem_Receive_15+0x4 ;; Ram_Source
\ 00000270 001091E5 LDR R1,[R1, #+0]
\ 00000274 001091E5 LDR R1,[R1, #+0]
\ 00000278 010050E1 CMP R0,R1
\ 0000027C 0500000A BEQ ??Ymodem_Receive_22
206 {
207 /* End session */
208 Send_Byte(CAN);
\ 00000280 1800A0E3 MOV R0,#+24
\ 00000284 ........ BL Send_Byte
209 Send_Byte(CAN);
\ 00000288 1800A0E3 MOV R0,#+24
\ 0000028C ........ BL Send_Byte
210 return -2;
\ 00000290 0100E0E3 MVN R0,#+1
\ 00000294 2A0000EA B ??Ymodem_Receive_8
211 }
212 Flash_Destination += 4;
\ ??Ymodem_Receive_22:
\ 00000298 B8009FE5 LDR R0,??Ymodem_Receive_15+0x8 ;; Flash_Destination
\ 0000029C B4109FE5 LDR R1,??Ymodem_Receive_15+0x8 ;; Flash_Destination
\ 000002A0 001091E5 LDR R1,[R1, #+0]
\ 000002A4 041091E2 ADDS R1,R1,#+4
\ 000002A8 001080E5 STR R1,[R0, #+0]
213 Ram_Source+=4;
\ 000002AC A0009FE5 LDR R0,??Ymodem_Receive_15+0x4 ;; Ram_Source
\ 000002B0 9C109FE5 LDR R1,??Ymodem_Receive_15+0x4 ;; Ram_Source
\ 000002B4 001091E5 LDR R1,[R1, #+0]
\ 000002B8 041091E2 ADDS R1,R1,#+4
\ 000002BC 001080E5 STR R1,[R0, #+0]
214 }
\ 000002C0 046096E2 ADDS R6,R6,#+4
\ 000002C4 D4FFFFEA B ??Ymodem_Receive_20
215
216 Send_Byte(ACK);
\ ??Ymodem_Receive_21:
\ 000002C8 0600A0E3 MOV R0,#+6
\ 000002CC ........ BL Send_Byte
217 }
218 packets_received ++;
\ ??Ymodem_Receive_19:
\ 000002D0 018098E2 ADDS R8,R8,#+1
219 session_begin = 1;
\ 000002D4 0100A0E3 MOV R0,#+1
\ 000002D8 00A0B0E1 MOVS R10,R0
\ 000002DC 120000EA B ??Ymodem_Receive_9
220 }
221 }
222 break;
223 case 1:
224 Send_Byte(CAN);
\ ??Ymodem_Receive_3:
\ 000002E0 1800A0E3 MOV R0,#+24
\ 000002E4 ........ BL Send_Byte
225 Send_Byte(CAN);
\ 000002E8 1800A0E3 MOV R0,#+24
\ 000002EC ........ BL Send_Byte
226 return -3;
\ 000002F0 0200E0E3 MVN R0,#+2
\ 000002F4 120000EA B ??Ymodem_Receive_8
227 default:
228 if (session_begin > 0)
\ ??Ymodem_Receive_4:
\ 000002F8 01005AE3 CMP R10,#+1
\ 000002FC 000000BA BLT ??Ymodem_Receive_23
229 {
230 errors ++;
\ 00000300 019099E2 ADDS R9,R9,#+1
231 }
232 if (errors > MAX_ERRORS)
\ ??Ymodem_Receive_23:
\ 00000304 060059E3 CMP R9,#+6
\ 00000308 050000BA BLT ??Ymodem_Receive_24
233 {
234 Send_Byte(CAN);
\ 0000030C 1800A0E3 MOV R0,#+24
\ 00000310 ........ BL Send_Byte
235 Send_Byte(CAN);
\ 00000314 1800A0E3 MOV R0,#+24
\ 00000318 ........ BL Send_Byte
236 return 0;
\ 0000031C 0000A0E3 MOV R0,#+0
\ 00000320 070000EA B ??Ymodem_Receive_8
237 }
238 Send_Byte(CRC16);
\ ??Ymodem_Receive_24:
\ 00000324 4300A0E3 MOV R0,#+67
\ 00000328 ........ BL Send_Byte
239 break;
240 }
241 if (file_done != 0)
\ ??Ymodem_Receive_9:
\ 0000032C 000057E3 CMP R7,#+0
\ 00000330 45FFFF0A BEQ ??Ymodem_Receive_1
242 {
243 break;
244 }
245 }
246 if (session_done != 0)
\ 00000334 08009DE5 LDR R0,[SP, #+8]
\ 00000338 000050E3 CMP R0,#+0
\ 0000033C 3CFFFF0A BEQ ??Ymodem_Receive_0
247 {
248 break;
249 }
250 }
251 return (s32)size;
\ 00000340 00009DE5 LDR R0,[SP, #+0]
\ ??Ymodem_Receive_8:
\ 00000344 2CD08DE2 ADD SP,SP,#+44 ;; stack cleaning
\ 00000348 40DE8DE2 ADD SP,SP,#+1024
\ 0000034C F08FBDE8 POP {R4-R11,PC} ;; return
\ ??Ymodem_Receive_15:
\ 00000350 ........ DC32 file_name
\ 00000354 ........ DC32 Ram_Source
\ 00000358 ........ DC32 Flash_Destination
252 }
\ In segment DATA_ID, align 4, align-sorted
\ `?<Initializer for Flash_Destination>`:
\ 00000000 00200040 DC32 1073750016
253 /*******************(C)COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Maximum stack usage in bytes:
Function CSTACK
-------- ------
Receive_Byte 12
Receive_Packet 28
Send_Byte 8
Ymodem_Receive 1104
Segment part sizes:
Function/Label Bytes
-------------- -----
file_name 256
Flash_Destination 4
Ram_Source 4
Receive_Byte 60
Send_Byte 24
Receive_Packet 324
Ymodem_Receive 860
?<Initializer for Flash_Destination>
4
Others 108
1 352 bytes in segment CODE
4 bytes in segment DATA_I
4 bytes in segment DATA_ID
260 bytes in segment DATA_Z
24 bytes in segment INITTAB
1 268 bytes of CODE memory (+ 108 bytes shared)
4 bytes of CONST memory
264 bytes of DATA memory
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -