📄 debug.cod
字号:
00004 |$M15700|
; 168 : return(UartRead());
00004 eb000000 bl UART2_Read
; 169 : }
00008 e49de004 ldr lr, [sp], #4
0000c e12fff1e bx lr
00010 |$M15701|
ENDP ; |OEMReadDebugByte|
EXPORT |OEMClearDebugCommError|
00000 AREA |.text| { |OEMClearDebugCommError| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMClearDebugCommError|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMClearDebugCommError| } ; comdat associative
|$T15713| DCD |$L15712|
DCD 0x40000d00
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMClearDebugCommError| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMClearDebugCommError| PROC
; 179 : {
00000 |$L15712|
00000 |$M15710|
; 180 : UartClearError();
00000 e59f1028 ldr r1, [pc, #0x28]
00004 e59f3020 ldr r3, [pc, #0x20]
00008 e59f2018 ldr r2, [pc, #0x18]
0000c e3a00000 mov r0, #0
00010 e5810000 str r0, [r1]
00014 e5830000 str r0, [r3]
00018 e3a03001 mov r3, #1
0001c e5820000 str r0, [r2]
00020 e5813000 str r3, [r1]
; 181 : }
00024 e12fff1e bx lr
00028 |$L15715|
00028 b08d001c DCD 0xb08d001c
0002c b08d0004 DCD 0xb08d0004
00030 b08d0014 DCD 0xb08d0014
00034 |$M15711|
ENDP ; |OEMClearDebugCommError|
EXPORT |OEMUartStop|
00000 AREA |.text| { |OEMUartStop| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMUartStop|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMUartStop| } ; comdat associative
|$T15724| DCD |$L15723|
DCD 0x40001701
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMUartStop| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMUartStop| PROC
; 190 : {
00000 |$L15723|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M15721|
; 191 : UartStop();
00004 e59f304c ldr r3, [pc, #0x4C]
00008 e59f2044 ldr r2, [pc, #0x44]
0000c e59f003c ldr r0, [pc, #0x3C]
00010 e3a0e000 mov lr, #0
00014 e59f1030 ldr r1, [pc, #0x30]
00018 e583e000 str lr, [r3]
0001c e59f3024 ldr r3, [pc, #0x24]
00020 e582e000 str lr, [r2]
; 192 : giSerialInitialized = 0;
00024 e59f2018 ldr r2, [pc, #0x18]
00028 e580e000 str lr, [r0]
0002c e581e000 str lr, [r1]
00030 e583e000 str lr, [r3]
00034 e3a03000 mov r3, #0
00038 e5823000 str r3, [r2]
; 193 : }
0003c e49de004 ldr lr, [sp], #4
00040 e12fff1e bx lr
00044 |$L15726|
00044 00000000 DCD |giSerialInitialized|
00048 b08d0004 DCD 0xb08d0004
0004c b08d0010 DCD 0xb08d0010
00050 b08d000c DCD 0xb08d000c
00054 b08d0008 DCD 0xb08d0008
00058 b08d0014 DCD 0xb08d0014
0005c |$M15722|
ENDP ; |OEMUartStop|
EXPORT |UART1_Start|
00000 AREA |.text| { |UART1_Start| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$UART1_Start|, PDATA, SELECTION=5, ASSOC=|.text| { |UART1_Start| } ; comdat associative
|$T15735| DCD |$L15734|
DCD 0x40002301
; Function compile flags: /Ogsy
00000 AREA |.text| { |UART1_Start| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |UART1_Start| PROC
; 202 : {
00000 |$L15734|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M15732|
; 203 : UART1_Stop();
00004 e59fe07c ldr lr, [pc, #0x7C]
00008 e59f0074 ldr r0, [pc, #0x74]
0000c e59f206c ldr r2, [pc, #0x6C]
00010 e59f3064 ldr r3, [pc, #0x64]
00014 e3a04000 mov r4, #0
00018 e59f1058 ldr r1, [pc, #0x58]
0001c e58e4000 str r4, [lr]
00020 e5804000 str r4, [r0]
00024 e5824000 str r4, [r2]
00028 e5834000 str r4, [r3]
0002c e5814000 str r4, [r1]
; 204 :
; 205 : //
; 206 : // Set up default baudrate
; 207 : //
; 208 : *UART1_LCR_M = 0 ;
00030 e5824000 str r4, [r2]
; 209 : *UART1_LCR_L = UART_DIVISOR(DEBUG_UART_SPEED);
00034 e3a0200b mov r2, #0xB
00038 e5832000 str r2, [r3]
; 210 :
; 211 : //
; 212 : // Setup mode 8 bits, no parity, 1 stop bit, fifo enabled.
; 213 : //
; 214 : *UART1_LCR_H = LCR_H_DATABITS_8 | LCR_H_FIFO_ENABLE;
0003c e3a03070 mov r3, #0x70
; 215 :
; 216 :
; 217 : // Clear old status.
; 218 : *UART1_SR = 0;
; 219 : *UART1_MCR = MCR_RTS | MCR_DTR;
00040 e59f202c ldr r2, [pc, #0x2C]
00044 e5803000 str r3, [r0]
; 220 : *UART1_IIR = 0;
00048 e59f3020 ldr r3, [pc, #0x20]
0004c e5814000 str r4, [r1]
00050 e3a01003 mov r1, #3
00054 e5821000 str r1, [r2]
00058 e5834000 str r4, [r3]
; 221 :
; 222 : //
; 223 : // enable this uart
; 224 : //
; 225 : *UART1_CR |= CR_UARTE;
0005c e59e3000 ldr r3, [lr]
00060 e3833001 orr r3, r3, #1
00064 e58e3000 str r3, [lr]
; 226 :
; 227 : return;
; 228 : }//end uart1_start
00068 e8bd4010 ldmia sp!, {r4, lr}
0006c e12fff1e bx lr
00070 |$L15737|
00070 b08c001c DCD 0xb08c001c
00074 b08c0100 DCD 0xb08c0100
00078 b08c0004 DCD 0xb08c0004
0007c b08c0010 DCD 0xb08c0010
00080 b08c000c DCD 0xb08c000c
00084 b08c0008 DCD 0xb08c0008
00088 b08c0014 DCD 0xb08c0014
0008c |$M15733|
ENDP ; |UART1_Start|
EXPORT |UART2_Start|
00000 AREA |.text| { |UART2_Start| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$UART2_Start|, PDATA, SELECTION=5, ASSOC=|.text| { |UART2_Start| } ; comdat associative
|$T15746| DCD |$L15745|
DCD 0x40001f01
; Function compile flags: /Ogsy
00000 AREA |.text| { |UART2_Start| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |UART2_Start| PROC
; 236 : {
00000 |$L15745|
00000 e92d4010 stmdb sp!, {r4, lr}
00004 |$M15743|
; 237 : UART2_Stop();
00004 e59fe06c ldr lr, [pc, #0x6C]
00008 e59f0064 ldr r0, [pc, #0x64]
0000c e59f205c ldr r2, [pc, #0x5C]
00010 e59f3054 ldr r3, [pc, #0x54]
00014 e3a04000 mov r4, #0
00018 e59f1048 ldr r1, [pc, #0x48]
0001c e58e4000 str r4, [lr]
00020 e5804000 str r4, [r0]
00024 e5824000 str r4, [r2]
00028 e5834000 str r4, [r3]
0002c e5814000 str r4, [r1]
; 238 :
; 239 : //
; 240 : // Set up default baudrate
; 241 : //
; 242 : *UART2_LCR_M = 0 ;
00030 e5824000 str r4, [r2]
; 243 : *UART2_LCR_L = UART_DIVISOR(DEBUG_UART_SPEED);
00034 e3a0200b mov r2, #0xB
00038 e5832000 str r2, [r3]
; 244 :
; 245 : //
; 246 : // Setup mode 8 bits, no parity, 1 stop bit, fifo enabled.
; 247 : //
; 248 : *UART2_LCR_H = LCR_H_DATABITS_8 | LCR_H_FIFO_ENABLE;
; 249 :
; 250 :
; 251 : // Clear old status.
; 252 : *UART2_SR = 0;
; 253 : // *UART2_MCR = MCR_RTS | MCR_DTR;
; 254 : *UART2_IIR = 0;
0003c e59f3020 ldr r3, [pc, #0x20]
00040 e3a02070 mov r2, #0x70
00044 e5802000 str r2, [r0]
00048 e5814000 str r4, [r1]
0004c e5834000 str r4, [r3]
; 255 :
; 256 : //
; 257 : // enable this uart
; 258 : //
; 259 : *UART2_CR |= CR_UARTE;
00050 e59e3000 ldr r3, [lr]
00054 e3833001 orr r3, r3, #1
00058 e58e3000 str r3, [lr]
; 260 :
; 261 : return;
; 262 : }//end uart1_start
0005c e8bd4010 ldmia sp!, {r4, lr}
00060 e12fff1e bx lr
00064 |$L15748|
00064 b08d001c DCD 0xb08d001c
00068 b08d0004 DCD 0xb08d0004
0006c b08d0010 DCD 0xb08d0010
00070 b08d000c DCD 0xb08d000c
00074 b08d0008 DCD 0xb08d0008
00078 b08d0014 DCD 0xb08d0014
0007c |$M15744|
ENDP ; |UART2_Start|
EXPORT |UART3_Start|
00000 AREA |.text| { |UART3_Start| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$UART3_Start|, PDATA, SELECTION=5, ASSOC=|.text| { |UART3_Start| } ; comdat associative
|$T15757| DCD |$L15756|
DCD 0x40001e01
; Function compile flags: /Ogsy
00000 AREA |.text| { |UART3_Start| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |UART3_Start| PROC
; 271 : {
00000 |$L15756|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M15754|
; 272 : //
; 273 : // Uart3 stop.
; 274 : //
; 275 : UART3_Stop();
00004 e59fe068 ldr lr, [pc, #0x68]
00008 e59f0060 ldr r0, [pc, #0x60]
0000c e59f1058 ldr r1, [pc, #0x58]
00010 e59f3050 ldr r3, [pc, #0x50]
00014 e3a05000 mov r5, #0
00018 e59f2044 ldr r2, [pc, #0x44]
0001c e58e5000 str r5, [lr]
00020 e5805000 str r5, [r0]
00024 e5815000 str r5, [r1]
00028 e5835000 str r5, [r3]
; 276 :
; 277 : //
; 278 : // Program uart divisor.
; 279 : //
; 280 : *UART3_LCR_L = UART_DIVISOR(DEBUG_UART_SPEED);
0002c e3a0400b mov r4, #0xB
00030 e5825000 str r5, [r2]
00034 e5834000 str r4, [r3]
; 281 : *UART3_LCR_M = 0 ;
; 282 :
; 283 : //
; 284 : // setup mode 8 data bits, 1 stop bit, no parity.
; 285 : //
; 286 : *UART3_LCR_H = LCR_H_DATABITS_8 ;
; 287 :
; 288 : //
; 289 : // Clear old status.
; 290 : //
; 291 : *UART3_SR = 0;
; 292 :
; 293 : //
; 294 : //clr intrpts
; 295 : //
; 296 : *UART3_IIR = 0;
00038 e59f3020 ldr r3, [pc, #0x20]
0003c e5815000 str r5, [r1]
00040 e3a01060 mov r1, #0x60
00044 e5801000 str r1, [r0]
00048 e5825000 str r5, [r2]
0004c e5835000 str r5, [r3]
; 297 :
; 298 : //
; 299 : // enable this uart
; 300 : //
; 301 : *UART3_CR = CR_UARTE;
00050 e3a03001 mov r3, #1
00054 e58e3000 str r3, [lr]
; 302 :
; 303 : return;
; 304 :
; 305 : }//end uart3_start
00058 e8bd4030 ldmia sp!, {r4, r5, lr}
0005c e12fff1e bx lr
00060 |$L15759|
00060 b08e001c DCD 0xb08e001c
00064 b08e0004 DCD 0xb08e0004
00068 b08e0010 DCD 0xb08e0010
0006c b08e000c DCD 0xb08e000c
00070 b08e0008 DCD 0xb08e0008
00074 b08e0014 DCD 0xb08e0014
00078 |$M15755|
ENDP ; |UART3_Start|
EXPORT |OEMInitDebugSerial|
00000 AREA |.text| { |OEMInitDebugSerial| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMInitDebugSerial|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMInitDebugSerial| } ; comdat associative
|$T15765| DCD |$L15764|
DCD 0x40000c01
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMInitDebugSerial| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMInitDebugSerial| PROC
; 100 : {
00000 |$L15764|
00000 e92d4030 stmdb sp!, {r4, r5, lr}
00004 |$M15762|
; 101 : if(giSerialInitialized !=SERIAL_INITIALIZED_CHECK)
00004 e59f4020 ldr r4, [pc, #0x20]
00008 e59f5018 ldr r5, [pc, #0x18]
0000c e5943000 ldr r3, [r4]
00010 e1530005 cmp r3, r5
00014 0a000001 beq |$L15333|
; 102 : {
; 103 : UartStart();
00018 eb000000 bl UART2_Start
; 104 : giSerialInitialized = SERIAL_INITIALIZED_CHECK;
0001c e5845000 str r5, [r4]
00020 |$L15333|
; 105 : }
; 106 : }
00020 e8bd4030 ldmia sp!, {r4, r5, lr}
00024 e12fff1e bx lr
00028 |$L15767|
00028 12345678 DCD 0x12345678
0002c 00000000 DCD |giSerialInitialized|
00030 |$M15763|
ENDP ; |OEMInitDebugSerial|
EXPORT |OEMWriteDebugString|
00000 AREA |.text| { |OEMWriteDebugString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$OEMWriteDebugString|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMWriteDebugString| } ; comdat associative
|$T15791| DCD |$L15790|
DCD 0x40001301
; Function compile flags: /Ogsy
00000 AREA |.text| { |OEMWriteDebugString| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |OEMWriteDebugString| PROC
; 135 : {
00000 |$L15790|
00000 e52de004 str lr, [sp, #-4]!
00004 |$M15788|
; 136 : //
; 137 : // Send message to serial port
; 138 : //
; 139 : while ( *str )
00004 e1d030b0 ldrh r3, [r0]
00008 e3530000 cmp r3, #0
0000c 0a00000b beq |$L15347|
00010 e3a0120b mov r1, #0xB, 4
00014 e59fe02c ldr lr, [pc, #0x2C]
00018 e381188d orr r1, r1, #0x8D, 16
0001c |$L15346|
; 140 : {
; 141 : OEMWriteDebugByte((unsigned char)*str++);
0001c e20320ff and r2, r3, #0xFF
00020 |$L15778|
00020 e59e3000 ldr r3, [lr]
00024 e2033080 and r3, r3, #0x80
00028 e3530080 cmp r3, #0x80
0002c 1afffffb bne |$L15778|
00030 e5812000 str r2, [r1]
00034 e1f030b2 ldrh r3, [r0, #2]!
00038 e3530000 cmp r3, #0
0003c 1afffff6 bne |$L15346|
00040 |$L15347|
; 142 : }
; 143 : }
00040 e49de004 ldr lr, [sp], #4
00044 e12fff1e bx lr
00048 |$L15793|
00048 b08d0018 DCD 0xb08d0018
0004c |$M15789|
ENDP ; |OEMWriteDebugString|
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -