STM32H7-node-red-CM7.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 00000298 08000000 08000000 00001000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 00013fd8 080002a0 080002a0 000012a0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 00003e44 08014278 08014278 00015278 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .ARM.extab 00000000 080180bc 080180bc 0001a08c 2**0 CONTENTS 4 .ARM 00000008 080180bc 080180bc 000190bc 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .preinit_array 00000000 080180c4 080180c4 0001a08c 2**0 CONTENTS, ALLOC, LOAD, DATA 6 .init_array 00000004 080180c4 080180c4 000190c4 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .fini_array 00000004 080180c8 080180c8 000190c8 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .data 0000008c 24000000 080180cc 0001a000 2**2 CONTENTS, ALLOC, LOAD, DATA 9 .bss 00019d10 2400008c 08018158 0001a08c 2**2 ALLOC 10 ._user_heap_stack 00000604 24019d9c 08018158 0001ad9c 2**0 ALLOC 11 .lwip_sec 00024b83 30020000 30020000 0001b000 2**2 ALLOC 12 .ARM.attributes 0000002e 00000000 00000000 0001a08c 2**0 CONTENTS, READONLY 13 .debug_info 00057232 00000000 00000000 0001a0ba 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_abbrev 0000ab68 00000000 00000000 000712ec 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_loclists 0001f9dd 00000000 00000000 0007be54 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_aranges 00002c80 00000000 00000000 0009b838 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_rnglists 000028cc 00000000 00000000 0009e4b8 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .debug_macro 0004c109 00000000 00000000 000a0d84 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 19 .debug_line 00057a8c 00000000 00000000 000ece8d 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 20 .debug_str 001a9140 00000000 00000000 00144919 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 21 .comment 00000043 00000000 00000000 002eda59 2**0 CONTENTS, READONLY 22 .debug_frame 00008c70 00000000 00000000 002eda9c 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 23 .debug_line_str 00000064 00000000 00000000 002f670c 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS Disassembly of section .text: 080002a0 <__do_global_dtors_aux>: 80002a0: b510 push {r4, lr} 80002a2: 4c05 ldr r4, [pc, #20] @ (80002b8 <__do_global_dtors_aux+0x18>) 80002a4: 7823 ldrb r3, [r4, #0] 80002a6: b933 cbnz r3, 80002b6 <__do_global_dtors_aux+0x16> 80002a8: 4b04 ldr r3, [pc, #16] @ (80002bc <__do_global_dtors_aux+0x1c>) 80002aa: b113 cbz r3, 80002b2 <__do_global_dtors_aux+0x12> 80002ac: 4804 ldr r0, [pc, #16] @ (80002c0 <__do_global_dtors_aux+0x20>) 80002ae: f3af 8000 nop.w 80002b2: 2301 movs r3, #1 80002b4: 7023 strb r3, [r4, #0] 80002b6: bd10 pop {r4, pc} 80002b8: 2400008c .word 0x2400008c 80002bc: 00000000 .word 0x00000000 80002c0: 08014260 .word 0x08014260 080002c4 : 80002c4: b508 push {r3, lr} 80002c6: 4b03 ldr r3, [pc, #12] @ (80002d4 ) 80002c8: b11b cbz r3, 80002d2 80002ca: 4903 ldr r1, [pc, #12] @ (80002d8 ) 80002cc: 4803 ldr r0, [pc, #12] @ (80002dc ) 80002ce: f3af 8000 nop.w 80002d2: bd08 pop {r3, pc} 80002d4: 00000000 .word 0x00000000 80002d8: 24000090 .word 0x24000090 80002dc: 08014260 .word 0x08014260 080002e0 : 80002e0: f810 2b01 ldrb.w r2, [r0], #1 80002e4: f811 3b01 ldrb.w r3, [r1], #1 80002e8: 2a01 cmp r2, #1 80002ea: bf28 it cs 80002ec: 429a cmpcs r2, r3 80002ee: d0f7 beq.n 80002e0 80002f0: 1ad0 subs r0, r2, r3 80002f2: 4770 bx lr 080002f4 : 80002f4: 4603 mov r3, r0 80002f6: f813 2b01 ldrb.w r2, [r3], #1 80002fa: 2a00 cmp r2, #0 80002fc: d1fb bne.n 80002f6 80002fe: 1a18 subs r0, r3, r0 8000300: 3801 subs r0, #1 8000302: 4770 bx lr ... 08000310 : 8000310: f001 01ff and.w r1, r1, #255 @ 0xff 8000314: 2a10 cmp r2, #16 8000316: db2b blt.n 8000370 8000318: f010 0f07 tst.w r0, #7 800031c: d008 beq.n 8000330 800031e: f810 3b01 ldrb.w r3, [r0], #1 8000322: 3a01 subs r2, #1 8000324: 428b cmp r3, r1 8000326: d02d beq.n 8000384 8000328: f010 0f07 tst.w r0, #7 800032c: b342 cbz r2, 8000380 800032e: d1f6 bne.n 800031e 8000330: b4f0 push {r4, r5, r6, r7} 8000332: ea41 2101 orr.w r1, r1, r1, lsl #8 8000336: ea41 4101 orr.w r1, r1, r1, lsl #16 800033a: f022 0407 bic.w r4, r2, #7 800033e: f07f 0700 mvns.w r7, #0 8000342: 2300 movs r3, #0 8000344: e8f0 5602 ldrd r5, r6, [r0], #8 8000348: 3c08 subs r4, #8 800034a: ea85 0501 eor.w r5, r5, r1 800034e: ea86 0601 eor.w r6, r6, r1 8000352: fa85 f547 uadd8 r5, r5, r7 8000356: faa3 f587 sel r5, r3, r7 800035a: fa86 f647 uadd8 r6, r6, r7 800035e: faa5 f687 sel r6, r5, r7 8000362: b98e cbnz r6, 8000388 8000364: d1ee bne.n 8000344 8000366: bcf0 pop {r4, r5, r6, r7} 8000368: f001 01ff and.w r1, r1, #255 @ 0xff 800036c: f002 0207 and.w r2, r2, #7 8000370: b132 cbz r2, 8000380 8000372: f810 3b01 ldrb.w r3, [r0], #1 8000376: 3a01 subs r2, #1 8000378: ea83 0301 eor.w r3, r3, r1 800037c: b113 cbz r3, 8000384 800037e: d1f8 bne.n 8000372 8000380: 2000 movs r0, #0 8000382: 4770 bx lr 8000384: 3801 subs r0, #1 8000386: 4770 bx lr 8000388: 2d00 cmp r5, #0 800038a: bf06 itte eq 800038c: 4635 moveq r5, r6 800038e: 3803 subeq r0, #3 8000390: 3807 subne r0, #7 8000392: f015 0f01 tst.w r5, #1 8000396: d107 bne.n 80003a8 8000398: 3001 adds r0, #1 800039a: f415 7f80 tst.w r5, #256 @ 0x100 800039e: bf02 ittt eq 80003a0: 3001 addeq r0, #1 80003a2: f415 3fc0 tsteq.w r5, #98304 @ 0x18000 80003a6: 3001 addeq r0, #1 80003a8: bcf0 pop {r4, r5, r6, r7} 80003aa: 3801 subs r0, #1 80003ac: 4770 bx lr 80003ae: bf00 nop 080003b0 : */ void SystemInit (void) { /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << (10*2))|(3UL << (11*2))); /* set CP10 and CP11 Full Access */ 80003b0: 4b2d ldr r3, [pc, #180] @ (8000468 ) 80003b2: f8d3 2088 ldr.w r2, [r3, #136] @ 0x88 80003b6: f442 0270 orr.w r2, r2, #15728640 @ 0xf00000 80003ba: f8c3 2088 str.w r2, [r3, #136] @ 0x88 #endif /*SEVONPEND enabled so that an interrupt coming from the CPU(n) interrupt signal is detectable by the CPU after a WFI/WFE instruction.*/ SCB->SCR |= SCB_SCR_SEVONPEND_Msk; 80003be: 691a ldr r2, [r3, #16] 80003c0: f042 0210 orr.w r2, r2, #16 80003c4: 611a str r2, [r3, #16] #if defined(CORE_CM7) /* Reset the RCC clock configuration to the default reset state ------------*/ /* Increasing the CPU frequency */ if(FLASH_LATENCY_DEFAULT > (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) 80003c6: 4b29 ldr r3, [pc, #164] @ (800046c ) 80003c8: 681b ldr r3, [r3, #0] 80003ca: f003 030f and.w r3, r3, #15 80003ce: 2b06 cmp r3, #6 80003d0: d806 bhi.n 80003e0 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); 80003d2: 4a26 ldr r2, [pc, #152] @ (800046c ) 80003d4: 6813 ldr r3, [r2, #0] 80003d6: f023 030f bic.w r3, r3, #15 80003da: f043 0307 orr.w r3, r3, #7 80003de: 6013 str r3, [r2, #0] } /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; 80003e0: 4b23 ldr r3, [pc, #140] @ (8000470 ) 80003e2: 681a ldr r2, [r3, #0] 80003e4: f042 0201 orr.w r2, r2, #1 80003e8: 601a str r2, [r3, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 80003ea: 2200 movs r2, #0 80003ec: 611a str r2, [r3, #16] /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; 80003ee: 6819 ldr r1, [r3, #0] 80003f0: 4a20 ldr r2, [pc, #128] @ (8000474 ) 80003f2: 400a ands r2, r1 80003f4: 601a str r2, [r3, #0] /* Decreasing the number of wait states because of lower CPU frequency */ if(FLASH_LATENCY_DEFAULT < (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))) 80003f6: 4b1d ldr r3, [pc, #116] @ (800046c ) 80003f8: 681b ldr r3, [r3, #0] 80003fa: f013 0f08 tst.w r3, #8 80003fe: d006 beq.n 800040e { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ MODIFY_REG(FLASH->ACR, FLASH_ACR_LATENCY, (uint32_t)(FLASH_LATENCY_DEFAULT)); 8000400: 4a1a ldr r2, [pc, #104] @ (800046c ) 8000402: 6813 ldr r3, [r2, #0] 8000404: f023 030f bic.w r3, r3, #15 8000408: f043 0307 orr.w r3, r3, #7 800040c: 6013 str r3, [r2, #0] } /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; 800040e: 4b18 ldr r3, [pc, #96] @ (8000470 ) 8000410: 2200 movs r2, #0 8000412: 619a str r2, [r3, #24] /* Reset D2CFGR register */ RCC->D2CFGR = 0x00000000; 8000414: 61da str r2, [r3, #28] /* Reset D3CFGR register */ RCC->D3CFGR = 0x00000000; 8000416: 621a str r2, [r3, #32] /* Reset PLLCKSELR register */ RCC->PLLCKSELR = 0x02020200; 8000418: 4917 ldr r1, [pc, #92] @ (8000478 ) 800041a: 6299 str r1, [r3, #40] @ 0x28 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x01FF0000; 800041c: 4917 ldr r1, [pc, #92] @ (800047c ) 800041e: 62d9 str r1, [r3, #44] @ 0x2c /* Reset PLL1DIVR register */ RCC->PLL1DIVR = 0x01010280; 8000420: 4917 ldr r1, [pc, #92] @ (8000480 ) 8000422: 6319 str r1, [r3, #48] @ 0x30 /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; 8000424: 635a str r2, [r3, #52] @ 0x34 /* Reset PLL2DIVR register */ RCC->PLL2DIVR = 0x01010280; 8000426: 6399 str r1, [r3, #56] @ 0x38 /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; 8000428: 63da str r2, [r3, #60] @ 0x3c /* Reset PLL3DIVR register */ RCC->PLL3DIVR = 0x01010280; 800042a: 6419 str r1, [r3, #64] @ 0x40 /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; 800042c: 645a str r2, [r3, #68] @ 0x44 /* Reset HSEBYP bit */ RCC->CR &= 0xFFFBFFFFU; 800042e: 6819 ldr r1, [r3, #0] 8000430: f421 2180 bic.w r1, r1, #262144 @ 0x40000 8000434: 6019 str r1, [r3, #0] /* Disable all interrupts */ RCC->CIER = 0x00000000; 8000436: 661a str r2, [r3, #96] @ 0x60 /* Enable CortexM7 HSEM EXTI line (line 78)*/ EXTI_D2->EMR3 |= 0x4000UL; 8000438: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800043c: f8d2 30e4 ldr.w r3, [r2, #228] @ 0xe4 8000440: f443 4380 orr.w r3, r3, #16384 @ 0x4000 8000444: f8c2 30e4 str.w r3, [r2, #228] @ 0xe4 if((DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U) 8000448: 4b0e ldr r3, [pc, #56] @ (8000484 ) 800044a: 681a ldr r2, [r3, #0] 800044c: 4b0e ldr r3, [pc, #56] @ (8000488 ) 800044e: 4013 ands r3, r2 8000450: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 8000454: d203 bcs.n 800045e { /* if stm32h7 revY*/ /* Change the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 7) */ *((__IO uint32_t*)0x51008108) = 0x000000001U; 8000456: 4b0d ldr r3, [pc, #52] @ (800048c ) 8000458: 2201 movs r2, #1 800045a: f8c3 2108 str.w r2, [r3, #264] @ 0x108 /* * Disable the FMC bank1 (enabled after reset). * This, prevents CPU speculation access on this bank which blocks the use of FMC during * 24us. During this time the others FMC master (such as LTDC) cannot use it! */ FMC_Bank1_R->BTCR[0] = 0x000030D2; 800045e: 4b0c ldr r3, [pc, #48] @ (8000490 ) 8000460: f243 02d2 movw r2, #12498 @ 0x30d2 8000464: 601a str r2, [r3, #0] #endif /* USER_VECT_TAB_ADDRESS */ #else #error Please #define CORE_CM4 or CORE_CM7 #endif /* CORE_CM4 */ } 8000466: 4770 bx lr 8000468: e000ed00 .word 0xe000ed00 800046c: 52002000 .word 0x52002000 8000470: 58024400 .word 0x58024400 8000474: eaf6ed7f .word 0xeaf6ed7f 8000478: 02020200 .word 0x02020200 800047c: 01ff0000 .word 0x01ff0000 8000480: 01010280 .word 0x01010280 8000484: 5c001000 .word 0x5c001000 8000488: ffff0000 .word 0xffff0000 800048c: 51008000 .word 0x51008000 8000490: 52004000 .word 0x52004000 08000494 : void vApplicationStackOverflowHook(xTaskHandle xTask, signed char *pcTaskName) { /* ETH_CODE: add breakpoint when stack oveflow is detected by FreeRTOS. * Useful for debugging issues. */ __BKPT(0); 8000494: be00 bkpt 0x0000 } 8000496: 4770 bx lr 08000498 : * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { 8000498: b088 sub sp, #32 /* GPIO Ports Clock Enable */ __HAL_RCC_GPIOG_CLK_ENABLE(); 800049a: 4b2b ldr r3, [pc, #172] @ (8000548 ) 800049c: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004a0: f042 0240 orr.w r2, r2, #64 @ 0x40 80004a4: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 80004a8: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004ac: f002 0240 and.w r2, r2, #64 @ 0x40 80004b0: 9201 str r2, [sp, #4] 80004b2: 9a01 ldr r2, [sp, #4] __HAL_RCC_GPIOA_CLK_ENABLE(); 80004b4: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004b8: f042 0201 orr.w r2, r2, #1 80004bc: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 80004c0: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004c4: f002 0201 and.w r2, r2, #1 80004c8: 9202 str r2, [sp, #8] 80004ca: 9a02 ldr r2, [sp, #8] __HAL_RCC_GPIOC_CLK_ENABLE(); 80004cc: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004d0: f042 0204 orr.w r2, r2, #4 80004d4: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 80004d8: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004dc: f002 0204 and.w r2, r2, #4 80004e0: 9203 str r2, [sp, #12] 80004e2: 9a03 ldr r2, [sp, #12] __HAL_RCC_GPIOE_CLK_ENABLE(); 80004e4: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004e8: f042 0210 orr.w r2, r2, #16 80004ec: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 80004f0: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80004f4: f002 0210 and.w r2, r2, #16 80004f8: 9204 str r2, [sp, #16] 80004fa: 9a04 ldr r2, [sp, #16] __HAL_RCC_GPIOB_CLK_ENABLE(); 80004fc: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8000500: f042 0202 orr.w r2, r2, #2 8000504: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 8000508: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 800050c: f002 0202 and.w r2, r2, #2 8000510: 9205 str r2, [sp, #20] 8000512: 9a05 ldr r2, [sp, #20] __HAL_RCC_GPIOI_CLK_ENABLE(); 8000514: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8000518: f442 7280 orr.w r2, r2, #256 @ 0x100 800051c: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 8000520: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8000524: f402 7280 and.w r2, r2, #256 @ 0x100 8000528: 9206 str r2, [sp, #24] 800052a: 9a06 ldr r2, [sp, #24] __HAL_RCC_GPIOH_CLK_ENABLE(); 800052c: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8000530: f042 0280 orr.w r2, r2, #128 @ 0x80 8000534: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 8000538: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 800053c: f003 0380 and.w r3, r3, #128 @ 0x80 8000540: 9307 str r3, [sp, #28] 8000542: 9b07 ldr r3, [sp, #28] } 8000544: b008 add sp, #32 8000546: 4770 bx lr 8000548: 58024400 .word 0x58024400 0800054c : } /* MPU Configuration */ void MPU_Config(void) { 800054c: b530 push {r4, r5, lr} 800054e: b085 sub sp, #20 MPU_Region_InitTypeDef MPU_InitStruct = {0}; 8000550: 2400 movs r4, #0 8000552: 9400 str r4, [sp, #0] 8000554: 9401 str r4, [sp, #4] 8000556: 9402 str r4, [sp, #8] 8000558: 9403 str r4, [sp, #12] /* Disables the MPU */ HAL_MPU_Disable(); 800055a: f000 fd13 bl 8000f84 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; 800055e: 2501 movs r5, #1 8000560: f88d 5000 strb.w r5, [sp] MPU_InitStruct.Number = MPU_REGION_NUMBER0; 8000564: f88d 4001 strb.w r4, [sp, #1] MPU_InitStruct.BaseAddress = 0x0; 8000568: 9401 str r4, [sp, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; 800056a: 231f movs r3, #31 800056c: f88d 3008 strb.w r3, [sp, #8] MPU_InitStruct.SubRegionDisable = 0x87; 8000570: 2387 movs r3, #135 @ 0x87 8000572: f88d 3009 strb.w r3, [sp, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 8000576: f88d 400a strb.w r4, [sp, #10] MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; 800057a: f88d 400b strb.w r4, [sp, #11] MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; 800057e: f88d 500c strb.w r5, [sp, #12] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 8000582: f88d 500d strb.w r5, [sp, #13] MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; 8000586: f88d 400e strb.w r4, [sp, #14] MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; 800058a: f88d 400f strb.w r4, [sp, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 800058e: 4668 mov r0, sp 8000590: f000 fd16 bl 8000fc0 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER1; 8000594: f88d 5001 strb.w r5, [sp, #1] MPU_InitStruct.BaseAddress = 0x30020000; 8000598: 4b13 ldr r3, [pc, #76] @ (80005e8 ) 800059a: 9301 str r3, [sp, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_128KB; 800059c: 2310 movs r3, #16 800059e: f88d 3008 strb.w r3, [sp, #8] MPU_InitStruct.SubRegionDisable = 0x0; 80005a2: f88d 4009 strb.w r4, [sp, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; 80005a6: f88d 500a strb.w r5, [sp, #10] MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; 80005aa: 2303 movs r3, #3 80005ac: f88d 300b strb.w r3, [sp, #11] MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; 80005b0: f88d 400d strb.w r4, [sp, #13] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80005b4: 4668 mov r0, sp 80005b6: f000 fd03 bl 8000fc0 /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER2; 80005ba: 2302 movs r3, #2 80005bc: f88d 3001 strb.w r3, [sp, #1] MPU_InitStruct.BaseAddress = 0x30040000; 80005c0: 4b0a ldr r3, [pc, #40] @ (80005ec ) 80005c2: 9301 str r3, [sp, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_512B; 80005c4: 2308 movs r3, #8 80005c6: f88d 3008 strb.w r3, [sp, #8] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 80005ca: f88d 400a strb.w r4, [sp, #10] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 80005ce: f88d 500d strb.w r5, [sp, #13] MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; 80005d2: f88d 500f strb.w r5, [sp, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80005d6: 4668 mov r0, sp 80005d8: f000 fcf2 bl 8000fc0 /* Enables the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); 80005dc: 2004 movs r0, #4 80005de: f000 fcdf bl 8000fa0 } 80005e2: b005 add sp, #20 80005e4: bd30 pop {r4, r5, pc} 80005e6: bf00 nop 80005e8: 30020000 .word 0x30020000 80005ec: 30040000 .word 0x30040000 080005f0 : { 80005f0: b508 push {r3, lr} MX_LWIP_Init(); 80005f2: f002 fef3 bl 80033dc 80005f6: e002 b.n 80005fe my_counter = 0; 80005f8: 4613 mov r3, r2 80005fa: 2200 movs r2, #0 80005fc: 601a str r2, [r3, #0] osDelay(pdMS_TO_TICKS(1000)); 80005fe: f44f 707a mov.w r0, #1000 @ 0x3e8 8000602: f003 fc4b bl 8003e9c my_counter++; 8000606: 4a03 ldr r2, [pc, #12] @ (8000614 ) 8000608: 6813 ldr r3, [r2, #0] 800060a: 3301 adds r3, #1 800060c: 6013 str r3, [r2, #0] if(my_counter > 10) 800060e: 2b0a cmp r3, #10 8000610: d9f5 bls.n 80005fe 8000612: e7f1 b.n 80005f8 8000614: 240000a8 .word 0x240000a8 08000618 : * a global variable "uwTick" used as application time base. * @param htim : TIM handle * @retval None */ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { 8000618: b508 push {r3, lr} /* USER CODE BEGIN Callback 0 */ /* USER CODE END Callback 0 */ if (htim->Instance == TIM6) { 800061a: 6802 ldr r2, [r0, #0] 800061c: 4b05 ldr r3, [pc, #20] @ (8000634 ) 800061e: 429a cmp r2, r3 8000620: d000 beq.n 8000624 MilliTimer++; } /* USER CODE BEGIN Callback 1 */ /* USER CODE END Callback 1 */ } 8000622: bd08 pop {r3, pc} HAL_IncTick(); 8000624: f000 fc26 bl 8000e74 MilliTimer++; 8000628: 4a03 ldr r2, [pc, #12] @ (8000638 ) 800062a: 6813 ldr r3, [r2, #0] 800062c: 3301 adds r3, #1 800062e: 6013 str r3, [r2, #0] } 8000630: e7f7 b.n 8000622 8000632: bf00 nop 8000634: 40001000 .word 0x40001000 8000638: 24019c48 .word 0x24019c48 0800063c : \details Disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes. */ __STATIC_FORCEINLINE void __disable_irq(void) { __ASM volatile ("cpsid i" : : : "memory"); 800063c: b672 cpsid i void Error_Handler(void) { /* USER CODE BEGIN Error_Handler_Debug */ /* User can add his own implementation to report the HAL error return state */ __disable_irq(); while (1) 800063e: e7fe b.n 800063e 08000640 : { 8000640: b500 push {lr} 8000642: b09d sub sp, #116 @ 0x74 RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 8000644: 224c movs r2, #76 @ 0x4c 8000646: 2100 movs r1, #0 8000648: a809 add r0, sp, #36 @ 0x24 800064a: f013 f835 bl 80136b8 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 800064e: 2220 movs r2, #32 8000650: 2100 movs r1, #0 8000652: a801 add r0, sp, #4 8000654: f013 f830 bl 80136b8 HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY); 8000658: 2004 movs r0, #4 800065a: f001 febf bl 80023dc __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); 800065e: 2300 movs r3, #0 8000660: 9300 str r3, [sp, #0] 8000662: 4b26 ldr r3, [pc, #152] @ (80006fc ) 8000664: 6ada ldr r2, [r3, #44] @ 0x2c 8000666: f022 0201 bic.w r2, r2, #1 800066a: 62da str r2, [r3, #44] @ 0x2c 800066c: 6adb ldr r3, [r3, #44] @ 0x2c 800066e: f003 0301 and.w r3, r3, #1 8000672: 9300 str r3, [sp, #0] 8000674: 4b22 ldr r3, [pc, #136] @ (8000700 ) 8000676: 699a ldr r2, [r3, #24] 8000678: f442 4240 orr.w r2, r2, #49152 @ 0xc000 800067c: 619a str r2, [r3, #24] 800067e: 699b ldr r3, [r3, #24] 8000680: f403 4340 and.w r3, r3, #49152 @ 0xc000 8000684: 9300 str r3, [sp, #0] 8000686: 9b00 ldr r3, [sp, #0] while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} 8000688: 4b1d ldr r3, [pc, #116] @ (8000700 ) 800068a: 699b ldr r3, [r3, #24] 800068c: f413 5f00 tst.w r3, #8192 @ 0x2000 8000690: d0fa beq.n 8000688 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; 8000692: 2301 movs r3, #1 8000694: 9309 str r3, [sp, #36] @ 0x24 RCC_OscInitStruct.HSEState = RCC_HSE_ON; 8000696: f44f 3380 mov.w r3, #65536 @ 0x10000 800069a: 930a str r3, [sp, #40] @ 0x28 RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 800069c: 2302 movs r3, #2 800069e: 9312 str r3, [sp, #72] @ 0x48 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 80006a0: 9313 str r3, [sp, #76] @ 0x4c RCC_OscInitStruct.PLL.PLLM = 5; 80006a2: 2205 movs r2, #5 80006a4: 9214 str r2, [sp, #80] @ 0x50 RCC_OscInitStruct.PLL.PLLN = 160; 80006a6: 22a0 movs r2, #160 @ 0xa0 80006a8: 9215 str r2, [sp, #84] @ 0x54 RCC_OscInitStruct.PLL.PLLP = 2; 80006aa: 9316 str r3, [sp, #88] @ 0x58 RCC_OscInitStruct.PLL.PLLQ = 4; 80006ac: 2304 movs r3, #4 80006ae: 9317 str r3, [sp, #92] @ 0x5c RCC_OscInitStruct.PLL.PLLR = 4; 80006b0: 9318 str r3, [sp, #96] @ 0x60 RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; 80006b2: 2308 movs r3, #8 80006b4: 9319 str r3, [sp, #100] @ 0x64 RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE; 80006b6: 2300 movs r3, #0 80006b8: 931a str r3, [sp, #104] @ 0x68 RCC_OscInitStruct.PLL.PLLFRACN = 0; 80006ba: 931b str r3, [sp, #108] @ 0x6c if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 80006bc: a809 add r0, sp, #36 @ 0x24 80006be: f001 fed7 bl 8002470 80006c2: b9b0 cbnz r0, 80006f2 RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 80006c4: 233f movs r3, #63 @ 0x3f 80006c6: 9301 str r3, [sp, #4] RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 80006c8: 2303 movs r3, #3 80006ca: 9302 str r3, [sp, #8] RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1; 80006cc: 2300 movs r3, #0 80006ce: 9303 str r3, [sp, #12] RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2; 80006d0: 2308 movs r3, #8 80006d2: 9304 str r3, [sp, #16] RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2; 80006d4: 2340 movs r3, #64 @ 0x40 80006d6: 9305 str r3, [sp, #20] RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2; 80006d8: 9306 str r3, [sp, #24] RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2; 80006da: f44f 6280 mov.w r2, #1024 @ 0x400 80006de: 9207 str r2, [sp, #28] RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2; 80006e0: 9308 str r3, [sp, #32] if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) 80006e2: 2102 movs r1, #2 80006e4: a801 add r0, sp, #4 80006e6: f002 faf7 bl 8002cd8 80006ea: b920 cbnz r0, 80006f6 } 80006ec: b01d add sp, #116 @ 0x74 80006ee: f85d fb04 ldr.w pc, [sp], #4 Error_Handler(); 80006f2: f7ff ffa3 bl 800063c Error_Handler(); 80006f6: f7ff ffa1 bl 800063c 80006fa: bf00 nop 80006fc: 58000400 .word 0x58000400 8000700: 58024800 .word 0x58024800 08000704
: { 8000704: b500 push {lr} 8000706: b083 sub sp, #12 MPU_Config(); 8000708: f7ff ff20 bl 800054c \details Turns on I-Cache */ __STATIC_FORCEINLINE void SCB_EnableICache (void) { #if defined (__ICACHE_PRESENT) && (__ICACHE_PRESENT == 1U) if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 800070c: 4b3d ldr r3, [pc, #244] @ (8000804 ) 800070e: 695b ldr r3, [r3, #20] 8000710: f413 3f00 tst.w r3, #131072 @ 0x20000 8000714: d113 bne.n 800073e \details Acts as a special kind of Data Memory Barrier. It completes when all explicit memory accesses before this instruction complete. */ __STATIC_FORCEINLINE void __DSB(void) { __ASM volatile ("dsb 0xF":::"memory"); 8000716: f3bf 8f4f dsb sy __ASM volatile ("isb 0xF":::"memory"); 800071a: f3bf 8f6f isb sy __DSB(); __ISB(); SCB->ICIALLU = 0UL; /* invalidate I-Cache */ 800071e: 4b39 ldr r3, [pc, #228] @ (8000804 ) 8000720: 2200 movs r2, #0 8000722: f8c3 2250 str.w r2, [r3, #592] @ 0x250 __ASM volatile ("dsb 0xF":::"memory"); 8000726: f3bf 8f4f dsb sy __ASM volatile ("isb 0xF":::"memory"); 800072a: f3bf 8f6f isb sy __DSB(); __ISB(); SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ 800072e: 695a ldr r2, [r3, #20] 8000730: f442 3200 orr.w r2, r2, #131072 @ 0x20000 8000734: 615a str r2, [r3, #20] __ASM volatile ("dsb 0xF":::"memory"); 8000736: f3bf 8f4f dsb sy __ASM volatile ("isb 0xF":::"memory"); 800073a: f3bf 8f6f isb sy #if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U) uint32_t ccsidr; uint32_t sets; uint32_t ways; if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 800073e: 4b31 ldr r3, [pc, #196] @ (8000804 ) 8000740: 695b ldr r3, [r3, #20] 8000742: f413 3f80 tst.w r3, #65536 @ 0x10000 8000746: d127 bne.n 8000798 SCB->CSSELR = 0U; /* select Level 1 data cache */ 8000748: 4b2e ldr r3, [pc, #184] @ (8000804 ) 800074a: 2200 movs r2, #0 800074c: f8c3 2084 str.w r2, [r3, #132] @ 0x84 __ASM volatile ("dsb 0xF":::"memory"); 8000750: f3bf 8f4f dsb sy __DSB(); ccsidr = SCB->CCSIDR; 8000754: f8d3 4080 ldr.w r4, [r3, #128] @ 0x80 /* invalidate D-Cache */ sets = (uint32_t)(CCSIDR_SETS(ccsidr)); 8000758: f3c4 304e ubfx r0, r4, #13, #15 800075c: e000 b.n 8000760 ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); #if defined ( __CC_ARM ) __schedule_barrier(); #endif } while (ways-- != 0U); } while(sets-- != 0U); 800075e: 4618 mov r0, r3 ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); 8000760: f3c4 02c9 ubfx r2, r4, #3, #10 SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8000764: f643 73e0 movw r3, #16352 @ 0x3fe0 8000768: ea03 1340 and.w r3, r3, r0, lsl #5 800076c: ea43 7382 orr.w r3, r3, r2, lsl #30 8000770: 4924 ldr r1, [pc, #144] @ (8000804 ) 8000772: f8c1 3260 str.w r3, [r1, #608] @ 0x260 } while (ways-- != 0U); 8000776: 4613 mov r3, r2 8000778: 3a01 subs r2, #1 800077a: 2b00 cmp r3, #0 800077c: d1f2 bne.n 8000764 } while(sets-- != 0U); 800077e: 1e43 subs r3, r0, #1 8000780: 2800 cmp r0, #0 8000782: d1ec bne.n 800075e 8000784: f3bf 8f4f dsb sy __DSB(); SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ 8000788: 694b ldr r3, [r1, #20] 800078a: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800078e: 614b str r3, [r1, #20] 8000790: f3bf 8f4f dsb sy __ASM volatile ("isb 0xF":::"memory"); 8000794: f3bf 8f6f isb sy HAL_Init(); 8000798: f000 fb3e bl 8000e18 SystemClock_Config(); 800079c: f7ff ff50 bl 8000640 ITM->TCR |= ITM_TCR_ITMENA_Msk; 80007a0: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 80007a4: f8d3 2e80 ldr.w r2, [r3, #3712] @ 0xe80 80007a8: f042 0201 orr.w r2, r2, #1 80007ac: f8c3 2e80 str.w r2, [r3, #3712] @ 0xe80 ITM->TER |= 1UL; 80007b0: f8d3 2e00 ldr.w r2, [r3, #3584] @ 0xe00 80007b4: f042 0201 orr.w r2, r2, #1 80007b8: f8c3 2e00 str.w r2, [r3, #3584] @ 0xe00 MX_GPIO_Init(); 80007bc: f7ff fe6c bl 8000498 __HAL_RCC_HSEM_CLK_ENABLE(); 80007c0: 4b11 ldr r3, [pc, #68] @ (8000808 ) 80007c2: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80007c6: f042 7200 orr.w r2, r2, #33554432 @ 0x2000000 80007ca: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 80007ce: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80007d2: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 80007d6: 9301 str r3, [sp, #4] 80007d8: 9b01 ldr r3, [sp, #4] HAL_HSEM_FastTake(HSEM_ID_0); 80007da: 2000 movs r0, #0 80007dc: f001 fde6 bl 80023ac HAL_HSEM_Release(HSEM_ID_0,0); 80007e0: 2100 movs r1, #0 80007e2: 4608 mov r0, r1 80007e4: f001 fdf2 bl 80023cc osKernelInitialize(); 80007e8: f003 fabe bl 8003d68 defaultTaskHandle = osThreadNew(StartDefaultTask, NULL, &defaultTask_attributes); 80007ec: 4a07 ldr r2, [pc, #28] @ (800080c ) 80007ee: 2100 movs r1, #0 80007f0: 4807 ldr r0, [pc, #28] @ (8000810 ) 80007f2: f003 faf1 bl 8003dd8 80007f6: 4b07 ldr r3, [pc, #28] @ (8000814 ) 80007f8: 6018 str r0, [r3, #0] mqtt_cli_init(); 80007fa: f000 f8e7 bl 80009cc osKernelStart(); 80007fe: f003 fac5 bl 8003d8c while (1) 8000802: e7fe b.n 8000802 8000804: e000ed00 .word 0xe000ed00 8000808: 58024400 .word 0x58024400 800080c: 08014344 .word 0x08014344 8000810: 080005f1 .word 0x080005f1 8000814: 240000ac .word 0x240000ac 08000818 : } } } void MqttClientPubTask(void *argument) { 8000818: b500 push {lr} 800081a: b085 sub sp, #20 800081c: e003 b.n 8000826 { MQTTPublish(&mqttClient, "test", &message); //publish a message } } osDelay(pdMS_TO_TICKS(1000)); 800081e: f44f 707a mov.w r0, #1000 @ 0x3e8 8000822: f003 fb3b bl 8003e9c if(mqttClient.isconnected) 8000826: 4b09 ldr r3, [pc, #36] @ (800084c ) 8000828: 6a1b ldr r3, [r3, #32] 800082a: 2b00 cmp r3, #0 800082c: d0f7 beq.n 800081e message.payload = (void*)str; 800082e: 4b08 ldr r3, [pc, #32] @ (8000850 ) 8000830: 9302 str r3, [sp, #8] message.payloadlen = strlen(str); 8000832: 2317 movs r3, #23 8000834: 9303 str r3, [sp, #12] if(is_link_up()) 8000836: f002 fdc9 bl 80033cc 800083a: 2800 cmp r0, #0 800083c: d0ef beq.n 800081e MQTTPublish(&mqttClient, "test", &message); //publish a message 800083e: 466a mov r2, sp 8000840: 4904 ldr r1, [pc, #16] @ (8000854 ) 8000842: 4802 ldr r0, [pc, #8] @ (800084c ) 8000844: f011 ff1e bl 8012684 8000848: e7e9 b.n 800081e 800084a: bf00 nop 800084c: 24000cb0 .word 0x24000cb0 8000850: 08014368 .word 0x08014368 8000854: 08014380 .word 0x08014380 08000858 : return MQTT_SUCCESS; } void MqttMessageArrived(MessageData* msg) { 8000858: b538 push {r3, r4, r5, lr} MQTTMessage* message = msg->message; 800085a: 6804 ldr r4, [r0, #0] memset(msgBuffer, 0, sizeof(msgBuffer)); 800085c: 4d08 ldr r5, [pc, #32] @ (8000880 ) 800085e: f44f 6280 mov.w r2, #1024 @ 0x400 8000862: 2100 movs r1, #0 8000864: 4628 mov r0, r5 8000866: f012 ff27 bl 80136b8 memcpy(msgBuffer, message->payload,message->payloadlen); 800086a: 68e2 ldr r2, [r4, #12] 800086c: 68a1 ldr r1, [r4, #8] 800086e: 4628 mov r0, r5 8000870: f013 f807 bl 8013882 printf("MQTT MSG[%d]:%s\n", (int)message->payloadlen, msgBuffer); 8000874: 462a mov r2, r5 8000876: 68e1 ldr r1, [r4, #12] 8000878: 4802 ldr r0, [pc, #8] @ (8000884 ) 800087a: f012 fdc5 bl 8013408 } 800087e: bd38 pop {r3, r4, r5, pc} 8000880: 240000b0 .word 0x240000b0 8000884: 08014388 .word 0x08014388 08000888 : { 8000888: b510 push {r4, lr} 800088a: b09a sub sp, #104 @ 0x68 NewNetwork(&net); 800088c: 4c28 ldr r4, [pc, #160] @ (8000930 ) 800088e: 4620 mov r0, r4 8000890: f012 f800 bl 8012894 ret = ConnectNetwork(&net, BROKER_IP, MQTT_PORT); 8000894: f240 725b movw r2, #1883 @ 0x75b 8000898: 4926 ldr r1, [pc, #152] @ (8000934 ) 800089a: 4620 mov r0, r4 800089c: f012 f80a bl 80128b4 if(ret != MQTT_SUCCESS) 80008a0: 2800 cmp r0, #0 80008a2: d131 bne.n 8000908 MQTTClientInit(&mqttClient, &net, 1000, sndBuffer, sizeof(sndBuffer), rcvBuffer, sizeof(rcvBuffer)); 80008a4: 4c24 ldr r4, [pc, #144] @ (8000938 ) 80008a6: f44f 6380 mov.w r3, #1024 @ 0x400 80008aa: 9302 str r3, [sp, #8] 80008ac: 4a23 ldr r2, [pc, #140] @ (800093c ) 80008ae: 9201 str r2, [sp, #4] 80008b0: 9300 str r3, [sp, #0] 80008b2: 4b23 ldr r3, [pc, #140] @ (8000940 ) 80008b4: f44f 727a mov.w r2, #1000 @ 0x3e8 80008b8: 491d ldr r1, [pc, #116] @ (8000930 ) 80008ba: 4620 mov r0, r4 80008bc: f011 fc26 bl 801210c MQTTPacket_connectData data = MQTTPacket_connectData_initializer; 80008c0: 2258 movs r2, #88 @ 0x58 80008c2: 4920 ldr r1, [pc, #128] @ (8000944 ) 80008c4: a804 add r0, sp, #16 80008c6: f012 ffdc bl 8013882 data.MQTTVersion = 3; 80008ca: 2303 movs r3, #3 80008cc: f88d 3018 strb.w r3, [sp, #24] data.clientID.cstring = "test_user1"; 80008d0: 4b1d ldr r3, [pc, #116] @ (8000948 ) 80008d2: 9307 str r3, [sp, #28] data.username.cstring = "test_user1"; 80008d4: 9314 str r3, [sp, #80] @ 0x50 data.password.cstring = "1234"; 80008d6: 4b1d ldr r3, [pc, #116] @ (800094c ) 80008d8: 9317 str r3, [sp, #92] @ 0x5c data.keepAliveInterval = 100; 80008da: 2364 movs r3, #100 @ 0x64 80008dc: f8ad 3028 strh.w r3, [sp, #40] @ 0x28 ret = MQTTConnect(&mqttClient, &data); 80008e0: a904 add r1, sp, #16 80008e2: 4620 mov r0, r4 80008e4: f011 fe12 bl 801250c if(ret != MQTT_SUCCESS) 80008e8: 4604 mov r4, r0 80008ea: b998 cbnz r0, 8000914 ret = MQTTSubscribe(&mqttClient, "test_second", QOS0, MqttMessageArrived); 80008ec: 4b18 ldr r3, [pc, #96] @ (8000950 ) 80008ee: 2200 movs r2, #0 80008f0: 4918 ldr r1, [pc, #96] @ (8000954 ) 80008f2: 4811 ldr r0, [pc, #68] @ (8000938 ) 80008f4: f011 febe bl 8012674 if(ret != MQTT_SUCCESS) 80008f8: 4604 mov r4, r0 80008fa: b990 cbnz r0, 8000922 printf("MQTT_ConnectBroker O.K.\n"); 80008fc: 4816 ldr r0, [pc, #88] @ (8000958 ) 80008fe: f012 fdeb bl 80134d8 } 8000902: 4620 mov r0, r4 8000904: b01a add sp, #104 @ 0x68 8000906: bd10 pop {r4, pc} printf("ConnectNetwork failed.\n"); 8000908: 4814 ldr r0, [pc, #80] @ (800095c ) 800090a: f012 fde5 bl 80134d8 return -1; 800090e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 8000912: e7f6 b.n 8000902 net_disconnect(&net); 8000914: 4806 ldr r0, [pc, #24] @ (8000930 ) 8000916: f011 ff69 bl 80127ec printf("MQTTConnect failed.\n"); 800091a: 4811 ldr r0, [pc, #68] @ (8000960 ) 800091c: f012 fddc bl 80134d8 return ret; 8000920: e7ef b.n 8000902 net_disconnect(&net); 8000922: 4803 ldr r0, [pc, #12] @ (8000930 ) 8000924: f011 ff62 bl 80127ec printf("MQTTSubscribe failed.\n"); 8000928: 480e ldr r0, [pc, #56] @ (8000964 ) 800092a: f012 fdd5 bl 80134d8 return ret; 800092e: e7e8 b.n 8000902 8000930: 24000d18 .word 0x24000d18 8000934: 0801439c .word 0x0801439c 8000938: 24000cb0 .word 0x24000cb0 800093c: 240004b0 .word 0x240004b0 8000940: 240008b0 .word 0x240008b0 8000944: 08014278 .word 0x08014278 8000948: 080143c4 .word 0x080143c4 800094c: 080143d0 .word 0x080143d0 8000950: 08000859 .word 0x08000859 8000954: 080143ec .word 0x080143ec 8000958: 08014410 .word 0x08014410 800095c: 080143ac .word 0x080143ac 8000960: 080143d8 .word 0x080143d8 8000964: 080143f8 .word 0x080143f8 08000968 : { 8000968: b508 push {r3, lr} 800096a: e003 b.n 8000974 osDelay(pdMS_TO_TICKS(1000)); 800096c: f44f 707a mov.w r0, #1000 @ 0x3e8 8000970: f003 fa94 bl 8003e9c if (gnetif.ip_addr.addr == 0 || gnetif.netmask.addr == 0 || gnetif.gw.addr == 0) //system has no valid ip address 8000974: 4b12 ldr r3, [pc, #72] @ (80009c0 ) 8000976: 685b ldr r3, [r3, #4] 8000978: 2b00 cmp r3, #0 800097a: d0f7 beq.n 800096c 800097c: 4b10 ldr r3, [pc, #64] @ (80009c0 ) 800097e: 689b ldr r3, [r3, #8] 8000980: 2b00 cmp r3, #0 8000982: d0f3 beq.n 800096c 8000984: 4b0e ldr r3, [pc, #56] @ (80009c0 ) 8000986: 68db ldr r3, [r3, #12] 8000988: 2b00 cmp r3, #0 800098a: d0ef beq.n 800096c printf("DHCP/Static IP O.K.\n"); 800098c: 480d ldr r0, [pc, #52] @ (80009c4 ) 800098e: f012 fda3 bl 80134d8 break; 8000992: e008 b.n 80009a6 MQTTDisconnect(&mqttClient); 8000994: 480c ldr r0, [pc, #48] @ (80009c8 ) 8000996: f011 feff bl 8012798 MqttConnectBroker(); 800099a: f7ff ff75 bl 8000888 osDelay(pdMS_TO_TICKS(1000)); 800099e: f44f 707a mov.w r0, #1000 @ 0x3e8 80009a2: f003 fa7b bl 8003e9c if(!mqttClient.isconnected) 80009a6: 4b08 ldr r3, [pc, #32] @ (80009c8 ) 80009a8: 6a1b ldr r3, [r3, #32] 80009aa: 2b00 cmp r3, #0 80009ac: d0f2 beq.n 8000994 MQTTYield(&mqttClient, 500); //handle timer 80009ae: f44f 71fa mov.w r1, #500 @ 0x1f4 80009b2: 4805 ldr r0, [pc, #20] @ (80009c8 ) 80009b4: f011 fd12 bl 80123dc osDelay(pdMS_TO_TICKS(100)); 80009b8: 2064 movs r0, #100 @ 0x64 80009ba: f003 fa6f bl 8003e9c 80009be: e7f2 b.n 80009a6 80009c0: 24000db4 .word 0x24000db4 80009c4: 08014428 .word 0x08014428 80009c8: 24000cb0 .word 0x24000cb0 080009cc : void mqtt_cli_init(void) { 80009cc: b508 push {r3, lr} mqttClientSubTaskHandle = osThreadNew(MqttClientSubTask, NULL, &mqttClientSubTaskAttr); //subscribe task 80009ce: 4a07 ldr r2, [pc, #28] @ (80009ec ) 80009d0: 2100 movs r1, #0 80009d2: 4807 ldr r0, [pc, #28] @ (80009f0 ) 80009d4: f003 fa00 bl 8003dd8 80009d8: 4b06 ldr r3, [pc, #24] @ (80009f4 ) 80009da: 6018 str r0, [r3, #0] mqttClientPubTaskHandle = osThreadNew(MqttClientPubTask, NULL, &mqttClientPubTaskAttr); //publish task 80009dc: 4a06 ldr r2, [pc, #24] @ (80009f8 ) 80009de: 2100 movs r1, #0 80009e0: 4806 ldr r0, [pc, #24] @ (80009fc ) 80009e2: f003 f9f9 bl 8003dd8 80009e6: 4b06 ldr r3, [pc, #24] @ (8000a00 ) 80009e8: 6018 str r0, [r3, #0] } 80009ea: bd08 pop {r3, pc} 80009ec: 08014488 .word 0x08014488 80009f0: 08000969 .word 0x08000969 80009f4: 24000d2c .word 0x24000d2c 80009f8: 08014464 .word 0x08014464 80009fc: 08000819 .word 0x08000819 8000a00: 24000d28 .word 0x24000d28 08000a04 : /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 8000a04: b500 push {lr} 8000a06: b083 sub sp, #12 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 8000a08: 4b0a ldr r3, [pc, #40] @ (8000a34 ) 8000a0a: f8d3 20f4 ldr.w r2, [r3, #244] @ 0xf4 8000a0e: f042 0202 orr.w r2, r2, #2 8000a12: f8c3 20f4 str.w r2, [r3, #244] @ 0xf4 8000a16: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8000a1a: f003 0302 and.w r3, r3, #2 8000a1e: 9301 str r3, [sp, #4] 8000a20: 9b01 ldr r3, [sp, #4] /* System interrupt init*/ /* PendSV_IRQn interrupt configuration */ HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0); 8000a22: 2200 movs r2, #0 8000a24: 210f movs r1, #15 8000a26: f06f 0001 mvn.w r0, #1 8000a2a: f000 fa97 bl 8000f5c /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 8000a2e: b003 add sp, #12 8000a30: f85d fb04 ldr.w pc, [sp], #4 8000a34: 58024400 .word 0x58024400 08000a38 : uint32_t uwTimclock, uwAPB1Prescaler; uint32_t uwPrescalerValue; uint32_t pFLatency; /*Configure the TIM6 IRQ priority */ if (TickPriority < (1UL << __NVIC_PRIO_BITS)) 8000a38: 280f cmp r0, #15 8000a3a: d901 bls.n 8000a40 HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); uwTickPrio = TickPriority; } else { return HAL_ERROR; 8000a3c: 2001 movs r0, #1 return HAL_TIM_Base_Start_IT(&htim6); } /* Return function status */ return HAL_ERROR; } 8000a3e: 4770 bx lr { 8000a40: b510 push {r4, lr} 8000a42: b08a sub sp, #40 @ 0x28 8000a44: 4604 mov r4, r0 HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U); 8000a46: 2200 movs r2, #0 8000a48: 4601 mov r1, r0 8000a4a: 2036 movs r0, #54 @ 0x36 8000a4c: f000 fa86 bl 8000f5c HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); 8000a50: 2036 movs r0, #54 @ 0x36 8000a52: f000 fa93 bl 8000f7c uwTickPrio = TickPriority; 8000a56: 4b1a ldr r3, [pc, #104] @ (8000ac0 ) 8000a58: 601c str r4, [r3, #0] __HAL_RCC_TIM6_CLK_ENABLE(); 8000a5a: 4b1a ldr r3, [pc, #104] @ (8000ac4 ) 8000a5c: f8d3 20e8 ldr.w r2, [r3, #232] @ 0xe8 8000a60: f042 0210 orr.w r2, r2, #16 8000a64: f8c3 20e8 str.w r2, [r3, #232] @ 0xe8 8000a68: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8000a6c: f003 0310 and.w r3, r3, #16 8000a70: 9300 str r3, [sp, #0] 8000a72: 9b00 ldr r3, [sp, #0] HAL_RCC_GetClockConfig(&clkconfig, &pFLatency); 8000a74: a901 add r1, sp, #4 8000a76: a802 add r0, sp, #8 8000a78: f002 faac bl 8002fd4 uwAPB1Prescaler = clkconfig.APB1CLKDivider; 8000a7c: 9b07 ldr r3, [sp, #28] if (uwAPB1Prescaler == RCC_HCLK_DIV1) 8000a7e: b9bb cbnz r3, 8000ab0 uwTimclock = HAL_RCC_GetPCLK1Freq(); 8000a80: f002 fa96 bl 8002fb0 8000a84: 4603 mov r3, r0 uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U); 8000a86: 4a10 ldr r2, [pc, #64] @ (8000ac8 ) 8000a88: fba2 2303 umull r2, r3, r2, r3 8000a8c: 0c9b lsrs r3, r3, #18 8000a8e: 3b01 subs r3, #1 htim6.Instance = TIM6; 8000a90: 480e ldr r0, [pc, #56] @ (8000acc ) 8000a92: 4a0f ldr r2, [pc, #60] @ (8000ad0 ) 8000a94: 6002 str r2, [r0, #0] htim6.Init.Period = (1000000U / 1000U) - 1U; 8000a96: f240 32e7 movw r2, #999 @ 0x3e7 8000a9a: 60c2 str r2, [r0, #12] htim6.Init.Prescaler = uwPrescalerValue; 8000a9c: 6043 str r3, [r0, #4] htim6.Init.ClockDivision = 0; 8000a9e: 2300 movs r3, #0 8000aa0: 6103 str r3, [r0, #16] htim6.Init.CounterMode = TIM_COUNTERMODE_UP; 8000aa2: 6083 str r3, [r0, #8] if(HAL_TIM_Base_Init(&htim6) == HAL_OK) 8000aa4: f002 fc5e bl 8003364 8000aa8: b130 cbz r0, 8000ab8 return HAL_ERROR; 8000aaa: 2001 movs r0, #1 } 8000aac: b00a add sp, #40 @ 0x28 8000aae: bd10 pop {r4, pc} uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq(); 8000ab0: f002 fa7e bl 8002fb0 8000ab4: 0043 lsls r3, r0, #1 8000ab6: e7e6 b.n 8000a86 return HAL_TIM_Base_Start_IT(&htim6); 8000ab8: 4804 ldr r0, [pc, #16] @ (8000acc ) 8000aba: f002 fab7 bl 800302c 8000abe: e7f5 b.n 8000aac 8000ac0: 2400000c .word 0x2400000c 8000ac4: 58024400 .word 0x58024400 8000ac8: 431bde83 .word 0x431bde83 8000acc: 24000d30 .word 0x24000d30 8000ad0: 40001000 .word 0x40001000 08000ad4 : { /* USER CODE BEGIN NonMaskableInt_IRQn 0 */ /* USER CODE END NonMaskableInt_IRQn 0 */ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */ while (1) 8000ad4: e7fe b.n 8000ad4 08000ad6 : void HardFault_Handler(void) { /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 8000ad6: e7fe b.n 8000ad6 08000ad8 : void MemManage_Handler(void) { /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) 8000ad8: e7fe b.n 8000ad8 08000ada : void BusFault_Handler(void) { /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) 8000ada: e7fe b.n 8000ada 08000adc : void UsageFault_Handler(void) { /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) 8000adc: e7fe b.n 8000adc 08000ade : /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } 8000ade: 4770 bx lr 08000ae0 : /** * @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts. */ void TIM6_DAC_IRQHandler(void) { 8000ae0: b508 push {r3, lr} /* USER CODE BEGIN TIM6_DAC_IRQn 0 */ /* USER CODE END TIM6_DAC_IRQn 0 */ HAL_TIM_IRQHandler(&htim6); 8000ae2: 4802 ldr r0, [pc, #8] @ (8000aec ) 8000ae4: f002 faee bl 80030c4 /* USER CODE BEGIN TIM6_DAC_IRQn 1 */ /* USER CODE END TIM6_DAC_IRQn 1 */ } 8000ae8: bd08 pop {r3, pc} 8000aea: bf00 nop 8000aec: 24000d30 .word 0x24000d30 08000af0 : /** * @brief This function handles Ethernet global interrupt. */ void ETH_IRQHandler(void) { 8000af0: b508 push {r3, lr} /* USER CODE BEGIN ETH_IRQn 0 */ /* USER CODE END ETH_IRQn 0 */ HAL_ETH_IRQHandler(&heth); 8000af2: 4802 ldr r0, [pc, #8] @ (8000afc ) 8000af4: f001 f823 bl 8001b3e /* USER CODE BEGIN ETH_IRQn 1 */ /* USER CODE END ETH_IRQn 1 */ } 8000af8: bd08 pop {r3, pc} 8000afa: bf00 nop 8000afc: 24000e4c .word 0x24000e4c 08000b00 : \param [in] ch Character to transmit. \returns Character to transmit. */ __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) { if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 8000b00: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8000b04: f8d3 3e80 ldr.w r3, [r3, #3712] @ 0xe80 8000b08: f013 0f01 tst.w r3, #1 8000b0c: d011 beq.n 8000b32 ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ 8000b0e: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8000b12: f8d3 3e00 ldr.w r3, [r3, #3584] @ 0xe00 if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 8000b16: f013 0f01 tst.w r3, #1 8000b1a: d101 bne.n 8000b20 8000b1c: 4770 bx lr { while (ITM->PORT[0U].u32 == 0UL) { __NOP(); 8000b1e: bf00 nop while (ITM->PORT[0U].u32 == 0UL) 8000b20: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8000b24: 681b ldr r3, [r3, #0] 8000b26: 2b00 cmp r3, #0 8000b28: d0f9 beq.n 8000b1e } ITM->PORT[0U].u8 = (uint8_t)ch; 8000b2a: b2c3 uxtb r3, r0 8000b2c: f04f 4260 mov.w r2, #3758096384 @ 0xe0000000 8000b30: 7013 strb r3, [r2, #0] } return (ch); } 8000b32: 4770 bx lr 08000b34 <_getpid>: } int _getpid(void) { return 1; } 8000b34: 2001 movs r0, #1 8000b36: 4770 bx lr 08000b38 <_kill>: int _kill(int pid, int sig) { errno = EINVAL; 8000b38: 4b02 ldr r3, [pc, #8] @ (8000b44 <_kill+0xc>) 8000b3a: 2216 movs r2, #22 8000b3c: 601a str r2, [r3, #0] return -1; } 8000b3e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8000b42: 4770 bx lr 8000b44: 24019d8c .word 0x24019d8c 08000b48 <_exit>: void _exit (int status) { 8000b48: b508 push {r3, lr} _kill(status, -1); 8000b4a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8000b4e: f7ff fff3 bl 8000b38 <_kill> while (1) {} /* Make sure we hang here */ 8000b52: e7fe b.n 8000b52 <_exit+0xa> 08000b54 <_read>: } __attribute__((weak)) int _read(int file, char *ptr, int len) { 8000b54: b570 push {r4, r5, r6, lr} 8000b56: 460c mov r4, r1 8000b58: 4616 mov r6, r2 int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 8000b5a: 2500 movs r5, #0 8000b5c: e006 b.n 8000b6c <_read+0x18> { *ptr++ = __io_getchar(); 8000b5e: f3af 8000 nop.w 8000b62: 4621 mov r1, r4 8000b64: f801 0b01 strb.w r0, [r1], #1 for (DataIdx = 0; DataIdx < len; DataIdx++) 8000b68: 3501 adds r5, #1 *ptr++ = __io_getchar(); 8000b6a: 460c mov r4, r1 for (DataIdx = 0; DataIdx < len; DataIdx++) 8000b6c: 42b5 cmp r5, r6 8000b6e: dbf6 blt.n 8000b5e <_read+0xa> } return len; } 8000b70: 4630 mov r0, r6 8000b72: bd70 pop {r4, r5, r6, pc} 08000b74 <_write>: __attribute__((weak)) int _write(int file, char *ptr, int len) { 8000b74: b570 push {r4, r5, r6, lr} 8000b76: 460c mov r4, r1 8000b78: 4616 mov r6, r2 int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 8000b7a: 2500 movs r5, #0 8000b7c: e004 b.n 8000b88 <_write+0x14> { // __io_putchar(*ptr++); ITM_SendChar(*ptr++); 8000b7e: f814 0b01 ldrb.w r0, [r4], #1 8000b82: f7ff ffbd bl 8000b00 for (DataIdx = 0; DataIdx < len; DataIdx++) 8000b86: 3501 adds r5, #1 8000b88: 42b5 cmp r5, r6 8000b8a: dbf8 blt.n 8000b7e <_write+0xa> } return len; } 8000b8c: 4630 mov r0, r6 8000b8e: bd70 pop {r4, r5, r6, pc} 08000b90 <_close>: int _close(int file) { return -1; } 8000b90: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8000b94: 4770 bx lr 08000b96 <_fstat>: int _fstat(int file, struct stat *st) { st->st_mode = S_IFCHR; 8000b96: f44f 5300 mov.w r3, #8192 @ 0x2000 8000b9a: 604b str r3, [r1, #4] return 0; } 8000b9c: 2000 movs r0, #0 8000b9e: 4770 bx lr 08000ba0 <_isatty>: int _isatty(int file) { return 1; } 8000ba0: 2001 movs r0, #1 8000ba2: 4770 bx lr 08000ba4 <_lseek>: int _lseek(int file, int ptr, int dir) { return 0; } 8000ba4: 2000 movs r0, #0 8000ba6: 4770 bx lr 08000ba8 <_sbrk>: * * @param incr Memory size * @return Pointer to allocated memory */ void *_sbrk(ptrdiff_t incr) { 8000ba8: b410 push {r4} 8000baa: 4603 mov r3, r0 extern uint8_t _end; /* Symbol defined in the linker script */ extern uint8_t _estack; /* Symbol defined in the linker script */ extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */ const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size; 8000bac: 4a0c ldr r2, [pc, #48] @ (8000be0 <_sbrk+0x38>) 8000bae: 490d ldr r1, [pc, #52] @ (8000be4 <_sbrk+0x3c>) const uint8_t *max_heap = (uint8_t *)stack_limit; uint8_t *prev_heap_end; /* Initialize heap end at first call */ if (NULL == __sbrk_heap_end) 8000bb0: 480d ldr r0, [pc, #52] @ (8000be8 <_sbrk+0x40>) 8000bb2: 6800 ldr r0, [r0, #0] 8000bb4: b150 cbz r0, 8000bcc <_sbrk+0x24> { __sbrk_heap_end = &_end; } /* Protect heap from growing into the reserved MSP stack */ if (__sbrk_heap_end + incr > max_heap) 8000bb6: 480c ldr r0, [pc, #48] @ (8000be8 <_sbrk+0x40>) 8000bb8: 6800 ldr r0, [r0, #0] 8000bba: 4403 add r3, r0 8000bbc: 1a52 subs r2, r2, r1 8000bbe: 4293 cmp r3, r2 8000bc0: d808 bhi.n 8000bd4 <_sbrk+0x2c> errno = ENOMEM; return (void *)-1; } prev_heap_end = __sbrk_heap_end; __sbrk_heap_end += incr; 8000bc2: 4a09 ldr r2, [pc, #36] @ (8000be8 <_sbrk+0x40>) 8000bc4: 6013 str r3, [r2, #0] return (void *)prev_heap_end; } 8000bc6: f85d 4b04 ldr.w r4, [sp], #4 8000bca: 4770 bx lr __sbrk_heap_end = &_end; 8000bcc: 4806 ldr r0, [pc, #24] @ (8000be8 <_sbrk+0x40>) 8000bce: 4c07 ldr r4, [pc, #28] @ (8000bec <_sbrk+0x44>) 8000bd0: 6004 str r4, [r0, #0] 8000bd2: e7f0 b.n 8000bb6 <_sbrk+0xe> errno = ENOMEM; 8000bd4: 4b06 ldr r3, [pc, #24] @ (8000bf0 <_sbrk+0x48>) 8000bd6: 220c movs r2, #12 8000bd8: 601a str r2, [r3, #0] return (void *)-1; 8000bda: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8000bde: e7f2 b.n 8000bc6 <_sbrk+0x1e> 8000be0: 24080000 .word 0x24080000 8000be4: 00000400 .word 0x00000400 8000be8: 24000d7c .word 0x24000d7c 8000bec: 24019da0 .word 0x24019da0 8000bf0: 24019d8c .word 0x24019d8c 08000bf4 : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr sp, =_estack /* set stack pointer */ 8000bf4: f8df d034 ldr.w sp, [pc, #52] @ 8000c2c /* Call the clock system initialization function.*/ bl SystemInit 8000bf8: f7ff fbda bl 80003b0 /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 8000bfc: 480c ldr r0, [pc, #48] @ (8000c30 ) ldr r1, =_edata 8000bfe: 490d ldr r1, [pc, #52] @ (8000c34 ) ldr r2, =_sidata 8000c00: 4a0d ldr r2, [pc, #52] @ (8000c38 ) movs r3, #0 8000c02: 2300 movs r3, #0 b LoopCopyDataInit 8000c04: e002 b.n 8000c0c 08000c06 : CopyDataInit: ldr r4, [r2, r3] 8000c06: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 8000c08: 50c4 str r4, [r0, r3] adds r3, r3, #4 8000c0a: 3304 adds r3, #4 08000c0c : LoopCopyDataInit: adds r4, r0, r3 8000c0c: 18c4 adds r4, r0, r3 cmp r4, r1 8000c0e: 428c cmp r4, r1 bcc CopyDataInit 8000c10: d3f9 bcc.n 8000c06 /* Zero fill the bss segment. */ ldr r2, =_sbss 8000c12: 4a0a ldr r2, [pc, #40] @ (8000c3c ) ldr r4, =_ebss 8000c14: 4c0a ldr r4, [pc, #40] @ (8000c40 ) movs r3, #0 8000c16: 2300 movs r3, #0 b LoopFillZerobss 8000c18: e001 b.n 8000c1e 08000c1a : FillZerobss: str r3, [r2] 8000c1a: 6013 str r3, [r2, #0] adds r2, r2, #4 8000c1c: 3204 adds r2, #4 08000c1e : LoopFillZerobss: cmp r2, r4 8000c1e: 42a2 cmp r2, r4 bcc FillZerobss 8000c20: d3fb bcc.n 8000c1a /* Call static constructors */ bl __libc_init_array 8000c22: f012 fdff bl 8013824 <__libc_init_array> /* Call the application's entry point.*/ bl main 8000c26: f7ff fd6d bl 8000704
bx lr 8000c2a: 4770 bx lr ldr sp, =_estack /* set stack pointer */ 8000c2c: 24080000 .word 0x24080000 ldr r0, =_sdata 8000c30: 24000000 .word 0x24000000 ldr r1, =_edata 8000c34: 2400008c .word 0x2400008c ldr r2, =_sidata 8000c38: 080180cc .word 0x080180cc ldr r2, =_sbss 8000c3c: 2400008c .word 0x2400008c ldr r4, =_ebss 8000c40: 24019d9c .word 0x24019d9c 08000c44 : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8000c44: e7fe b.n 8000c44 08000c46 : * @retval LAN8742_STATUS_OK if OK * LAN8742_STATUS_ERROR if missing mandatory function */ int32_t LAN8742_RegisterBusIO(lan8742_Object_t *pObj, lan8742_IOCtx_t *ioctx) { if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick) 8000c46: b188 cbz r0, 8000c6c 8000c48: 68ca ldr r2, [r1, #12] 8000c4a: b192 cbz r2, 8000c72 8000c4c: 688a ldr r2, [r1, #8] 8000c4e: b19a cbz r2, 8000c78 8000c50: 690a ldr r2, [r1, #16] 8000c52: b1a2 cbz r2, 8000c7e { return LAN8742_STATUS_ERROR; } pObj->IO.Init = ioctx->Init; 8000c54: 680a ldr r2, [r1, #0] 8000c56: 6082 str r2, [r0, #8] pObj->IO.DeInit = ioctx->DeInit; 8000c58: 684a ldr r2, [r1, #4] 8000c5a: 60c2 str r2, [r0, #12] pObj->IO.ReadReg = ioctx->ReadReg; 8000c5c: 68ca ldr r2, [r1, #12] 8000c5e: 6142 str r2, [r0, #20] pObj->IO.WriteReg = ioctx->WriteReg; 8000c60: 688a ldr r2, [r1, #8] 8000c62: 6102 str r2, [r0, #16] pObj->IO.GetTick = ioctx->GetTick; 8000c64: 690a ldr r2, [r1, #16] 8000c66: 6182 str r2, [r0, #24] return LAN8742_STATUS_OK; 8000c68: 2000 movs r0, #0 8000c6a: 4770 bx lr return LAN8742_STATUS_ERROR; 8000c6c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8000c70: 4770 bx lr 8000c72: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8000c76: 4770 bx lr 8000c78: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8000c7c: 4770 bx lr 8000c7e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } 8000c82: 4770 bx lr 08000c84 : * LAN8742_STATUS_READ_ERROR if connot read register * LAN8742_STATUS_WRITE_ERROR if connot write to register * LAN8742_STATUS_RESET_TIMEOUT if cannot perform a software reset */ int32_t LAN8742_Init(lan8742_Object_t *pObj) { 8000c84: b570 push {r4, r5, r6, lr} 8000c86: b082 sub sp, #8 8000c88: 4605 mov r5, r0 uint32_t tickstart = 0, regvalue = 0, addr = 0; 8000c8a: 2300 movs r3, #0 8000c8c: 9301 str r3, [sp, #4] int32_t status = LAN8742_STATUS_OK; if(pObj->Is_Initialized == 0) 8000c8e: 6844 ldr r4, [r0, #4] 8000c90: 2c00 cmp r4, #0 8000c92: d14a bne.n 8000d2a { if(pObj->IO.Init != 0) 8000c94: 6883 ldr r3, [r0, #8] 8000c96: b103 cbz r3, 8000c9a { /* GPIO and Clocks initialization */ pObj->IO.Init(); 8000c98: 4798 blx r3 } /* for later check */ pObj->DevAddr = LAN8742_MAX_DEV_ADDR + 1; 8000c9a: 2320 movs r3, #32 8000c9c: 602b str r3, [r5, #0] int32_t status = LAN8742_STATUS_OK; 8000c9e: 2600 movs r6, #0 /* Get the device address from special mode register */ for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++) 8000ca0: e002 b.n 8000ca8 { if(pObj->IO.ReadReg(addr, LAN8742_SMR, ®value) < 0) { status = LAN8742_STATUS_READ_ERROR; 8000ca2: f06f 0604 mvn.w r6, #4 for(addr = 0; addr <= LAN8742_MAX_DEV_ADDR; addr ++) 8000ca6: 3401 adds r4, #1 8000ca8: 2c1f cmp r4, #31 8000caa: d80d bhi.n 8000cc8 if(pObj->IO.ReadReg(addr, LAN8742_SMR, ®value) < 0) 8000cac: 696b ldr r3, [r5, #20] 8000cae: aa01 add r2, sp, #4 8000cb0: 2112 movs r1, #18 8000cb2: 4620 mov r0, r4 8000cb4: 4798 blx r3 8000cb6: 2800 cmp r0, #0 8000cb8: dbf3 blt.n 8000ca2 /* Can't read from this device address continue with next address */ continue; } if((regvalue & LAN8742_SMR_PHY_ADDR) == addr) 8000cba: 9b01 ldr r3, [sp, #4] 8000cbc: f003 031f and.w r3, r3, #31 8000cc0: 42a3 cmp r3, r4 8000cc2: d1f0 bne.n 8000ca6 { pObj->DevAddr = addr; 8000cc4: 602c str r4, [r5, #0] status = LAN8742_STATUS_OK; 8000cc6: 2600 movs r6, #0 break; } } if(pObj->DevAddr > LAN8742_MAX_DEV_ADDR) 8000cc8: 6828 ldr r0, [r5, #0] 8000cca: 281f cmp r0, #31 8000ccc: d826 bhi.n 8000d1c { status = LAN8742_STATUS_ADDRESS_ERROR; } /* if device address is matched */ if(status == LAN8742_STATUS_OK) 8000cce: 2e00 cmp r6, #0 8000cd0: d137 bne.n 8000d42 { /* set a software reset */ if(pObj->IO.WriteReg(pObj->DevAddr, LAN8742_BCR, LAN8742_BCR_SOFT_RESET) >= 0) 8000cd2: 692b ldr r3, [r5, #16] 8000cd4: f44f 4200 mov.w r2, #32768 @ 0x8000 8000cd8: 2100 movs r1, #0 8000cda: 4798 blx r3 8000cdc: 2800 cmp r0, #0 8000cde: db33 blt.n 8000d48 { /* get software reset status */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) >= 0) 8000ce0: 696b ldr r3, [r5, #20] 8000ce2: aa01 add r2, sp, #4 8000ce4: 2100 movs r1, #0 8000ce6: 6828 ldr r0, [r5, #0] 8000ce8: 4798 blx r3 8000cea: 2800 cmp r0, #0 8000cec: db2f blt.n 8000d4e { tickstart = pObj->IO.GetTick(); 8000cee: 69ab ldr r3, [r5, #24] 8000cf0: 4798 blx r3 8000cf2: 4604 mov r4, r0 /* wait until software reset is done or timeout occured */ while(regvalue & LAN8742_BCR_SOFT_RESET) 8000cf4: 9b01 ldr r3, [sp, #4] 8000cf6: f413 4f00 tst.w r3, #32768 @ 0x8000 8000cfa: d011 beq.n 8000d20 { if((pObj->IO.GetTick() - tickstart) <= LAN8742_SW_RESET_TO) 8000cfc: 69ab ldr r3, [r5, #24] 8000cfe: 4798 blx r3 8000d00: 1b00 subs r0, r0, r4 8000d02: f5b0 7ffa cmp.w r0, #500 @ 0x1f4 8000d06: d80d bhi.n 8000d24 { if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, ®value) < 0) 8000d08: 696b ldr r3, [r5, #20] 8000d0a: aa01 add r2, sp, #4 8000d0c: 2100 movs r1, #0 8000d0e: 6828 ldr r0, [r5, #0] 8000d10: 4798 blx r3 8000d12: 2800 cmp r0, #0 8000d14: daee bge.n 8000cf4 { status = LAN8742_STATUS_READ_ERROR; 8000d16: f06f 0604 mvn.w r6, #4 8000d1a: e001 b.n 8000d20 status = LAN8742_STATUS_ADDRESS_ERROR; 8000d1c: f06f 0602 mvn.w r6, #2 status = LAN8742_STATUS_WRITE_ERROR; } } } if(status == LAN8742_STATUS_OK) 8000d20: b97e cbnz r6, 8000d42 8000d22: e003 b.n 8000d2c status = LAN8742_STATUS_RESET_TIMEOUT; 8000d24: f06f 0601 mvn.w r6, #1 8000d28: e7fa b.n 8000d20 int32_t status = LAN8742_STATUS_OK; 8000d2a: 2600 movs r6, #0 { tickstart = pObj->IO.GetTick(); 8000d2c: 69ab ldr r3, [r5, #24] 8000d2e: 4798 blx r3 8000d30: 4604 mov r4, r0 /* Wait for 2s to perform initialization */ while((pObj->IO.GetTick() - tickstart) <= LAN8742_INIT_TO) 8000d32: 69ab ldr r3, [r5, #24] 8000d34: 4798 blx r3 8000d36: 1b03 subs r3, r0, r4 8000d38: f5b3 6ffa cmp.w r3, #2000 @ 0x7d0 8000d3c: d9f9 bls.n 8000d32 { } pObj->Is_Initialized = 1; 8000d3e: 2301 movs r3, #1 8000d40: 606b str r3, [r5, #4] } return status; } 8000d42: 4630 mov r0, r6 8000d44: b002 add sp, #8 8000d46: bd70 pop {r4, r5, r6, pc} status = LAN8742_STATUS_WRITE_ERROR; 8000d48: f06f 0603 mvn.w r6, #3 8000d4c: e7f9 b.n 8000d42 status = LAN8742_STATUS_READ_ERROR; 8000d4e: f06f 0604 mvn.w r6, #4 return status; 8000d52: e7f6 b.n 8000d42 08000d54 : * LAN8742_STATUS_10MBITS_HALFDUPLEX if 10Mb/s HD * LAN8742_STATUS_READ_ERROR if connot read register * LAN8742_STATUS_WRITE_ERROR if connot write to register */ int32_t LAN8742_GetLinkState(lan8742_Object_t *pObj) { 8000d54: b510 push {r4, lr} 8000d56: b082 sub sp, #8 8000d58: 4604 mov r4, r0 uint32_t readval = 0; 8000d5a: 2300 movs r3, #0 8000d5c: 9301 str r3, [sp, #4] /* Read Status register */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0) 8000d5e: 6943 ldr r3, [r0, #20] 8000d60: aa01 add r2, sp, #4 8000d62: 2101 movs r1, #1 8000d64: 6800 ldr r0, [r0, #0] 8000d66: 4798 blx r3 8000d68: 2800 cmp r0, #0 8000d6a: db39 blt.n 8000de0 { return LAN8742_STATUS_READ_ERROR; } /* Read Status register again */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BSR, &readval) < 0) 8000d6c: 6963 ldr r3, [r4, #20] 8000d6e: aa01 add r2, sp, #4 8000d70: 2101 movs r1, #1 8000d72: 6820 ldr r0, [r4, #0] 8000d74: 4798 blx r3 8000d76: 2800 cmp r0, #0 8000d78: db35 blt.n 8000de6 { return LAN8742_STATUS_READ_ERROR; } if((readval & LAN8742_BSR_LINK_STATUS) == 0) 8000d7a: 9b01 ldr r3, [sp, #4] 8000d7c: f013 0f04 tst.w r3, #4 8000d80: d034 beq.n 8000dec /* Return Link Down status */ return LAN8742_STATUS_LINK_DOWN; } /* Check Auto negotiaition */ if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_BCR, &readval) < 0) 8000d82: 6963 ldr r3, [r4, #20] 8000d84: aa01 add r2, sp, #4 8000d86: 2100 movs r1, #0 8000d88: 6820 ldr r0, [r4, #0] 8000d8a: 4798 blx r3 8000d8c: 2800 cmp r0, #0 8000d8e: db30 blt.n 8000df2 { return LAN8742_STATUS_READ_ERROR; } if((readval & LAN8742_BCR_AUTONEGO_EN) != LAN8742_BCR_AUTONEGO_EN) 8000d90: 9b01 ldr r3, [sp, #4] 8000d92: f413 5f80 tst.w r3, #4096 @ 0x1000 8000d96: d10c bne.n 8000db2 { if(((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT) && ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE)) 8000d98: f403 5204 and.w r2, r3, #8448 @ 0x2100 8000d9c: f5b2 5f04 cmp.w r2, #8448 @ 0x2100 8000da0: d02a beq.n 8000df8 { return LAN8742_STATUS_100MBITS_FULLDUPLEX; } else if ((readval & LAN8742_BCR_SPEED_SELECT) == LAN8742_BCR_SPEED_SELECT) 8000da2: f413 5f00 tst.w r3, #8192 @ 0x2000 8000da6: d129 bne.n 8000dfc { return LAN8742_STATUS_100MBITS_HALFDUPLEX; } else if ((readval & LAN8742_BCR_DUPLEX_MODE) == LAN8742_BCR_DUPLEX_MODE) 8000da8: f413 7f80 tst.w r3, #256 @ 0x100 8000dac: d028 beq.n 8000e00 { return LAN8742_STATUS_10MBITS_FULLDUPLEX; 8000dae: 2004 movs r0, #4 8000db0: e01d b.n 8000dee return LAN8742_STATUS_10MBITS_HALFDUPLEX; } } else /* Auto Nego enabled */ { if(pObj->IO.ReadReg(pObj->DevAddr, LAN8742_PHYSCSR, &readval) < 0) 8000db2: 6963 ldr r3, [r4, #20] 8000db4: aa01 add r2, sp, #4 8000db6: 211f movs r1, #31 8000db8: 6820 ldr r0, [r4, #0] 8000dba: 4798 blx r3 8000dbc: 2800 cmp r0, #0 8000dbe: db21 blt.n 8000e04 { return LAN8742_STATUS_READ_ERROR; } /* Check if auto nego not done */ if((readval & LAN8742_PHYSCSR_AUTONEGO_DONE) == 0) 8000dc0: 9b01 ldr r3, [sp, #4] 8000dc2: f413 5f80 tst.w r3, #4096 @ 0x1000 8000dc6: d020 beq.n 8000e0a { return LAN8742_STATUS_AUTONEGO_NOTDONE; } if((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_FD) 8000dc8: f003 031c and.w r3, r3, #28 8000dcc: 2b18 cmp r3, #24 8000dce: d01e beq.n 8000e0e { return LAN8742_STATUS_100MBITS_FULLDUPLEX; } else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_100BTX_HD) 8000dd0: 2b08 cmp r3, #8 8000dd2: d01e beq.n 8000e12 { return LAN8742_STATUS_100MBITS_HALFDUPLEX; } else if ((readval & LAN8742_PHYSCSR_HCDSPEEDMASK) == LAN8742_PHYSCSR_10BT_FD) 8000dd4: 2b14 cmp r3, #20 8000dd6: d001 beq.n 8000ddc { return LAN8742_STATUS_10MBITS_FULLDUPLEX; } else { return LAN8742_STATUS_10MBITS_HALFDUPLEX; 8000dd8: 2005 movs r0, #5 8000dda: e008 b.n 8000dee return LAN8742_STATUS_10MBITS_FULLDUPLEX; 8000ddc: 2004 movs r0, #4 8000dde: e006 b.n 8000dee return LAN8742_STATUS_READ_ERROR; 8000de0: f06f 0004 mvn.w r0, #4 8000de4: e003 b.n 8000dee return LAN8742_STATUS_READ_ERROR; 8000de6: f06f 0004 mvn.w r0, #4 8000dea: e000 b.n 8000dee return LAN8742_STATUS_LINK_DOWN; 8000dec: 2001 movs r0, #1 } } } 8000dee: b002 add sp, #8 8000df0: bd10 pop {r4, pc} return LAN8742_STATUS_READ_ERROR; 8000df2: f06f 0004 mvn.w r0, #4 8000df6: e7fa b.n 8000dee return LAN8742_STATUS_100MBITS_FULLDUPLEX; 8000df8: 2002 movs r0, #2 8000dfa: e7f8 b.n 8000dee return LAN8742_STATUS_100MBITS_HALFDUPLEX; 8000dfc: 2003 movs r0, #3 8000dfe: e7f6 b.n 8000dee return LAN8742_STATUS_10MBITS_HALFDUPLEX; 8000e00: 2005 movs r0, #5 8000e02: e7f4 b.n 8000dee return LAN8742_STATUS_READ_ERROR; 8000e04: f06f 0004 mvn.w r0, #4 8000e08: e7f1 b.n 8000dee return LAN8742_STATUS_AUTONEGO_NOTDONE; 8000e0a: 2006 movs r0, #6 8000e0c: e7ef b.n 8000dee return LAN8742_STATUS_100MBITS_FULLDUPLEX; 8000e0e: 2002 movs r0, #2 8000e10: e7ed b.n 8000dee return LAN8742_STATUS_100MBITS_HALFDUPLEX; 8000e12: 2003 movs r0, #3 8000e14: e7eb b.n 8000dee ... 08000e18 : * need to ensure that the SysTick time base is always set to 1 millisecond * to have correct HAL operation. * @retval HAL status */ HAL_StatusTypeDef HAL_Init(void) { 8000e18: b510 push {r4, lr} __HAL_ART_CONFIG_BASE_ADDRESS(0x08100000UL); /* Configure the Cortex-M4 ART Base address to the Flash Bank 2 : */ __HAL_ART_ENABLE(); /* Enable the Cortex-M4 ART */ #endif /* DUAL_CORE && CORE_CM4 */ /* Set Interrupt Group Priority */ HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); 8000e1a: 2003 movs r0, #3 8000e1c: f000 f88c bl 8000f38 /* Update the SystemCoreClock global variable */ #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU); 8000e20: f001 fe60 bl 8002ae4 8000e24: 490f ldr r1, [pc, #60] @ (8000e64 ) 8000e26: 698b ldr r3, [r1, #24] 8000e28: f3c3 2303 ubfx r3, r3, #8, #4 8000e2c: 4a0e ldr r2, [pc, #56] @ (8000e68 ) 8000e2e: 5cd3 ldrb r3, [r2, r3] 8000e30: f003 031f and.w r3, r3, #31 8000e34: 40d8 lsrs r0, r3 common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE)>> RCC_CDCFGR1_CDCPRE_Pos]) & 0x1FU); #endif /* Update the SystemD2Clock global variable */ #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 8000e36: 698b ldr r3, [r1, #24] 8000e38: f003 030f and.w r3, r3, #15 8000e3c: 5cd3 ldrb r3, [r2, r3] 8000e3e: f003 031f and.w r3, r3, #31 8000e42: fa20 f303 lsr.w r3, r0, r3 8000e46: 4a09 ldr r2, [pc, #36] @ (8000e6c ) 8000e48: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 8000e4a: 4b09 ldr r3, [pc, #36] @ (8000e70 ) 8000e4c: 6018 str r0, [r3, #0] #endif /* DUAL_CORE && CORE_CM4 */ /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */ if(HAL_InitTick(TICK_INT_PRIORITY) != HAL_OK) 8000e4e: 200f movs r0, #15 8000e50: f7ff fdf2 bl 8000a38 8000e54: b110 cbz r0, 8000e5c { return HAL_ERROR; 8000e56: 2401 movs r4, #1 /* Init the low level hardware */ HAL_MspInit(); /* Return function status */ return HAL_OK; } 8000e58: 4620 mov r0, r4 8000e5a: bd10 pop {r4, pc} 8000e5c: 4604 mov r4, r0 HAL_MspInit(); 8000e5e: f7ff fdd1 bl 8000a04 return HAL_OK; 8000e62: e7f9 b.n 8000e58 8000e64: 58024400 .word 0x58024400 8000e68: 08014328 .word 0x08014328 8000e6c: 24000000 .word 0x24000000 8000e70: 24000004 .word 0x24000004 08000e74 : * implementations in user file. * @retval None */ __weak void HAL_IncTick(void) { uwTick += (uint32_t)uwTickFreq; 8000e74: 4b03 ldr r3, [pc, #12] @ (8000e84 ) 8000e76: 781b ldrb r3, [r3, #0] 8000e78: 4a03 ldr r2, [pc, #12] @ (8000e88 ) 8000e7a: 6811 ldr r1, [r2, #0] 8000e7c: 440b add r3, r1 8000e7e: 6013 str r3, [r2, #0] } 8000e80: 4770 bx lr 8000e82: bf00 nop 8000e84: 24000008 .word 0x24000008 8000e88: 24000d80 .word 0x24000d80 08000e8c : * implementations in user file. * @retval tick value */ __weak uint32_t HAL_GetTick(void) { return uwTick; 8000e8c: 4b01 ldr r3, [pc, #4] @ (8000e94 ) 8000e8e: 6818 ldr r0, [r3, #0] } 8000e90: 4770 bx lr 8000e92: bf00 nop 8000e94: 24000d80 .word 0x24000d80 08000e98 : * @brief Returns the device revision identifier. * @retval Device revision identifier */ uint32_t HAL_GetREVID(void) { return((DBGMCU->IDCODE) >> 16); 8000e98: 4b01 ldr r3, [pc, #4] @ (8000ea0 ) 8000e9a: 6818 ldr r0, [r3, #0] } 8000e9c: 0c00 lsrs r0, r0, #16 8000e9e: 4770 bx lr 8000ea0: 5c001000 .word 0x5c001000 08000ea4 : void HAL_SYSCFG_ETHInterfaceSelect(uint32_t SYSCFG_ETHInterface) { /* Check the parameter */ assert_param(IS_SYSCFG_ETHERNET_CONFIG(SYSCFG_ETHInterface)); MODIFY_REG(SYSCFG->PMCR, SYSCFG_PMCR_EPIS_SEL, (uint32_t)(SYSCFG_ETHInterface)); 8000ea4: 4a03 ldr r2, [pc, #12] @ (8000eb4 ) 8000ea6: 6853 ldr r3, [r2, #4] 8000ea8: f423 0360 bic.w r3, r3, #14680064 @ 0xe00000 8000eac: 4303 orrs r3, r0 8000eae: 6053 str r3, [r2, #4] } 8000eb0: 4770 bx lr 8000eb2: bf00 nop 8000eb4: 58000400 .word 0x58000400 08000eb8 <__NVIC_EnableIRQ>: if ((int32_t)(IRQn) >= 0) 8000eb8: 2800 cmp r0, #0 8000eba: db07 blt.n 8000ecc <__NVIC_EnableIRQ+0x14> NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 8000ebc: f000 021f and.w r2, r0, #31 8000ec0: 0940 lsrs r0, r0, #5 8000ec2: 2301 movs r3, #1 8000ec4: 4093 lsls r3, r2 8000ec6: 4a02 ldr r2, [pc, #8] @ (8000ed0 <__NVIC_EnableIRQ+0x18>) 8000ec8: f842 3020 str.w r3, [r2, r0, lsl #2] } 8000ecc: 4770 bx lr 8000ece: bf00 nop 8000ed0: e000e100 .word 0xe000e100 08000ed4 <__NVIC_SetPriority>: if ((int32_t)(IRQn) >= 0) 8000ed4: 2800 cmp r0, #0 8000ed6: db04 blt.n 8000ee2 <__NVIC_SetPriority+0xe> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8000ed8: 0109 lsls r1, r1, #4 8000eda: b2c9 uxtb r1, r1 8000edc: 4b04 ldr r3, [pc, #16] @ (8000ef0 <__NVIC_SetPriority+0x1c>) 8000ede: 5419 strb r1, [r3, r0] 8000ee0: 4770 bx lr SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8000ee2: f000 000f and.w r0, r0, #15 8000ee6: 0109 lsls r1, r1, #4 8000ee8: b2c9 uxtb r1, r1 8000eea: 4b02 ldr r3, [pc, #8] @ (8000ef4 <__NVIC_SetPriority+0x20>) 8000eec: 5419 strb r1, [r3, r0] } 8000eee: 4770 bx lr 8000ef0: e000e400 .word 0xe000e400 8000ef4: e000ed14 .word 0xe000ed14 08000ef8 : { 8000ef8: b500 push {lr} uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 8000efa: f000 0007 and.w r0, r0, #7 PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); 8000efe: f1c0 0c07 rsb ip, r0, #7 8000f02: f1bc 0f04 cmp.w ip, #4 8000f06: bf28 it cs 8000f08: f04f 0c04 movcs.w ip, #4 SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); 8000f0c: 1d03 adds r3, r0, #4 8000f0e: 2b06 cmp r3, #6 8000f10: d90f bls.n 8000f32 8000f12: 1ec3 subs r3, r0, #3 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8000f14: f04f 3eff mov.w lr, #4294967295 @ 0xffffffff 8000f18: fa0e f00c lsl.w r0, lr, ip 8000f1c: ea21 0100 bic.w r1, r1, r0 8000f20: 4099 lsls r1, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) 8000f22: fa0e fe03 lsl.w lr, lr, r3 8000f26: ea22 020e bic.w r2, r2, lr } 8000f2a: ea41 0002 orr.w r0, r1, r2 8000f2e: f85d fb04 ldr.w pc, [sp], #4 SubPriorityBits = ((PriorityGroupTmp + (uint32_t)(__NVIC_PRIO_BITS)) < (uint32_t)7UL) ? (uint32_t)0UL : (uint32_t)((PriorityGroupTmp - 7UL) + (uint32_t)(__NVIC_PRIO_BITS)); 8000f32: 2300 movs r3, #0 8000f34: e7ee b.n 8000f14 ... 08000f38 : reg_value = SCB->AIRCR; /* read old register configuration */ 8000f38: 4906 ldr r1, [pc, #24] @ (8000f54 ) 8000f3a: 68cb ldr r3, [r1, #12] reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ 8000f3c: f423 63e0 bic.w r3, r3, #1792 @ 0x700 8000f40: 041b lsls r3, r3, #16 8000f42: 0c1b lsrs r3, r3, #16 (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ 8000f44: 0200 lsls r0, r0, #8 8000f46: f400 60e0 and.w r0, r0, #1792 @ 0x700 ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 8000f4a: 4303 orrs r3, r0 reg_value = (reg_value | 8000f4c: 4a02 ldr r2, [pc, #8] @ (8000f58 ) 8000f4e: 431a orrs r2, r3 SCB->AIRCR = reg_value; 8000f50: 60ca str r2, [r1, #12] /* Check the parameters */ assert_param(IS_NVIC_PRIORITY_GROUP(PriorityGroup)); /* Set the PRIGROUP[10:8] bits according to the PriorityGroup parameter value */ NVIC_SetPriorityGrouping(PriorityGroup); } 8000f52: 4770 bx lr 8000f54: e000ed00 .word 0xe000ed00 8000f58: 05fa0000 .word 0x05fa0000 08000f5c : * This parameter can be a value between 0 and 15 * A lower priority value indicates a higher priority. * @retval None */ void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority) { 8000f5c: b510 push {r4, lr} 8000f5e: 4604 mov r4, r0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); 8000f60: 4b05 ldr r3, [pc, #20] @ (8000f78 ) 8000f62: 68d8 ldr r0, [r3, #12] assert_param(IS_NVIC_SUB_PRIORITY(SubPriority)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(PreemptPriority)); prioritygroup = NVIC_GetPriorityGrouping(); NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); 8000f64: f3c0 2002 ubfx r0, r0, #8, #3 8000f68: f7ff ffc6 bl 8000ef8 8000f6c: 4601 mov r1, r0 8000f6e: 4620 mov r0, r4 8000f70: f7ff ffb0 bl 8000ed4 <__NVIC_SetPriority> } 8000f74: bd10 pop {r4, pc} 8000f76: bf00 nop 8000f78: e000ed00 .word 0xe000ed00 08000f7c : * This parameter can be an enumerator of IRQn_Type enumeration * (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32h7xxxx.h)) * @retval None */ void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) { 8000f7c: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 8000f7e: f7ff ff9b bl 8000eb8 <__NVIC_EnableIRQ> } 8000f82: bd08 pop {r3, pc} 08000f84 : \details Ensures the apparent order of the explicit memory operations before and after the instruction, without ensuring their completion. */ __STATIC_FORCEINLINE void __DMB(void) { __ASM volatile ("dmb 0xF":::"memory"); 8000f84: f3bf 8f5f dmb sy { /* Make sure outstanding transfers are done */ __DMB(); /* Disable fault exceptions */ SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; 8000f88: 4b04 ldr r3, [pc, #16] @ (8000f9c ) 8000f8a: 6a5a ldr r2, [r3, #36] @ 0x24 8000f8c: f422 3280 bic.w r2, r2, #65536 @ 0x10000 8000f90: 625a str r2, [r3, #36] @ 0x24 /* Disable the MPU and clear the control register*/ MPU->CTRL = 0; 8000f92: 2200 movs r2, #0 8000f94: f8c3 2094 str.w r2, [r3, #148] @ 0x94 } 8000f98: 4770 bx lr 8000f9a: bf00 nop 8000f9c: e000ed00 .word 0xe000ed00 08000fa0 : * @retval None */ void HAL_MPU_Enable(uint32_t MPU_Control) { /* Enable the MPU */ MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; 8000fa0: f040 0001 orr.w r0, r0, #1 8000fa4: 4b05 ldr r3, [pc, #20] @ (8000fbc ) 8000fa6: f8c3 0094 str.w r0, [r3, #148] @ 0x94 /* Enable fault exceptions */ SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; 8000faa: 6a5a ldr r2, [r3, #36] @ 0x24 8000fac: f442 3280 orr.w r2, r2, #65536 @ 0x10000 8000fb0: 625a str r2, [r3, #36] @ 0x24 __ASM volatile ("dsb 0xF":::"memory"); 8000fb2: f3bf 8f4f dsb sy __ASM volatile ("isb 0xF":::"memory"); 8000fb6: f3bf 8f6f isb sy /* Ensure MPU setting take effects */ __DSB(); __ISB(); } 8000fba: 4770 bx lr 8000fbc: e000ed00 .word 0xe000ed00 08000fc0 : /* Check the parameters */ assert_param(IS_MPU_REGION_NUMBER(MPU_Init->Number)); assert_param(IS_MPU_REGION_ENABLE(MPU_Init->Enable)); /* Set the Region number */ MPU->RNR = MPU_Init->Number; 8000fc0: 7842 ldrb r2, [r0, #1] 8000fc2: 4b16 ldr r3, [pc, #88] @ (800101c ) 8000fc4: f8c3 2098 str.w r2, [r3, #152] @ 0x98 if ((MPU_Init->Enable) != 0UL) 8000fc8: 7803 ldrb r3, [r0, #0] 8000fca: b1fb cbz r3, 800100c assert_param(IS_MPU_ACCESS_CACHEABLE(MPU_Init->IsCacheable)); assert_param(IS_MPU_ACCESS_BUFFERABLE(MPU_Init->IsBufferable)); assert_param(IS_MPU_SUB_REGION_DISABLE(MPU_Init->SubRegionDisable)); assert_param(IS_MPU_REGION_SIZE(MPU_Init->Size)); MPU->RBAR = MPU_Init->BaseAddress; 8000fcc: 6843 ldr r3, [r0, #4] 8000fce: 4a13 ldr r2, [pc, #76] @ (800101c ) 8000fd0: f8c2 309c str.w r3, [r2, #156] @ 0x9c MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8000fd4: 7b01 ldrb r1, [r0, #12] ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8000fd6: 7ac3 ldrb r3, [r0, #11] 8000fd8: 061b lsls r3, r3, #24 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8000fda: ea43 7301 orr.w r3, r3, r1, lsl #28 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8000fde: 7a81 ldrb r1, [r0, #10] ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8000fe0: ea43 43c1 orr.w r3, r3, r1, lsl #19 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8000fe4: 7b41 ldrb r1, [r0, #13] ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8000fe6: ea43 4381 orr.w r3, r3, r1, lsl #18 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8000fea: 7b81 ldrb r1, [r0, #14] ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8000fec: ea43 4341 orr.w r3, r3, r1, lsl #17 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8000ff0: 7bc1 ldrb r1, [r0, #15] ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8000ff2: ea43 4301 orr.w r3, r3, r1, lsl #16 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8000ff6: 7a41 ldrb r1, [r0, #9] ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8000ff8: ea43 2301 orr.w r3, r3, r1, lsl #8 ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8000ffc: 7a01 ldrb r1, [r0, #8] ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8000ffe: ea43 0341 orr.w r3, r3, r1, lsl #1 ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos); 8001002: 7801 ldrb r1, [r0, #0] ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8001004: 430b orrs r3, r1 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8001006: f8c2 30a0 str.w r3, [r2, #160] @ 0xa0 800100a: 4770 bx lr } else { MPU->RBAR = 0x00; 800100c: 4b03 ldr r3, [pc, #12] @ (800101c ) 800100e: 2200 movs r2, #0 8001010: f8c3 209c str.w r2, [r3, #156] @ 0x9c MPU->RASR = 0x00; 8001014: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 } } 8001018: 4770 bx lr 800101a: bf00 nop 800101c: e000ed00 .word 0xe000ed00 08001020 : * @brief Returns the current CPU ID. * @retval CPU identifier */ uint32_t HAL_GetCurrentCPUID(void) { if (((SCB->CPUID & 0x000000F0U) >> 4 )== 0x7U) 8001020: 4b04 ldr r3, [pc, #16] @ (8001034 ) 8001022: 681b ldr r3, [r3, #0] 8001024: f3c3 1303 ubfx r3, r3, #4, #4 8001028: 2b07 cmp r3, #7 800102a: d001 beq.n 8001030 { return CM7_CPUID; } else { return CM4_CPUID; 800102c: 2001 movs r0, #1 } } 800102e: 4770 bx lr return CM7_CPUID; 8001030: 2003 movs r0, #3 8001032: 4770 bx lr 8001034: e000ed00 .word 0xe000ed00 08001038 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth) { 8001038: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800103c: b082 sub sp, #8 800103e: 4607 mov r7, r0 uint32_t descidx; uint32_t desccount; ETH_DMADescTypeDef *dmarxdesc; uint8_t *buff = NULL; 8001040: 2300 movs r3, #0 8001042: 9301 str r3, [sp, #4] uint8_t allocStatus = 1U; descidx = heth->RxDescList.RxBuildDescIdx; 8001044: f8d0 8068 ldr.w r8, [r0, #104] @ 0x68 dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 8001048: f108 0312 add.w r3, r8, #18 800104c: f850 4023 ldr.w r4, [r0, r3, lsl #2] desccount = heth->RxDescList.RxBuildDescCnt; 8001050: 6ec5 ldr r5, [r0, #108] @ 0x6c uint8_t allocStatus = 1U; 8001052: 2601 movs r6, #1 while ((desccount > 0U) && (allocStatus != 0U)) 8001054: e013 b.n 800107e #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Allocate callback*/ heth->rxAllocateCallback(&buff); #else /* Allocate callback */ HAL_ETH_RxAllocateCallback(&buff); 8001056: a801 add r0, sp, #4 8001058: f002 fce4 bl 8003a24 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ if (buff == NULL) 800105c: 9b01 ldr r3, [sp, #4] 800105e: b113 cbz r3, 8001066 { allocStatus = 0U; } else { WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff); 8001060: 6123 str r3, [r4, #16] WRITE_REG(dmarxdesc->DESC0, (uint32_t)buff); 8001062: 6023 str r3, [r4, #0] 8001064: e010 b.n 8001088 allocStatus = 0U; 8001066: 2600 movs r6, #0 8001068: e00e b.n 8001088 { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC); } else { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V); 800106a: f04f 4301 mov.w r3, #2164260864 @ 0x81000000 800106e: 60e3 str r3, [r4, #12] 8001070: e014 b.n 800109c } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 8001072: f103 0212 add.w r2, r3, #18 8001076: f857 4022 ldr.w r4, [r7, r2, lsl #2] desccount--; 800107a: 3d01 subs r5, #1 800107c: 4698 mov r8, r3 while ((desccount > 0U) && (allocStatus != 0U)) 800107e: b1a5 cbz r5, 80010aa 8001080: b19e cbz r6, 80010aa if (READ_REG(dmarxdesc->BackupAddr0) == 0U) 8001082: 6923 ldr r3, [r4, #16] 8001084: 2b00 cmp r3, #0 8001086: d0e6 beq.n 8001056 if (allocStatus != 0U) 8001088: 2e00 cmp r6, #0 800108a: d0f8 beq.n 800107e __ASM volatile ("dmb 0xF":::"memory"); 800108c: f3bf 8f5f dmb sy if (heth->RxDescList.ItMode != 0U) 8001090: 6dbb ldr r3, [r7, #88] @ 0x58 8001092: 2b00 cmp r3, #0 8001094: d0e9 beq.n 800106a WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC); 8001096: f04f 4341 mov.w r3, #3238002688 @ 0xc1000000 800109a: 60e3 str r3, [r4, #12] INCR_RX_DESC_INDEX(descidx, 1U); 800109c: f108 0301 add.w r3, r8, #1 80010a0: 2b03 cmp r3, #3 80010a2: d9e6 bls.n 8001072 80010a4: f1a8 0303 sub.w r3, r8, #3 80010a8: e7e3 b.n 8001072 } } if (heth->RxDescList.RxBuildDescCnt != desccount) 80010aa: 6efb ldr r3, [r7, #108] @ 0x6c 80010ac: 42ab cmp r3, r5 80010ae: d008 beq.n 80010c2 { /* Set the Tail pointer address */ WRITE_REG(heth->Instance->DMACRDTPR, 0); 80010b0: 683b ldr r3, [r7, #0] 80010b2: f503 5380 add.w r3, r3, #4096 @ 0x1000 80010b6: 2200 movs r2, #0 80010b8: f8c3 2128 str.w r2, [r3, #296] @ 0x128 heth->RxDescList.RxBuildDescIdx = descidx; 80010bc: f8c7 8068 str.w r8, [r7, #104] @ 0x68 heth->RxDescList.RxBuildDescCnt = desccount; 80010c0: 66fd str r5, [r7, #108] @ 0x6c } } 80010c2: b002 add sp, #8 80010c4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 080010c8 : * @{ */ static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, ETH_MACConfigTypeDef *macconf) { 80010c8: b430 push {r4, r5} uint32_t macregval; /*------------------------ MACCR Configuration --------------------*/ macregval = (macconf->InterPacketGapVal | 80010ca: 688b ldr r3, [r1, #8] macconf->SourceAddrControl | 80010cc: 680a ldr r2, [r1, #0] macregval = (macconf->InterPacketGapVal | 80010ce: 4313 orrs r3, r2 ((uint32_t)macconf->ChecksumOffload << 27) | 80010d0: 790a ldrb r2, [r1, #4] macconf->SourceAddrControl | 80010d2: ea43 63c2 orr.w r3, r3, r2, lsl #27 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 80010d6: 7b0a ldrb r2, [r1, #12] ((uint32_t)macconf->ChecksumOffload << 27) | 80010d8: ea43 53c2 orr.w r3, r3, r2, lsl #23 ((uint32_t)macconf->Support2KPacket << 22) | 80010dc: 7b4a ldrb r2, [r1, #13] ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 80010de: ea43 5382 orr.w r3, r3, r2, lsl #22 ((uint32_t)macconf->CRCStripTypePacket << 21) | 80010e2: 7b8a ldrb r2, [r1, #14] ((uint32_t)macconf->Support2KPacket << 22) | 80010e4: ea43 5342 orr.w r3, r3, r2, lsl #21 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 80010e8: 7bca ldrb r2, [r1, #15] ((uint32_t)macconf->CRCStripTypePacket << 21) | 80010ea: ea43 5302 orr.w r3, r3, r2, lsl #20 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 80010ee: 7c0a ldrb r2, [r1, #16] 80010f0: 2a00 cmp r2, #0 80010f2: f040 80b0 bne.w 8001256 80010f6: f44f 2200 mov.w r2, #524288 @ 0x80000 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 80010fa: 4313 orrs r3, r2 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 80010fc: 7c4a ldrb r2, [r1, #17] 80010fe: 2a00 cmp r2, #0 8001100: f040 80ab bne.w 800125a 8001104: f44f 3200 mov.w r2, #131072 @ 0x20000 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 8001108: 4313 orrs r3, r2 ((uint32_t)macconf->JumboPacket << 16) | 800110a: 7c8a ldrb r2, [r1, #18] ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 800110c: ea43 4302 orr.w r3, r3, r2, lsl #16 macconf->Speed | 8001110: 694a ldr r2, [r1, #20] ((uint32_t)macconf->JumboPacket << 16) | 8001112: 4313 orrs r3, r2 macconf->DuplexMode | 8001114: 698a ldr r2, [r1, #24] macconf->Speed | 8001116: 4313 orrs r3, r2 ((uint32_t)macconf->LoopbackMode << 12) | 8001118: 7f0a ldrb r2, [r1, #28] macconf->DuplexMode | 800111a: ea43 3302 orr.w r3, r3, r2, lsl #12 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 800111e: 7f4a ldrb r2, [r1, #29] ((uint32_t)macconf->LoopbackMode << 12) | 8001120: ea43 23c2 orr.w r3, r3, r2, lsl #11 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8001124: 7f8a ldrb r2, [r1, #30] 8001126: 2a00 cmp r2, #0 8001128: f040 8099 bne.w 800125e 800112c: f44f 6280 mov.w r2, #1024 @ 0x400 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 8001130: 4313 orrs r3, r2 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 8001132: 7fca ldrb r2, [r1, #31] ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8001134: ea43 2342 orr.w r3, r3, r2, lsl #9 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 8001138: f891 2020 ldrb.w r2, [r1, #32] 800113c: 2a00 cmp r2, #0 800113e: f040 8090 bne.w 8001262 8001142: f44f 7280 mov.w r2, #256 @ 0x100 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 8001146: 4313 orrs r3, r2 macconf->BackOffLimit | 8001148: 6a4a ldr r2, [r1, #36] @ 0x24 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 800114a: 4313 orrs r3, r2 ((uint32_t)macconf->DeferralCheck << 4) | 800114c: f891 2028 ldrb.w r2, [r1, #40] @ 0x28 macconf->BackOffLimit | 8001150: ea43 1302 orr.w r3, r3, r2, lsl #4 macconf->PreambleLength); 8001154: 6aca ldr r2, [r1, #44] @ 0x2c macregval = (macconf->InterPacketGapVal | 8001156: 4313 orrs r3, r2 /* Write to MACCR */ MODIFY_REG(heth->Instance->MACCR, ETH_MACCR_MASK, macregval); 8001158: 6804 ldr r4, [r0, #0] 800115a: 6822 ldr r2, [r4, #0] 800115c: f022 427f bic.w r2, r2, #4278190080 @ 0xff000000 8001160: f422 027b bic.w r2, r2, #16449536 @ 0xfb0000 8001164: f422 42fe bic.w r2, r2, #32512 @ 0x7f00 8001168: f022 027c bic.w r2, r2, #124 @ 0x7c 800116c: 4313 orrs r3, r2 800116e: 6023 str r3, [r4, #0] /*------------------------ MACECR Configuration --------------------*/ macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8001170: 6bca ldr r2, [r1, #60] @ 0x3c ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 8001172: f891 3038 ldrb.w r3, [r1, #56] @ 0x38 8001176: 061b lsls r3, r3, #24 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8001178: ea43 6342 orr.w r3, r3, r2, lsl #25 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 800117c: f891 2030 ldrb.w r2, [r1, #48] @ 0x30 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 8001180: ea43 4382 orr.w r3, r3, r2, lsl #18 ((uint32_t)macconf->SlowProtocolDetect << 17) | 8001184: f891 2031 ldrb.w r2, [r1, #49] @ 0x31 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 8001188: ea43 4342 orr.w r3, r3, r2, lsl #17 ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) | 800118c: f891 2032 ldrb.w r2, [r1, #50] @ 0x32 8001190: 2a00 cmp r2, #0 8001192: d168 bne.n 8001266 8001194: f44f 3280 mov.w r2, #65536 @ 0x10000 ((uint32_t)macconf->SlowProtocolDetect << 17) | 8001198: 4313 orrs r3, r2 macconf->GiantPacketSizeLimit); 800119a: 6b4a ldr r2, [r1, #52] @ 0x34 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 800119c: 4313 orrs r3, r2 /* Write to MACECR */ MODIFY_REG(heth->Instance->MACECR, ETH_MACECR_MASK, macregval); 800119e: 6804 ldr r4, [r0, #0] 80011a0: 6862 ldr r2, [r4, #4] 80011a2: f022 527c bic.w r2, r2, #1056964608 @ 0x3f000000 80011a6: f422 22ef bic.w r2, r2, #489472 @ 0x77800 80011aa: f422 62ff bic.w r2, r2, #2040 @ 0x7f8 80011ae: f022 0207 bic.w r2, r2, #7 80011b2: 4313 orrs r3, r2 80011b4: 6063 str r3, [r4, #4] /*------------------------ MACWTR Configuration --------------------*/ macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 80011b6: f891 2040 ldrb.w r2, [r1, #64] @ 0x40 macconf->WatchdogTimeout); 80011ba: 6c4b ldr r3, [r1, #68] @ 0x44 macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 80011bc: ea43 2202 orr.w r2, r3, r2, lsl #8 /* Write to MACWTR */ MODIFY_REG(heth->Instance->MACWTR, ETH_MACWTR_MASK, macregval); 80011c0: 6804 ldr r4, [r0, #0] 80011c2: 68e5 ldr r5, [r4, #12] 80011c4: 4b2b ldr r3, [pc, #172] @ (8001274 ) 80011c6: 402b ands r3, r5 80011c8: 4313 orrs r3, r2 80011ca: 60e3 str r3, [r4, #12] /*------------------------ MACTFCR Configuration --------------------*/ macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 80011cc: f891 2054 ldrb.w r2, [r1, #84] @ 0x54 macconf->PauseLowThreshold | 80011d0: 6d0b ldr r3, [r1, #80] @ 0x50 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 80011d2: ea43 0342 orr.w r3, r3, r2, lsl #1 ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) | 80011d6: f891 204c ldrb.w r2, [r1, #76] @ 0x4c 80011da: 2a00 cmp r2, #0 80011dc: d145 bne.n 800126a 80011de: 2280 movs r2, #128 @ 0x80 macconf->PauseLowThreshold | 80011e0: 4313 orrs r3, r2 (macconf->PauseTime << 16)); 80011e2: 6c8a ldr r2, [r1, #72] @ 0x48 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 80011e4: ea43 4302 orr.w r3, r3, r2, lsl #16 /* Write to MACTFCR */ MODIFY_REG(heth->Instance->MACTFCR, ETH_MACTFCR_MASK, macregval); 80011e8: 6804 ldr r4, [r0, #0] 80011ea: 6f22 ldr r2, [r4, #112] @ 0x70 80011ec: f022 02f2 bic.w r2, r2, #242 @ 0xf2 80011f0: 0412 lsls r2, r2, #16 80011f2: 0c12 lsrs r2, r2, #16 80011f4: 4313 orrs r3, r2 80011f6: 6723 str r3, [r4, #112] @ 0x70 /*------------------------ MACRFCR Configuration --------------------*/ macregval = ((uint32_t)macconf->ReceiveFlowControl | 80011f8: f891 2056 ldrb.w r2, [r1, #86] @ 0x56 ((uint32_t)macconf->UnicastPausePacketDetect << 1)); 80011fc: f891 3055 ldrb.w r3, [r1, #85] @ 0x55 macregval = ((uint32_t)macconf->ReceiveFlowControl | 8001200: ea42 0243 orr.w r2, r2, r3, lsl #1 /* Write to MACRFCR */ MODIFY_REG(heth->Instance->MACRFCR, ETH_MACRFCR_MASK, macregval); 8001204: 6804 ldr r4, [r0, #0] 8001206: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90 800120a: f023 0303 bic.w r3, r3, #3 800120e: 4313 orrs r3, r2 8001210: f8c4 3090 str.w r3, [r4, #144] @ 0x90 /*------------------------ MTLTQOMR Configuration --------------------*/ /* Write to MTLTQOMR */ MODIFY_REG(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_MASK, macconf->TransmitQueueMode); 8001214: 6802 ldr r2, [r0, #0] 8001216: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00 800121a: f023 0372 bic.w r3, r3, #114 @ 0x72 800121e: 6d8c ldr r4, [r1, #88] @ 0x58 8001220: 4323 orrs r3, r4 8001222: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00 /*------------------------ MTLRQOMR Configuration --------------------*/ macregval = (macconf->ReceiveQueueMode | 8001226: 6dcb ldr r3, [r1, #92] @ 0x5c ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8001228: f891 2060 ldrb.w r2, [r1, #96] @ 0x60 800122c: b9fa cbnz r2, 800126e 800122e: 2240 movs r2, #64 @ 0x40 macregval = (macconf->ReceiveQueueMode | 8001230: 4313 orrs r3, r2 ((uint32_t)macconf->ForwardRxErrorPacket << 4) | 8001232: f891 2061 ldrb.w r2, [r1, #97] @ 0x61 ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8001236: ea43 1302 orr.w r3, r3, r2, lsl #4 ((uint32_t)macconf->ForwardRxUndersizedGoodPacket << 3)); 800123a: f891 2062 ldrb.w r2, [r1, #98] @ 0x62 macregval = (macconf->ReceiveQueueMode | 800123e: ea43 03c2 orr.w r3, r3, r2, lsl #3 /* Write to MTLRQOMR */ MODIFY_REG(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_MASK, macregval); 8001242: 6801 ldr r1, [r0, #0] 8001244: f8d1 2d30 ldr.w r2, [r1, #3376] @ 0xd30 8001248: f022 027b bic.w r2, r2, #123 @ 0x7b 800124c: 4313 orrs r3, r2 800124e: f8c1 3d30 str.w r3, [r1, #3376] @ 0xd30 } 8001252: bc30 pop {r4, r5} 8001254: 4770 bx lr ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 8001256: 2200 movs r2, #0 8001258: e74f b.n 80010fa ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 800125a: 2200 movs r2, #0 800125c: e754 b.n 8001108 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 800125e: 2200 movs r2, #0 8001260: e766 b.n 8001130 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 8001262: 2200 movs r2, #0 8001264: e76f b.n 8001146 ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) | 8001266: 2200 movs r2, #0 8001268: e796 b.n 8001198 ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) | 800126a: 2200 movs r2, #0 800126c: e7b8 b.n 80011e0 ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 800126e: 2200 movs r2, #0 8001270: e7de b.n 8001230 8001272: bf00 nop 8001274: fffffef0 .word 0xfffffef0 08001278 : static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, ETH_DMAConfigTypeDef *dmaconf) { 8001278: b410 push {r4} uint32_t dmaregval; /*------------------------ DMAMR Configuration --------------------*/ MODIFY_REG(heth->Instance->DMAMR, ETH_DMAMR_MASK, dmaconf->DMAArbitration); 800127a: 6802 ldr r2, [r0, #0] 800127c: f502 5280 add.w r2, r2, #4096 @ 0x1000 8001280: 6814 ldr r4, [r2, #0] 8001282: 4b23 ldr r3, [pc, #140] @ (8001310 ) 8001284: 4023 ands r3, r4 8001286: 680c ldr r4, [r1, #0] 8001288: 4323 orrs r3, r4 800128a: 6013 str r3, [r2, #0] /*------------------------ DMASBMR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 800128c: 790a ldrb r2, [r1, #4] dmaconf->BurstMode | 800128e: 688b ldr r3, [r1, #8] dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8001290: ea43 3302 orr.w r3, r3, r2, lsl #12 ((uint32_t)dmaconf->RebuildINCRxBurst << 15)); 8001294: 7b0a ldrb r2, [r1, #12] dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8001296: ea43 32c2 orr.w r2, r3, r2, lsl #15 MODIFY_REG(heth->Instance->DMASBMR, ETH_DMASBMR_MASK, dmaregval); 800129a: 6803 ldr r3, [r0, #0] 800129c: f503 5c80 add.w ip, r3, #4096 @ 0x1000 80012a0: f8dc 4004 ldr.w r4, [ip, #4] 80012a4: 4b1b ldr r3, [pc, #108] @ (8001314 ) 80012a6: 4023 ands r3, r4 80012a8: 4313 orrs r3, r2 80012aa: f8cc 3004 str.w r3, [ip, #4] /*------------------------ DMACCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 80012ae: 7b4a ldrb r2, [r1, #13] dmaconf->MaximumSegmentSize); 80012b0: 6a0b ldr r3, [r1, #32] dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 80012b2: ea43 4c02 orr.w ip, r3, r2, lsl #16 MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_MASK, dmaregval); 80012b6: 6802 ldr r2, [r0, #0] 80012b8: f502 5280 add.w r2, r2, #4096 @ 0x1000 80012bc: f8d2 4100 ldr.w r4, [r2, #256] @ 0x100 80012c0: 4b15 ldr r3, [pc, #84] @ (8001318 ) 80012c2: 4023 ands r3, r4 80012c4: ea43 030c orr.w r3, r3, ip 80012c8: f8c2 3100 str.w r3, [r2, #256] @ 0x100 /*------------------------ DMACTCR Configuration --------------------*/ dmaregval = (dmaconf->TxDMABurstLength | 80012cc: 690b ldr r3, [r1, #16] ((uint32_t)dmaconf->SecondPacketOperate << 4) | 80012ce: 7d0a ldrb r2, [r1, #20] dmaregval = (dmaconf->TxDMABurstLength | 80012d0: ea43 1302 orr.w r3, r3, r2, lsl #4 ((uint32_t)dmaconf->TCPSegmentation << 12)); 80012d4: 7f4a ldrb r2, [r1, #29] dmaregval = (dmaconf->TxDMABurstLength | 80012d6: ea43 3202 orr.w r2, r3, r2, lsl #12 MODIFY_REG(heth->Instance->DMACTCR, ETH_DMACTCR_MASK, dmaregval); 80012da: 6803 ldr r3, [r0, #0] 80012dc: f503 5c80 add.w ip, r3, #4096 @ 0x1000 80012e0: f8dc 4104 ldr.w r4, [ip, #260] @ 0x104 80012e4: 4b0d ldr r3, [pc, #52] @ (800131c ) 80012e6: 4023 ands r3, r4 80012e8: 4313 orrs r3, r2 80012ea: f8cc 3104 str.w r3, [ip, #260] @ 0x104 /*------------------------ DMACRCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 80012ee: 7f0b ldrb r3, [r1, #28] dmaconf->RxDMABurstLength); 80012f0: 6989 ldr r1, [r1, #24] dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 80012f2: ea41 71c3 orr.w r1, r1, r3, lsl #31 /* Write to DMACRCR */ MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_MASK, dmaregval); 80012f6: 6802 ldr r2, [r0, #0] 80012f8: f502 5280 add.w r2, r2, #4096 @ 0x1000 80012fc: f8d2 0108 ldr.w r0, [r2, #264] @ 0x108 8001300: 4b07 ldr r3, [pc, #28] @ (8001320 ) 8001302: 4003 ands r3, r0 8001304: 430b orrs r3, r1 8001306: f8c2 3108 str.w r3, [r2, #264] @ 0x108 } 800130a: f85d 4b04 ldr.w r4, [sp], #4 800130e: 4770 bx lr 8001310: ffff87fd .word 0xffff87fd 8001314: ffff2ffe .word 0xffff2ffe 8001318: fffec000 .word 0xfffec000 800131c: ffc0efef .word 0xffc0efef 8001320: 7fc0ffff .word 0x7fc0ffff 08001324 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval HAL status */ static void ETH_MACDMAConfig(ETH_HandleTypeDef *heth) { 8001324: b570 push {r4, r5, r6, lr} 8001326: b0a2 sub sp, #136 @ 0x88 8001328: 4606 mov r6, r0 ETH_MACConfigTypeDef macDefaultConf; ETH_DMAConfigTypeDef dmaDefaultConf; /*--------------- ETHERNET MAC registers default Configuration --------------*/ macDefaultConf.AutomaticPadCRCStrip = ENABLE; 800132a: 2501 movs r5, #1 800132c: f88d 5033 strb.w r5, [sp, #51] @ 0x33 macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10; 8001330: 2400 movs r4, #0 8001332: 9412 str r4, [sp, #72] @ 0x48 macDefaultConf.CarrierSenseBeforeTransmit = DISABLE; 8001334: f88d 4041 strb.w r4, [sp, #65] @ 0x41 macDefaultConf.CarrierSenseDuringTransmit = DISABLE; 8001338: f88d 4043 strb.w r4, [sp, #67] @ 0x43 macDefaultConf.ChecksumOffload = ENABLE; 800133c: f88d 5028 strb.w r5, [sp, #40] @ 0x28 macDefaultConf.CRCCheckingRxPackets = ENABLE; 8001340: f88d 5056 strb.w r5, [sp, #86] @ 0x56 macDefaultConf.CRCStripTypePacket = ENABLE; 8001344: f88d 5032 strb.w r5, [sp, #50] @ 0x32 macDefaultConf.DeferralCheck = DISABLE; 8001348: f88d 404c strb.w r4, [sp, #76] @ 0x4c macDefaultConf.DropTCPIPChecksumErrorPacket = ENABLE; 800134c: f88d 5084 strb.w r5, [sp, #132] @ 0x84 macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE; 8001350: f44f 5300 mov.w r3, #8192 @ 0x2000 8001354: 930f str r3, [sp, #60] @ 0x3c macDefaultConf.ExtendedInterPacketGap = DISABLE; 8001356: f88d 405c strb.w r4, [sp, #92] @ 0x5c macDefaultConf.ExtendedInterPacketGapVal = 0x0; 800135a: 9418 str r4, [sp, #96] @ 0x60 macDefaultConf.ForwardRxErrorPacket = DISABLE; 800135c: f88d 4085 strb.w r4, [sp, #133] @ 0x85 macDefaultConf.ForwardRxUndersizedGoodPacket = DISABLE; 8001360: f88d 4086 strb.w r4, [sp, #134] @ 0x86 macDefaultConf.GiantPacketSizeLimit = 0x618; 8001364: f44f 63c3 mov.w r3, #1560 @ 0x618 8001368: 9316 str r3, [sp, #88] @ 0x58 macDefaultConf.GiantPacketSizeLimitControl = DISABLE; 800136a: f88d 4030 strb.w r4, [sp, #48] @ 0x30 macDefaultConf.InterPacketGapVal = ETH_INTERPACKETGAP_96BIT; 800136e: 940b str r4, [sp, #44] @ 0x2c macDefaultConf.Jabber = ENABLE; 8001370: f88d 5035 strb.w r5, [sp, #53] @ 0x35 macDefaultConf.JumboPacket = DISABLE; 8001374: f88d 4036 strb.w r4, [sp, #54] @ 0x36 macDefaultConf.LoopbackMode = DISABLE; 8001378: f88d 4040 strb.w r4, [sp, #64] @ 0x40 macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS_4; 800137c: 941d str r4, [sp, #116] @ 0x74 macDefaultConf.PauseTime = 0x0; 800137e: 941b str r4, [sp, #108] @ 0x6c macDefaultConf.PreambleLength = ETH_PREAMBLELENGTH_7; 8001380: 9414 str r4, [sp, #80] @ 0x50 macDefaultConf.ProgrammableWatchdog = DISABLE; 8001382: f88d 4064 strb.w r4, [sp, #100] @ 0x64 macDefaultConf.ReceiveFlowControl = DISABLE; 8001386: f88d 407a strb.w r4, [sp, #122] @ 0x7a macDefaultConf.ReceiveOwn = ENABLE; 800138a: f88d 5042 strb.w r5, [sp, #66] @ 0x42 macDefaultConf.ReceiveQueueMode = ETH_RECEIVESTOREFORWARD; 800138e: 2320 movs r3, #32 8001390: 9320 str r3, [sp, #128] @ 0x80 macDefaultConf.RetryTransmission = ENABLE; 8001392: f88d 5044 strb.w r5, [sp, #68] @ 0x44 macDefaultConf.SlowProtocolDetect = DISABLE; 8001396: f88d 4055 strb.w r4, [sp, #85] @ 0x55 macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0; 800139a: f04f 5340 mov.w r3, #805306368 @ 0x30000000 800139e: 9309 str r3, [sp, #36] @ 0x24 macDefaultConf.Speed = ETH_SPEED_100M; 80013a0: f44f 4380 mov.w r3, #16384 @ 0x4000 80013a4: 930e str r3, [sp, #56] @ 0x38 macDefaultConf.Support2KPacket = DISABLE; 80013a6: f88d 4031 strb.w r4, [sp, #49] @ 0x31 macDefaultConf.TransmitQueueMode = ETH_TRANSMITSTOREFORWARD; 80013aa: 2302 movs r3, #2 80013ac: 931f str r3, [sp, #124] @ 0x7c macDefaultConf.TransmitFlowControl = DISABLE; 80013ae: f88d 4078 strb.w r4, [sp, #120] @ 0x78 macDefaultConf.UnicastPausePacketDetect = DISABLE; 80013b2: f88d 4079 strb.w r4, [sp, #121] @ 0x79 macDefaultConf.UnicastSlowProtocolPacketDetect = DISABLE; 80013b6: f88d 4054 strb.w r4, [sp, #84] @ 0x54 macDefaultConf.Watchdog = ENABLE; 80013ba: f88d 5034 strb.w r5, [sp, #52] @ 0x34 macDefaultConf.WatchdogTimeout = ETH_MACWTR_WTO_2KB; 80013be: 941a str r4, [sp, #104] @ 0x68 macDefaultConf.ZeroQuantaPause = ENABLE; 80013c0: f88d 5070 strb.w r5, [sp, #112] @ 0x70 /* MAC default configuration */ ETH_SetMACConfig(heth, &macDefaultConf); 80013c4: a909 add r1, sp, #36 @ 0x24 80013c6: f7ff fe7f bl 80010c8 /*--------------- ETHERNET DMA registers default Configuration --------------*/ dmaDefaultConf.AddressAlignedBeats = ENABLE; 80013ca: f88d 5004 strb.w r5, [sp, #4] dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED; 80013ce: 9502 str r5, [sp, #8] dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_RX1_TX1; 80013d0: 9400 str r4, [sp, #0] dmaDefaultConf.FlushRxPacket = DISABLE; 80013d2: f88d 401c strb.w r4, [sp, #28] dmaDefaultConf.PBLx8Mode = DISABLE; 80013d6: f88d 400d strb.w r4, [sp, #13] dmaDefaultConf.RebuildINCRxBurst = DISABLE; 80013da: f88d 400c strb.w r4, [sp, #12] dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; 80013de: f44f 1300 mov.w r3, #2097152 @ 0x200000 80013e2: 9306 str r3, [sp, #24] dmaDefaultConf.SecondPacketOperate = DISABLE; 80013e4: f88d 4014 strb.w r4, [sp, #20] dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; 80013e8: 9304 str r3, [sp, #16] dmaDefaultConf.TCPSegmentation = DISABLE; 80013ea: f88d 401d strb.w r4, [sp, #29] dmaDefaultConf.MaximumSegmentSize = ETH_SEGMENT_SIZE_DEFAULT; 80013ee: f44f 7306 mov.w r3, #536 @ 0x218 80013f2: 9308 str r3, [sp, #32] /* DMA default configuration */ ETH_SetDMAConfig(heth, &dmaDefaultConf); 80013f4: 4669 mov r1, sp 80013f6: 4630 mov r0, r6 80013f8: f7ff ff3e bl 8001278 } 80013fc: b022 add sp, #136 @ 0x88 80013fe: bd70 pop {r4, r5, r6, pc} 08001400 : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMATxDescListInit(ETH_HandleTypeDef *heth) { 8001400: b410 push {r4} ETH_DMADescTypeDef *dmatxdesc; uint32_t i; /* Fill each DMATxDesc descriptor with the right values */ for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++) 8001402: 2200 movs r2, #0 8001404: e010 b.n 8001428 { dmatxdesc = heth->Init.TxDesc + i; 8001406: 68c4 ldr r4, [r0, #12] 8001408: eb02 0342 add.w r3, r2, r2, lsl #1 800140c: ea4f 0cc3 mov.w ip, r3, lsl #3 8001410: eb04 03c3 add.w r3, r4, r3, lsl #3 WRITE_REG(dmatxdesc->DESC0, 0x0); 8001414: 2100 movs r1, #0 8001416: f844 100c str.w r1, [r4, ip] WRITE_REG(dmatxdesc->DESC1, 0x0); 800141a: 6059 str r1, [r3, #4] WRITE_REG(dmatxdesc->DESC2, 0x0); 800141c: 6099 str r1, [r3, #8] WRITE_REG(dmatxdesc->DESC3, 0x0); 800141e: 60d9 str r1, [r3, #12] WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc); 8001420: 1d91 adds r1, r2, #6 8001422: f840 3021 str.w r3, [r0, r1, lsl #2] for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++) 8001426: 3201 adds r2, #1 8001428: 2a03 cmp r2, #3 800142a: d9ec bls.n 8001406 } heth->TxDescList.CurTxDesc = 0; 800142c: 2300 movs r3, #0 800142e: 6283 str r3, [r0, #40] @ 0x28 /* Set Transmit Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT - 1U)); 8001430: 6803 ldr r3, [r0, #0] 8001432: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001436: 2203 movs r2, #3 8001438: f8c3 212c str.w r2, [r3, #300] @ 0x12c /* Set Transmit Descriptor List Address */ WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc); 800143c: 68c2 ldr r2, [r0, #12] 800143e: 6803 ldr r3, [r0, #0] 8001440: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001444: f8c3 2114 str.w r2, [r3, #276] @ 0x114 /* Set Transmit Descriptor Tail pointer */ WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc); 8001448: 68c2 ldr r2, [r0, #12] 800144a: 6803 ldr r3, [r0, #0] 800144c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001450: f8c3 2120 str.w r2, [r3, #288] @ 0x120 } 8001454: f85d 4b04 ldr.w r4, [sp], #4 8001458: 4770 bx lr 0800145a : * @param heth: pointer to a ETH_HandleTypeDef structure that contains * the configuration information for ETHERNET module * @retval None */ static void ETH_DMARxDescListInit(ETH_HandleTypeDef *heth) { 800145a: b410 push {r4} ETH_DMADescTypeDef *dmarxdesc; uint32_t i; for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 800145c: 2100 movs r1, #0 800145e: e013 b.n 8001488 { dmarxdesc = heth->Init.RxDesc + i; 8001460: 6904 ldr r4, [r0, #16] 8001462: eb01 0341 add.w r3, r1, r1, lsl #1 8001466: ea4f 0cc3 mov.w ip, r3, lsl #3 800146a: eb04 03c3 add.w r3, r4, r3, lsl #3 WRITE_REG(dmarxdesc->DESC0, 0x0); 800146e: 2200 movs r2, #0 8001470: f844 200c str.w r2, [r4, ip] WRITE_REG(dmarxdesc->DESC1, 0x0); 8001474: 605a str r2, [r3, #4] WRITE_REG(dmarxdesc->DESC2, 0x0); 8001476: 609a str r2, [r3, #8] WRITE_REG(dmarxdesc->DESC3, 0x0); 8001478: 60da str r2, [r3, #12] WRITE_REG(dmarxdesc->BackupAddr0, 0x0); 800147a: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->BackupAddr1, 0x0); 800147c: 615a str r2, [r3, #20] /* Set Rx descritors addresses */ WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc); 800147e: f101 0212 add.w r2, r1, #18 8001482: f840 3022 str.w r3, [r0, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 8001486: 3101 adds r1, #1 8001488: 2903 cmp r1, #3 800148a: d9e9 bls.n 8001460 } WRITE_REG(heth->RxDescList.RxDescIdx, 0); 800148c: 2300 movs r3, #0 800148e: 65c3 str r3, [r0, #92] @ 0x5c WRITE_REG(heth->RxDescList.RxDescCnt, 0); 8001490: 6603 str r3, [r0, #96] @ 0x60 WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0); 8001492: 6683 str r3, [r0, #104] @ 0x68 WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0); 8001494: 66c3 str r3, [r0, #108] @ 0x6c WRITE_REG(heth->RxDescList.ItMode, 0); 8001496: 6583 str r3, [r0, #88] @ 0x58 /* Set Receive Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U))); 8001498: 6803 ldr r3, [r0, #0] 800149a: f503 5380 add.w r3, r3, #4096 @ 0x1000 800149e: 2203 movs r2, #3 80014a0: f8c3 2130 str.w r2, [r3, #304] @ 0x130 /* Set Receive Descriptor List Address */ WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc); 80014a4: 6902 ldr r2, [r0, #16] 80014a6: 6803 ldr r3, [r0, #0] 80014a8: f503 5380 add.w r3, r3, #4096 @ 0x1000 80014ac: f8c3 211c str.w r2, [r3, #284] @ 0x11c /* Set Receive Descriptor Tail pointer Address */ WRITE_REG(heth->Instance->DMACRDTPR, ((uint32_t)(heth->Init.RxDesc + (uint32_t)(ETH_RX_DESC_CNT - 1U)))); 80014b0: 6903 ldr r3, [r0, #16] 80014b2: f103 0248 add.w r2, r3, #72 @ 0x48 80014b6: 6803 ldr r3, [r0, #0] 80014b8: f503 5380 add.w r3, r3, #4096 @ 0x1000 80014bc: f8c3 2128 str.w r2, [r3, #296] @ 0x128 } 80014c0: f85d 4b04 ldr.w r4, [sp], #4 80014c4: 4770 bx lr ... 080014c8 : * @param pTxConfig: Tx packet configuration * @param ItMode: Enable or disable Tx EOT interrept * @retval Status */ static uint32_t ETH_Prepare_Tx_Descriptors(ETH_HandleTypeDef *heth, ETH_TxPacketConfig *pTxConfig, uint32_t ItMode) { 80014c8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80014cc: 4690 mov r8, r2 ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; uint32_t descidx = dmatxdesclist->CurTxDesc; 80014ce: 6a84 ldr r4, [r0, #40] @ 0x28 uint32_t firstdescidx = dmatxdesclist->CurTxDesc; uint32_t idx; uint32_t descnbr = 0; ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80014d0: eb00 0384 add.w r3, r0, r4, lsl #2 80014d4: 699b ldr r3, [r3, #24] ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer; 80014d6: f8d1 c008 ldr.w ip, [r1, #8] uint32_t bd_count = 0; /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN) 80014da: 68da ldr r2, [r3, #12] 80014dc: 2a00 cmp r2, #0 80014de: f2c0 8198 blt.w 8001812 || (dmatxdesclist->PacketAddress[descidx] != NULL)) 80014e2: 1d22 adds r2, r4, #4 80014e4: eb00 0282 add.w r2, r0, r2, lsl #2 80014e8: 69d2 ldr r2, [r2, #28] 80014ea: 2a00 cmp r2, #0 80014ec: f040 8193 bne.w 8001816 /***************************************************************************/ /***************** Context descriptor configuration (Optional) **********/ /***************************************************************************/ /* If VLAN tag is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 80014f0: 680a ldr r2, [r1, #0] 80014f2: f012 0f04 tst.w r2, #4 80014f6: d02c beq.n 8001552 { /* Set vlan tag value */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_VT, pTxConfig->VlanTag); 80014f8: 68dd ldr r5, [r3, #12] 80014fa: 4a81 ldr r2, [pc, #516] @ (8001700 ) 80014fc: 402a ands r2, r5 80014fe: 6a4d ldr r5, [r1, #36] @ 0x24 8001500: 432a orrs r2, r5 8001502: 60da str r2, [r3, #12] /* Set vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_VLTV); 8001504: 68da ldr r2, [r3, #12] 8001506: f442 3280 orr.w r2, r2, #65536 @ 0x10000 800150a: 60da str r2, [r3, #12] /* Set the descriptor as the vlan input source */ SET_BIT(heth->Instance->MACVIR, ETH_MACVIR_VLTI); 800150c: 6805 ldr r5, [r0, #0] 800150e: 6e2a ldr r2, [r5, #96] @ 0x60 8001510: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 8001514: 662a str r2, [r5, #96] @ 0x60 /* if inner VLAN is enabled */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_INNERVLANTAG) != (uint32_t)RESET) 8001516: 680a ldr r2, [r1, #0] 8001518: f012 0f08 tst.w r2, #8 800151c: d019 beq.n 8001552 { /* Set inner vlan tag value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_IVT, (pTxConfig->InnerVlanTag << 16)); 800151e: 689a ldr r2, [r3, #8] 8001520: b292 uxth r2, r2 8001522: 6acd ldr r5, [r1, #44] @ 0x2c 8001524: ea42 4205 orr.w r2, r2, r5, lsl #16 8001528: 609a str r2, [r3, #8] /* Set inner vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_IVLTV); 800152a: 68da ldr r2, [r3, #12] 800152c: f442 3200 orr.w r2, r2, #131072 @ 0x20000 8001530: 60da str r2, [r3, #12] /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_IVTIR, pTxConfig->InnerVlanCtrl); 8001532: 68da ldr r2, [r3, #12] 8001534: f422 2240 bic.w r2, r2, #786432 @ 0xc0000 8001538: 6b0d ldr r5, [r1, #48] @ 0x30 800153a: 432a orrs r2, r5 800153c: 60da str r2, [r3, #12] /* Set the descriptor as the inner vlan input source */ SET_BIT(heth->Instance->MACIVIR, ETH_MACIVIR_VLTI); 800153e: 6805 ldr r5, [r0, #0] 8001540: 6e6a ldr r2, [r5, #100] @ 0x64 8001542: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 8001546: 666a str r2, [r5, #100] @ 0x64 /* Enable double VLAN processing */ SET_BIT(heth->Instance->MACVTR, ETH_MACVTR_EDVLP); 8001548: 6805 ldr r5, [r0, #0] 800154a: 6d2a ldr r2, [r5, #80] @ 0x50 800154c: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000 8001550: 652a str r2, [r5, #80] @ 0x50 } } /* if tcp segmentation is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8001552: 680a ldr r2, [r1, #0] 8001554: f012 0f10 tst.w r2, #16 8001558: d009 beq.n 800156e { /* Set MSS value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_MSS, pTxConfig->MaxSegmentSize); 800155a: 689d ldr r5, [r3, #8] 800155c: 4a69 ldr r2, [pc, #420] @ (8001704 ) 800155e: 402a ands r2, r5 8001560: 698d ldr r5, [r1, #24] 8001562: 432a orrs r2, r5 8001564: 609a str r2, [r3, #8] /* Set MSS valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_TCMSSV); 8001566: 68da ldr r2, [r3, #12] 8001568: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000 800156c: 60da str r2, [r3, #12] } if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) || (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)) 800156e: 680a ldr r2, [r1, #0] if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8001570: f012 0214 ands.w r2, r2, #20 8001574: d020 beq.n 80015b8 { /* Set as context descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_CTXT); 8001576: 68da ldr r2, [r3, #12] 8001578: f042 4280 orr.w r2, r2, #1073741824 @ 0x40000000 800157c: 60da str r2, [r3, #12] 800157e: f3bf 8f5f dmb sy /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Set own bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN); 8001582: 68da ldr r2, [r3, #12] 8001584: f042 4200 orr.w r2, r2, #2147483648 @ 0x80000000 8001588: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 800158a: 1c66 adds r6, r4, #1 800158c: 2e03 cmp r6, #3 800158e: d900 bls.n 8001592 8001590: 1ee6 subs r6, r4, #3 /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8001592: eb00 0386 add.w r3, r0, r6, lsl #2 8001596: 699b ldr r3, [r3, #24] descnbr += 1U; /* Current Tx Descriptor Owned by DMA: cannot be used by the application */ if (READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCWBF_OWN) == ETH_DMATXNDESCWBF_OWN) 8001598: 68da ldr r2, [r3, #12] 800159a: 2a00 cmp r2, #0 800159c: db01 blt.n 80015a2 descnbr += 1U; 800159e: 2201 movs r2, #1 80015a0: e00b b.n 80015ba { dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[firstdescidx]; 80015a2: eb00 0484 add.w r4, r0, r4, lsl #2 80015a6: 69a2 ldr r2, [r4, #24] 80015a8: f3bf 8f5f dmb sy /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Clear own bit */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_OWN); 80015ac: 68d3 ldr r3, [r2, #12] 80015ae: f023 4300 bic.w r3, r3, #2147483648 @ 0x80000000 80015b2: 60d3 str r3, [r2, #12] return HAL_ETH_ERROR_BUSY; 80015b4: 2002 movs r0, #2 80015b6: e12f b.n 8001818 uint32_t descidx = dmatxdesclist->CurTxDesc; 80015b8: 4626 mov r6, r4 /***************************************************************************/ /***************** Normal descriptors configuration *****************/ /***************************************************************************/ descnbr += 1U; 80015ba: f102 0e01 add.w lr, r2, #1 /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 80015be: f8dc 2000 ldr.w r2, [ip] 80015c2: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 80015c4: 689a ldr r2, [r3, #8] 80015c6: 4d4f ldr r5, [pc, #316] @ (8001704 ) 80015c8: 4015 ands r5, r2 80015ca: f8dc 2004 ldr.w r2, [ip, #4] 80015ce: 4315 orrs r5, r2 80015d0: 609d str r5, [r3, #8] if (txbuffer->next != NULL) 80015d2: f8dc 2008 ldr.w r2, [ip, #8] 80015d6: 2a00 cmp r2, #0 80015d8: d048 beq.n 800166c { txbuffer = txbuffer->next; /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 80015da: 6815 ldr r5, [r2, #0] 80015dc: 605d str r5, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 80015de: 689d ldr r5, [r3, #8] 80015e0: f8df c124 ldr.w ip, [pc, #292] @ 8001708 80015e4: ea05 0c0c and.w ip, r5, ip 80015e8: 6855 ldr r5, [r2, #4] 80015ea: ea4c 4505 orr.w r5, ip, r5, lsl #16 80015ee: 609d str r5, [r3, #8] WRITE_REG(dmatxdesc->DESC1, 0x0); /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 80015f0: 680d ldr r5, [r1, #0] 80015f2: f015 0f10 tst.w r5, #16 80015f6: d041 beq.n 800167c { /* Set TCP Header length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_THL, (pTxConfig->TCPHeaderLen << 19)); 80015f8: 68dd ldr r5, [r3, #12] 80015fa: f425 0cf0 bic.w ip, r5, #7864320 @ 0x780000 80015fe: 6a0d ldr r5, [r1, #32] 8001600: ea4c 45c5 orr.w r5, ip, r5, lsl #19 8001604: 60dd str r5, [r3, #12] /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8001606: 68dd ldr r5, [r3, #12] 8001608: f8df c104 ldr.w ip, [pc, #260] @ 8001710 800160c: ea05 0c0c and.w ip, r5, ip 8001610: 69cd ldr r5, [r1, #28] 8001612: ea4c 0505 orr.w r5, ip, r5 8001616: 60dd str r5, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 8001618: 68dd ldr r5, [r3, #12] 800161a: f445 2580 orr.w r5, r5, #262144 @ 0x40000 800161e: 60dd str r5, [r3, #12] { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl); } } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8001620: 680d ldr r5, [r1, #0] 8001622: f015 0f04 tst.w r5, #4 8001626: d006 beq.n 8001636 { /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_VTIR, pTxConfig->VlanCtrl); 8001628: 689d ldr r5, [r3, #8] 800162a: f425 4c40 bic.w ip, r5, #49152 @ 0xc000 800162e: 6a8d ldr r5, [r1, #40] @ 0x28 8001630: ea4c 0505 orr.w r5, ip, r5 8001634: 609d str r5, [r3, #8] } /* Mark it as First Descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8001636: 68dd ldr r5, [r3, #12] 8001638: f045 5500 orr.w r5, r5, #536870912 @ 0x20000000 800163c: 60dd str r5, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 800163e: 68dd ldr r5, [r3, #12] 8001640: f025 4580 bic.w r5, r5, #1073741824 @ 0x40000000 8001644: 60dd str r5, [r3, #12] 8001646: f3bf 8f5f dmb sy /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* set OWN bit of FIRST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 800164a: 68dd ldr r5, [r3, #12] 800164c: f045 4500 orr.w r5, r5, #2147483648 @ 0x80000000 8001650: 60dd str r5, [r3, #12] /* If source address insertion/replacement is enabled for this packet */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_SAIC) != (uint32_t)RESET) 8001652: 680d ldr r5, [r1, #0] 8001654: f015 0f02 tst.w r5, #2 8001658: d006 beq.n 8001668 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_SAIC, pTxConfig->SrcAddrCtrl); 800165a: 68dd ldr r5, [r3, #12] 800165c: f025 7c60 bic.w ip, r5, #58720256 @ 0x3800000 8001660: 68cd ldr r5, [r1, #12] 8001662: ea4c 0505 orr.w r5, ip, r5 8001666: 60dd str r5, [r3, #12] } descnbr += 1U; /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8001668: 2500 movs r5, #0 800166a: e06f b.n 800174c WRITE_REG(dmatxdesc->DESC1, 0x0); 800166c: 2200 movs r2, #0 800166e: 605a str r2, [r3, #4] MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8001670: 689d ldr r5, [r3, #8] 8001672: 4a25 ldr r2, [pc, #148] @ (8001708 ) 8001674: 402a ands r2, r5 8001676: 609a str r2, [r3, #8] ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer; 8001678: 4662 mov r2, ip 800167a: e7b9 b.n 80015f0 MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 800167c: 68dd ldr r5, [r3, #12] 800167e: f8df c08c ldr.w ip, [pc, #140] @ 800170c 8001682: ea05 0c0c and.w ip, r5, ip 8001686: 684d ldr r5, [r1, #4] 8001688: ea4c 0505 orr.w r5, ip, r5 800168c: 60dd str r5, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 800168e: 680d ldr r5, [r1, #0] 8001690: f015 0f01 tst.w r5, #1 8001694: d006 beq.n 80016a4 MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8001696: 68dd ldr r5, [r3, #12] 8001698: f425 3c40 bic.w ip, r5, #196608 @ 0x30000 800169c: 694d ldr r5, [r1, #20] 800169e: ea4c 0505 orr.w r5, ip, r5 80016a2: 60dd str r5, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != (uint32_t)RESET) 80016a4: 680d ldr r5, [r1, #0] 80016a6: f015 0f20 tst.w r5, #32 80016aa: d0b9 beq.n 8001620 MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl); 80016ac: 68dd ldr r5, [r3, #12] 80016ae: f025 6c40 bic.w ip, r5, #201326592 @ 0xc000000 80016b2: 690d ldr r5, [r1, #16] 80016b4: ea4c 0505 orr.w r5, ip, r5 80016b8: 60dd str r5, [r3, #12] 80016ba: e7b1 b.n 8001620 dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80016bc: eb00 0384 add.w r3, r0, r4, lsl #2 80016c0: 6999 ldr r1, [r3, #24] for (idx = 0; idx < descnbr; idx ++) 80016c2: 2200 movs r2, #0 80016c4: e004 b.n 80016d0 dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 80016c6: eb00 0183 add.w r1, r0, r3, lsl #2 80016ca: 6989 ldr r1, [r1, #24] for (idx = 0; idx < descnbr; idx ++) 80016cc: 3201 adds r2, #1 80016ce: 461c mov r4, r3 80016d0: 4572 cmp r2, lr 80016d2: d20a bcs.n 80016ea 80016d4: f3bf 8f5f dmb sy CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 80016d8: 68cb ldr r3, [r1, #12] 80016da: f023 4300 bic.w r3, r3, #2147483648 @ 0x80000000 80016de: 60cb str r3, [r1, #12] INCR_TX_DESC_INDEX(descidx, 1U); 80016e0: 1c63 adds r3, r4, #1 80016e2: 2b03 cmp r3, #3 80016e4: d9ef bls.n 80016c6 80016e6: 1ee3 subs r3, r4, #3 80016e8: e7ed b.n 80016c6 return HAL_ETH_ERROR_BUSY; 80016ea: 2002 movs r0, #2 80016ec: e094 b.n 8001818 /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); } else { WRITE_REG(dmatxdesc->DESC1, 0x0); 80016ee: 2200 movs r2, #0 80016f0: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 80016f2: 689e ldr r6, [r3, #8] 80016f4: 4a04 ldr r2, [pc, #16] @ (8001708 ) 80016f6: 4032 ands r2, r6 80016f8: 609a str r2, [r3, #8] txbuffer = txbuffer->next; 80016fa: 463a mov r2, r7 80016fc: e05c b.n 80017b8 80016fe: bf00 nop 8001700: ffff0000 .word 0xffff0000 8001704: ffffc000 .word 0xffffc000 8001708: c000ffff .word 0xc000ffff 800170c: ffff8000 .word 0xffff8000 8001710: fffc0000 .word 0xfffc0000 SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); } else { /* Set the packet length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 8001714: 68df ldr r7, [r3, #12] 8001716: 4e41 ldr r6, [pc, #260] @ (800181c ) 8001718: 403e ands r6, r7 800171a: 684f ldr r7, [r1, #4] 800171c: 433e orrs r6, r7 800171e: 60de str r6, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 8001720: 680e ldr r6, [r1, #0] 8001722: f016 0f01 tst.w r6, #1 8001726: d005 beq.n 8001734 { /* Checksum Insertion Control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8001728: 68de ldr r6, [r3, #12] 800172a: f426 3640 bic.w r6, r6, #196608 @ 0x30000 800172e: 694f ldr r7, [r1, #20] 8001730: 433e orrs r6, r7 8001732: 60de str r6, [r3, #12] } } bd_count += 1U; 8001734: 3501 adds r5, #1 8001736: f3bf 8f5f dmb sy /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); /* Set Own bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 800173a: 68de ldr r6, [r3, #12] 800173c: f046 4600 orr.w r6, r6, #2147483648 @ 0x80000000 8001740: 60de str r6, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8001742: 68de ldr r6, [r3, #12] 8001744: f026 4680 bic.w r6, r6, #1073741824 @ 0x40000000 8001748: 60de str r6, [r3, #12] 800174a: 4666 mov r6, ip while (txbuffer->next != NULL) 800174c: 6897 ldr r7, [r2, #8] 800174e: 2f00 cmp r7, #0 8001750: d041 beq.n 80017d6 CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8001752: 68df ldr r7, [r3, #12] 8001754: f027 5780 bic.w r7, r7, #268435456 @ 0x10000000 8001758: 60df str r7, [r3, #12] INCR_TX_DESC_INDEX(descidx, 1U); 800175a: f106 0c01 add.w ip, r6, #1 800175e: f1bc 0f03 cmp.w ip, #3 8001762: d901 bls.n 8001768 8001764: f1a6 0c03 sub.w ip, r6, #3 dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8001768: eb00 038c add.w r3, r0, ip, lsl #2 800176c: 699b ldr r3, [r3, #24] CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 800176e: 68de ldr r6, [r3, #12] 8001770: f026 5600 bic.w r6, r6, #536870912 @ 0x20000000 8001774: 60de str r6, [r3, #12] if ((READ_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN) == ETH_DMATXNDESCRF_OWN) 8001776: 68de ldr r6, [r3, #12] 8001778: 2e00 cmp r6, #0 800177a: db9f blt.n 80016bc || (dmatxdesclist->PacketAddress[descidx] != NULL)) 800177c: f10c 0604 add.w r6, ip, #4 8001780: eb00 0686 add.w r6, r0, r6, lsl #2 8001784: 69f6 ldr r6, [r6, #28] 8001786: 2e00 cmp r6, #0 8001788: d198 bne.n 80016bc descnbr += 1U; 800178a: f10e 0e01 add.w lr, lr, #1 txbuffer = txbuffer->next; 800178e: 6897 ldr r7, [r2, #8] WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8001790: 683a ldr r2, [r7, #0] 8001792: 601a str r2, [r3, #0] MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8001794: 689a ldr r2, [r3, #8] 8001796: 4e22 ldr r6, [pc, #136] @ (8001820 ) 8001798: 4016 ands r6, r2 800179a: 687a ldr r2, [r7, #4] 800179c: 4316 orrs r6, r2 800179e: 609e str r6, [r3, #8] if (txbuffer->next != NULL) 80017a0: 68ba ldr r2, [r7, #8] 80017a2: 2a00 cmp r2, #0 80017a4: d0a3 beq.n 80016ee WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 80017a6: 6816 ldr r6, [r2, #0] 80017a8: 605e str r6, [r3, #4] MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 80017aa: 689f ldr r7, [r3, #8] 80017ac: 4e1d ldr r6, [pc, #116] @ (8001824 ) 80017ae: 403e ands r6, r7 80017b0: 6857 ldr r7, [r2, #4] 80017b2: ea46 4607 orr.w r6, r6, r7, lsl #16 80017b6: 609e str r6, [r3, #8] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 80017b8: 680e ldr r6, [r1, #0] 80017ba: f016 0f10 tst.w r6, #16 80017be: d0a9 beq.n 8001714 MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 80017c0: 68df ldr r7, [r3, #12] 80017c2: 4e19 ldr r6, [pc, #100] @ (8001828 ) 80017c4: 403e ands r6, r7 80017c6: 69cf ldr r7, [r1, #28] 80017c8: 433e orrs r6, r7 80017ca: 60de str r6, [r3, #12] SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 80017cc: 68de ldr r6, [r3, #12] 80017ce: f446 2680 orr.w r6, r6, #262144 @ 0x40000 80017d2: 60de str r6, [r3, #12] 80017d4: e7ae b.n 8001734 } if (ItMode != ((uint32_t)RESET)) 80017d6: f1b8 0f00 cmp.w r8, #0 80017da: d015 beq.n 8001808 { /* Set Interrupt on completion bit */ SET_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 80017dc: 689a ldr r2, [r3, #8] 80017de: f042 4200 orr.w r2, r2, #2147483648 @ 0x80000000 80017e2: 609a str r2, [r3, #8] /* Clear Interrupt on completion bit */ CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); } /* Mark it as LAST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 80017e4: 68da ldr r2, [r3, #12] 80017e6: f042 5280 orr.w r2, r2, #268435456 @ 0x10000000 80017ea: 60da str r2, [r3, #12] /* Save the current packet address to expose it to the application */ dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress; 80017ec: 6bc2 ldr r2, [r0, #60] @ 0x3c 80017ee: 1d33 adds r3, r6, #4 80017f0: eb00 0383 add.w r3, r0, r3, lsl #2 80017f4: 61da str r2, [r3, #28] dmatxdesclist->CurTxDesc = descidx; 80017f6: 6286 str r6, [r0, #40] @ 0x28 __ASM volatile ("cpsid i" : : : "memory"); 80017f8: b672 cpsid i /* disable the interrupt */ __disable_irq(); dmatxdesclist->BuffersInUse += bd_count + 1U; 80017fa: 6c03 ldr r3, [r0, #64] @ 0x40 80017fc: 442b add r3, r5 80017fe: 3301 adds r3, #1 8001800: 6403 str r3, [r0, #64] @ 0x40 __ASM volatile ("cpsie i" : : : "memory"); 8001802: b662 cpsie i /* Enable interrupts back */ __enable_irq(); /* Return function status */ return HAL_ETH_ERROR_NONE; 8001804: 2000 movs r0, #0 8001806: e007 b.n 8001818 CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8001808: 689a ldr r2, [r3, #8] 800180a: f022 4200 bic.w r2, r2, #2147483648 @ 0x80000000 800180e: 609a str r2, [r3, #8] 8001810: e7e8 b.n 80017e4 return HAL_ETH_ERROR_BUSY; 8001812: 2002 movs r0, #2 8001814: e000 b.n 8001818 8001816: 2002 movs r0, #2 } 8001818: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 800181c: ffff8000 .word 0xffff8000 8001820: ffffc000 .word 0xffffc000 8001824: c000ffff .word 0xc000ffff 8001828: fffc0000 .word 0xfffc0000 0800182c : { 800182c: b538 push {r3, r4, r5, lr} if (heth->gState == HAL_ETH_STATE_READY) 800182e: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84 8001832: 2b10 cmp r3, #16 8001834: d001 beq.n 800183a return HAL_ERROR; 8001836: 2001 movs r0, #1 } 8001838: bd38 pop {r3, r4, r5, pc} 800183a: 4604 mov r4, r0 heth->gState = HAL_ETH_STATE_BUSY; 800183c: 2523 movs r5, #35 @ 0x23 800183e: f8c0 5084 str.w r5, [r0, #132] @ 0x84 heth->RxDescList.ItMode = 1U; 8001842: 2301 movs r3, #1 8001844: 6583 str r3, [r0, #88] @ 0x58 SET_BIT(heth->Instance->MMCRIMR, ETH_MMCRIMR_RXLPITRCIM | ETH_MMCRIMR_RXLPIUSCIM | \ 8001846: 6802 ldr r2, [r0, #0] 8001848: f8d2 170c ldr.w r1, [r2, #1804] @ 0x70c 800184c: 4b24 ldr r3, [pc, #144] @ (80018e0 ) 800184e: 430b orrs r3, r1 8001850: f8c2 370c str.w r3, [r2, #1804] @ 0x70c SET_BIT(heth->Instance->MMCTIMR, ETH_MMCTIMR_TXLPITRCIM | ETH_MMCTIMR_TXLPIUSCIM | \ 8001854: 6802 ldr r2, [r0, #0] 8001856: f8d2 1710 ldr.w r1, [r2, #1808] @ 0x710 800185a: 4b22 ldr r3, [pc, #136] @ (80018e4 ) 800185c: 430b orrs r3, r1 800185e: f8c2 3710 str.w r3, [r2, #1808] @ 0x710 heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT; 8001862: 2304 movs r3, #4 8001864: 66c3 str r3, [r0, #108] @ 0x6c ETH_UpdateDescriptor(heth); 8001866: f7ff fbe7 bl 8001038 SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 800186a: 6822 ldr r2, [r4, #0] 800186c: 6813 ldr r3, [r2, #0] 800186e: f043 0302 orr.w r3, r3, #2 8001872: 6013 str r3, [r2, #0] SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 8001874: 6822 ldr r2, [r4, #0] 8001876: 6813 ldr r3, [r2, #0] 8001878: f043 0301 orr.w r3, r3, #1 800187c: 6013 str r3, [r2, #0] SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 800187e: 6822 ldr r2, [r4, #0] 8001880: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00 8001884: f043 0301 orr.w r3, r3, #1 8001888: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00 SET_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 800188c: 6823 ldr r3, [r4, #0] 800188e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001892: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104 8001896: f042 0201 orr.w r2, r2, #1 800189a: f8c3 2104 str.w r2, [r3, #260] @ 0x104 SET_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 800189e: 6823 ldr r3, [r4, #0] 80018a0: f503 5380 add.w r3, r3, #4096 @ 0x1000 80018a4: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 80018a8: f042 0201 orr.w r2, r2, #1 80018ac: f8c3 2108 str.w r2, [r3, #264] @ 0x108 heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS); 80018b0: 6823 ldr r3, [r4, #0] 80018b2: f503 5380 add.w r3, r3, #4096 @ 0x1000 80018b6: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160 80018ba: f442 7281 orr.w r2, r2, #258 @ 0x102 80018be: f8c3 2160 str.w r2, [r3, #352] @ 0x160 __HAL_ETH_DMA_ENABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE | 80018c2: 6823 ldr r3, [r4, #0] 80018c4: f503 5380 add.w r3, r3, #4096 @ 0x1000 80018c8: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 80018cc: f24d 02c1 movw r2, #53441 @ 0xd0c1 80018d0: 430a orrs r2, r1 80018d2: f8c3 2134 str.w r2, [r3, #308] @ 0x134 heth->gState = HAL_ETH_STATE_STARTED; 80018d6: f8c4 5084 str.w r5, [r4, #132] @ 0x84 return HAL_OK; 80018da: 2000 movs r0, #0 80018dc: e7ac b.n 8001838 80018de: bf00 nop 80018e0: 0c020060 .word 0x0c020060 80018e4: 0c20c000 .word 0x0c20c000 080018e8 : if (heth->gState == HAL_ETH_STATE_STARTED) 80018e8: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84 80018ec: 2b23 cmp r3, #35 @ 0x23 80018ee: d001 beq.n 80018f4 return HAL_ERROR; 80018f0: 2001 movs r0, #1 } 80018f2: 4770 bx lr heth->gState = HAL_ETH_STATE_BUSY; 80018f4: f8c0 3084 str.w r3, [r0, #132] @ 0x84 __HAL_ETH_DMA_DISABLE_IT(heth, (ETH_DMACIER_NIE | ETH_DMACIER_RIE | ETH_DMACIER_TIE | 80018f8: 6803 ldr r3, [r0, #0] 80018fa: f503 5380 add.w r3, r3, #4096 @ 0x1000 80018fe: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 8001902: 4a1d ldr r2, [pc, #116] @ (8001978 ) 8001904: 400a ands r2, r1 8001906: f8c3 2134 str.w r2, [r3, #308] @ 0x134 CLEAR_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 800190a: 6803 ldr r3, [r0, #0] 800190c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001910: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104 8001914: f022 0201 bic.w r2, r2, #1 8001918: f8c3 2104 str.w r2, [r3, #260] @ 0x104 CLEAR_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 800191c: 6803 ldr r3, [r0, #0] 800191e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001922: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 8001926: f022 0201 bic.w r2, r2, #1 800192a: f8c3 2108 str.w r2, [r3, #264] @ 0x108 CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 800192e: 6802 ldr r2, [r0, #0] 8001930: 6813 ldr r3, [r2, #0] 8001932: f023 0301 bic.w r3, r3, #1 8001936: 6013 str r3, [r2, #0] SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 8001938: 6802 ldr r2, [r0, #0] 800193a: f8d2 3d00 ldr.w r3, [r2, #3328] @ 0xd00 800193e: f043 0301 orr.w r3, r3, #1 8001942: f8c2 3d00 str.w r3, [r2, #3328] @ 0xd00 CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 8001946: 6802 ldr r2, [r0, #0] 8001948: 6813 ldr r3, [r2, #0] 800194a: f023 0302 bic.w r3, r3, #2 800194e: 6013 str r3, [r2, #0] for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 8001950: 2300 movs r3, #0 8001952: e008 b.n 8001966 dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex]; 8001954: f103 0212 add.w r2, r3, #18 8001958: f850 1022 ldr.w r1, [r0, r2, lsl #2] CLEAR_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); 800195c: 68ca ldr r2, [r1, #12] 800195e: f022 4280 bic.w r2, r2, #1073741824 @ 0x40000000 8001962: 60ca str r2, [r1, #12] for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 8001964: 3301 adds r3, #1 8001966: 2b03 cmp r3, #3 8001968: d9f4 bls.n 8001954 heth->RxDescList.ItMode = 0U; 800196a: 2300 movs r3, #0 800196c: 6583 str r3, [r0, #88] @ 0x58 heth->gState = HAL_ETH_STATE_READY; 800196e: 2210 movs r2, #16 8001970: f8c0 2084 str.w r2, [r0, #132] @ 0x84 return HAL_OK; 8001974: 4618 mov r0, r3 8001976: 4770 bx lr 8001978: ffff2f3e .word 0xffff2f3e 0800197c : { 800197c: b510 push {r4, lr} 800197e: 4604 mov r4, r0 if (pTxConfig == NULL) 8001980: b129 cbz r1, 800198e if (heth->gState == HAL_ETH_STATE_STARTED) 8001982: f8d4 3084 ldr.w r3, [r4, #132] @ 0x84 8001986: 2b23 cmp r3, #35 @ 0x23 8001988: d009 beq.n 800199e return HAL_ERROR; 800198a: 2001 movs r0, #1 } 800198c: bd10 pop {r4, pc} heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 800198e: f8d0 3088 ldr.w r3, [r0, #136] @ 0x88 8001992: f043 0301 orr.w r3, r3, #1 8001996: f8c0 3088 str.w r3, [r0, #136] @ 0x88 return HAL_ERROR; 800199a: 2001 movs r0, #1 800199c: e7f6 b.n 800198c heth->TxDescList.CurrentPacketAddress = (uint32_t *)pTxConfig->pData; 800199e: 6b4b ldr r3, [r1, #52] @ 0x34 80019a0: 63e3 str r3, [r4, #60] @ 0x3c if (ETH_Prepare_Tx_Descriptors(heth, pTxConfig, 1) != HAL_ETH_ERROR_NONE) 80019a2: 2201 movs r2, #1 80019a4: 4620 mov r0, r4 80019a6: f7ff fd8f bl 80014c8 80019aa: b138 cbz r0, 80019bc heth->ErrorCode |= HAL_ETH_ERROR_BUSY; 80019ac: f8d4 3088 ldr.w r3, [r4, #136] @ 0x88 80019b0: f043 0302 orr.w r3, r3, #2 80019b4: f8c4 3088 str.w r3, [r4, #136] @ 0x88 return HAL_ERROR; 80019b8: 2001 movs r0, #1 80019ba: e7e7 b.n 800198c __ASM volatile ("dsb 0xF":::"memory"); 80019bc: f3bf 8f4f dsb sy INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U); 80019c0: 6aa3 ldr r3, [r4, #40] @ 0x28 80019c2: 1c5a adds r2, r3, #1 80019c4: 62a2 str r2, [r4, #40] @ 0x28 80019c6: 2a03 cmp r2, #3 80019c8: d901 bls.n 80019ce 80019ca: 3b03 subs r3, #3 80019cc: 62a3 str r3, [r4, #40] @ 0x28 WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t)(heth->TxDescList.TxDesc[heth->TxDescList.CurTxDesc])); 80019ce: 6aa2 ldr r2, [r4, #40] @ 0x28 80019d0: 6823 ldr r3, [r4, #0] 80019d2: 3206 adds r2, #6 80019d4: f854 2022 ldr.w r2, [r4, r2, lsl #2] 80019d8: f503 5380 add.w r3, r3, #4096 @ 0x1000 80019dc: f8c3 2120 str.w r2, [r3, #288] @ 0x120 return HAL_OK; 80019e0: 2000 movs r0, #0 80019e2: e7d3 b.n 800198c 080019e4 : { 80019e4: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80019e8: 4604 mov r4, r0 if (pAppBuff == NULL) 80019ea: b189 cbz r1, 8001a10 80019ec: 468b mov fp, r1 if (heth->gState != HAL_ETH_STATE_STARTED) 80019ee: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84 80019f2: 2b23 cmp r3, #35 @ 0x23 80019f4: d172 bne.n 8001adc descidx = heth->RxDescList.RxDescIdx; 80019f6: f8d0 805c ldr.w r8, [r0, #92] @ 0x5c dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 80019fa: f108 0312 add.w r3, r8, #18 80019fe: f850 5023 ldr.w r5, [r0, r3, lsl #2] desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt; 8001a02: 6ec3 ldr r3, [r0, #108] @ 0x6c 8001a04: f1c3 0a04 rsb sl, r3, #4 uint8_t rxdataready = 0U; 8001a08: f04f 0900 mov.w r9, #0 uint32_t desccnt = 0U; 8001a0c: 464f mov r7, r9 while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 8001a0e: e038 b.n 8001a82 heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 8001a10: f8d0 3088 ldr.w r3, [r0, #136] @ 0x88 8001a14: f043 0301 orr.w r3, r3, #1 8001a18: f8c0 3088 str.w r3, [r0, #136] @ 0x88 return HAL_ERROR; 8001a1c: 2001 movs r0, #1 8001a1e: e05e b.n 8001ade if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) 8001a20: 68eb ldr r3, [r5, #12] 8001a22: f013 5f00 tst.w r3, #536870912 @ 0x20000000 8001a26: d002 beq.n 8001a2e heth->RxDescList.RxDescCnt = 0; 8001a28: 2300 movs r3, #0 8001a2a: 6623 str r3, [r4, #96] @ 0x60 heth->RxDescList.RxDataLength = 0; 8001a2c: 6663 str r3, [r4, #100] @ 0x64 bufflength = heth->Init.RxBuffLen; 8001a2e: 6966 ldr r6, [r4, #20] if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_LD) != (uint32_t)RESET) 8001a30: 68eb ldr r3, [r5, #12] 8001a32: f013 5f80 tst.w r3, #268435456 @ 0x10000000 8001a36: d008 beq.n 8001a4a bufflength = READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_PL) - heth->RxDescList.RxDataLength; 8001a38: 68ee ldr r6, [r5, #12] 8001a3a: f3c6 060e ubfx r6, r6, #0, #15 8001a3e: 6e63 ldr r3, [r4, #100] @ 0x64 8001a40: 1af6 subs r6, r6, r3 heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC3; 8001a42: 68eb ldr r3, [r5, #12] 8001a44: 6723 str r3, [r4, #112] @ 0x70 rxdataready = 1; 8001a46: f04f 0901 mov.w r9, #1 HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd, 8001a4a: b2b3 uxth r3, r6 8001a4c: 692a ldr r2, [r5, #16] 8001a4e: f104 0180 add.w r1, r4, #128 @ 0x80 8001a52: f104 007c add.w r0, r4, #124 @ 0x7c 8001a56: f002 f80b bl 8003a70 heth->RxDescList.RxDescCnt++; 8001a5a: 6e23 ldr r3, [r4, #96] @ 0x60 8001a5c: 3301 adds r3, #1 8001a5e: 6623 str r3, [r4, #96] @ 0x60 heth->RxDescList.RxDataLength += bufflength; 8001a60: 6e63 ldr r3, [r4, #100] @ 0x64 8001a62: 4433 add r3, r6 8001a64: 6663 str r3, [r4, #100] @ 0x64 dmarxdesc->BackupAddr0 = 0; 8001a66: 2300 movs r3, #0 8001a68: 612b str r3, [r5, #16] INCR_RX_DESC_INDEX(descidx, 1U); 8001a6a: f108 0301 add.w r3, r8, #1 8001a6e: 2b03 cmp r3, #3 8001a70: d901 bls.n 8001a76 8001a72: f1a8 0303 sub.w r3, r8, #3 dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 8001a76: f103 0212 add.w r2, r3, #18 8001a7a: f854 5022 ldr.w r5, [r4, r2, lsl #2] desccnt++; 8001a7e: 3701 adds r7, #1 8001a80: 4698 mov r8, r3 while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 8001a82: 68eb ldr r3, [r5, #12] && (rxdataready == 0U)) 8001a84: 2b00 cmp r3, #0 8001a86: db14 blt.n 8001ab2 8001a88: f089 0301 eor.w r3, r9, #1 8001a8c: 4557 cmp r7, sl 8001a8e: d210 bcs.n 8001ab2 8001a90: b17b cbz r3, 8001ab2 if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_CTXT) != (uint32_t)RESET) 8001a92: 68eb ldr r3, [r5, #12] 8001a94: f013 4f80 tst.w r3, #1073741824 @ 0x40000000 8001a98: d003 beq.n 8001aa2 heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC1; 8001a9a: 686b ldr r3, [r5, #4] 8001a9c: 67a3 str r3, [r4, #120] @ 0x78 heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC0; 8001a9e: 682b ldr r3, [r5, #0] 8001aa0: 6763 str r3, [r4, #116] @ 0x74 if ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL)) 8001aa2: 68eb ldr r3, [r5, #12] 8001aa4: f013 5f00 tst.w r3, #536870912 @ 0x20000000 8001aa8: d1ba bne.n 8001a20 8001aaa: 6fe3 ldr r3, [r4, #124] @ 0x7c 8001aac: 2b00 cmp r3, #0 8001aae: d1b7 bne.n 8001a20 8001ab0: e7db b.n 8001a6a heth->RxDescList.RxBuildDescCnt += desccnt; 8001ab2: 6ee3 ldr r3, [r4, #108] @ 0x6c 8001ab4: 443b add r3, r7 8001ab6: 66e3 str r3, [r4, #108] @ 0x6c if ((heth->RxDescList.RxBuildDescCnt) != 0U) 8001ab8: b933 cbnz r3, 8001ac8 heth->RxDescList.RxDescIdx = descidx; 8001aba: f8c4 805c str.w r8, [r4, #92] @ 0x5c if (rxdataready == 1U) 8001abe: f1b9 0f00 cmp.w r9, #0 8001ac2: d105 bne.n 8001ad0 return HAL_ERROR; 8001ac4: 2001 movs r0, #1 8001ac6: e00a b.n 8001ade ETH_UpdateDescriptor(heth); 8001ac8: 4620 mov r0, r4 8001aca: f7ff fab5 bl 8001038 8001ace: e7f4 b.n 8001aba *pAppBuff = heth->RxDescList.pRxStart; 8001ad0: 6fe3 ldr r3, [r4, #124] @ 0x7c 8001ad2: f8cb 3000 str.w r3, [fp] heth->RxDescList.pRxStart = NULL; 8001ad6: 2000 movs r0, #0 8001ad8: 67e0 str r0, [r4, #124] @ 0x7c return HAL_OK; 8001ada: e000 b.n 8001ade return HAL_ERROR; 8001adc: 2001 movs r0, #1 } 8001ade: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08001ae2 : { 8001ae2: b5f8 push {r3, r4, r5, r6, r7, lr} 8001ae4: 4606 mov r6, r0 uint32_t numOfBuf = dmatxdesclist->BuffersInUse; 8001ae6: 6c05 ldr r5, [r0, #64] @ 0x40 uint32_t idx = dmatxdesclist->releaseIndex; 8001ae8: 6c44 ldr r4, [r0, #68] @ 0x44 uint8_t pktTxStatus = 1U; 8001aea: 2701 movs r7, #1 while ((numOfBuf != 0U) && (pktTxStatus != 0U)) 8001aec: e002 b.n 8001af4 idx = (idx + 1U) & (ETH_TX_DESC_CNT - 1U); 8001aee: 3401 adds r4, #1 8001af0: f004 0403 and.w r4, r4, #3 while ((numOfBuf != 0U) && (pktTxStatus != 0U)) 8001af4: b1f5 cbz r5, 8001b34 8001af6: b1ef cbz r7, 8001b34 numOfBuf--; 8001af8: 3d01 subs r5, #1 if (dmatxdesclist->PacketAddress[idx] == NULL) 8001afa: 1d23 adds r3, r4, #4 8001afc: eb06 0383 add.w r3, r6, r3, lsl #2 8001b00: 69d8 ldr r0, [r3, #28] 8001b02: 2800 cmp r0, #0 8001b04: d0f3 beq.n 8001aee if ((heth->Init.TxDesc[idx].DESC3 & ETH_DMATXNDESCRF_OWN) == 0U) 8001b06: 68f3 ldr r3, [r6, #12] 8001b08: eb04 0244 add.w r2, r4, r4, lsl #1 8001b0c: eb03 03c2 add.w r3, r3, r2, lsl #3 8001b10: 68db ldr r3, [r3, #12] 8001b12: 2b00 cmp r3, #0 8001b14: da01 bge.n 8001b1a pktTxStatus = 0U; 8001b16: 2700 movs r7, #0 8001b18: e7ec b.n 8001af4 HAL_ETH_TxFreeCallback(dmatxdesclist->PacketAddress[idx]); 8001b1a: f001 ffd9 bl 8003ad0 dmatxdesclist->PacketAddress[idx] = NULL; 8001b1e: 1d23 adds r3, r4, #4 8001b20: eb06 0383 add.w r3, r6, r3, lsl #2 8001b24: 2200 movs r2, #0 8001b26: 61da str r2, [r3, #28] idx = (idx + 1U) & (ETH_TX_DESC_CNT - 1U); 8001b28: 3401 adds r4, #1 8001b2a: f004 0403 and.w r4, r4, #3 dmatxdesclist->BuffersInUse = numOfBuf; 8001b2e: 6435 str r5, [r6, #64] @ 0x40 dmatxdesclist->releaseIndex = idx; 8001b30: 6474 str r4, [r6, #68] @ 0x44 8001b32: e7df b.n 8001af4 } 8001b34: 2000 movs r0, #0 8001b36: bdf8 pop {r3, r4, r5, r6, r7, pc} 08001b38 : } 8001b38: 4770 bx lr 08001b3a : } 8001b3a: 4770 bx lr 08001b3c : } 8001b3c: 4770 bx lr 08001b3e : { 8001b3e: b510 push {r4, lr} 8001b40: 4604 mov r4, r0 if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_RI)) 8001b42: 6803 ldr r3, [r0, #0] 8001b44: f503 5280 add.w r2, r3, #4096 @ 0x1000 8001b48: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160 8001b4c: f012 0f40 tst.w r2, #64 @ 0x40 8001b50: d006 beq.n 8001b60 if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_RIE)) 8001b52: f503 5280 add.w r2, r3, #4096 @ 0x1000 8001b56: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134 8001b5a: f012 0f40 tst.w r2, #64 @ 0x40 8001b5e: d160 bne.n 8001c22 if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_TI)) 8001b60: 6823 ldr r3, [r4, #0] 8001b62: f503 5280 add.w r2, r3, #4096 @ 0x1000 8001b66: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160 8001b6a: f012 0f01 tst.w r2, #1 8001b6e: d006 beq.n 8001b7e if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_TIE)) 8001b70: f503 5280 add.w r2, r3, #4096 @ 0x1000 8001b74: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134 8001b78: f012 0f01 tst.w r2, #1 8001b7c: d15a bne.n 8001c34 if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_AIS)) 8001b7e: 6823 ldr r3, [r4, #0] 8001b80: f503 5280 add.w r2, r3, #4096 @ 0x1000 8001b84: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160 8001b88: f412 4f80 tst.w r2, #16384 @ 0x4000 8001b8c: d02b beq.n 8001be6 if (__HAL_ETH_DMA_GET_IT_SOURCE(heth, ETH_DMACIER_AIE)) 8001b8e: f503 5280 add.w r2, r3, #4096 @ 0x1000 8001b92: f8d2 2134 ldr.w r2, [r2, #308] @ 0x134 8001b96: f412 4f80 tst.w r2, #16384 @ 0x4000 8001b9a: d024 beq.n 8001be6 heth->ErrorCode |= HAL_ETH_ERROR_DMA; 8001b9c: f8d4 2088 ldr.w r2, [r4, #136] @ 0x88 8001ba0: f042 0208 orr.w r2, r2, #8 8001ba4: f8c4 2088 str.w r2, [r4, #136] @ 0x88 if (__HAL_ETH_DMA_GET_IT(heth, ETH_DMACSR_FBE)) 8001ba8: f503 5280 add.w r2, r3, #4096 @ 0x1000 8001bac: f8d2 2160 ldr.w r2, [r2, #352] @ 0x160 8001bb0: f412 5f80 tst.w r2, #4096 @ 0x1000 8001bb4: d048 beq.n 8001c48 heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_FBE | ETH_DMACSR_TPS | ETH_DMACSR_RPS)); 8001bb6: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001bba: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160 8001bbe: f422 626f bic.w r2, r2, #3824 @ 0xef0 8001bc2: f022 020d bic.w r2, r2, #13 8001bc6: 04d2 lsls r2, r2, #19 8001bc8: 0cd2 lsrs r2, r2, #19 8001bca: f8c4 208c str.w r2, [r4, #140] @ 0x8c __HAL_ETH_DMA_DISABLE_IT(heth, ETH_DMACIER_NIE | ETH_DMACIER_AIE); 8001bce: f8d3 2134 ldr.w r2, [r3, #308] @ 0x134 8001bd2: f422 4240 bic.w r2, r2, #49152 @ 0xc000 8001bd6: f8c3 2134 str.w r2, [r3, #308] @ 0x134 heth->gState = HAL_ETH_STATE_ERROR; 8001bda: 23e0 movs r3, #224 @ 0xe0 8001bdc: f8c4 3084 str.w r3, [r4, #132] @ 0x84 HAL_ETH_ErrorCallback(heth); 8001be0: 4620 mov r0, r4 8001be2: f001 fd37 bl 8003654 macirqenable = heth->Instance->MACIER; 8001be6: 6823 ldr r3, [r4, #0] 8001be8: f8d3 20b4 ldr.w r2, [r3, #180] @ 0xb4 if (((macirqenable & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 8001bec: f412 4fc0 tst.w r2, #24576 @ 0x6000 8001bf0: d137 bne.n 8001c62 if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_PMT_IT)) 8001bf2: 6823 ldr r3, [r4, #0] 8001bf4: f8d3 20b0 ldr.w r2, [r3, #176] @ 0xb0 8001bf8: f012 0f10 tst.w r2, #16 8001bfc: d145 bne.n 8001c8a if (__HAL_ETH_MAC_GET_IT(heth, ETH_MAC_LPI_IT)) 8001bfe: 6823 ldr r3, [r4, #0] 8001c00: f8d3 20b0 ldr.w r2, [r3, #176] @ 0xb0 8001c04: f012 0f20 tst.w r2, #32 8001c08: d14c bne.n 8001ca4 if (HAL_GetCurrentCPUID() == CM7_CPUID) 8001c0a: f7ff fa09 bl 8001020 8001c0e: 2803 cmp r0, #3 8001c10: d055 beq.n 8001cbe if (__HAL_ETH_WAKEUP_EXTID2_GET_FLAG(ETH_WAKEUP_EXTI_LINE) != (uint32_t)RESET) 8001c12: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 8001c16: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8001c1a: f413 0f80 tst.w r3, #4194304 @ 0x400000 8001c1e: d15f bne.n 8001ce0 } 8001c20: bd10 pop {r4, pc} __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_RI | ETH_DMACSR_NIS); 8001c22: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001c26: f248 0240 movw r2, #32832 @ 0x8040 8001c2a: f8c3 2160 str.w r2, [r3, #352] @ 0x160 HAL_ETH_RxCpltCallback(heth); 8001c2e: f001 fd01 bl 8003634 8001c32: e795 b.n 8001b60 __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS); 8001c34: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001c38: f248 0201 movw r2, #32769 @ 0x8001 8001c3c: f8c3 2160 str.w r2, [r3, #352] @ 0x160 HAL_ETH_TxCpltCallback(heth); 8001c40: 4620 mov r0, r4 8001c42: f001 fcff bl 8003644 8001c46: e79a b.n 8001b7e heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8001c48: f503 5380 add.w r3, r3, #4096 @ 0x1000 8001c4c: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160 8001c50: f402 42cd and.w r2, r2, #26240 @ 0x6680 8001c54: f8c4 208c str.w r2, [r4, #140] @ 0x8c __HAL_ETH_DMA_CLEAR_IT(heth, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8001c58: f44f 42cd mov.w r2, #26240 @ 0x6680 8001c5c: f8c3 2160 str.w r2, [r3, #352] @ 0x160 8001c60: e7be b.n 8001be0 heth->ErrorCode |= HAL_ETH_ERROR_MAC; 8001c62: f8d4 2088 ldr.w r2, [r4, #136] @ 0x88 8001c66: f042 0210 orr.w r2, r2, #16 8001c6a: f8c4 2088 str.w r2, [r4, #136] @ 0x88 heth->MACErrorCode = READ_REG(heth->Instance->MACRXTXSR); 8001c6e: f8d3 30b8 ldr.w r3, [r3, #184] @ 0xb8 8001c72: f8c4 3090 str.w r3, [r4, #144] @ 0x90 heth->gState = HAL_ETH_STATE_ERROR; 8001c76: 23e0 movs r3, #224 @ 0xe0 8001c78: f8c4 3084 str.w r3, [r4, #132] @ 0x84 HAL_ETH_ErrorCallback(heth); 8001c7c: 4620 mov r0, r4 8001c7e: f001 fce9 bl 8003654 heth->MACErrorCode = (uint32_t)(0x0U); 8001c82: 2300 movs r3, #0 8001c84: f8c4 3090 str.w r3, [r4, #144] @ 0x90 8001c88: e7b3 b.n 8001bf2 heth->MACWakeUpEvent = READ_BIT(heth->Instance->MACPCSR, (ETH_MACPCSR_RWKPRCVD | ETH_MACPCSR_MGKPRCVD)); 8001c8a: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0 8001c8e: f003 0360 and.w r3, r3, #96 @ 0x60 8001c92: f8c4 3094 str.w r3, [r4, #148] @ 0x94 HAL_ETH_PMTCallback(heth); 8001c96: 4620 mov r0, r4 8001c98: f7ff ff4e bl 8001b38 heth->MACWakeUpEvent = (uint32_t)(0x0U); 8001c9c: 2300 movs r3, #0 8001c9e: f8c4 3094 str.w r3, [r4, #148] @ 0x94 8001ca2: e7ac b.n 8001bfe heth->MACLPIEvent = READ_BIT(heth->Instance->MACPCSR, 0x0000000FU); 8001ca4: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0 8001ca8: f003 030f and.w r3, r3, #15 8001cac: f8c4 3098 str.w r3, [r4, #152] @ 0x98 HAL_ETH_EEECallback(heth); 8001cb0: 4620 mov r0, r4 8001cb2: f7ff ff42 bl 8001b3a heth->MACLPIEvent = (uint32_t)(0x0U); 8001cb6: 2300 movs r3, #0 8001cb8: f8c4 3098 str.w r3, [r4, #152] @ 0x98 8001cbc: e7a5 b.n 8001c0a if (__HAL_ETH_WAKEUP_EXTI_GET_FLAG(ETH_WAKEUP_EXTI_LINE) != (uint32_t)RESET) 8001cbe: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 8001cc2: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8 8001cc6: f413 0f80 tst.w r3, #4194304 @ 0x400000 8001cca: d0a9 beq.n 8001c20 __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE); 8001ccc: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 8001cd0: f44f 0280 mov.w r2, #4194304 @ 0x400000 8001cd4: f8c3 20a8 str.w r2, [r3, #168] @ 0xa8 HAL_ETH_WakeUpCallback(heth); 8001cd8: 4620 mov r0, r4 8001cda: f7ff ff2f bl 8001b3c 8001cde: e79f b.n 8001c20 __HAL_ETH_WAKEUP_EXTID2_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE); 8001ce0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 8001ce4: f44f 0280 mov.w r2, #4194304 @ 0x400000 8001ce8: f8c3 20e8 str.w r2, [r3, #232] @ 0xe8 HAL_ETH_WakeUpCallback(heth); 8001cec: 4620 mov r0, r4 8001cee: f7ff ff25 bl 8001b3c } 8001cf2: e795 b.n 8001c20 08001cf4 : { 8001cf4: b570 push {r4, r5, r6, lr} 8001cf6: 4604 mov r4, r0 8001cf8: 461d mov r5, r3 if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET) 8001cfa: 6800 ldr r0, [r0, #0] 8001cfc: f8d0 3200 ldr.w r3, [r0, #512] @ 0x200 8001d00: f013 0f01 tst.w r3, #1 8001d04: d001 beq.n 8001d0a return HAL_ERROR; 8001d06: 2001 movs r0, #1 } 8001d08: bd70 pop {r4, r5, r6, pc} WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8001d0a: f8d0 3200 ldr.w r3, [r0, #512] @ 0x200 MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21)); 8001d0e: f023 7378 bic.w r3, r3, #65011712 @ 0x3e00000 8001d12: ea43 5141 orr.w r1, r3, r1, lsl #21 MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8001d16: f421 13f8 bic.w r3, r1, #2031616 @ 0x1f0000 8001d1a: ea43 4202 orr.w r2, r3, r2, lsl #16 SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8001d1e: f042 020d orr.w r2, r2, #13 WRITE_REG(heth->Instance->MACMDIOAR, tmpreg); 8001d22: f8c0 2200 str.w r2, [r0, #512] @ 0x200 tickstart = HAL_GetTick(); 8001d26: f7ff f8b1 bl 8000e8c 8001d2a: 4606 mov r6, r0 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8001d2c: 6822 ldr r2, [r4, #0] 8001d2e: f8d2 1200 ldr.w r1, [r2, #512] @ 0x200 8001d32: f011 0f01 tst.w r1, #1 8001d36: d007 beq.n 8001d48 if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8001d38: f7ff f8a8 bl 8000e8c 8001d3c: 1b82 subs r2, r0, r6 8001d3e: f5b2 7f7a cmp.w r2, #1000 @ 0x3e8 8001d42: d9f3 bls.n 8001d2c return HAL_ERROR; 8001d44: 2001 movs r0, #1 8001d46: e7df b.n 8001d08 WRITE_REG(*pRegValue, (uint16_t)heth->Instance->MACMDIODR); 8001d48: f8d2 3204 ldr.w r3, [r2, #516] @ 0x204 8001d4c: b29b uxth r3, r3 8001d4e: 602b str r3, [r5, #0] return HAL_OK; 8001d50: 2000 movs r0, #0 8001d52: e7d9 b.n 8001d08 08001d54 : { 8001d54: b538 push {r3, r4, r5, lr} 8001d56: 4604 mov r4, r0 if (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) != (uint32_t)RESET) 8001d58: 6800 ldr r0, [r0, #0] 8001d5a: f8d0 5200 ldr.w r5, [r0, #512] @ 0x200 8001d5e: f015 0f01 tst.w r5, #1 8001d62: d001 beq.n 8001d68 return HAL_ERROR; 8001d64: 2001 movs r0, #1 } 8001d66: bd38 pop {r3, r4, r5, pc} WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8001d68: f8d0 0200 ldr.w r0, [r0, #512] @ 0x200 MODIFY_REG(tmpreg, ETH_MACMDIOAR_PA, (PHYAddr << 21)); 8001d6c: f020 7078 bic.w r0, r0, #65011712 @ 0x3e00000 8001d70: ea40 5141 orr.w r1, r0, r1, lsl #21 MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8001d74: f421 11f8 bic.w r1, r1, #2031616 @ 0x1f0000 8001d78: ea41 4202 orr.w r2, r1, r2, lsl #16 MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_WR); 8001d7c: f022 020c bic.w r2, r2, #12 SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8001d80: f042 0205 orr.w r2, r2, #5 WRITE_REG(ETH->MACMDIODR, (uint16_t)RegValue); 8001d84: b29b uxth r3, r3 8001d86: 490c ldr r1, [pc, #48] @ (8001db8 ) 8001d88: f8c1 3204 str.w r3, [r1, #516] @ 0x204 WRITE_REG(ETH->MACMDIOAR, tmpreg); 8001d8c: f8c1 2200 str.w r2, [r1, #512] @ 0x200 tickstart = HAL_GetTick(); 8001d90: f7ff f87c bl 8000e8c 8001d94: 4605 mov r5, r0 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8001d96: 6823 ldr r3, [r4, #0] 8001d98: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8001d9c: f013 0f01 tst.w r3, #1 8001da0: d007 beq.n 8001db2 if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8001da2: f7ff f873 bl 8000e8c 8001da6: 1b43 subs r3, r0, r5 8001da8: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8001dac: d9f3 bls.n 8001d96 return HAL_ERROR; 8001dae: 2001 movs r0, #1 8001db0: e7d9 b.n 8001d66 return HAL_OK; 8001db2: 2000 movs r0, #0 8001db4: e7d7 b.n 8001d66 8001db6: bf00 nop 8001db8: 40028000 .word 0x40028000 08001dbc : if (macconf == NULL) 8001dbc: 2900 cmp r1, #0 8001dbe: f000 80ee beq.w 8001f9e macconf->PreambleLength = READ_BIT(heth->Instance->MACCR, ETH_MACCR_PRELEN); 8001dc2: 6802 ldr r2, [r0, #0] 8001dc4: 6812 ldr r2, [r2, #0] 8001dc6: f002 020c and.w r2, r2, #12 8001dca: 62ca str r2, [r1, #44] @ 0x2c macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE; 8001dcc: 6802 ldr r2, [r0, #0] 8001dce: 6812 ldr r2, [r2, #0] 8001dd0: f3c2 1200 ubfx r2, r2, #4, #1 8001dd4: f881 2028 strb.w r2, [r1, #40] @ 0x28 macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL); 8001dd8: 6802 ldr r2, [r0, #0] 8001dda: 6812 ldr r2, [r2, #0] 8001ddc: f002 0260 and.w r2, r2, #96 @ 0x60 8001de0: 624a str r2, [r1, #36] @ 0x24 macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DR) >> 8) == 0U) ? ENABLE : DISABLE; 8001de2: 6802 ldr r2, [r0, #0] 8001de4: 6812 ldr r2, [r2, #0] 8001de6: f412 7f80 tst.w r2, #256 @ 0x100 8001dea: bf0c ite eq 8001dec: 2201 moveq r2, #1 8001dee: 2200 movne r2, #0 8001df0: f881 2020 strb.w r2, [r1, #32] macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8001df4: 6802 ldr r2, [r0, #0] 8001df6: 6812 ldr r2, [r2, #0] ? ENABLE : DISABLE; 8001df8: f3c2 2240 ubfx r2, r2, #9, #1 macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8001dfc: 77ca strb r2, [r1, #31] macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DO) >> 10) == 0U) ? ENABLE : DISABLE; 8001dfe: 6802 ldr r2, [r0, #0] 8001e00: 6812 ldr r2, [r2, #0] 8001e02: f412 6f80 tst.w r2, #1024 @ 0x400 8001e06: bf0c ite eq 8001e08: 2201 moveq r2, #1 8001e0a: 2200 movne r2, #0 8001e0c: 778a strb r2, [r1, #30] macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8001e0e: 6802 ldr r2, [r0, #0] 8001e10: 6812 ldr r2, [r2, #0] ETH_MACCR_ECRSFD) >> 11) > 0U) ? ENABLE : DISABLE; 8001e12: f3c2 22c0 ubfx r2, r2, #11, #1 macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8001e16: 774a strb r2, [r1, #29] macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE; 8001e18: 6802 ldr r2, [r0, #0] 8001e1a: 6812 ldr r2, [r2, #0] 8001e1c: f3c2 3200 ubfx r2, r2, #12, #1 8001e20: 770a strb r2, [r1, #28] macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM); 8001e22: 6802 ldr r2, [r0, #0] 8001e24: 6812 ldr r2, [r2, #0] 8001e26: f402 5200 and.w r2, r2, #8192 @ 0x2000 8001e2a: 618a str r2, [r1, #24] macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES); 8001e2c: 6802 ldr r2, [r0, #0] 8001e2e: 6812 ldr r2, [r2, #0] 8001e30: f402 4280 and.w r2, r2, #16384 @ 0x4000 8001e34: 614a str r2, [r1, #20] macconf->JumboPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JE) >> 16) > 0U) ? ENABLE : DISABLE; 8001e36: 6802 ldr r2, [r0, #0] 8001e38: 6812 ldr r2, [r2, #0] 8001e3a: f3c2 4200 ubfx r2, r2, #16, #1 8001e3e: 748a strb r2, [r1, #18] macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 17) == 0U) ? ENABLE : DISABLE; 8001e40: 6802 ldr r2, [r0, #0] 8001e42: 6812 ldr r2, [r2, #0] 8001e44: f412 3f00 tst.w r2, #131072 @ 0x20000 8001e48: bf0c ite eq 8001e4a: 2201 moveq r2, #1 8001e4c: 2200 movne r2, #0 8001e4e: 744a strb r2, [r1, #17] macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 19) == 0U) ? ENABLE : DISABLE; 8001e50: 6802 ldr r2, [r0, #0] 8001e52: 6812 ldr r2, [r2, #0] 8001e54: f412 2f00 tst.w r2, #524288 @ 0x80000 8001e58: bf0c ite eq 8001e5a: 2201 moveq r2, #1 8001e5c: 2200 movne r2, #0 8001e5e: 740a strb r2, [r1, #16] macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ACS) >> 20) > 0U) ? ENABLE : DISABLE; 8001e60: 6802 ldr r2, [r0, #0] 8001e62: 6812 ldr r2, [r2, #0] 8001e64: f3c2 5200 ubfx r2, r2, #20, #1 8001e68: 73ca strb r2, [r1, #15] macconf->CRCStripTypePacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CST) >> 21) > 0U) ? ENABLE : DISABLE; 8001e6a: 6802 ldr r2, [r0, #0] 8001e6c: 6812 ldr r2, [r2, #0] 8001e6e: f3c2 5240 ubfx r2, r2, #21, #1 8001e72: 738a strb r2, [r1, #14] macconf->Support2KPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_S2KP) >> 22) > 0U) ? ENABLE : DISABLE; 8001e74: 6802 ldr r2, [r0, #0] 8001e76: 6812 ldr r2, [r2, #0] 8001e78: f3c2 5280 ubfx r2, r2, #22, #1 8001e7c: 734a strb r2, [r1, #13] macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8001e7e: 6802 ldr r2, [r0, #0] 8001e80: 6812 ldr r2, [r2, #0] ETH_MACCR_GPSLCE) >> 23) > 0U) ? ENABLE : DISABLE; 8001e82: f3c2 52c0 ubfx r2, r2, #23, #1 macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8001e86: 730a strb r2, [r1, #12] macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPG); 8001e88: 6802 ldr r2, [r0, #0] 8001e8a: 6812 ldr r2, [r2, #0] 8001e8c: f002 62e0 and.w r2, r2, #117440512 @ 0x7000000 8001e90: 608a str r2, [r1, #8] macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPC) >> 27) > 0U) ? ENABLE : DISABLE; 8001e92: 6802 ldr r2, [r0, #0] 8001e94: 6812 ldr r2, [r2, #0] 8001e96: f3c2 62c0 ubfx r2, r2, #27, #1 8001e9a: 710a strb r2, [r1, #4] macconf->SourceAddrControl = READ_BIT(heth->Instance->MACCR, ETH_MACCR_SARC); 8001e9c: 6802 ldr r2, [r0, #0] 8001e9e: 6812 ldr r2, [r2, #0] 8001ea0: f002 42e0 and.w r2, r2, #1879048192 @ 0x70000000 8001ea4: 600a str r2, [r1, #0] macconf->GiantPacketSizeLimit = READ_BIT(heth->Instance->MACECR, ETH_MACECR_GPSL); 8001ea6: 6802 ldr r2, [r0, #0] 8001ea8: 6852 ldr r2, [r2, #4] 8001eaa: f3c2 020d ubfx r2, r2, #0, #14 8001eae: 634a str r2, [r1, #52] @ 0x34 macconf->CRCCheckingRxPackets = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_DCRCC) >> 16) == 0U) ? ENABLE : DISABLE; 8001eb0: 6802 ldr r2, [r0, #0] 8001eb2: 6852 ldr r2, [r2, #4] 8001eb4: f412 3f80 tst.w r2, #65536 @ 0x10000 8001eb8: bf0c ite eq 8001eba: 2201 moveq r2, #1 8001ebc: 2200 movne r2, #0 8001ebe: f881 2032 strb.w r2, [r1, #50] @ 0x32 macconf->SlowProtocolDetect = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_SPEN) >> 17) > 0U) ? ENABLE : DISABLE; 8001ec2: 6802 ldr r2, [r0, #0] 8001ec4: 6852 ldr r2, [r2, #4] 8001ec6: f3c2 4240 ubfx r2, r2, #17, #1 8001eca: f881 2031 strb.w r2, [r1, #49] @ 0x31 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 8001ece: 6802 ldr r2, [r0, #0] 8001ed0: 6852 ldr r2, [r2, #4] ETH_MACECR_USP) >> 18) > 0U) ? ENABLE : DISABLE; 8001ed2: f3c2 4280 ubfx r2, r2, #18, #1 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 8001ed6: f881 2030 strb.w r2, [r1, #48] @ 0x30 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 8001eda: 6802 ldr r2, [r0, #0] 8001edc: 6852 ldr r2, [r2, #4] ? ENABLE : DISABLE; 8001ede: f3c2 6200 ubfx r2, r2, #24, #1 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 8001ee2: f881 2038 strb.w r2, [r1, #56] @ 0x38 macconf->ExtendedInterPacketGapVal = READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPG) >> 25; 8001ee6: 6802 ldr r2, [r0, #0] 8001ee8: 6852 ldr r2, [r2, #4] 8001eea: f3c2 6244 ubfx r2, r2, #25, #5 8001eee: 63ca str r2, [r1, #60] @ 0x3c macconf->ProgrammableWatchdog = ((READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_PWE) >> 8) > 0U) ? ENABLE : DISABLE; 8001ef0: 6802 ldr r2, [r0, #0] 8001ef2: 68d2 ldr r2, [r2, #12] 8001ef4: f3c2 2200 ubfx r2, r2, #8, #1 8001ef8: f881 2040 strb.w r2, [r1, #64] @ 0x40 macconf->WatchdogTimeout = READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_WTO); 8001efc: 6802 ldr r2, [r0, #0] 8001efe: 68d2 ldr r2, [r2, #12] 8001f00: f002 020f and.w r2, r2, #15 8001f04: 644a str r2, [r1, #68] @ 0x44 macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_TFE) >> 1) > 0U) ? ENABLE : DISABLE; 8001f06: 6802 ldr r2, [r0, #0] 8001f08: 6f12 ldr r2, [r2, #112] @ 0x70 8001f0a: f3c2 0240 ubfx r2, r2, #1, #1 8001f0e: f881 2054 strb.w r2, [r1, #84] @ 0x54 macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_DZPQ) >> 7) == 0U) ? ENABLE : DISABLE; 8001f12: 6802 ldr r2, [r0, #0] 8001f14: 6f12 ldr r2, [r2, #112] @ 0x70 8001f16: f012 0f80 tst.w r2, #128 @ 0x80 8001f1a: bf0c ite eq 8001f1c: 2201 moveq r2, #1 8001f1e: 2200 movne r2, #0 8001f20: f881 204c strb.w r2, [r1, #76] @ 0x4c macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PLT); 8001f24: 6802 ldr r2, [r0, #0] 8001f26: 6f12 ldr r2, [r2, #112] @ 0x70 8001f28: f002 0270 and.w r2, r2, #112 @ 0x70 8001f2c: 650a str r2, [r1, #80] @ 0x50 macconf->PauseTime = (READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PT) >> 16); 8001f2e: 6802 ldr r2, [r0, #0] 8001f30: 6f12 ldr r2, [r2, #112] @ 0x70 8001f32: 0c12 lsrs r2, r2, #16 8001f34: 648a str r2, [r1, #72] @ 0x48 macconf->ReceiveFlowControl = (READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_RFE) > 0U) ? ENABLE : DISABLE; 8001f36: 6802 ldr r2, [r0, #0] 8001f38: f8d2 2090 ldr.w r2, [r2, #144] @ 0x90 8001f3c: f002 0201 and.w r2, r2, #1 8001f40: f881 2056 strb.w r2, [r1, #86] @ 0x56 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 8001f44: 6802 ldr r2, [r0, #0] 8001f46: f8d2 2090 ldr.w r2, [r2, #144] @ 0x90 ? ENABLE : DISABLE; 8001f4a: f3c2 0240 ubfx r2, r2, #1, #1 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 8001f4e: f881 2055 strb.w r2, [r1, #85] @ 0x55 macconf->TransmitQueueMode = READ_BIT(heth->Instance->MTLTQOMR, (ETH_MTLTQOMR_TTC | ETH_MTLTQOMR_TSF)); 8001f52: 6802 ldr r2, [r0, #0] 8001f54: f8d2 2d00 ldr.w r2, [r2, #3328] @ 0xd00 8001f58: f002 0272 and.w r2, r2, #114 @ 0x72 8001f5c: 658a str r2, [r1, #88] @ 0x58 macconf->ReceiveQueueMode = READ_BIT(heth->Instance->MTLRQOMR, (ETH_MTLRQOMR_RTC | ETH_MTLRQOMR_RSF)); 8001f5e: 6802 ldr r2, [r0, #0] 8001f60: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30 8001f64: f002 0223 and.w r2, r2, #35 @ 0x23 8001f68: 65ca str r2, [r1, #92] @ 0x5c macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8001f6a: 6802 ldr r2, [r0, #0] 8001f6c: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30 ETH_MTLRQOMR_FUP) >> 3) > 0U) ? ENABLE : DISABLE; 8001f70: f3c2 02c0 ubfx r2, r2, #3, #1 macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8001f74: f881 2062 strb.w r2, [r1, #98] @ 0x62 macconf->ForwardRxErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_FEP) >> 4) > 0U) ? ENABLE : DISABLE; 8001f78: 6802 ldr r2, [r0, #0] 8001f7a: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30 8001f7e: f3c2 1200 ubfx r2, r2, #4, #1 8001f82: f881 2061 strb.w r2, [r1, #97] @ 0x61 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8001f86: 6802 ldr r2, [r0, #0] 8001f88: f8d2 2d30 ldr.w r2, [r2, #3376] @ 0xd30 ETH_MTLRQOMR_DISTCPEF) >> 6) == 0U) ? ENABLE : DISABLE; 8001f8c: f012 0f40 tst.w r2, #64 @ 0x40 8001f90: bf0c ite eq 8001f92: 2201 moveq r2, #1 8001f94: 2200 movne r2, #0 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8001f96: f881 2060 strb.w r2, [r1, #96] @ 0x60 return HAL_OK; 8001f9a: 2000 movs r0, #0 8001f9c: 4770 bx lr return HAL_ERROR; 8001f9e: 2001 movs r0, #1 } 8001fa0: 4770 bx lr 08001fa2 : if (macconf == NULL) 8001fa2: b151 cbz r1, 8001fba { 8001fa4: b508 push {r3, lr} if (heth->gState == HAL_ETH_STATE_READY) 8001fa6: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84 8001faa: 2b10 cmp r3, #16 8001fac: d001 beq.n 8001fb2 return HAL_ERROR; 8001fae: 2001 movs r0, #1 } 8001fb0: bd08 pop {r3, pc} ETH_SetMACConfig(heth, macconf); 8001fb2: f7ff f889 bl 80010c8 return HAL_OK; 8001fb6: 2000 movs r0, #0 8001fb8: e7fa b.n 8001fb0 return HAL_ERROR; 8001fba: 2001 movs r0, #1 } 8001fbc: 4770 bx lr ... 08001fc0 : { 8001fc0: b538 push {r3, r4, r5, lr} 8001fc2: 4605 mov r5, r0 tmpreg = (heth->Instance)->MACMDIOAR; 8001fc4: 6803 ldr r3, [r0, #0] 8001fc6: f8d3 4200 ldr.w r4, [r3, #512] @ 0x200 tmpreg &= ~ETH_MACMDIOAR_CR; 8001fca: f424 6470 bic.w r4, r4, #3840 @ 0xf00 hclk = HAL_RCC_GetHCLKFreq(); 8001fce: f000 ffcd bl 8002f6c if ((hclk >= 20000000U) && (hclk < 35000000U)) 8001fd2: 4b11 ldr r3, [pc, #68] @ (8002018 ) 8001fd4: 4403 add r3, r0 8001fd6: 4a11 ldr r2, [pc, #68] @ (800201c ) 8001fd8: 4293 cmp r3, r2 8001fda: d205 bcs.n 8001fe8 tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV16; 8001fdc: f444 7400 orr.w r4, r4, #512 @ 0x200 (heth->Instance)->MACMDIOAR = (uint32_t)tmpreg; 8001fe0: 682b ldr r3, [r5, #0] 8001fe2: f8c3 4200 str.w r4, [r3, #512] @ 0x200 } 8001fe6: bd38 pop {r3, r4, r5, pc} else if ((hclk >= 35000000U) && (hclk < 60000000U)) 8001fe8: 4b0d ldr r3, [pc, #52] @ (8002020 ) 8001fea: 4403 add r3, r0 8001fec: 4a0d ldr r2, [pc, #52] @ (8002024 ) 8001fee: 4293 cmp r3, r2 8001ff0: d802 bhi.n 8001ff8 tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV26; 8001ff2: f444 7440 orr.w r4, r4, #768 @ 0x300 8001ff6: e7f3 b.n 8001fe0 else if ((hclk >= 60000000U) && (hclk < 100000000U)) 8001ff8: 4b0b ldr r3, [pc, #44] @ (8002028 ) 8001ffa: 4403 add r3, r0 8001ffc: 4a0b ldr r2, [pc, #44] @ (800202c ) 8001ffe: 4293 cmp r3, r2 8002000: d3ee bcc.n 8001fe0 else if ((hclk >= 100000000U) && (hclk < 150000000U)) 8002002: 4b0b ldr r3, [pc, #44] @ (8002030 ) 8002004: 4403 add r3, r0 8002006: 4a0b ldr r2, [pc, #44] @ (8002034 ) 8002008: 4293 cmp r3, r2 800200a: d802 bhi.n 8002012 tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV62; 800200c: f444 7480 orr.w r4, r4, #256 @ 0x100 8002010: e7e6 b.n 8001fe0 tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV102; 8002012: f444 6480 orr.w r4, r4, #1024 @ 0x400 8002016: e7e3 b.n 8001fe0 8002018: feced300 .word 0xfeced300 800201c: 00e4e1c0 .word 0x00e4e1c0 8002020: fde9f140 .word 0xfde9f140 8002024: 017d783f .word 0x017d783f 8002028: fc6c7900 .word 0xfc6c7900 800202c: 02625a00 .word 0x02625a00 8002030: fa0a1f00 .word 0xfa0a1f00 8002034: 02faf07f .word 0x02faf07f 08002038 : if (heth == NULL) 8002038: 2800 cmp r0, #0 800203a: f000 8099 beq.w 8002170 { 800203e: b530 push {r4, r5, lr} 8002040: b083 sub sp, #12 8002042: 4604 mov r4, r0 if (heth->gState == HAL_ETH_STATE_RESET) 8002044: f8d0 3084 ldr.w r3, [r0, #132] @ 0x84 8002048: b39b cbz r3, 80020b2 __HAL_RCC_SYSCFG_CLK_ENABLE(); 800204a: 4b4a ldr r3, [pc, #296] @ (8002174 ) 800204c: f8d3 20f4 ldr.w r2, [r3, #244] @ 0xf4 8002050: f042 0202 orr.w r2, r2, #2 8002054: f8c3 20f4 str.w r2, [r3, #244] @ 0xf4 8002058: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 800205c: f003 0302 and.w r3, r3, #2 8002060: 9301 str r3, [sp, #4] 8002062: 9b01 ldr r3, [sp, #4] if (heth->Init.MediaInterface == HAL_ETH_MII_MODE) 8002064: 7a23 ldrb r3, [r4, #8] 8002066: bb53 cbnz r3, 80020be HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII); 8002068: 2000 movs r0, #0 800206a: f7fe ff1b bl 8000ea4 (void)SYSCFG->PMCR; 800206e: 4b42 ldr r3, [pc, #264] @ (8002178 ) 8002070: 685b ldr r3, [r3, #4] SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR); 8002072: 6823 ldr r3, [r4, #0] 8002074: f503 5380 add.w r3, r3, #4096 @ 0x1000 8002078: 681a ldr r2, [r3, #0] 800207a: f042 0201 orr.w r2, r2, #1 800207e: 601a str r2, [r3, #0] tickstart = HAL_GetTick(); 8002080: f7fe ff04 bl 8000e8c 8002084: 4605 mov r5, r0 while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 8002086: 6823 ldr r3, [r4, #0] 8002088: f503 5380 add.w r3, r3, #4096 @ 0x1000 800208c: 681b ldr r3, [r3, #0] 800208e: f013 0f01 tst.w r3, #1 8002092: d019 beq.n 80020c8 if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT)) 8002094: f7fe fefa bl 8000e8c 8002098: 1b40 subs r0, r0, r5 800209a: f5b0 7ffa cmp.w r0, #500 @ 0x1f4 800209e: d9f2 bls.n 8002086 heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT; 80020a0: 2304 movs r3, #4 80020a2: f8c4 3088 str.w r3, [r4, #136] @ 0x88 heth->gState = HAL_ETH_STATE_ERROR; 80020a6: 23e0 movs r3, #224 @ 0xe0 80020a8: f8c4 3084 str.w r3, [r4, #132] @ 0x84 return HAL_ERROR; 80020ac: 2001 movs r0, #1 } 80020ae: b003 add sp, #12 80020b0: bd30 pop {r4, r5, pc} heth->gState = HAL_ETH_STATE_BUSY; 80020b2: 2323 movs r3, #35 @ 0x23 80020b4: f8c0 3084 str.w r3, [r0, #132] @ 0x84 HAL_ETH_MspInit(heth); 80020b8: f001 fade bl 8003678 80020bc: e7c5 b.n 800204a HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII); 80020be: f44f 0000 mov.w r0, #8388608 @ 0x800000 80020c2: f7fe feef bl 8000ea4 80020c6: e7d2 b.n 800206e HAL_ETH_SetMDIOClockRange(heth); 80020c8: 4620 mov r0, r4 80020ca: f7ff ff79 bl 8001fc0 WRITE_REG(heth->Instance->MAC1USTCR, (((uint32_t)HAL_RCC_GetHCLKFreq() / ETH_MAC_US_TICK) - 1U)); 80020ce: f000 ff4d bl 8002f6c 80020d2: 4b2a ldr r3, [pc, #168] @ (800217c ) 80020d4: fba3 2300 umull r2, r3, r3, r0 80020d8: 0c9b lsrs r3, r3, #18 80020da: 6822 ldr r2, [r4, #0] 80020dc: 3b01 subs r3, #1 80020de: f8c2 30dc str.w r3, [r2, #220] @ 0xdc ETH_MACDMAConfig(heth); 80020e2: 4620 mov r0, r4 80020e4: f7ff f91e bl 8001324 MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT); 80020e8: 6822 ldr r2, [r4, #0] 80020ea: f502 5280 add.w r2, r2, #4096 @ 0x1000 80020ee: f8d2 3100 ldr.w r3, [r2, #256] @ 0x100 80020f2: f423 13e0 bic.w r3, r3, #1835008 @ 0x1c0000 80020f6: f443 2300 orr.w r3, r3, #524288 @ 0x80000 80020fa: f8c2 3100 str.w r3, [r2, #256] @ 0x100 if ((heth->Init.RxBuffLen % 0x4U) != 0x0U) 80020fe: 6962 ldr r2, [r4, #20] 8002100: f012 0f03 tst.w r2, #3 8002104: d006 beq.n 8002114 heth->ErrorCode = HAL_ETH_ERROR_PARAM; 8002106: 2001 movs r0, #1 8002108: f8c4 0088 str.w r0, [r4, #136] @ 0x88 heth->gState = HAL_ETH_STATE_ERROR; 800210c: 23e0 movs r3, #224 @ 0xe0 800210e: f8c4 3084 str.w r3, [r4, #132] @ 0x84 return HAL_ERROR; 8002112: e7cc b.n 80020ae MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_RBSZ, ((heth->Init.RxBuffLen) << 1)); 8002114: 6821 ldr r1, [r4, #0] 8002116: f501 5180 add.w r1, r1, #4096 @ 0x1000 800211a: f8d1 0108 ldr.w r0, [r1, #264] @ 0x108 800211e: 4b18 ldr r3, [pc, #96] @ (8002180 ) 8002120: 4003 ands r3, r0 8002122: ea43 0342 orr.w r3, r3, r2, lsl #1 8002126: f8c1 3108 str.w r3, [r1, #264] @ 0x108 ETH_DMATxDescListInit(heth); 800212a: 4620 mov r0, r4 800212c: f7ff f968 bl 8001400 ETH_DMARxDescListInit(heth); 8002130: 4620 mov r0, r4 8002132: f7ff f992 bl 800145a heth->Instance->MACA0HR = (((uint32_t)(heth->Init.MACAddr[5]) << 8) | (uint32_t)heth->Init.MACAddr[4]); 8002136: 6863 ldr r3, [r4, #4] 8002138: 7959 ldrb r1, [r3, #5] 800213a: 791b ldrb r3, [r3, #4] 800213c: 6822 ldr r2, [r4, #0] 800213e: ea43 2301 orr.w r3, r3, r1, lsl #8 8002142: f8c2 3300 str.w r3, [r2, #768] @ 0x300 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8002146: 6862 ldr r2, [r4, #4] 8002148: 78d1 ldrb r1, [r2, #3] 800214a: 7893 ldrb r3, [r2, #2] 800214c: 041b lsls r3, r3, #16 800214e: ea43 6301 orr.w r3, r3, r1, lsl #24 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 8002152: 7851 ldrb r1, [r2, #1] heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8002154: ea43 2301 orr.w r3, r3, r1, lsl #8 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 8002158: 7811 ldrb r1, [r2, #0] heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 800215a: 6822 ldr r2, [r4, #0] ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 800215c: 430b orrs r3, r1 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 800215e: f8c2 3304 str.w r3, [r2, #772] @ 0x304 heth->ErrorCode = HAL_ETH_ERROR_NONE; 8002162: 2000 movs r0, #0 8002164: f8c4 0088 str.w r0, [r4, #136] @ 0x88 heth->gState = HAL_ETH_STATE_READY; 8002168: 2310 movs r3, #16 800216a: f8c4 3084 str.w r3, [r4, #132] @ 0x84 return HAL_OK; 800216e: e79e b.n 80020ae return HAL_ERROR; 8002170: 2001 movs r0, #1 } 8002172: 4770 bx lr 8002174: 58024400 .word 0x58024400 8002178: 58000400 .word 0x58000400 800217c: 431bde83 .word 0x431bde83 8002180: ffff8001 .word 0xffff8001 08002184 : return heth->DMAErrorCode; 8002184: f8d0 008c ldr.w r0, [r0, #140] @ 0x8c } 8002188: 4770 bx lr ... 0800218c : * @param GPIO_Init: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init) { 800218c: b5f0 push {r4, r5, r6, r7, lr} 800218e: b083 sub sp, #12 uint32_t position = 0x00U; 8002190: 2300 movs r3, #0 assert_param(IS_GPIO_ALL_INSTANCE(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Init->Pin)); assert_param(IS_GPIO_MODE(GPIO_Init->Mode)); /* Configure the port pins */ while (((GPIO_Init->Pin) >> position) != 0x00U) 8002192: e06b b.n 800226c { /* Check the Speed parameter */ assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); /* Configure the IO Speed */ temp = GPIOx->OSPEEDR; 8002194: 6885 ldr r5, [r0, #8] temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2U)); 8002196: 005e lsls r6, r3, #1 8002198: 2403 movs r4, #3 800219a: 40b4 lsls r4, r6 800219c: ea25 0504 bic.w r5, r5, r4 temp |= (GPIO_Init->Speed << (position * 2U)); 80021a0: 68cc ldr r4, [r1, #12] 80021a2: 40b4 lsls r4, r6 80021a4: 432c orrs r4, r5 GPIOx->OSPEEDR = temp; 80021a6: 6084 str r4, [r0, #8] /* Configure the IO Output Type */ temp = GPIOx->OTYPER; 80021a8: 6845 ldr r5, [r0, #4] temp &= ~(GPIO_OTYPER_OT0 << position) ; 80021aa: ea25 050c bic.w r5, r5, ip temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); 80021ae: 684c ldr r4, [r1, #4] 80021b0: f3c4 1400 ubfx r4, r4, #4, #1 80021b4: 409c lsls r4, r3 80021b6: 432c orrs r4, r5 GPIOx->OTYPER = temp; 80021b8: 6044 str r4, [r0, #4] 80021ba: e069 b.n 8002290 /* Check the Alternate function parameters */ assert_param(IS_GPIO_AF_INSTANCE(GPIOx)); assert_param(IS_GPIO_AF(GPIO_Init->Alternate)); /* Configure Alternate function mapped with the current IO */ temp = GPIOx->AFR[position >> 3U]; 80021bc: 08dd lsrs r5, r3, #3 80021be: 3508 adds r5, #8 80021c0: f850 4025 ldr.w r4, [r0, r5, lsl #2] temp &= ~(0xFU << ((position & 0x07U) * 4U)); 80021c4: f003 0c07 and.w ip, r3, #7 80021c8: ea4f 0c8c mov.w ip, ip, lsl #2 80021cc: f04f 0e0f mov.w lr, #15 80021d0: fa0e fe0c lsl.w lr, lr, ip 80021d4: ea24 0e0e bic.w lr, r4, lr temp |= ((GPIO_Init->Alternate) << ((position & 0x07U) * 4U)); 80021d8: 690c ldr r4, [r1, #16] 80021da: fa04 f40c lsl.w r4, r4, ip 80021de: ea44 040e orr.w r4, r4, lr GPIOx->AFR[position >> 3U] = temp; 80021e2: f840 4025 str.w r4, [r0, r5, lsl #2] 80021e6: e06b b.n 80022c0 /* Enable SYSCFG Clock */ __HAL_RCC_SYSCFG_CLK_ENABLE(); temp = SYSCFG->EXTICR[position >> 2U]; temp &= ~(0x0FUL << (4U * (position & 0x03U))); temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U))); 80021e8: 2409 movs r4, #9 80021ea: e000 b.n 80021ee 80021ec: 2400 movs r4, #0 80021ee: fa04 f40e lsl.w r4, r4, lr 80021f2: 432c orrs r4, r5 SYSCFG->EXTICR[position >> 2U] = temp; 80021f4: f10c 0c02 add.w ip, ip, #2 80021f8: 4d69 ldr r5, [pc, #420] @ (80023a0 ) 80021fa: f845 402c str.w r4, [r5, ip, lsl #2] /* Clear Rising Falling edge configuration */ temp = EXTI->RTSR1; 80021fe: f04f 44b0 mov.w r4, #1476395008 @ 0x58000000 8002202: 6825 ldr r5, [r4, #0] temp &= ~(iocurrent); 8002204: 43d4 mvns r4, r2 8002206: ea25 0602 bic.w r6, r5, r2 if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U) 800220a: 684f ldr r7, [r1, #4] 800220c: f417 1f80 tst.w r7, #1048576 @ 0x100000 8002210: d001 beq.n 8002216 { temp |= iocurrent; 8002212: ea42 0605 orr.w r6, r2, r5 } EXTI->RTSR1 = temp; 8002216: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000 800221a: 602e str r6, [r5, #0] temp = EXTI->FTSR1; 800221c: 686d ldr r5, [r5, #4] temp &= ~(iocurrent); 800221e: ea04 0605 and.w r6, r4, r5 if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U) 8002222: 684f ldr r7, [r1, #4] 8002224: f417 1f00 tst.w r7, #2097152 @ 0x200000 8002228: d001 beq.n 800222e { temp |= iocurrent; 800222a: ea42 0605 orr.w r6, r2, r5 } EXTI->FTSR1 = temp; 800222e: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000 8002232: 606e str r6, [r5, #4] temp = EXTI_CurrentCPU->EMR1; 8002234: f8d5 5084 ldr.w r5, [r5, #132] @ 0x84 temp &= ~(iocurrent); 8002238: ea04 0605 and.w r6, r4, r5 if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U) 800223c: 684f ldr r7, [r1, #4] 800223e: f417 3f00 tst.w r7, #131072 @ 0x20000 8002242: d001 beq.n 8002248 { temp |= iocurrent; 8002244: ea42 0605 orr.w r6, r2, r5 } EXTI_CurrentCPU->EMR1 = temp; 8002248: f04f 45b0 mov.w r5, #1476395008 @ 0x58000000 800224c: f8c5 6084 str.w r6, [r5, #132] @ 0x84 /* Clear EXTI line configuration */ temp = EXTI_CurrentCPU->IMR1; 8002250: f8d5 5080 ldr.w r5, [r5, #128] @ 0x80 temp &= ~(iocurrent); 8002254: 402c ands r4, r5 if ((GPIO_Init->Mode & EXTI_IT) != 0x00U) 8002256: 684e ldr r6, [r1, #4] 8002258: f416 3f80 tst.w r6, #65536 @ 0x10000 800225c: d001 beq.n 8002262 { temp |= iocurrent; 800225e: ea42 0405 orr.w r4, r2, r5 } EXTI_CurrentCPU->IMR1 = temp; 8002262: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 8002266: f8c2 4080 str.w r4, [r2, #128] @ 0x80 } } position++; 800226a: 3301 adds r3, #1 while (((GPIO_Init->Pin) >> position) != 0x00U) 800226c: 680a ldr r2, [r1, #0] 800226e: fa32 f403 lsrs.w r4, r2, r3 8002272: f000 8092 beq.w 800239a iocurrent = (GPIO_Init->Pin) & (1UL << position); 8002276: f04f 0c01 mov.w ip, #1 800227a: fa0c fc03 lsl.w ip, ip, r3 if (iocurrent != 0x00U) 800227e: ea1c 0202 ands.w r2, ip, r2 8002282: d0f2 beq.n 800226a if (((GPIO_Init->Mode & GPIO_MODE) == MODE_OUTPUT) || ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF)) 8002284: 684c ldr r4, [r1, #4] 8002286: f004 0403 and.w r4, r4, #3 800228a: 3c01 subs r4, #1 800228c: 2c01 cmp r4, #1 800228e: d981 bls.n 8002194 if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) 8002290: 684c ldr r4, [r1, #4] 8002292: f004 0403 and.w r4, r4, #3 8002296: 2c03 cmp r4, #3 8002298: d00c beq.n 80022b4 temp = GPIOx->PUPDR; 800229a: 68c4 ldr r4, [r0, #12] temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U)); 800229c: 005d lsls r5, r3, #1 800229e: f04f 0c03 mov.w ip, #3 80022a2: fa0c fc05 lsl.w ip, ip, r5 80022a6: ea24 0c0c bic.w ip, r4, ip temp |= ((GPIO_Init->Pull) << (position * 2U)); 80022aa: 688c ldr r4, [r1, #8] 80022ac: 40ac lsls r4, r5 80022ae: ea44 040c orr.w r4, r4, ip GPIOx->PUPDR = temp; 80022b2: 60c4 str r4, [r0, #12] if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) 80022b4: 684c ldr r4, [r1, #4] 80022b6: f004 0403 and.w r4, r4, #3 80022ba: 2c02 cmp r4, #2 80022bc: f43f af7e beq.w 80021bc temp = GPIOx->MODER; 80022c0: 6804 ldr r4, [r0, #0] temp &= ~(GPIO_MODER_MODE0 << (position * 2U)); 80022c2: ea4f 0e43 mov.w lr, r3, lsl #1 80022c6: f04f 0c03 mov.w ip, #3 80022ca: fa0c fc0e lsl.w ip, ip, lr 80022ce: ea24 0c0c bic.w ip, r4, ip temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U)); 80022d2: 684c ldr r4, [r1, #4] 80022d4: f004 0403 and.w r4, r4, #3 80022d8: fa04 f40e lsl.w r4, r4, lr 80022dc: ea44 040c orr.w r4, r4, ip GPIOx->MODER = temp; 80022e0: 6004 str r4, [r0, #0] if ((GPIO_Init->Mode & EXTI_MODE) != 0x00U) 80022e2: 684c ldr r4, [r1, #4] 80022e4: f414 3f40 tst.w r4, #196608 @ 0x30000 80022e8: d0bf beq.n 800226a __HAL_RCC_SYSCFG_CLK_ENABLE(); 80022ea: 4c2e ldr r4, [pc, #184] @ (80023a4 ) 80022ec: f8d4 50f4 ldr.w r5, [r4, #244] @ 0xf4 80022f0: f045 0502 orr.w r5, r5, #2 80022f4: f8c4 50f4 str.w r5, [r4, #244] @ 0xf4 80022f8: f8d4 40f4 ldr.w r4, [r4, #244] @ 0xf4 80022fc: f004 0402 and.w r4, r4, #2 8002300: 9401 str r4, [sp, #4] 8002302: 9c01 ldr r4, [sp, #4] temp = SYSCFG->EXTICR[position >> 2U]; 8002304: ea4f 0c93 mov.w ip, r3, lsr #2 8002308: f10c 0502 add.w r5, ip, #2 800230c: 4c24 ldr r4, [pc, #144] @ (80023a0 ) 800230e: f854 5025 ldr.w r5, [r4, r5, lsl #2] temp &= ~(0x0FUL << (4U * (position & 0x03U))); 8002312: f003 0e03 and.w lr, r3, #3 8002316: ea4f 0e8e mov.w lr, lr, lsl #2 800231a: 240f movs r4, #15 800231c: fa04 f40e lsl.w r4, r4, lr 8002320: ea25 0504 bic.w r5, r5, r4 temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U))); 8002324: 4c20 ldr r4, [pc, #128] @ (80023a8 ) 8002326: 42a0 cmp r0, r4 8002328: f43f af60 beq.w 80021ec 800232c: f504 6480 add.w r4, r4, #1024 @ 0x400 8002330: 42a0 cmp r0, r4 8002332: d022 beq.n 800237a 8002334: f504 6480 add.w r4, r4, #1024 @ 0x400 8002338: 42a0 cmp r0, r4 800233a: d020 beq.n 800237e 800233c: f504 6480 add.w r4, r4, #1024 @ 0x400 8002340: 42a0 cmp r0, r4 8002342: d01e beq.n 8002382 8002344: f504 6480 add.w r4, r4, #1024 @ 0x400 8002348: 42a0 cmp r0, r4 800234a: d01c beq.n 8002386 800234c: f504 6480 add.w r4, r4, #1024 @ 0x400 8002350: 42a0 cmp r0, r4 8002352: d01a beq.n 800238a 8002354: f504 6480 add.w r4, r4, #1024 @ 0x400 8002358: 42a0 cmp r0, r4 800235a: d018 beq.n 800238e 800235c: f504 6480 add.w r4, r4, #1024 @ 0x400 8002360: 42a0 cmp r0, r4 8002362: d016 beq.n 8002392 8002364: f504 6480 add.w r4, r4, #1024 @ 0x400 8002368: 42a0 cmp r0, r4 800236a: d014 beq.n 8002396 800236c: f504 6480 add.w r4, r4, #1024 @ 0x400 8002370: 42a0 cmp r0, r4 8002372: f43f af39 beq.w 80021e8 8002376: 240a movs r4, #10 8002378: e739 b.n 80021ee 800237a: 2401 movs r4, #1 800237c: e737 b.n 80021ee 800237e: 2402 movs r4, #2 8002380: e735 b.n 80021ee 8002382: 2403 movs r4, #3 8002384: e733 b.n 80021ee 8002386: 2404 movs r4, #4 8002388: e731 b.n 80021ee 800238a: 2405 movs r4, #5 800238c: e72f b.n 80021ee 800238e: 2406 movs r4, #6 8002390: e72d b.n 80021ee 8002392: 2407 movs r4, #7 8002394: e72b b.n 80021ee 8002396: 2408 movs r4, #8 8002398: e729 b.n 80021ee } } 800239a: b003 add sp, #12 800239c: bdf0 pop {r4, r5, r6, r7, pc} 800239e: bf00 nop 80023a0: 58000400 .word 0x58000400 80023a4: 58024400 .word 0x58024400 80023a8: 58020000 .word 0x58020000 080023ac : /*take success when MasterID match and take bit set*/ return HAL_OK; } #else /* Read the RLR register to take the semaphore */ if (HSEM->RLR[SemID] == (HSEM_CR_COREID_CURRENT | HSEM_RLR_LOCK)) 80023ac: 3020 adds r0, #32 80023ae: 4b05 ldr r3, [pc, #20] @ (80023c4 ) 80023b0: f853 2020 ldr.w r2, [r3, r0, lsl #2] 80023b4: 4b04 ldr r3, [pc, #16] @ (80023c8 ) 80023b6: 429a cmp r2, r3 80023b8: d001 beq.n 80023be return HAL_OK; } #endif /* Semaphore take fails */ return HAL_ERROR; 80023ba: 2001 movs r0, #1 80023bc: 4770 bx lr return HAL_OK; 80023be: 2000 movs r0, #0 } 80023c0: 4770 bx lr 80023c2: bf00 nop 80023c4: 58026400 .word 0x58026400 80023c8: 80000300 .word 0x80000300 080023cc : /* Clear the semaphore by writing to the R register : the MasterID , the processID and take bit = 0 */ #if USE_MULTI_CORE_SHARED_CODE != 0U HSEM->R[SemID] = (ProcessID | ((HAL_GetCurrentCPUID() << POSITION_VAL(HSEM_R_MASTERID)) & HSEM_R_MASTERID)); #else HSEM->R[SemID] = (ProcessID | HSEM_CR_COREID_CURRENT); 80023cc: f441 7140 orr.w r1, r1, #768 @ 0x300 80023d0: 4b01 ldr r3, [pc, #4] @ (80023d8 ) 80023d2: f843 1020 str.w r1, [r3, r0, lsl #2] #endif } 80023d6: 4770 bx lr 80023d8: 58026400 .word 0x58026400 080023dc : * PWR_SMPS_2V5_SUPPLIES_EXT are used only for lines that supports SMPS * regulator. * @retval HAL status. */ HAL_StatusTypeDef HAL_PWREx_ConfigSupply (uint32_t SupplySource) { 80023dc: b538 push {r3, r4, r5, lr} 80023de: 4604 mov r4, r0 /* Check if supply source was configured */ #if defined (PWR_FLAG_SCUEN) if (__HAL_PWR_GET_FLAG (PWR_FLAG_SCUEN) == 0U) #else if ((PWR->CR3 & (PWR_CR3_SMPSEN | PWR_CR3_LDOEN | PWR_CR3_BYPASS)) != (PWR_CR3_SMPSEN | PWR_CR3_LDOEN)) 80023e0: 4b22 ldr r3, [pc, #136] @ (800246c ) 80023e2: 68db ldr r3, [r3, #12] 80023e4: f003 0307 and.w r3, r3, #7 80023e8: 2b06 cmp r3, #6 80023ea: d007 beq.n 80023fc #endif /* defined (PWR_FLAG_SCUEN) */ { /* Check supply configuration */ if ((PWR->CR3 & PWR_SUPPLY_CONFIG_MASK) != SupplySource) 80023ec: 4b1f ldr r3, [pc, #124] @ (800246c ) 80023ee: 68db ldr r3, [r3, #12] 80023f0: f003 033f and.w r3, r3, #63 @ 0x3f 80023f4: 4283 cmp r3, r0 80023f6: d036 beq.n 8002466 { /* Supply configuration update locked, can't apply a new supply config */ return HAL_ERROR; 80023f8: 2001 movs r0, #1 } } #endif /* defined (SMPS) */ return HAL_OK; } 80023fa: bd38 pop {r3, r4, r5, pc} MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource); 80023fc: 4a1b ldr r2, [pc, #108] @ (800246c ) 80023fe: 68d3 ldr r3, [r2, #12] 8002400: f023 033f bic.w r3, r3, #63 @ 0x3f 8002404: 4303 orrs r3, r0 8002406: 60d3 str r3, [r2, #12] tickstart = HAL_GetTick (); 8002408: f7fe fd40 bl 8000e8c 800240c: 4605 mov r5, r0 while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 800240e: 4b17 ldr r3, [pc, #92] @ (800246c ) 8002410: 685b ldr r3, [r3, #4] 8002412: f413 5f00 tst.w r3, #8192 @ 0x2000 8002416: d107 bne.n 8002428 if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY) 8002418: f7fe fd38 bl 8000e8c 800241c: 1b43 subs r3, r0, r5 800241e: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8002422: d9f4 bls.n 800240e return HAL_ERROR; 8002424: 2001 movs r0, #1 8002426: e7e8 b.n 80023fa if ((SupplySource == PWR_SMPS_1V8_SUPPLIES_EXT_AND_LDO) || 8002428: 2c2e cmp r4, #46 @ 0x2e 800242a: bf18 it ne 800242c: 2c1e cmpne r4, #30 800242e: d008 beq.n 8002442 (SupplySource == PWR_SMPS_2V5_SUPPLIES_EXT)) 8002430: 2c2d cmp r4, #45 @ 0x2d 8002432: bf14 ite ne 8002434: 2300 movne r3, #0 8002436: 2301 moveq r3, #1 (SupplySource == PWR_SMPS_1V8_SUPPLIES_EXT) || 8002438: 2c1d cmp r4, #29 800243a: d002 beq.n 8002442 800243c: b90b cbnz r3, 8002442 return HAL_OK; 800243e: 2000 movs r0, #0 8002440: e7db b.n 80023fa tickstart = HAL_GetTick (); 8002442: f7fe fd23 bl 8000e8c 8002446: 4604 mov r4, r0 while (__HAL_PWR_GET_FLAG (PWR_FLAG_SMPSEXTRDY) == 0U) 8002448: 4b08 ldr r3, [pc, #32] @ (800246c ) 800244a: 68db ldr r3, [r3, #12] 800244c: f413 3f80 tst.w r3, #65536 @ 0x10000 8002450: d107 bne.n 8002462 if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY) 8002452: f7fe fd1b bl 8000e8c 8002456: 1b00 subs r0, r0, r4 8002458: f5b0 7f7a cmp.w r0, #1000 @ 0x3e8 800245c: d9f4 bls.n 8002448 return HAL_ERROR; 800245e: 2001 movs r0, #1 8002460: e7cb b.n 80023fa return HAL_OK; 8002462: 2000 movs r0, #0 8002464: e7c9 b.n 80023fa return HAL_OK; 8002466: 2000 movs r0, #0 8002468: e7c7 b.n 80023fa 800246a: bf00 nop 800246c: 58024800 .word 0x58024800 08002470 : { uint32_t tickstart; uint32_t temp1_pllckcfg, temp2_pllckcfg; /* Check Null pointer */ if(RCC_OscInitStruct == NULL) 8002470: 2800 cmp r0, #0 8002472: f000 8318 beq.w 8002aa6 { 8002476: b538 push {r3, r4, r5, lr} 8002478: 4604 mov r4, r0 } /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 800247a: 6803 ldr r3, [r0, #0] 800247c: f013 0f01 tst.w r3, #1 8002480: d025 beq.n 80024ce { /* Check the parameters */ assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 8002482: 4a94 ldr r2, [pc, #592] @ (80026d4 ) 8002484: 6913 ldr r3, [r2, #16] 8002486: f003 0338 and.w r3, r3, #56 @ 0x38 const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800248a: 6a92 ldr r2, [r2, #40] @ 0x28 /* When the HSE is used as system clock or clock source for PLL in these cases HSE will not disabled */ if((temp_sysclksrc == RCC_CFGR_SWS_HSE) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSE))) 800248c: 2b10 cmp r3, #16 800248e: d015 beq.n 80024bc 8002490: 2b18 cmp r3, #24 8002492: d00f beq.n 80024b4 } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 8002494: 6863 ldr r3, [r4, #4] 8002496: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800249a: d03f beq.n 800251c 800249c: 2b00 cmp r3, #0 800249e: d153 bne.n 8002548 80024a0: 4b8c ldr r3, [pc, #560] @ (80026d4 ) 80024a2: 681a ldr r2, [r3, #0] 80024a4: f422 3280 bic.w r2, r2, #65536 @ 0x10000 80024a8: 601a str r2, [r3, #0] 80024aa: 681a ldr r2, [r3, #0] 80024ac: f422 2280 bic.w r2, r2, #262144 @ 0x40000 80024b0: 601a str r2, [r3, #0] 80024b2: e038 b.n 8002526 if((temp_sysclksrc == RCC_CFGR_SWS_HSE) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSE))) 80024b4: f002 0203 and.w r2, r2, #3 80024b8: 2a02 cmp r2, #2 80024ba: d1eb bne.n 8002494 if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 80024bc: 4b85 ldr r3, [pc, #532] @ (80026d4 ) 80024be: 681b ldr r3, [r3, #0] 80024c0: f413 3f00 tst.w r3, #131072 @ 0x20000 80024c4: d003 beq.n 80024ce 80024c6: 6863 ldr r3, [r4, #4] 80024c8: 2b00 cmp r3, #0 80024ca: f000 82ee beq.w 8002aaa } } } } /*----------------------------- HSI Configuration --------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 80024ce: 6823 ldr r3, [r4, #0] 80024d0: f013 0f02 tst.w r3, #2 80024d4: f000 80a1 beq.w 800261a /* Check the parameters */ assert_param(IS_RCC_HSI(RCC_OscInitStruct->HSIState)); assert_param(IS_RCC_HSICALIBRATION_VALUE(RCC_OscInitStruct->HSICalibrationValue)); /* When the HSI is used as system clock it will not be disabled */ const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 80024d8: 4a7e ldr r2, [pc, #504] @ (80026d4 ) 80024da: 6913 ldr r3, [r2, #16] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 80024dc: 6a92 ldr r2, [r2, #40] @ 0x28 if((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI))) 80024de: f013 0338 ands.w r3, r3, #56 @ 0x38 80024e2: d05a beq.n 800259a 80024e4: 2b18 cmp r3, #24 80024e6: d055 beq.n 8002594 } else { /* Check the HSI State */ if((RCC_OscInitStruct->HSIState)!= RCC_HSI_OFF) 80024e8: 68e3 ldr r3, [r4, #12] 80024ea: 2b00 cmp r3, #0 80024ec: f000 80de beq.w 80026ac { /* Enable the Internal High Speed oscillator (HSI, HSIDIV2,HSIDIV4, or HSIDIV8) */ __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 80024f0: 4978 ldr r1, [pc, #480] @ (80026d4 ) 80024f2: 680a ldr r2, [r1, #0] 80024f4: f022 0219 bic.w r2, r2, #25 80024f8: 4313 orrs r3, r2 80024fa: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 80024fc: f7fe fcc6 bl 8000e8c 8002500: 4605 mov r5, r0 /* Wait till HSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8002502: 4b74 ldr r3, [pc, #464] @ (80026d4 ) 8002504: 681b ldr r3, [r3, #0] 8002506: f013 0f04 tst.w r3, #4 800250a: f040 80ad bne.w 8002668 { if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) 800250e: f7fe fcbd bl 8000e8c 8002512: 1b40 subs r0, r0, r5 8002514: 2802 cmp r0, #2 8002516: d9f4 bls.n 8002502 { return HAL_TIMEOUT; 8002518: 2003 movs r0, #3 800251a: e2cd b.n 8002ab8 __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 800251c: 4a6d ldr r2, [pc, #436] @ (80026d4 ) 800251e: 6813 ldr r3, [r2, #0] 8002520: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8002524: 6013 str r3, [r2, #0] if(RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 8002526: 6863 ldr r3, [r4, #4] 8002528: b32b cbz r3, 8002576 tickstart = HAL_GetTick(); 800252a: f7fe fcaf bl 8000e8c 800252e: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 8002530: 4b68 ldr r3, [pc, #416] @ (80026d4 ) 8002532: 681b ldr r3, [r3, #0] 8002534: f413 3f00 tst.w r3, #131072 @ 0x20000 8002538: d1c9 bne.n 80024ce if((uint32_t) (HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) 800253a: f7fe fca7 bl 8000e8c 800253e: 1b40 subs r0, r0, r5 8002540: 2864 cmp r0, #100 @ 0x64 8002542: d9f5 bls.n 8002530 return HAL_TIMEOUT; 8002544: 2003 movs r0, #3 8002546: e2b7 b.n 8002ab8 __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 8002548: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800254c: d009 beq.n 8002562 800254e: 4b61 ldr r3, [pc, #388] @ (80026d4 ) 8002550: 681a ldr r2, [r3, #0] 8002552: f422 3280 bic.w r2, r2, #65536 @ 0x10000 8002556: 601a str r2, [r3, #0] 8002558: 681a ldr r2, [r3, #0] 800255a: f422 2280 bic.w r2, r2, #262144 @ 0x40000 800255e: 601a str r2, [r3, #0] 8002560: e7e1 b.n 8002526 8002562: 4b5c ldr r3, [pc, #368] @ (80026d4 ) 8002564: 681a ldr r2, [r3, #0] 8002566: f442 2280 orr.w r2, r2, #262144 @ 0x40000 800256a: 601a str r2, [r3, #0] 800256c: 681a ldr r2, [r3, #0] 800256e: f442 3280 orr.w r2, r2, #65536 @ 0x10000 8002572: 601a str r2, [r3, #0] 8002574: e7d7 b.n 8002526 tickstart = HAL_GetTick(); 8002576: f7fe fc89 bl 8000e8c 800257a: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 800257c: 4b55 ldr r3, [pc, #340] @ (80026d4 ) 800257e: 681b ldr r3, [r3, #0] 8002580: f413 3f00 tst.w r3, #131072 @ 0x20000 8002584: d0a3 beq.n 80024ce if((uint32_t) (HAL_GetTick() - tickstart ) > HSE_TIMEOUT_VALUE) 8002586: f7fe fc81 bl 8000e8c 800258a: 1b40 subs r0, r0, r5 800258c: 2864 cmp r0, #100 @ 0x64 800258e: d9f5 bls.n 800257c return HAL_TIMEOUT; 8002590: 2003 movs r0, #3 8002592: e291 b.n 8002ab8 if((temp_sysclksrc == RCC_CFGR_SWS_HSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_HSI))) 8002594: f012 0f03 tst.w r2, #3 8002598: d1a6 bne.n 80024e8 if((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800259a: 4b4e ldr r3, [pc, #312] @ (80026d4 ) 800259c: 681b ldr r3, [r3, #0] 800259e: f013 0f04 tst.w r3, #4 80025a2: d003 beq.n 80025ac 80025a4: 68e3 ldr r3, [r4, #12] 80025a6: 2b00 cmp r3, #0 80025a8: f000 8281 beq.w 8002aae __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 80025ac: 4a49 ldr r2, [pc, #292] @ (80026d4 ) 80025ae: 6813 ldr r3, [r2, #0] 80025b0: f023 0319 bic.w r3, r3, #25 80025b4: 68e1 ldr r1, [r4, #12] 80025b6: 430b orrs r3, r1 80025b8: 6013 str r3, [r2, #0] tickstart = HAL_GetTick(); 80025ba: f7fe fc67 bl 8000e8c 80025be: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 80025c0: 4b44 ldr r3, [pc, #272] @ (80026d4 ) 80025c2: 681b ldr r3, [r3, #0] 80025c4: f013 0f04 tst.w r3, #4 80025c8: d106 bne.n 80025d8 if((uint32_t) (HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) 80025ca: f7fe fc5f bl 8000e8c 80025ce: 1b40 subs r0, r0, r5 80025d0: 2802 cmp r0, #2 80025d2: d9f5 bls.n 80025c0 return HAL_TIMEOUT; 80025d4: 2003 movs r0, #3 80025d6: e26f b.n 8002ab8 __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 80025d8: f7fe fc5e bl 8000e98 80025dc: f241 0303 movw r3, #4099 @ 0x1003 80025e0: 4298 cmp r0, r3 80025e2: d812 bhi.n 800260a 80025e4: 6922 ldr r2, [r4, #16] 80025e6: 2a40 cmp r2, #64 @ 0x40 80025e8: d007 beq.n 80025fa 80025ea: 493a ldr r1, [pc, #232] @ (80026d4 ) 80025ec: 684b ldr r3, [r1, #4] 80025ee: f423 337c bic.w r3, r3, #258048 @ 0x3f000 80025f2: ea43 3302 orr.w r3, r3, r2, lsl #12 80025f6: 604b str r3, [r1, #4] 80025f8: e00f b.n 800261a 80025fa: 4a36 ldr r2, [pc, #216] @ (80026d4 ) 80025fc: 6853 ldr r3, [r2, #4] 80025fe: f423 337c bic.w r3, r3, #258048 @ 0x3f000 8002602: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8002606: 6053 str r3, [r2, #4] 8002608: e007 b.n 800261a 800260a: 4a32 ldr r2, [pc, #200] @ (80026d4 ) 800260c: 6853 ldr r3, [r2, #4] 800260e: f023 43fe bic.w r3, r3, #2130706432 @ 0x7f000000 8002612: 6921 ldr r1, [r4, #16] 8002614: ea43 6301 orr.w r3, r3, r1, lsl #24 8002618: 6053 str r3, [r2, #4] } } } } /*----------------------------- CSI Configuration --------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI) 800261a: 6823 ldr r3, [r4, #0] 800261c: f013 0f10 tst.w r3, #16 8002620: f000 8088 beq.w 8002734 /* Check the parameters */ assert_param(IS_RCC_CSI(RCC_OscInitStruct->CSIState)); assert_param(IS_RCC_CSICALIBRATION_VALUE(RCC_OscInitStruct->CSICalibrationValue)); /* When the CSI is used as system clock it will not disabled */ const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 8002624: 4a2b ldr r2, [pc, #172] @ (80026d4 ) 8002626: 6913 ldr r3, [r2, #16] 8002628: f003 0338 and.w r3, r3, #56 @ 0x38 const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800262c: 6a92 ldr r2, [r2, #40] @ 0x28 if((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI))) 800262e: 2b08 cmp r3, #8 8002630: d056 beq.n 80026e0 8002632: 2b18 cmp r3, #24 8002634: d050 beq.n 80026d8 } } else { /* Check the CSI State */ if((RCC_OscInitStruct->CSIState)!= RCC_CSI_OFF) 8002636: 69e3 ldr r3, [r4, #28] 8002638: 2b00 cmp r3, #0 800263a: f000 80b8 beq.w 80027ae { /* Enable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_ENABLE(); 800263e: 4a25 ldr r2, [pc, #148] @ (80026d4 ) 8002640: 6813 ldr r3, [r2, #0] 8002642: f043 0380 orr.w r3, r3, #128 @ 0x80 8002646: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8002648: f7fe fc20 bl 8000e8c 800264c: 4605 mov r5, r0 /* Wait till CSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800264e: 4b21 ldr r3, [pc, #132] @ (80026d4 ) 8002650: 681b ldr r3, [r3, #0] 8002652: f413 7f80 tst.w r3, #256 @ 0x100 8002656: f040 8088 bne.w 800276a { if((HAL_GetTick() - tickstart ) > CSI_TIMEOUT_VALUE) 800265a: f7fe fc17 bl 8000e8c 800265e: 1b40 subs r0, r0, r5 8002660: 2802 cmp r0, #2 8002662: d9f4 bls.n 800264e { return HAL_TIMEOUT; 8002664: 2003 movs r0, #3 8002666: e227 b.n 8002ab8 __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 8002668: f7fe fc16 bl 8000e98 800266c: f241 0303 movw r3, #4099 @ 0x1003 8002670: 4298 cmp r0, r3 8002672: d812 bhi.n 800269a 8002674: 6922 ldr r2, [r4, #16] 8002676: 2a40 cmp r2, #64 @ 0x40 8002678: d007 beq.n 800268a 800267a: 4916 ldr r1, [pc, #88] @ (80026d4 ) 800267c: 684b ldr r3, [r1, #4] 800267e: f423 337c bic.w r3, r3, #258048 @ 0x3f000 8002682: ea43 3302 orr.w r3, r3, r2, lsl #12 8002686: 604b str r3, [r1, #4] 8002688: e7c7 b.n 800261a 800268a: 4a12 ldr r2, [pc, #72] @ (80026d4 ) 800268c: 6853 ldr r3, [r2, #4] 800268e: f423 337c bic.w r3, r3, #258048 @ 0x3f000 8002692: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8002696: 6053 str r3, [r2, #4] 8002698: e7bf b.n 800261a 800269a: 4a0e ldr r2, [pc, #56] @ (80026d4 ) 800269c: 6853 ldr r3, [r2, #4] 800269e: f023 43fe bic.w r3, r3, #2130706432 @ 0x7f000000 80026a2: 6921 ldr r1, [r4, #16] 80026a4: ea43 6301 orr.w r3, r3, r1, lsl #24 80026a8: 6053 str r3, [r2, #4] 80026aa: e7b6 b.n 800261a __HAL_RCC_HSI_DISABLE(); 80026ac: 4a09 ldr r2, [pc, #36] @ (80026d4 ) 80026ae: 6813 ldr r3, [r2, #0] 80026b0: f023 0301 bic.w r3, r3, #1 80026b4: 6013 str r3, [r2, #0] tickstart = HAL_GetTick(); 80026b6: f7fe fbe9 bl 8000e8c 80026ba: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 80026bc: 4b05 ldr r3, [pc, #20] @ (80026d4 ) 80026be: 681b ldr r3, [r3, #0] 80026c0: f013 0f04 tst.w r3, #4 80026c4: d0a9 beq.n 800261a if((HAL_GetTick() - tickstart ) > HSI_TIMEOUT_VALUE) 80026c6: f7fe fbe1 bl 8000e8c 80026ca: 1b40 subs r0, r0, r5 80026cc: 2802 cmp r0, #2 80026ce: d9f5 bls.n 80026bc return HAL_TIMEOUT; 80026d0: 2003 movs r0, #3 80026d2: e1f1 b.n 8002ab8 80026d4: 58024400 .word 0x58024400 if((temp_sysclksrc == RCC_CFGR_SWS_CSI) || ((temp_sysclksrc == RCC_CFGR_SWS_PLL1) && ((temp_pllckselr & RCC_PLLCKSELR_PLLSRC) == RCC_PLLCKSELR_PLLSRC_CSI))) 80026d8: f002 0203 and.w r2, r2, #3 80026dc: 2a01 cmp r2, #1 80026de: d1aa bne.n 8002636 if((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 80026e0: 4ba1 ldr r3, [pc, #644] @ (8002968 ) 80026e2: 681b ldr r3, [r3, #0] 80026e4: f413 7f80 tst.w r3, #256 @ 0x100 80026e8: d003 beq.n 80026f2 80026ea: 69e3 ldr r3, [r4, #28] 80026ec: 2b80 cmp r3, #128 @ 0x80 80026ee: f040 81e0 bne.w 8002ab2 __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 80026f2: f7fe fbd1 bl 8000e98 80026f6: f241 0303 movw r3, #4099 @ 0x1003 80026fa: 4298 cmp r0, r3 80026fc: d812 bhi.n 8002724 80026fe: 6a22 ldr r2, [r4, #32] 8002700: 2a20 cmp r2, #32 8002702: d007 beq.n 8002714 8002704: 4998 ldr r1, [pc, #608] @ (8002968 ) 8002706: 684b ldr r3, [r1, #4] 8002708: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 800270c: ea43 6382 orr.w r3, r3, r2, lsl #26 8002710: 604b str r3, [r1, #4] 8002712: e00f b.n 8002734 8002714: 4a94 ldr r2, [pc, #592] @ (8002968 ) 8002716: 6853 ldr r3, [r2, #4] 8002718: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 800271c: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 8002720: 6053 str r3, [r2, #4] 8002722: e007 b.n 8002734 8002724: 4a90 ldr r2, [pc, #576] @ (8002968 ) 8002726: 68d3 ldr r3, [r2, #12] 8002728: f023 537c bic.w r3, r3, #1056964608 @ 0x3f000000 800272c: 6a21 ldr r1, [r4, #32] 800272e: ea43 6301 orr.w r3, r3, r1, lsl #24 8002732: 60d3 str r3, [r2, #12] } } } } /*------------------------------ LSI Configuration -------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 8002734: 6823 ldr r3, [r4, #0] 8002736: f013 0f08 tst.w r3, #8 800273a: d060 beq.n 80027fe { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if((RCC_OscInitStruct->LSIState)!= RCC_LSI_OFF) 800273c: 6963 ldr r3, [r4, #20] 800273e: 2b00 cmp r3, #0 8002740: d049 beq.n 80027d6 { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 8002742: 4a89 ldr r2, [pc, #548] @ (8002968 ) 8002744: 6f53 ldr r3, [r2, #116] @ 0x74 8002746: f043 0301 orr.w r3, r3, #1 800274a: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 800274c: f7fe fb9e bl 8000e8c 8002750: 4605 mov r5, r0 /* Wait till LSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 8002752: 4b85 ldr r3, [pc, #532] @ (8002968 ) 8002754: 6f5b ldr r3, [r3, #116] @ 0x74 8002756: f013 0f02 tst.w r3, #2 800275a: d150 bne.n 80027fe { if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) 800275c: f7fe fb96 bl 8000e8c 8002760: 1b40 subs r0, r0, r5 8002762: 2802 cmp r0, #2 8002764: d9f5 bls.n 8002752 { return HAL_TIMEOUT; 8002766: 2003 movs r0, #3 8002768: e1a6 b.n 8002ab8 __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800276a: f7fe fb95 bl 8000e98 800276e: f241 0303 movw r3, #4099 @ 0x1003 8002772: 4298 cmp r0, r3 8002774: d812 bhi.n 800279c 8002776: 6a22 ldr r2, [r4, #32] 8002778: 2a20 cmp r2, #32 800277a: d007 beq.n 800278c 800277c: 497a ldr r1, [pc, #488] @ (8002968 ) 800277e: 684b ldr r3, [r1, #4] 8002780: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 8002784: ea43 6382 orr.w r3, r3, r2, lsl #26 8002788: 604b str r3, [r1, #4] 800278a: e7d3 b.n 8002734 800278c: 4a76 ldr r2, [pc, #472] @ (8002968 ) 800278e: 6853 ldr r3, [r2, #4] 8002790: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 8002794: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 8002798: 6053 str r3, [r2, #4] 800279a: e7cb b.n 8002734 800279c: 4a72 ldr r2, [pc, #456] @ (8002968 ) 800279e: 68d3 ldr r3, [r2, #12] 80027a0: f023 537c bic.w r3, r3, #1056964608 @ 0x3f000000 80027a4: 6a21 ldr r1, [r4, #32] 80027a6: ea43 6301 orr.w r3, r3, r1, lsl #24 80027aa: 60d3 str r3, [r2, #12] 80027ac: e7c2 b.n 8002734 __HAL_RCC_CSI_DISABLE(); 80027ae: 4a6e ldr r2, [pc, #440] @ (8002968 ) 80027b0: 6813 ldr r3, [r2, #0] 80027b2: f023 0380 bic.w r3, r3, #128 @ 0x80 80027b6: 6013 str r3, [r2, #0] tickstart = HAL_GetTick(); 80027b8: f7fe fb68 bl 8000e8c 80027bc: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 80027be: 4b6a ldr r3, [pc, #424] @ (8002968 ) 80027c0: 681b ldr r3, [r3, #0] 80027c2: f413 7f80 tst.w r3, #256 @ 0x100 80027c6: d0b5 beq.n 8002734 if((HAL_GetTick() - tickstart ) > CSI_TIMEOUT_VALUE) 80027c8: f7fe fb60 bl 8000e8c 80027cc: 1b40 subs r0, r0, r5 80027ce: 2802 cmp r0, #2 80027d0: d9f5 bls.n 80027be return HAL_TIMEOUT; 80027d2: 2003 movs r0, #3 80027d4: e170 b.n 8002ab8 } } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 80027d6: 4a64 ldr r2, [pc, #400] @ (8002968 ) 80027d8: 6f53 ldr r3, [r2, #116] @ 0x74 80027da: f023 0301 bic.w r3, r3, #1 80027de: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 80027e0: f7fe fb54 bl 8000e8c 80027e4: 4605 mov r5, r0 /* Wait till LSI is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 80027e6: 4b60 ldr r3, [pc, #384] @ (8002968 ) 80027e8: 6f5b ldr r3, [r3, #116] @ 0x74 80027ea: f013 0f02 tst.w r3, #2 80027ee: d006 beq.n 80027fe { if((HAL_GetTick() - tickstart ) > LSI_TIMEOUT_VALUE) 80027f0: f7fe fb4c bl 8000e8c 80027f4: 1b40 subs r0, r0, r5 80027f6: 2802 cmp r0, #2 80027f8: d9f5 bls.n 80027e6 { return HAL_TIMEOUT; 80027fa: 2003 movs r0, #3 80027fc: e15c b.n 8002ab8 } } } /*------------------------------ HSI48 Configuration -------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) 80027fe: 6823 ldr r3, [r4, #0] 8002800: f013 0f20 tst.w r3, #32 8002804: d029 beq.n 800285a { /* Check the parameters */ assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); /* Check the HSI48 State */ if((RCC_OscInitStruct->HSI48State)!= RCC_HSI48_OFF) 8002806: 69a3 ldr r3, [r4, #24] 8002808: b19b cbz r3, 8002832 { /* Enable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_ENABLE(); 800280a: 4a57 ldr r2, [pc, #348] @ (8002968 ) 800280c: 6813 ldr r3, [r2, #0] 800280e: f443 5380 orr.w r3, r3, #4096 @ 0x1000 8002812: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 8002814: f7fe fb3a bl 8000e8c 8002818: 4605 mov r5, r0 /* Wait till HSI48 is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 800281a: 4b53 ldr r3, [pc, #332] @ (8002968 ) 800281c: 681b ldr r3, [r3, #0] 800281e: f413 5f00 tst.w r3, #8192 @ 0x2000 8002822: d11a bne.n 800285a { if((HAL_GetTick() - tickstart ) > HSI48_TIMEOUT_VALUE) 8002824: f7fe fb32 bl 8000e8c 8002828: 1b40 subs r0, r0, r5 800282a: 2802 cmp r0, #2 800282c: d9f5 bls.n 800281a { return HAL_TIMEOUT; 800282e: 2003 movs r0, #3 8002830: e142 b.n 8002ab8 } } else { /* Disable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_DISABLE(); 8002832: 4a4d ldr r2, [pc, #308] @ (8002968 ) 8002834: 6813 ldr r3, [r2, #0] 8002836: f423 5380 bic.w r3, r3, #4096 @ 0x1000 800283a: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 800283c: f7fe fb26 bl 8000e8c 8002840: 4605 mov r5, r0 /* Wait till HSI48 is ready */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 8002842: 4b49 ldr r3, [pc, #292] @ (8002968 ) 8002844: 681b ldr r3, [r3, #0] 8002846: f413 5f00 tst.w r3, #8192 @ 0x2000 800284a: d006 beq.n 800285a { if((HAL_GetTick() - tickstart ) > HSI48_TIMEOUT_VALUE) 800284c: f7fe fb1e bl 8000e8c 8002850: 1b40 subs r0, r0, r5 8002852: 2802 cmp r0, #2 8002854: d9f5 bls.n 8002842 { return HAL_TIMEOUT; 8002856: 2003 movs r0, #3 8002858: e12e b.n 8002ab8 } } } } /*------------------------------ LSE Configuration -------------------------*/ if(((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 800285a: 6823 ldr r3, [r4, #0] 800285c: f013 0f04 tst.w r3, #4 8002860: d121 bne.n 80028a6 } } /*-------------------------------- PLL Configuration -----------------------*/ /* Check the parameters */ assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) 8002862: 6a63 ldr r3, [r4, #36] @ 0x24 8002864: 2b00 cmp r3, #0 8002866: f000 8126 beq.w 8002ab6 { /* Check if the PLL is used as system clock or not */ if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL1) 800286a: 4a3f ldr r2, [pc, #252] @ (8002968 ) 800286c: 6912 ldr r2, [r2, #16] 800286e: f002 0238 and.w r2, r2, #56 @ 0x38 8002872: 2a18 cmp r2, #24 8002874: f000 80ee beq.w 8002a54 { if((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 8002878: 2b02 cmp r3, #2 800287a: d079 beq.n 8002970 } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 800287c: 4a3a ldr r2, [pc, #232] @ (8002968 ) 800287e: 6813 ldr r3, [r2, #0] 8002880: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 8002884: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 8002886: f7fe fb01 bl 8000e8c 800288a: 4604 mov r4, r0 /* Wait till PLL is disabled */ while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800288c: 4b36 ldr r3, [pc, #216] @ (8002968 ) 800288e: 681b ldr r3, [r3, #0] 8002890: f013 7f00 tst.w r3, #33554432 @ 0x2000000 8002894: f000 80dc beq.w 8002a50 { if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) 8002898: f7fe faf8 bl 8000e8c 800289c: 1b00 subs r0, r0, r4 800289e: 2802 cmp r0, #2 80028a0: d9f4 bls.n 800288c { return HAL_TIMEOUT; 80028a2: 2003 movs r0, #3 80028a4: e108 b.n 8002ab8 PWR->CR1 |= PWR_CR1_DBP; 80028a6: 4a31 ldr r2, [pc, #196] @ (800296c ) 80028a8: 6813 ldr r3, [r2, #0] 80028aa: f443 7380 orr.w r3, r3, #256 @ 0x100 80028ae: 6013 str r3, [r2, #0] tickstart = HAL_GetTick(); 80028b0: f7fe faec bl 8000e8c 80028b4: 4605 mov r5, r0 while((PWR->CR1 & PWR_CR1_DBP) == 0U) 80028b6: 4b2d ldr r3, [pc, #180] @ (800296c ) 80028b8: 681b ldr r3, [r3, #0] 80028ba: f413 7f80 tst.w r3, #256 @ 0x100 80028be: d106 bne.n 80028ce if((HAL_GetTick() - tickstart ) > RCC_DBP_TIMEOUT_VALUE) 80028c0: f7fe fae4 bl 8000e8c 80028c4: 1b40 subs r0, r0, r5 80028c6: 2864 cmp r0, #100 @ 0x64 80028c8: d9f5 bls.n 80028b6 return HAL_TIMEOUT; 80028ca: 2003 movs r0, #3 80028cc: e0f4 b.n 8002ab8 __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 80028ce: 68a3 ldr r3, [r4, #8] 80028d0: 2b01 cmp r3, #1 80028d2: d00a beq.n 80028ea 80028d4: bb0b cbnz r3, 800291a 80028d6: 4b24 ldr r3, [pc, #144] @ (8002968 ) 80028d8: 6f1a ldr r2, [r3, #112] @ 0x70 80028da: f022 0201 bic.w r2, r2, #1 80028de: 671a str r2, [r3, #112] @ 0x70 80028e0: 6f1a ldr r2, [r3, #112] @ 0x70 80028e2: f022 0204 bic.w r2, r2, #4 80028e6: 671a str r2, [r3, #112] @ 0x70 80028e8: e004 b.n 80028f4 80028ea: 4a1f ldr r2, [pc, #124] @ (8002968 ) 80028ec: 6f13 ldr r3, [r2, #112] @ 0x70 80028ee: f043 0301 orr.w r3, r3, #1 80028f2: 6713 str r3, [r2, #112] @ 0x70 if((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF) 80028f4: 68a3 ldr r3, [r4, #8] 80028f6: b333 cbz r3, 8002946 tickstart = HAL_GetTick(); 80028f8: f7fe fac8 bl 8000e8c 80028fc: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 80028fe: 4b1a ldr r3, [pc, #104] @ (8002968 ) 8002900: 6f1b ldr r3, [r3, #112] @ 0x70 8002902: f013 0f02 tst.w r3, #2 8002906: d1ac bne.n 8002862 if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) 8002908: f7fe fac0 bl 8000e8c 800290c: 1b40 subs r0, r0, r5 800290e: f241 3388 movw r3, #5000 @ 0x1388 8002912: 4298 cmp r0, r3 8002914: d9f3 bls.n 80028fe return HAL_TIMEOUT; 8002916: 2003 movs r0, #3 8002918: e0ce b.n 8002ab8 __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 800291a: 2b05 cmp r3, #5 800291c: d009 beq.n 8002932 800291e: 4b12 ldr r3, [pc, #72] @ (8002968 ) 8002920: 6f1a ldr r2, [r3, #112] @ 0x70 8002922: f022 0201 bic.w r2, r2, #1 8002926: 671a str r2, [r3, #112] @ 0x70 8002928: 6f1a ldr r2, [r3, #112] @ 0x70 800292a: f022 0204 bic.w r2, r2, #4 800292e: 671a str r2, [r3, #112] @ 0x70 8002930: e7e0 b.n 80028f4 8002932: 4b0d ldr r3, [pc, #52] @ (8002968 ) 8002934: 6f1a ldr r2, [r3, #112] @ 0x70 8002936: f042 0204 orr.w r2, r2, #4 800293a: 671a str r2, [r3, #112] @ 0x70 800293c: 6f1a ldr r2, [r3, #112] @ 0x70 800293e: f042 0201 orr.w r2, r2, #1 8002942: 671a str r2, [r3, #112] @ 0x70 8002944: e7d6 b.n 80028f4 tickstart = HAL_GetTick(); 8002946: f7fe faa1 bl 8000e8c 800294a: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 800294c: 4b06 ldr r3, [pc, #24] @ (8002968 ) 800294e: 6f1b ldr r3, [r3, #112] @ 0x70 8002950: f013 0f02 tst.w r3, #2 8002954: d085 beq.n 8002862 if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE) 8002956: f7fe fa99 bl 8000e8c 800295a: 1b40 subs r0, r0, r5 800295c: f241 3388 movw r3, #5000 @ 0x1388 8002960: 4298 cmp r0, r3 8002962: d9f3 bls.n 800294c return HAL_TIMEOUT; 8002964: 2003 movs r0, #3 8002966: e0a7 b.n 8002ab8 8002968: 58024400 .word 0x58024400 800296c: 58024800 .word 0x58024800 __HAL_RCC_PLL_DISABLE(); 8002970: 4a59 ldr r2, [pc, #356] @ (8002ad8 ) 8002972: 6813 ldr r3, [r2, #0] 8002974: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 8002978: 6013 str r3, [r2, #0] tickstart = HAL_GetTick(); 800297a: f7fe fa87 bl 8000e8c 800297e: 4605 mov r5, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 8002980: 4b55 ldr r3, [pc, #340] @ (8002ad8 ) 8002982: 681b ldr r3, [r3, #0] 8002984: f013 7f00 tst.w r3, #33554432 @ 0x2000000 8002988: d006 beq.n 8002998 if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) 800298a: f7fe fa7f bl 8000e8c 800298e: 1b40 subs r0, r0, r5 8002990: 2802 cmp r0, #2 8002992: d9f5 bls.n 8002980 return HAL_TIMEOUT; 8002994: 2003 movs r0, #3 8002996: e08f b.n 8002ab8 __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 8002998: 4b4f ldr r3, [pc, #316] @ (8002ad8 ) 800299a: 6a99 ldr r1, [r3, #40] @ 0x28 800299c: 4a4f ldr r2, [pc, #316] @ (8002adc ) 800299e: 400a ands r2, r1 80029a0: 6aa1 ldr r1, [r4, #40] @ 0x28 80029a2: 6ae0 ldr r0, [r4, #44] @ 0x2c 80029a4: ea41 1100 orr.w r1, r1, r0, lsl #4 80029a8: 430a orrs r2, r1 80029aa: 629a str r2, [r3, #40] @ 0x28 80029ac: 6b22 ldr r2, [r4, #48] @ 0x30 80029ae: 3a01 subs r2, #1 80029b0: f3c2 0208 ubfx r2, r2, #0, #9 80029b4: 6b61 ldr r1, [r4, #52] @ 0x34 80029b6: 3901 subs r1, #1 80029b8: 0249 lsls r1, r1, #9 80029ba: b289 uxth r1, r1 80029bc: 430a orrs r2, r1 80029be: 6ba1 ldr r1, [r4, #56] @ 0x38 80029c0: 3901 subs r1, #1 80029c2: 0409 lsls r1, r1, #16 80029c4: f401 01fe and.w r1, r1, #8323072 @ 0x7f0000 80029c8: 430a orrs r2, r1 80029ca: 6be1 ldr r1, [r4, #60] @ 0x3c 80029cc: 3901 subs r1, #1 80029ce: 0609 lsls r1, r1, #24 80029d0: f001 41fe and.w r1, r1, #2130706432 @ 0x7f000000 80029d4: 430a orrs r2, r1 80029d6: 631a str r2, [r3, #48] @ 0x30 __HAL_RCC_PLLFRACN_DISABLE(); 80029d8: 6ada ldr r2, [r3, #44] @ 0x2c 80029da: f022 0201 bic.w r2, r2, #1 80029de: 62da str r2, [r3, #44] @ 0x2c __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 80029e0: 6b59 ldr r1, [r3, #52] @ 0x34 80029e2: 4a3f ldr r2, [pc, #252] @ (8002ae0 ) 80029e4: 400a ands r2, r1 80029e6: 6ca1 ldr r1, [r4, #72] @ 0x48 80029e8: ea42 02c1 orr.w r2, r2, r1, lsl #3 80029ec: 635a str r2, [r3, #52] @ 0x34 __HAL_RCC_PLL_VCIRANGE(RCC_OscInitStruct->PLL.PLLRGE) ; 80029ee: 6ada ldr r2, [r3, #44] @ 0x2c 80029f0: f022 020c bic.w r2, r2, #12 80029f4: 6c21 ldr r1, [r4, #64] @ 0x40 80029f6: 430a orrs r2, r1 80029f8: 62da str r2, [r3, #44] @ 0x2c __HAL_RCC_PLL_VCORANGE(RCC_OscInitStruct->PLL.PLLVCOSEL) ; 80029fa: 6ada ldr r2, [r3, #44] @ 0x2c 80029fc: f022 0202 bic.w r2, r2, #2 8002a00: 6c61 ldr r1, [r4, #68] @ 0x44 8002a02: 430a orrs r2, r1 8002a04: 62da str r2, [r3, #44] @ 0x2c __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVP); 8002a06: 6ada ldr r2, [r3, #44] @ 0x2c 8002a08: f442 3280 orr.w r2, r2, #65536 @ 0x10000 8002a0c: 62da str r2, [r3, #44] @ 0x2c __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 8002a0e: 6ada ldr r2, [r3, #44] @ 0x2c 8002a10: f442 3200 orr.w r2, r2, #131072 @ 0x20000 8002a14: 62da str r2, [r3, #44] @ 0x2c __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVR); 8002a16: 6ada ldr r2, [r3, #44] @ 0x2c 8002a18: f442 2280 orr.w r2, r2, #262144 @ 0x40000 8002a1c: 62da str r2, [r3, #44] @ 0x2c __HAL_RCC_PLLFRACN_ENABLE(); 8002a1e: 6ada ldr r2, [r3, #44] @ 0x2c 8002a20: f042 0201 orr.w r2, r2, #1 8002a24: 62da str r2, [r3, #44] @ 0x2c __HAL_RCC_PLL_ENABLE(); 8002a26: 681a ldr r2, [r3, #0] 8002a28: f042 7280 orr.w r2, r2, #16777216 @ 0x1000000 8002a2c: 601a str r2, [r3, #0] tickstart = HAL_GetTick(); 8002a2e: f7fe fa2d bl 8000e8c 8002a32: 4604 mov r4, r0 while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 8002a34: 4b28 ldr r3, [pc, #160] @ (8002ad8 ) 8002a36: 681b ldr r3, [r3, #0] 8002a38: f013 7f00 tst.w r3, #33554432 @ 0x2000000 8002a3c: d106 bne.n 8002a4c if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE) 8002a3e: f7fe fa25 bl 8000e8c 8002a42: 1b00 subs r0, r0, r4 8002a44: 2802 cmp r0, #2 8002a46: d9f5 bls.n 8002a34 return HAL_TIMEOUT; 8002a48: 2003 movs r0, #3 8002a4a: e035 b.n 8002ab8 { return HAL_ERROR; } } } return HAL_OK; 8002a4c: 2000 movs r0, #0 8002a4e: e033 b.n 8002ab8 8002a50: 2000 movs r0, #0 8002a52: e031 b.n 8002ab8 temp1_pllckcfg = RCC->PLLCKSELR; 8002a54: 4a20 ldr r2, [pc, #128] @ (8002ad8 ) 8002a56: 6a91 ldr r1, [r2, #40] @ 0x28 temp2_pllckcfg = RCC->PLL1DIVR; 8002a58: 6b10 ldr r0, [r2, #48] @ 0x30 if(((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 8002a5a: 2b01 cmp r3, #1 8002a5c: d02d beq.n 8002aba (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 8002a5e: f001 0303 and.w r3, r1, #3 8002a62: 6aa2 ldr r2, [r4, #40] @ 0x28 if(((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 8002a64: 4293 cmp r3, r2 8002a66: d12a bne.n 8002abe ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 8002a68: f3c1 1105 ubfx r1, r1, #4, #6 8002a6c: 6ae3 ldr r3, [r4, #44] @ 0x2c (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 8002a6e: 4299 cmp r1, r3 8002a70: d127 bne.n 8002ac2 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 8002a72: f3c0 0208 ubfx r2, r0, #0, #9 8002a76: 6b23 ldr r3, [r4, #48] @ 0x30 8002a78: 3b01 subs r3, #1 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 8002a7a: 429a cmp r2, r3 8002a7c: d123 bne.n 8002ac6 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 8002a7e: f3c0 2246 ubfx r2, r0, #9, #7 8002a82: 6b63 ldr r3, [r4, #52] @ 0x34 8002a84: 3b01 subs r3, #1 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 8002a86: 429a cmp r2, r3 8002a88: d11f bne.n 8002aca ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 8002a8a: f3c0 4206 ubfx r2, r0, #16, #7 8002a8e: 6ba3 ldr r3, [r4, #56] @ 0x38 8002a90: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 8002a92: 429a cmp r2, r3 8002a94: d11b bne.n 8002ace ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U))) 8002a96: f3c0 6006 ubfx r0, r0, #24, #7 8002a9a: 6be3 ldr r3, [r4, #60] @ 0x3c 8002a9c: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 8002a9e: 4298 cmp r0, r3 8002aa0: d117 bne.n 8002ad2 return HAL_OK; 8002aa2: 2000 movs r0, #0 8002aa4: e008 b.n 8002ab8 return HAL_ERROR; 8002aa6: 2001 movs r0, #1 } 8002aa8: 4770 bx lr return HAL_ERROR; 8002aaa: 2001 movs r0, #1 8002aac: e004 b.n 8002ab8 return HAL_ERROR; 8002aae: 2001 movs r0, #1 8002ab0: e002 b.n 8002ab8 return HAL_ERROR; 8002ab2: 2001 movs r0, #1 8002ab4: e000 b.n 8002ab8 return HAL_OK; 8002ab6: 2000 movs r0, #0 } 8002ab8: bd38 pop {r3, r4, r5, pc} return HAL_ERROR; 8002aba: 2001 movs r0, #1 8002abc: e7fc b.n 8002ab8 8002abe: 2001 movs r0, #1 8002ac0: e7fa b.n 8002ab8 8002ac2: 2001 movs r0, #1 8002ac4: e7f8 b.n 8002ab8 8002ac6: 2001 movs r0, #1 8002ac8: e7f6 b.n 8002ab8 8002aca: 2001 movs r0, #1 8002acc: e7f4 b.n 8002ab8 8002ace: 2001 movs r0, #1 8002ad0: e7f2 b.n 8002ab8 8002ad2: 2001 movs r0, #1 8002ad4: e7f0 b.n 8002ab8 8002ad6: bf00 nop 8002ad8: 58024400 .word 0x58024400 8002adc: fffffc0c .word 0xfffffc0c 8002ae0: ffff0007 .word 0xffff0007 08002ae4 : float_t fracn1, pllvco; uint32_t sysclockfreq; /* Get SYSCLK source -------------------------------------------------------*/ switch (RCC->CFGR & RCC_CFGR_SWS) 8002ae4: 4b74 ldr r3, [pc, #464] @ (8002cb8 ) 8002ae6: 691b ldr r3, [r3, #16] 8002ae8: f003 0338 and.w r3, r3, #56 @ 0x38 8002aec: 2b10 cmp r3, #16 8002aee: f000 80de beq.w 8002cae 8002af2: 2b18 cmp r3, #24 8002af4: d00f beq.n 8002b16 8002af6: b10b cbz r3, 8002afc 8002af8: 4870 ldr r0, [pc, #448] @ (8002cbc ) 8002afa: 4770 bx lr { case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 8002afc: 4b6e ldr r3, [pc, #440] @ (8002cb8 ) 8002afe: 681b ldr r3, [r3, #0] 8002b00: f013 0f20 tst.w r3, #32 8002b04: f000 80d5 beq.w 8002cb2 { sysclockfreq = (uint32_t) (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER()>> 3)); 8002b08: 4b6b ldr r3, [pc, #428] @ (8002cb8 ) 8002b0a: 681b ldr r3, [r3, #0] 8002b0c: f3c3 03c1 ubfx r3, r3, #3, #2 8002b10: 486b ldr r0, [pc, #428] @ (8002cc0 ) 8002b12: 40d8 lsrs r0, r3 8002b14: 4770 bx lr { 8002b16: b410 push {r4} case RCC_CFGR_SWS_PLL1: /* PLL1 used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE or CSI_VALUE/ PLLM) * PLLN SYSCLK = PLL_VCO / PLLR */ pllsource = (RCC->PLLCKSELR & RCC_PLLCKSELR_PLLSRC); 8002b18: 4b67 ldr r3, [pc, #412] @ (8002cb8 ) 8002b1a: 6a9a ldr r2, [r3, #40] @ 0x28 8002b1c: f002 0203 and.w r2, r2, #3 pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1)>> 4) ; 8002b20: 6a9c ldr r4, [r3, #40] @ 0x28 8002b22: f3c4 1005 ubfx r0, r4, #4, #6 pllfracen = ((RCC-> PLLCFGR & RCC_PLLCFGR_PLL1FRACEN)>>RCC_PLLCFGR_PLL1FRACEN_Pos); 8002b26: 6ad9 ldr r1, [r3, #44] @ 0x2c 8002b28: f001 0101 and.w r1, r1, #1 fracn1 = (float_t)(uint32_t)(pllfracen* ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1)>> 3)); 8002b2c: 6b5b ldr r3, [r3, #52] @ 0x34 8002b2e: f3c3 03cc ubfx r3, r3, #3, #13 8002b32: fb01 f303 mul.w r3, r1, r3 8002b36: ee07 3a90 vmov s15, r3 8002b3a: eef8 7a67 vcvt.f32.u32 s15, s15 if (pllm != 0U) 8002b3e: f414 7f7c tst.w r4, #1008 @ 0x3f0 8002b42: f000 8094 beq.w 8002c6e { switch (pllsource) 8002b46: 2a01 cmp r2, #1 8002b48: d066 beq.n 8002c18 8002b4a: 2a02 cmp r2, #2 8002b4c: f000 8092 beq.w 8002c74 8002b50: b1e2 cbz r2, 8002b8c case RCC_PLLSOURCE_HSE: /* HSE used as PLL clock source */ pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 ); break; default: pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 ); 8002b52: ee07 0a10 vmov s14, r0 8002b56: eef8 6a47 vcvt.f32.u32 s13, s14 8002b5a: ed9f 6a5a vldr s12, [pc, #360] @ 8002cc4 8002b5e: ee86 7a26 vdiv.f32 s14, s12, s13 8002b62: 4b55 ldr r3, [pc, #340] @ (8002cb8 ) 8002b64: 6b1b ldr r3, [r3, #48] @ 0x30 8002b66: f3c3 0308 ubfx r3, r3, #0, #9 8002b6a: ee06 3a90 vmov s13, r3 8002b6e: eef8 6a66 vcvt.f32.u32 s13, s13 8002b72: ed9f 6a55 vldr s12, [pc, #340] @ 8002cc8 8002b76: ee67 7a86 vmul.f32 s15, s15, s12 8002b7a: ee76 7aa7 vadd.f32 s15, s13, s15 8002b7e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 8002b82: ee77 7aa6 vadd.f32 s15, s15, s13 8002b86: ee27 7a27 vmul.f32 s14, s14, s15 break; 8002b8a: e061 b.n 8002c50 if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 8002b8c: 4b4a ldr r3, [pc, #296] @ (8002cb8 ) 8002b8e: 681b ldr r3, [r3, #0] 8002b90: f013 0f20 tst.w r3, #32 8002b94: d023 beq.n 8002bde hsivalue= (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER()>> 3)); 8002b96: 4948 ldr r1, [pc, #288] @ (8002cb8 ) 8002b98: 680a ldr r2, [r1, #0] 8002b9a: f3c2 02c1 ubfx r2, r2, #3, #2 8002b9e: 4b48 ldr r3, [pc, #288] @ (8002cc0 ) 8002ba0: 40d3 lsrs r3, r2 pllvco = ( (float_t)hsivalue / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 ); 8002ba2: ee07 3a10 vmov s14, r3 8002ba6: eef8 6a47 vcvt.f32.u32 s13, s14 8002baa: ee07 0a10 vmov s14, r0 8002bae: eeb8 6a47 vcvt.f32.u32 s12, s14 8002bb2: ee86 7a86 vdiv.f32 s14, s13, s12 8002bb6: 6b0b ldr r3, [r1, #48] @ 0x30 8002bb8: f3c3 0308 ubfx r3, r3, #0, #9 8002bbc: ee06 3a90 vmov s13, r3 8002bc0: eef8 6a66 vcvt.f32.u32 s13, s13 8002bc4: ed9f 6a40 vldr s12, [pc, #256] @ 8002cc8 8002bc8: ee67 7a86 vmul.f32 s15, s15, s12 8002bcc: ee76 7aa7 vadd.f32 s15, s13, s15 8002bd0: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 8002bd4: ee77 7aa6 vadd.f32 s15, s15, s13 8002bd8: ee27 7a27 vmul.f32 s14, s14, s15 8002bdc: e038 b.n 8002c50 pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 ); 8002bde: ee07 0a10 vmov s14, r0 8002be2: eef8 6a47 vcvt.f32.u32 s13, s14 8002be6: ed9f 6a39 vldr s12, [pc, #228] @ 8002ccc 8002bea: ee86 7a26 vdiv.f32 s14, s12, s13 8002bee: 4b32 ldr r3, [pc, #200] @ (8002cb8 ) 8002bf0: 6b1b ldr r3, [r3, #48] @ 0x30 8002bf2: f3c3 0308 ubfx r3, r3, #0, #9 8002bf6: ee06 3a90 vmov s13, r3 8002bfa: eef8 6a66 vcvt.f32.u32 s13, s13 8002bfe: ed9f 6a32 vldr s12, [pc, #200] @ 8002cc8 8002c02: ee67 7a86 vmul.f32 s15, s15, s12 8002c06: ee76 7aa7 vadd.f32 s15, s13, s15 8002c0a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 8002c0e: ee77 7aa6 vadd.f32 s15, s15, s13 8002c12: ee27 7a27 vmul.f32 s14, s14, s15 8002c16: e01b b.n 8002c50 pllvco = ((float_t)CSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 ); 8002c18: ee07 0a10 vmov s14, r0 8002c1c: eef8 6a47 vcvt.f32.u32 s13, s14 8002c20: ed9f 6a28 vldr s12, [pc, #160] @ 8002cc4 8002c24: ee86 7a26 vdiv.f32 s14, s12, s13 8002c28: 4b23 ldr r3, [pc, #140] @ (8002cb8 ) 8002c2a: 6b1b ldr r3, [r3, #48] @ 0x30 8002c2c: f3c3 0308 ubfx r3, r3, #0, #9 8002c30: ee06 3a90 vmov s13, r3 8002c34: eef8 6a66 vcvt.f32.u32 s13, s13 8002c38: ed9f 6a23 vldr s12, [pc, #140] @ 8002cc8 8002c3c: ee67 7a86 vmul.f32 s15, s15, s12 8002c40: ee76 7aa7 vadd.f32 s15, s13, s15 8002c44: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 8002c48: ee77 7aa6 vadd.f32 s15, s15, s13 8002c4c: ee27 7a27 vmul.f32 s14, s14, s15 } pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >>9) + 1U ) ; 8002c50: 4b19 ldr r3, [pc, #100] @ (8002cb8 ) 8002c52: 6b1b ldr r3, [r3, #48] @ 0x30 8002c54: f3c3 2346 ubfx r3, r3, #9, #7 8002c58: 3301 adds r3, #1 sysclockfreq = (uint32_t)(float_t)(pllvco/(float_t)pllp); 8002c5a: ee07 3a90 vmov s15, r3 8002c5e: eef8 7a67 vcvt.f32.u32 s15, s15 8002c62: eec7 6a27 vdiv.f32 s13, s14, s15 8002c66: eefc 7ae6 vcvt.u32.f32 s15, s13 8002c6a: ee17 0a90 vmov r0, s15 sysclockfreq = CSI_VALUE; break; } return sysclockfreq; } 8002c6e: f85d 4b04 ldr.w r4, [sp], #4 8002c72: 4770 bx lr pllvco = ((float_t)HSE_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1/(float_t)0x2000) +(float_t)1 ); 8002c74: ee07 0a10 vmov s14, r0 8002c78: eef8 6a47 vcvt.f32.u32 s13, s14 8002c7c: ed9f 6a14 vldr s12, [pc, #80] @ 8002cd0 8002c80: ee86 7a26 vdiv.f32 s14, s12, s13 8002c84: 4b0c ldr r3, [pc, #48] @ (8002cb8 ) 8002c86: 6b1b ldr r3, [r3, #48] @ 0x30 8002c88: f3c3 0308 ubfx r3, r3, #0, #9 8002c8c: ee06 3a90 vmov s13, r3 8002c90: eef8 6a66 vcvt.f32.u32 s13, s13 8002c94: ed9f 6a0c vldr s12, [pc, #48] @ 8002cc8 8002c98: ee67 7a86 vmul.f32 s15, s15, s12 8002c9c: ee76 7aa7 vadd.f32 s15, s13, s15 8002ca0: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 8002ca4: ee77 7aa6 vadd.f32 s15, s15, s13 8002ca8: ee27 7a27 vmul.f32 s14, s14, s15 break; 8002cac: e7d0 b.n 8002c50 sysclockfreq = HSE_VALUE; 8002cae: 4809 ldr r0, [pc, #36] @ (8002cd4 ) 8002cb0: 4770 bx lr sysclockfreq = (uint32_t) HSI_VALUE; 8002cb2: 4803 ldr r0, [pc, #12] @ (8002cc0 ) } 8002cb4: 4770 bx lr 8002cb6: bf00 nop 8002cb8: 58024400 .word 0x58024400 8002cbc: 003d0900 .word 0x003d0900 8002cc0: 03d09000 .word 0x03d09000 8002cc4: 4a742400 .word 0x4a742400 8002cc8: 39000000 .word 0x39000000 8002ccc: 4c742400 .word 0x4c742400 8002cd0: 4bbebc20 .word 0x4bbebc20 8002cd4: 017d7840 .word 0x017d7840 08002cd8 : if(RCC_ClkInitStruct == NULL) 8002cd8: 2800 cmp r0, #0 8002cda: f000 8132 beq.w 8002f42 { 8002cde: b570 push {r4, r5, r6, lr} 8002ce0: 460d mov r5, r1 8002ce2: 4604 mov r4, r0 if(FLatency > __HAL_FLASH_GET_LATENCY()) 8002ce4: 4b9b ldr r3, [pc, #620] @ (8002f54 ) 8002ce6: 681b ldr r3, [r3, #0] 8002ce8: f003 030f and.w r3, r3, #15 8002cec: 428b cmp r3, r1 8002cee: d20b bcs.n 8002d08 __HAL_FLASH_SET_LATENCY(FLatency); 8002cf0: 4a98 ldr r2, [pc, #608] @ (8002f54 ) 8002cf2: 6813 ldr r3, [r2, #0] 8002cf4: f023 030f bic.w r3, r3, #15 8002cf8: 430b orrs r3, r1 8002cfa: 6013 str r3, [r2, #0] if(__HAL_FLASH_GET_LATENCY() != FLatency) 8002cfc: 6813 ldr r3, [r2, #0] 8002cfe: f003 030f and.w r3, r3, #15 8002d02: 428b cmp r3, r1 8002d04: f040 811f bne.w 8002f46 if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 8002d08: 6823 ldr r3, [r4, #0] 8002d0a: f013 0f04 tst.w r3, #4 8002d0e: d00c beq.n 8002d2a if((RCC_ClkInitStruct->APB3CLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 8002d10: 6922 ldr r2, [r4, #16] 8002d12: 4b91 ldr r3, [pc, #580] @ (8002f58 ) 8002d14: 699b ldr r3, [r3, #24] 8002d16: f003 0370 and.w r3, r3, #112 @ 0x70 8002d1a: 429a cmp r2, r3 8002d1c: d905 bls.n 8002d2a MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 8002d1e: 498e ldr r1, [pc, #568] @ (8002f58 ) 8002d20: 698b ldr r3, [r1, #24] 8002d22: f023 0370 bic.w r3, r3, #112 @ 0x70 8002d26: 431a orrs r2, r3 8002d28: 618a str r2, [r1, #24] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 8002d2a: 6823 ldr r3, [r4, #0] 8002d2c: f013 0f08 tst.w r3, #8 8002d30: d00c beq.n 8002d4c if((RCC_ClkInitStruct->APB1CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 8002d32: 6962 ldr r2, [r4, #20] 8002d34: 4b88 ldr r3, [pc, #544] @ (8002f58 ) 8002d36: 69db ldr r3, [r3, #28] 8002d38: f003 0370 and.w r3, r3, #112 @ 0x70 8002d3c: 429a cmp r2, r3 8002d3e: d905 bls.n 8002d4c MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 8002d40: 4985 ldr r1, [pc, #532] @ (8002f58 ) 8002d42: 69cb ldr r3, [r1, #28] 8002d44: f023 0370 bic.w r3, r3, #112 @ 0x70 8002d48: 431a orrs r2, r3 8002d4a: 61ca str r2, [r1, #28] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 8002d4c: 6823 ldr r3, [r4, #0] 8002d4e: f013 0f10 tst.w r3, #16 8002d52: d00c beq.n 8002d6e if((RCC_ClkInitStruct->APB2CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 8002d54: 69a2 ldr r2, [r4, #24] 8002d56: 4b80 ldr r3, [pc, #512] @ (8002f58 ) 8002d58: 69db ldr r3, [r3, #28] 8002d5a: f403 63e0 and.w r3, r3, #1792 @ 0x700 8002d5e: 429a cmp r2, r3 8002d60: d905 bls.n 8002d6e MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 8002d62: 497d ldr r1, [pc, #500] @ (8002f58 ) 8002d64: 69cb ldr r3, [r1, #28] 8002d66: f423 63e0 bic.w r3, r3, #1792 @ 0x700 8002d6a: 431a orrs r2, r3 8002d6c: 61ca str r2, [r1, #28] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 8002d6e: 6823 ldr r3, [r4, #0] 8002d70: f013 0f20 tst.w r3, #32 8002d74: d00c beq.n 8002d90 if((RCC_ClkInitStruct->APB4CLKDivider) > (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 8002d76: 69e2 ldr r2, [r4, #28] 8002d78: 4b77 ldr r3, [pc, #476] @ (8002f58 ) 8002d7a: 6a1b ldr r3, [r3, #32] 8002d7c: f003 0370 and.w r3, r3, #112 @ 0x70 8002d80: 429a cmp r2, r3 8002d82: d905 bls.n 8002d90 MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider) ); 8002d84: 4974 ldr r1, [pc, #464] @ (8002f58 ) 8002d86: 6a0b ldr r3, [r1, #32] 8002d88: f023 0370 bic.w r3, r3, #112 @ 0x70 8002d8c: 431a orrs r2, r3 8002d8e: 620a str r2, [r1, #32] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 8002d90: 6823 ldr r3, [r4, #0] 8002d92: f013 0f02 tst.w r3, #2 8002d96: d00c beq.n 8002db2 if((RCC_ClkInitStruct->AHBCLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 8002d98: 68e2 ldr r2, [r4, #12] 8002d9a: 4b6f ldr r3, [pc, #444] @ (8002f58 ) 8002d9c: 699b ldr r3, [r3, #24] 8002d9e: f003 030f and.w r3, r3, #15 8002da2: 429a cmp r2, r3 8002da4: d905 bls.n 8002db2 MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 8002da6: 496c ldr r1, [pc, #432] @ (8002f58 ) 8002da8: 698b ldr r3, [r1, #24] 8002daa: f023 030f bic.w r3, r3, #15 8002dae: 431a orrs r2, r3 8002db0: 618a str r2, [r1, #24] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 8002db2: 6823 ldr r3, [r4, #0] 8002db4: f013 0f01 tst.w r3, #1 8002db8: d041 beq.n 8002e3e MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1CPRE, RCC_ClkInitStruct->SYSCLKDivider); 8002dba: 4a67 ldr r2, [pc, #412] @ (8002f58 ) 8002dbc: 6993 ldr r3, [r2, #24] 8002dbe: f423 6370 bic.w r3, r3, #3840 @ 0xf00 8002dc2: 68a1 ldr r1, [r4, #8] 8002dc4: 430b orrs r3, r1 8002dc6: 6193 str r3, [r2, #24] if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_HSE) 8002dc8: 6863 ldr r3, [r4, #4] 8002dca: 2b02 cmp r3, #2 8002dcc: d00a beq.n 8002de4 else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 8002dce: 2b03 cmp r3, #3 8002dd0: d027 beq.n 8002e22 else if(RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_CSI) 8002dd2: 2b01 cmp r3, #1 8002dd4: d02c beq.n 8002e30 if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 8002dd6: 4a60 ldr r2, [pc, #384] @ (8002f58 ) 8002dd8: 6812 ldr r2, [r2, #0] 8002dda: f012 0f04 tst.w r2, #4 8002dde: d106 bne.n 8002dee return HAL_ERROR; 8002de0: 2001 movs r0, #1 8002de2: e0ad b.n 8002f40 if(__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 8002de4: 6812 ldr r2, [r2, #0] 8002de6: f412 3f00 tst.w r2, #131072 @ 0x20000 8002dea: f000 80ae beq.w 8002f4a MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource); 8002dee: 495a ldr r1, [pc, #360] @ (8002f58 ) 8002df0: 690a ldr r2, [r1, #16] 8002df2: f022 0207 bic.w r2, r2, #7 8002df6: 4313 orrs r3, r2 8002df8: 610b str r3, [r1, #16] tickstart = HAL_GetTick(); 8002dfa: f7fe f847 bl 8000e8c 8002dfe: 4606 mov r6, r0 while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 8002e00: 4b55 ldr r3, [pc, #340] @ (8002f58 ) 8002e02: 691b ldr r3, [r3, #16] 8002e04: f003 0338 and.w r3, r3, #56 @ 0x38 8002e08: 6862 ldr r2, [r4, #4] 8002e0a: ebb3 0fc2 cmp.w r3, r2, lsl #3 8002e0e: d016 beq.n 8002e3e if((HAL_GetTick() - tickstart ) > CLOCKSWITCH_TIMEOUT_VALUE) 8002e10: f7fe f83c bl 8000e8c 8002e14: 1b80 subs r0, r0, r6 8002e16: f241 3388 movw r3, #5000 @ 0x1388 8002e1a: 4298 cmp r0, r3 8002e1c: d9f0 bls.n 8002e00 return HAL_TIMEOUT; 8002e1e: 2003 movs r0, #3 8002e20: e08e b.n 8002f40 if(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 8002e22: 4a4d ldr r2, [pc, #308] @ (8002f58 ) 8002e24: 6812 ldr r2, [r2, #0] 8002e26: f012 7f00 tst.w r2, #33554432 @ 0x2000000 8002e2a: d1e0 bne.n 8002dee return HAL_ERROR; 8002e2c: 2001 movs r0, #1 8002e2e: e087 b.n 8002f40 if(__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 8002e30: 4a49 ldr r2, [pc, #292] @ (8002f58 ) 8002e32: 6812 ldr r2, [r2, #0] 8002e34: f412 7f80 tst.w r2, #256 @ 0x100 8002e38: d1d9 bne.n 8002dee return HAL_ERROR; 8002e3a: 2001 movs r0, #1 8002e3c: e080 b.n 8002f40 if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 8002e3e: 6823 ldr r3, [r4, #0] 8002e40: f013 0f02 tst.w r3, #2 8002e44: d00c beq.n 8002e60 if((RCC_ClkInitStruct->AHBCLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 8002e46: 68e2 ldr r2, [r4, #12] 8002e48: 4b43 ldr r3, [pc, #268] @ (8002f58 ) 8002e4a: 699b ldr r3, [r3, #24] 8002e4c: f003 030f and.w r3, r3, #15 8002e50: 429a cmp r2, r3 8002e52: d205 bcs.n 8002e60 MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 8002e54: 4940 ldr r1, [pc, #256] @ (8002f58 ) 8002e56: 698b ldr r3, [r1, #24] 8002e58: f023 030f bic.w r3, r3, #15 8002e5c: 431a orrs r2, r3 8002e5e: 618a str r2, [r1, #24] if(FLatency < __HAL_FLASH_GET_LATENCY()) 8002e60: 4b3c ldr r3, [pc, #240] @ (8002f54 ) 8002e62: 681b ldr r3, [r3, #0] 8002e64: f003 030f and.w r3, r3, #15 8002e68: 42ab cmp r3, r5 8002e6a: d90a bls.n 8002e82 __HAL_FLASH_SET_LATENCY(FLatency); 8002e6c: 4a39 ldr r2, [pc, #228] @ (8002f54 ) 8002e6e: 6813 ldr r3, [r2, #0] 8002e70: f023 030f bic.w r3, r3, #15 8002e74: 432b orrs r3, r5 8002e76: 6013 str r3, [r2, #0] if(__HAL_FLASH_GET_LATENCY() != FLatency) 8002e78: 6813 ldr r3, [r2, #0] 8002e7a: f003 030f and.w r3, r3, #15 8002e7e: 42ab cmp r3, r5 8002e80: d165 bne.n 8002f4e if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 8002e82: 6823 ldr r3, [r4, #0] 8002e84: f013 0f04 tst.w r3, #4 8002e88: d00c beq.n 8002ea4 if((RCC_ClkInitStruct->APB3CLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 8002e8a: 6922 ldr r2, [r4, #16] 8002e8c: 4b32 ldr r3, [pc, #200] @ (8002f58 ) 8002e8e: 699b ldr r3, [r3, #24] 8002e90: f003 0370 and.w r3, r3, #112 @ 0x70 8002e94: 429a cmp r2, r3 8002e96: d205 bcs.n 8002ea4 MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 8002e98: 492f ldr r1, [pc, #188] @ (8002f58 ) 8002e9a: 698b ldr r3, [r1, #24] 8002e9c: f023 0370 bic.w r3, r3, #112 @ 0x70 8002ea0: 431a orrs r2, r3 8002ea2: 618a str r2, [r1, #24] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 8002ea4: 6823 ldr r3, [r4, #0] 8002ea6: f013 0f08 tst.w r3, #8 8002eaa: d00c beq.n 8002ec6 if((RCC_ClkInitStruct->APB1CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 8002eac: 6962 ldr r2, [r4, #20] 8002eae: 4b2a ldr r3, [pc, #168] @ (8002f58 ) 8002eb0: 69db ldr r3, [r3, #28] 8002eb2: f003 0370 and.w r3, r3, #112 @ 0x70 8002eb6: 429a cmp r2, r3 8002eb8: d205 bcs.n 8002ec6 MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 8002eba: 4927 ldr r1, [pc, #156] @ (8002f58 ) 8002ebc: 69cb ldr r3, [r1, #28] 8002ebe: f023 0370 bic.w r3, r3, #112 @ 0x70 8002ec2: 431a orrs r2, r3 8002ec4: 61ca str r2, [r1, #28] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 8002ec6: 6823 ldr r3, [r4, #0] 8002ec8: f013 0f10 tst.w r3, #16 8002ecc: d00c beq.n 8002ee8 if((RCC_ClkInitStruct->APB2CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 8002ece: 69a2 ldr r2, [r4, #24] 8002ed0: 4b21 ldr r3, [pc, #132] @ (8002f58 ) 8002ed2: 69db ldr r3, [r3, #28] 8002ed4: f403 63e0 and.w r3, r3, #1792 @ 0x700 8002ed8: 429a cmp r2, r3 8002eda: d205 bcs.n 8002ee8 MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 8002edc: 491e ldr r1, [pc, #120] @ (8002f58 ) 8002ede: 69cb ldr r3, [r1, #28] 8002ee0: f423 63e0 bic.w r3, r3, #1792 @ 0x700 8002ee4: 431a orrs r2, r3 8002ee6: 61ca str r2, [r1, #28] if(((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 8002ee8: 6823 ldr r3, [r4, #0] 8002eea: f013 0f20 tst.w r3, #32 8002eee: d00c beq.n 8002f0a if((RCC_ClkInitStruct->APB4CLKDivider) < (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 8002ef0: 69e2 ldr r2, [r4, #28] 8002ef2: 4b19 ldr r3, [pc, #100] @ (8002f58 ) 8002ef4: 6a1b ldr r3, [r3, #32] 8002ef6: f003 0370 and.w r3, r3, #112 @ 0x70 8002efa: 429a cmp r2, r3 8002efc: d205 bcs.n 8002f0a MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider) ); 8002efe: 4916 ldr r1, [pc, #88] @ (8002f58 ) 8002f00: 6a0b ldr r3, [r1, #32] 8002f02: f023 0370 bic.w r3, r3, #112 @ 0x70 8002f06: 431a orrs r2, r3 8002f08: 620a str r2, [r1, #32] common_system_clock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU); 8002f0a: f7ff fdeb bl 8002ae4 8002f0e: 4912 ldr r1, [pc, #72] @ (8002f58 ) 8002f10: 698b ldr r3, [r1, #24] 8002f12: f3c3 2303 ubfx r3, r3, #8, #4 8002f16: 4a11 ldr r2, [pc, #68] @ (8002f5c ) 8002f18: 5cd3 ldrb r3, [r2, r3] 8002f1a: f003 031f and.w r3, r3, #31 8002f1e: 40d8 lsrs r0, r3 SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 8002f20: 698b ldr r3, [r1, #24] 8002f22: f003 030f and.w r3, r3, #15 8002f26: 5cd3 ldrb r3, [r2, r3] 8002f28: f003 031f and.w r3, r3, #31 8002f2c: fa20 f303 lsr.w r3, r0, r3 8002f30: 4a0b ldr r2, [pc, #44] @ (8002f60 ) 8002f32: 6013 str r3, [r2, #0] SystemCoreClock = common_system_clock; 8002f34: 4b0b ldr r3, [pc, #44] @ (8002f64 ) 8002f36: 6018 str r0, [r3, #0] halstatus = HAL_InitTick (uwTickPrio); 8002f38: 4b0b ldr r3, [pc, #44] @ (8002f68 ) 8002f3a: 6818 ldr r0, [r3, #0] 8002f3c: f7fd fd7c bl 8000a38 } 8002f40: bd70 pop {r4, r5, r6, pc} return HAL_ERROR; 8002f42: 2001 movs r0, #1 } 8002f44: 4770 bx lr return HAL_ERROR; 8002f46: 2001 movs r0, #1 8002f48: e7fa b.n 8002f40 return HAL_ERROR; 8002f4a: 2001 movs r0, #1 8002f4c: e7f8 b.n 8002f40 return HAL_ERROR; 8002f4e: 2001 movs r0, #1 8002f50: e7f6 b.n 8002f40 8002f52: bf00 nop 8002f54: 52002000 .word 0x52002000 8002f58: 58024400 .word 0x58024400 8002f5c: 08014328 .word 0x08014328 8002f60: 24000000 .word 0x24000000 8002f64: 24000004 .word 0x24000004 8002f68: 2400000c .word 0x2400000c 08002f6c : * @note The SystemD2Clock CMSIS variable is used to store System domain2 Clock Frequency * and updated within this function * @retval HCLK frequency */ uint32_t HAL_RCC_GetHCLKFreq(void) { 8002f6c: b508 push {r3, lr} uint32_t common_system_clock; #if defined(RCC_D1CFGR_D1CPRE) common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos] & 0x1FU); 8002f6e: f7ff fdb9 bl 8002ae4 8002f72: 4a0b ldr r2, [pc, #44] @ (8002fa0 ) 8002f74: 6993 ldr r3, [r2, #24] 8002f76: f3c3 2303 ubfx r3, r3, #8, #4 8002f7a: 490a ldr r1, [pc, #40] @ (8002fa4 ) 8002f7c: 5ccb ldrb r3, [r1, r3] 8002f7e: f003 031f and.w r3, r3, #31 8002f82: fa20 f303 lsr.w r3, r0, r3 #else common_system_clock = HAL_RCC_GetSysClockFreq() >> (D1CorePrescTable[(RCC->CDCFGR1 & RCC_CDCFGR1_CDCPRE)>> RCC_CDCFGR1_CDCPRE_Pos] & 0x1FU); #endif #if defined(RCC_D1CFGR_HPRE) SystemD2Clock = (common_system_clock >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_HPRE)>> RCC_D1CFGR_HPRE_Pos]) & 0x1FU)); 8002f86: 6992 ldr r2, [r2, #24] 8002f88: f002 020f and.w r2, r2, #15 8002f8c: 5c88 ldrb r0, [r1, r2] 8002f8e: f000 001f and.w r0, r0, #31 8002f92: fa23 f000 lsr.w r0, r3, r0 8002f96: 4a04 ldr r2, [pc, #16] @ (8002fa8 ) 8002f98: 6010 str r0, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 8002f9a: 4a04 ldr r2, [pc, #16] @ (8002fac ) 8002f9c: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ return SystemD2Clock; } 8002f9e: bd08 pop {r3, pc} 8002fa0: 58024400 .word 0x58024400 8002fa4: 08014328 .word 0x08014328 8002fa8: 24000000 .word 0x24000000 8002fac: 24000004 .word 0x24000004 08002fb0 : * @note Each time PCLK1 changes, this function must be called to update the * right PCLK1 value. Otherwise, any configuration based on this function will be incorrect. * @retval PCLK1 frequency */ uint32_t HAL_RCC_GetPCLK1Freq(void) { 8002fb0: b508 push {r3, lr} #if defined (RCC_D2CFGR_D2PPRE1) /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)>> RCC_D2CFGR_D2PPRE1_Pos]) & 0x1FU)); 8002fb2: f7ff ffdb bl 8002f6c 8002fb6: 4b05 ldr r3, [pc, #20] @ (8002fcc ) 8002fb8: 69db ldr r3, [r3, #28] 8002fba: f3c3 1302 ubfx r3, r3, #4, #3 8002fbe: 4a04 ldr r2, [pc, #16] @ (8002fd0 ) 8002fc0: 5cd3 ldrb r3, [r2, r3] 8002fc2: f003 031f and.w r3, r3, #31 #else /* Get HCLK source and Compute PCLK1 frequency ---------------------------*/ return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->CDCFGR2 & RCC_CDCFGR2_CDPPRE1)>> RCC_CDCFGR2_CDPPRE1_Pos]) & 0x1FU)); #endif } 8002fc6: 40d8 lsrs r0, r3 8002fc8: bd08 pop {r3, pc} 8002fca: bf00 nop 8002fcc: 58024400 .word 0x58024400 8002fd0: 08014328 .word 0x08014328 08002fd4 : * @retval None */ void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency) { /* Set all possible values for the Clock type parameter --------------------*/ RCC_ClkInitStruct->ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_D1PCLK1 | RCC_CLOCKTYPE_PCLK1 | 8002fd4: 233f movs r3, #63 @ 0x3f 8002fd6: 6003 str r3, [r0, #0] RCC_CLOCKTYPE_PCLK2 | RCC_CLOCKTYPE_D3PCLK1 ; /* Get the SYSCLK configuration --------------------------------------------*/ RCC_ClkInitStruct->SYSCLKSource = (uint32_t)(RCC->CFGR & RCC_CFGR_SW); 8002fd8: 4b11 ldr r3, [pc, #68] @ (8003020 ) 8002fda: 691a ldr r2, [r3, #16] 8002fdc: f002 0207 and.w r2, r2, #7 8002fe0: 6042 str r2, [r0, #4] #if defined(RCC_D1CFGR_D1CPRE) /* Get the SYSCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->SYSCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1CPRE); 8002fe2: 699a ldr r2, [r3, #24] 8002fe4: f402 6270 and.w r2, r2, #3840 @ 0xf00 8002fe8: 6082 str r2, [r0, #8] /* Get the D1HCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_HPRE); 8002fea: 699a ldr r2, [r3, #24] 8002fec: f002 020f and.w r2, r2, #15 8002ff0: 60c2 str r2, [r0, #12] /* Get the APB3 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB3CLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1PPRE); 8002ff2: 699a ldr r2, [r3, #24] 8002ff4: f002 0270 and.w r2, r2, #112 @ 0x70 8002ff8: 6102 str r2, [r0, #16] /* Get the APB1 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1); 8002ffa: 69da ldr r2, [r3, #28] 8002ffc: f002 0270 and.w r2, r2, #112 @ 0x70 8003000: 6142 str r2, [r0, #20] /* Get the APB2 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE2); 8003002: 69da ldr r2, [r3, #28] 8003004: f402 62e0 and.w r2, r2, #1792 @ 0x700 8003008: 6182 str r2, [r0, #24] /* Get the APB4 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->D3CFGR & RCC_D3CFGR_D3PPRE); 800300a: 6a1b ldr r3, [r3, #32] 800300c: f003 0370 and.w r3, r3, #112 @ 0x70 8003010: 61c3 str r3, [r0, #28] /* Get the APB4 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->SRDCFGR & RCC_SRDCFGR_SRDPPRE); #endif /* Get the Flash Wait State (Latency) configuration ------------------------*/ *pFLatency = (uint32_t)(FLASH->ACR & FLASH_ACR_LATENCY); 8003012: 4b04 ldr r3, [pc, #16] @ (8003024 ) 8003014: 681b ldr r3, [r3, #0] 8003016: f003 030f and.w r3, r3, #15 800301a: 600b str r3, [r1, #0] } 800301c: 4770 bx lr 800301e: bf00 nop 8003020: 58024400 .word 0x58024400 8003024: 52002000 .word 0x52002000 08003028 : UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIM_Base_MspInit could be implemented in the user file */ } 8003028: 4770 bx lr ... 0800302c : /* Check the parameters */ assert_param(IS_TIM_INSTANCE(htim->Instance)); /* Check the TIM state */ if (htim->State != HAL_TIM_STATE_READY) 800302c: f890 303d ldrb.w r3, [r0, #61] @ 0x3d 8003030: b2db uxtb r3, r3 8003032: 2b01 cmp r3, #1 8003034: d13a bne.n 80030ac { return HAL_ERROR; } /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; 8003036: 2302 movs r3, #2 8003038: f880 303d strb.w r3, [r0, #61] @ 0x3d /* Enable the TIM Update interrupt */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE); 800303c: 6802 ldr r2, [r0, #0] 800303e: 68d3 ldr r3, [r2, #12] 8003040: f043 0301 orr.w r3, r3, #1 8003044: 60d3 str r3, [r2, #12] /* Enable the Peripheral, except in trigger mode where enable is automatically done with trigger */ if (IS_TIM_SLAVE_INSTANCE(htim->Instance)) 8003046: 6803 ldr r3, [r0, #0] 8003048: 4a1a ldr r2, [pc, #104] @ (80030b4 ) 800304a: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800304e: bf18 it ne 8003050: 4293 cmpne r3, r2 8003052: d01d beq.n 8003090 8003054: f5a2 427c sub.w r2, r2, #64512 @ 0xfc00 8003058: 4293 cmp r3, r2 800305a: d019 beq.n 8003090 800305c: f502 6280 add.w r2, r2, #1024 @ 0x400 8003060: 4293 cmp r3, r2 8003062: d015 beq.n 8003090 8003064: f502 6280 add.w r2, r2, #1024 @ 0x400 8003068: 4293 cmp r3, r2 800306a: d011 beq.n 8003090 800306c: f502 4278 add.w r2, r2, #63488 @ 0xf800 8003070: 4293 cmp r3, r2 8003072: d00d beq.n 8003090 8003074: f5a2 426c sub.w r2, r2, #60416 @ 0xec00 8003078: 4293 cmp r3, r2 800307a: d009 beq.n 8003090 800307c: f502 3294 add.w r2, r2, #75776 @ 0x12800 8003080: 4293 cmp r3, r2 8003082: d005 beq.n 8003090 __HAL_TIM_ENABLE(htim); } } else { __HAL_TIM_ENABLE(htim); 8003084: 681a ldr r2, [r3, #0] 8003086: f042 0201 orr.w r2, r2, #1 800308a: 601a str r2, [r3, #0] } /* Return function status */ return HAL_OK; 800308c: 2000 movs r0, #0 800308e: 4770 bx lr tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS; 8003090: 6899 ldr r1, [r3, #8] 8003092: 4a09 ldr r2, [pc, #36] @ (80030b8 ) 8003094: 400a ands r2, r1 if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 8003096: 2a06 cmp r2, #6 8003098: bf18 it ne 800309a: f5b2 3f80 cmpne.w r2, #65536 @ 0x10000 800309e: d007 beq.n 80030b0 __HAL_TIM_ENABLE(htim); 80030a0: 681a ldr r2, [r3, #0] 80030a2: f042 0201 orr.w r2, r2, #1 80030a6: 601a str r2, [r3, #0] return HAL_OK; 80030a8: 2000 movs r0, #0 80030aa: 4770 bx lr return HAL_ERROR; 80030ac: 2001 movs r0, #1 80030ae: 4770 bx lr return HAL_OK; 80030b0: 2000 movs r0, #0 } 80030b2: 4770 bx lr 80030b4: 40010000 .word 0x40010000 80030b8: 00010007 .word 0x00010007 080030bc : UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIM_OC_DelayElapsedCallback could be implemented in the user file */ } 80030bc: 4770 bx lr 080030be : UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIM_IC_CaptureCallback could be implemented in the user file */ } 80030be: 4770 bx lr 080030c0 : UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIM_PWM_PulseFinishedCallback could be implemented in the user file */ } 80030c0: 4770 bx lr 080030c2 : UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIM_TriggerCallback could be implemented in the user file */ } 80030c2: 4770 bx lr 080030c4 : { 80030c4: b510 push {r4, lr} 80030c6: 4604 mov r4, r0 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC1) != RESET) 80030c8: 6803 ldr r3, [r0, #0] 80030ca: 691a ldr r2, [r3, #16] 80030cc: f012 0f02 tst.w r2, #2 80030d0: d011 beq.n 80030f6 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC1) != RESET) 80030d2: 68da ldr r2, [r3, #12] 80030d4: f012 0f02 tst.w r2, #2 80030d8: d00d beq.n 80030f6 __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC1); 80030da: f06f 0202 mvn.w r2, #2 80030de: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; 80030e0: 2301 movs r3, #1 80030e2: 7703 strb r3, [r0, #28] if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U) 80030e4: 6803 ldr r3, [r0, #0] 80030e6: 699b ldr r3, [r3, #24] 80030e8: f013 0f03 tst.w r3, #3 80030ec: d079 beq.n 80031e2 HAL_TIM_IC_CaptureCallback(htim); 80030ee: f7ff ffe6 bl 80030be htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 80030f2: 2300 movs r3, #0 80030f4: 7723 strb r3, [r4, #28] if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC2) != RESET) 80030f6: 6823 ldr r3, [r4, #0] 80030f8: 691a ldr r2, [r3, #16] 80030fa: f012 0f04 tst.w r2, #4 80030fe: d012 beq.n 8003126 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC2) != RESET) 8003100: 68da ldr r2, [r3, #12] 8003102: f012 0f04 tst.w r2, #4 8003106: d00e beq.n 8003126 __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC2); 8003108: f06f 0204 mvn.w r2, #4 800310c: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; 800310e: 2302 movs r3, #2 8003110: 7723 strb r3, [r4, #28] if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U) 8003112: 6823 ldr r3, [r4, #0] 8003114: 699b ldr r3, [r3, #24] 8003116: f413 7f40 tst.w r3, #768 @ 0x300 800311a: d068 beq.n 80031ee HAL_TIM_IC_CaptureCallback(htim); 800311c: 4620 mov r0, r4 800311e: f7ff ffce bl 80030be htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 8003122: 2300 movs r3, #0 8003124: 7723 strb r3, [r4, #28] if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC3) != RESET) 8003126: 6823 ldr r3, [r4, #0] 8003128: 691a ldr r2, [r3, #16] 800312a: f012 0f08 tst.w r2, #8 800312e: d012 beq.n 8003156 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC3) != RESET) 8003130: 68da ldr r2, [r3, #12] 8003132: f012 0f08 tst.w r2, #8 8003136: d00e beq.n 8003156 __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC3); 8003138: f06f 0208 mvn.w r2, #8 800313c: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; 800313e: 2304 movs r3, #4 8003140: 7723 strb r3, [r4, #28] if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U) 8003142: 6823 ldr r3, [r4, #0] 8003144: 69db ldr r3, [r3, #28] 8003146: f013 0f03 tst.w r3, #3 800314a: d057 beq.n 80031fc HAL_TIM_IC_CaptureCallback(htim); 800314c: 4620 mov r0, r4 800314e: f7ff ffb6 bl 80030be htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 8003152: 2300 movs r3, #0 8003154: 7723 strb r3, [r4, #28] if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_CC4) != RESET) 8003156: 6823 ldr r3, [r4, #0] 8003158: 691a ldr r2, [r3, #16] 800315a: f012 0f10 tst.w r2, #16 800315e: d012 beq.n 8003186 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_CC4) != RESET) 8003160: 68da ldr r2, [r3, #12] 8003162: f012 0f10 tst.w r2, #16 8003166: d00e beq.n 8003186 __HAL_TIM_CLEAR_IT(htim, TIM_IT_CC4); 8003168: f06f 0210 mvn.w r2, #16 800316c: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; 800316e: 2308 movs r3, #8 8003170: 7723 strb r3, [r4, #28] if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U) 8003172: 6823 ldr r3, [r4, #0] 8003174: 69db ldr r3, [r3, #28] 8003176: f413 7f40 tst.w r3, #768 @ 0x300 800317a: d046 beq.n 800320a HAL_TIM_IC_CaptureCallback(htim); 800317c: 4620 mov r0, r4 800317e: f7ff ff9e bl 80030be htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 8003182: 2300 movs r3, #0 8003184: 7723 strb r3, [r4, #28] if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_UPDATE) != RESET) 8003186: 6823 ldr r3, [r4, #0] 8003188: 691a ldr r2, [r3, #16] 800318a: f012 0f01 tst.w r2, #1 800318e: d003 beq.n 8003198 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_UPDATE) != RESET) 8003190: 68da ldr r2, [r3, #12] 8003192: f012 0f01 tst.w r2, #1 8003196: d13f bne.n 8003218 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET) 8003198: 6823 ldr r3, [r4, #0] 800319a: 691a ldr r2, [r3, #16] 800319c: f012 0f80 tst.w r2, #128 @ 0x80 80031a0: d003 beq.n 80031aa if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET) 80031a2: 68da ldr r2, [r3, #12] 80031a4: f012 0f80 tst.w r2, #128 @ 0x80 80031a8: d13d bne.n 8003226 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET) 80031aa: 6823 ldr r3, [r4, #0] 80031ac: 691a ldr r2, [r3, #16] 80031ae: f412 7f80 tst.w r2, #256 @ 0x100 80031b2: d003 beq.n 80031bc if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET) 80031b4: 68da ldr r2, [r3, #12] 80031b6: f012 0f80 tst.w r2, #128 @ 0x80 80031ba: d13b bne.n 8003234 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_TRIGGER) != RESET) 80031bc: 6823 ldr r3, [r4, #0] 80031be: 691a ldr r2, [r3, #16] 80031c0: f012 0f40 tst.w r2, #64 @ 0x40 80031c4: d003 beq.n 80031ce if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_TRIGGER) != RESET) 80031c6: 68da ldr r2, [r3, #12] 80031c8: f012 0f40 tst.w r2, #64 @ 0x40 80031cc: d139 bne.n 8003242 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_COM) != RESET) 80031ce: 6823 ldr r3, [r4, #0] 80031d0: 691a ldr r2, [r3, #16] 80031d2: f012 0f20 tst.w r2, #32 80031d6: d003 beq.n 80031e0 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_COM) != RESET) 80031d8: 68da ldr r2, [r3, #12] 80031da: f012 0f20 tst.w r2, #32 80031de: d137 bne.n 8003250 } 80031e0: bd10 pop {r4, pc} HAL_TIM_OC_DelayElapsedCallback(htim); 80031e2: f7ff ff6b bl 80030bc HAL_TIM_PWM_PulseFinishedCallback(htim); 80031e6: 4620 mov r0, r4 80031e8: f7ff ff6a bl 80030c0 80031ec: e781 b.n 80030f2 HAL_TIM_OC_DelayElapsedCallback(htim); 80031ee: 4620 mov r0, r4 80031f0: f7ff ff64 bl 80030bc HAL_TIM_PWM_PulseFinishedCallback(htim); 80031f4: 4620 mov r0, r4 80031f6: f7ff ff63 bl 80030c0 80031fa: e792 b.n 8003122 HAL_TIM_OC_DelayElapsedCallback(htim); 80031fc: 4620 mov r0, r4 80031fe: f7ff ff5d bl 80030bc HAL_TIM_PWM_PulseFinishedCallback(htim); 8003202: 4620 mov r0, r4 8003204: f7ff ff5c bl 80030c0 8003208: e7a3 b.n 8003152 HAL_TIM_OC_DelayElapsedCallback(htim); 800320a: 4620 mov r0, r4 800320c: f7ff ff56 bl 80030bc HAL_TIM_PWM_PulseFinishedCallback(htim); 8003210: 4620 mov r0, r4 8003212: f7ff ff55 bl 80030c0 8003216: e7b4 b.n 8003182 __HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE); 8003218: f06f 0201 mvn.w r2, #1 800321c: 611a str r2, [r3, #16] HAL_TIM_PeriodElapsedCallback(htim); 800321e: 4620 mov r0, r4 8003220: f7fd f9fa bl 8000618 8003224: e7b8 b.n 8003198 __HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK); 8003226: f06f 0280 mvn.w r2, #128 @ 0x80 800322a: 611a str r2, [r3, #16] HAL_TIMEx_BreakCallback(htim); 800322c: 4620 mov r0, r4 800322e: f000 f8ca bl 80033c6 8003232: e7ba b.n 80031aa __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2); 8003234: f46f 7280 mvn.w r2, #256 @ 0x100 8003238: 611a str r2, [r3, #16] HAL_TIMEx_Break2Callback(htim); 800323a: 4620 mov r0, r4 800323c: f000 f8c4 bl 80033c8 8003240: e7bc b.n 80031bc __HAL_TIM_CLEAR_IT(htim, TIM_IT_TRIGGER); 8003242: f06f 0240 mvn.w r2, #64 @ 0x40 8003246: 611a str r2, [r3, #16] HAL_TIM_TriggerCallback(htim); 8003248: 4620 mov r0, r4 800324a: f7ff ff3a bl 80030c2 800324e: e7be b.n 80031ce __HAL_TIM_CLEAR_IT(htim, TIM_FLAG_COM); 8003250: f06f 0220 mvn.w r2, #32 8003254: 611a str r2, [r3, #16] HAL_TIMEx_CommutCallback(htim); 8003256: 4620 mov r0, r4 8003258: f000 f8b4 bl 80033c4 } 800325c: e7c0 b.n 80031e0 ... 08003260 : * @param TIMx TIM peripheral * @param Structure TIM Base configuration structure * @retval None */ void TIM_Base_SetConfig(TIM_TypeDef *TIMx, TIM_Base_InitTypeDef *Structure) { 8003260: b530 push {r4, r5, lr} uint32_t tmpcr1; tmpcr1 = TIMx->CR1; 8003262: 6803 ldr r3, [r0, #0] /* Set TIM Time Base Unit parameters ---------------------------------------*/ if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx)) 8003264: 4a39 ldr r2, [pc, #228] @ (800334c ) 8003266: 4290 cmp r0, r2 8003268: bf14 ite ne 800326a: f04f 0e00 movne.w lr, #0 800326e: f04f 0e01 moveq.w lr, #1 8003272: f1b0 4f80 cmp.w r0, #1073741824 @ 0x40000000 8003276: bf14 ite ne 8003278: 4672 movne r2, lr 800327a: f04e 0201 orreq.w r2, lr, #1 800327e: b9aa cbnz r2, 80032ac 8003280: 4c33 ldr r4, [pc, #204] @ (8003350 ) 8003282: 42a0 cmp r0, r4 8003284: bf14 ite ne 8003286: 2400 movne r4, #0 8003288: 2401 moveq r4, #1 800328a: 4d32 ldr r5, [pc, #200] @ (8003354 ) 800328c: 42a8 cmp r0, r5 800328e: d00d beq.n 80032ac 8003290: b964 cbnz r4, 80032ac 8003292: f104 4480 add.w r4, r4, #1073741824 @ 0x40000000 8003296: f504 3482 add.w r4, r4, #66560 @ 0x10400 800329a: 42a0 cmp r0, r4 800329c: bf14 ite ne 800329e: 2400 movne r4, #0 80032a0: 2401 moveq r4, #1 80032a2: f505 6500 add.w r5, r5, #2048 @ 0x800 80032a6: 42a8 cmp r0, r5 80032a8: d000 beq.n 80032ac 80032aa: b11c cbz r4, 80032b4 { /* Select the Counter Mode */ tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS); 80032ac: f023 0370 bic.w r3, r3, #112 @ 0x70 tmpcr1 |= Structure->CounterMode; 80032b0: 684c ldr r4, [r1, #4] 80032b2: 4323 orrs r3, r4 } if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx)) 80032b4: bb12 cbnz r2, 80032fc 80032b6: 4a26 ldr r2, [pc, #152] @ (8003350 ) 80032b8: 4290 cmp r0, r2 80032ba: bf14 ite ne 80032bc: 2200 movne r2, #0 80032be: 2201 moveq r2, #1 80032c0: 4c24 ldr r4, [pc, #144] @ (8003354 ) 80032c2: 42a0 cmp r0, r4 80032c4: d01a beq.n 80032fc 80032c6: b9ca cbnz r2, 80032fc 80032c8: f102 4280 add.w r2, r2, #1073741824 @ 0x40000000 80032cc: f502 3282 add.w r2, r2, #66560 @ 0x10400 80032d0: 4290 cmp r0, r2 80032d2: bf14 ite ne 80032d4: 2200 movne r2, #0 80032d6: 2201 moveq r2, #1 80032d8: f504 6400 add.w r4, r4, #2048 @ 0x800 80032dc: 42a0 cmp r0, r4 80032de: d00d beq.n 80032fc 80032e0: b962 cbnz r2, 80032fc 80032e2: 4a1d ldr r2, [pc, #116] @ (8003358 ) 80032e4: 4290 cmp r0, r2 80032e6: bf14 ite ne 80032e8: 2200 movne r2, #0 80032ea: 2201 moveq r2, #1 80032ec: f504 349a add.w r4, r4, #78848 @ 0x13400 80032f0: 42a0 cmp r0, r4 80032f2: d003 beq.n 80032fc 80032f4: b912 cbnz r2, 80032fc 80032f6: 4a19 ldr r2, [pc, #100] @ (800335c ) 80032f8: 4290 cmp r0, r2 80032fa: d104 bne.n 8003306 { /* Set the clock division */ tmpcr1 &= ~TIM_CR1_CKD; 80032fc: f423 7c40 bic.w ip, r3, #768 @ 0x300 tmpcr1 |= (uint32_t)Structure->ClockDivision; 8003300: 68cb ldr r3, [r1, #12] 8003302: ea43 030c orr.w r3, r3, ip } /* Set the auto-reload preload */ MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload); 8003306: f023 0380 bic.w r3, r3, #128 @ 0x80 800330a: 694a ldr r2, [r1, #20] 800330c: 4313 orrs r3, r2 TIMx->CR1 = tmpcr1; 800330e: 6003 str r3, [r0, #0] /* Set the Autoreload value */ TIMx->ARR = (uint32_t)Structure->Period ; 8003310: 688a ldr r2, [r1, #8] 8003312: 62c2 str r2, [r0, #44] @ 0x2c /* Set the Prescaler value */ TIMx->PSC = Structure->Prescaler; 8003314: 680a ldr r2, [r1, #0] 8003316: 6282 str r2, [r0, #40] @ 0x28 if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx)) 8003318: 4a11 ldr r2, [pc, #68] @ (8003360 ) 800331a: 4290 cmp r0, r2 800331c: bf14 ite ne 800331e: 4673 movne r3, lr 8003320: f04e 0301 orreq.w r3, lr, #1 8003324: b963 cbnz r3, 8003340 8003326: 4b0c ldr r3, [pc, #48] @ (8003358 ) 8003328: 4298 cmp r0, r3 800332a: bf14 ite ne 800332c: 2300 movne r3, #0 800332e: 2301 moveq r3, #1 8003330: f502 5270 add.w r2, r2, #15360 @ 0x3c00 8003334: 4290 cmp r0, r2 8003336: d003 beq.n 8003340 8003338: b913 cbnz r3, 8003340 800333a: 4b08 ldr r3, [pc, #32] @ (800335c ) 800333c: 4298 cmp r0, r3 800333e: d101 bne.n 8003344 { /* Set the Repetition Counter value */ TIMx->RCR = Structure->RepetitionCounter; 8003340: 690b ldr r3, [r1, #16] 8003342: 6303 str r3, [r0, #48] @ 0x30 } /* Generate an update event to reload the Prescaler and the repetition counter (only for advanced timer) value immediately */ TIMx->EGR = TIM_EGR_UG; 8003344: 2301 movs r3, #1 8003346: 6143 str r3, [r0, #20] } 8003348: bd30 pop {r4, r5, pc} 800334a: bf00 nop 800334c: 40010000 .word 0x40010000 8003350: 40000800 .word 0x40000800 8003354: 40000400 .word 0x40000400 8003358: 40014400 .word 0x40014400 800335c: 40014800 .word 0x40014800 8003360: 40010400 .word 0x40010400 08003364 : if (htim == NULL) 8003364: b360 cbz r0, 80033c0 { 8003366: b510 push {r4, lr} 8003368: 4604 mov r4, r0 if (htim->State == HAL_TIM_STATE_RESET) 800336a: f890 303d ldrb.w r3, [r0, #61] @ 0x3d 800336e: b313 cbz r3, 80033b6 htim->State = HAL_TIM_STATE_BUSY; 8003370: 2302 movs r3, #2 8003372: f884 303d strb.w r3, [r4, #61] @ 0x3d TIM_Base_SetConfig(htim->Instance, &htim->Init); 8003376: 4621 mov r1, r4 8003378: f851 0b04 ldr.w r0, [r1], #4 800337c: f7ff ff70 bl 8003260 htim->DMABurstState = HAL_DMA_BURST_STATE_READY; 8003380: 2301 movs r3, #1 8003382: f884 3048 strb.w r3, [r4, #72] @ 0x48 TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 8003386: f884 303e strb.w r3, [r4, #62] @ 0x3e 800338a: f884 303f strb.w r3, [r4, #63] @ 0x3f 800338e: f884 3040 strb.w r3, [r4, #64] @ 0x40 8003392: f884 3041 strb.w r3, [r4, #65] @ 0x41 8003396: f884 3042 strb.w r3, [r4, #66] @ 0x42 800339a: f884 3043 strb.w r3, [r4, #67] @ 0x43 TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 800339e: f884 3044 strb.w r3, [r4, #68] @ 0x44 80033a2: f884 3045 strb.w r3, [r4, #69] @ 0x45 80033a6: f884 3046 strb.w r3, [r4, #70] @ 0x46 80033aa: f884 3047 strb.w r3, [r4, #71] @ 0x47 htim->State = HAL_TIM_STATE_READY; 80033ae: f884 303d strb.w r3, [r4, #61] @ 0x3d return HAL_OK; 80033b2: 2000 movs r0, #0 } 80033b4: bd10 pop {r4, pc} htim->Lock = HAL_UNLOCKED; 80033b6: f880 303c strb.w r3, [r0, #60] @ 0x3c HAL_TIM_Base_MspInit(htim); 80033ba: f7ff fe35 bl 8003028 80033be: e7d7 b.n 8003370 return HAL_ERROR; 80033c0: 2001 movs r0, #1 } 80033c2: 4770 bx lr 080033c4 : UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIMEx_CommutCallback could be implemented in the user file */ } 80033c4: 4770 bx lr 080033c6 : UNUSED(htim); /* NOTE : This function should not be modified, when the callback is needed, the HAL_TIMEx_BreakCallback could be implemented in the user file */ } 80033c6: 4770 bx lr 080033c8 : UNUSED(htim); /* NOTE : This function Should not be modified, when the callback is needed, the HAL_TIMEx_Break2Callback could be implemented in the user file */ } 80033c8: 4770 bx lr 080033ca : else /* netif is down */ { /* USER CODE BEGIN 6 */ /* USER CODE END 6 */ } } 80033ca: 4770 bx lr 080033cc : return netif_is_up(&gnetif); 80033cc: 4b02 ldr r3, [pc, #8] @ (80033d8 ) 80033ce: f893 0031 ldrb.w r0, [r3, #49] @ 0x31 } 80033d2: f000 0001 and.w r0, r0, #1 80033d6: 4770 bx lr 80033d8: 24000db4 .word 0x24000db4 080033dc : { 80033dc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80033e0: b084 sub sp, #16 ip_addr_set_zero_ip4(&ipaddr); 80033e2: 4e24 ldr r6, [pc, #144] @ (8003474 ) 80033e4: 2400 movs r4, #0 80033e6: 6034 str r4, [r6, #0] ip_addr_set_zero_ip4(&netmask); 80033e8: 4f23 ldr r7, [pc, #140] @ (8003478 ) 80033ea: 603c str r4, [r7, #0] ip_addr_set_zero_ip4(&gw); 80033ec: f8df 80a8 ldr.w r8, [pc, #168] @ 8003498 80033f0: f8c8 4000 str.w r4, [r8] tcpip_init(tcpip_init_done, arg); 80033f4: 4621 mov r1, r4 80033f6: 4620 mov r0, r4 80033f8: f00e f860 bl 80114bc LOCK_TCPIP_CORE(); 80033fc: f000 fb6c bl 8003ad8 netif_add(&gnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 8003400: 4d1e ldr r5, [pc, #120] @ (800347c ) 8003402: 4b1f ldr r3, [pc, #124] @ (8003480 ) 8003404: 9302 str r3, [sp, #8] 8003406: 4b1f ldr r3, [pc, #124] @ (8003484 ) 8003408: 9301 str r3, [sp, #4] 800340a: 9400 str r4, [sp, #0] 800340c: 4643 mov r3, r8 800340e: 463a mov r2, r7 8003410: 4631 mov r1, r6 8003412: 4628 mov r0, r5 8003414: f008 fa52 bl 800b8bc netif_set_default(&gnetif); 8003418: 4628 mov r0, r5 800341a: f008 faed bl 800b9f8 if (netif_is_link_up(&gnetif)) 800341e: f895 3031 ldrb.w r3, [r5, #49] @ 0x31 8003422: f013 0f04 tst.w r3, #4 8003426: d021 beq.n 800346c netif_set_up(&gnetif); 8003428: 4628 mov r0, r5 800342a: f008 faef bl 800ba0c netif_set_link_callback(&gnetif, ethernet_link_status_updated); 800342e: 4d13 ldr r5, [pc, #76] @ (800347c ) 8003430: 4915 ldr r1, [pc, #84] @ (8003488 ) 8003432: 4628 mov r0, r5 8003434: f008 fb7c bl 800bb30 memset(&attributes, 0x0, sizeof(osThreadAttr_t)); 8003438: 4c14 ldr r4, [pc, #80] @ (800348c ) 800343a: 2224 movs r2, #36 @ 0x24 800343c: 2100 movs r1, #0 800343e: 4620 mov r0, r4 8003440: f010 f93a bl 80136b8 attributes.name = "EthLink"; 8003444: 4b12 ldr r3, [pc, #72] @ (8003490 ) 8003446: 6023 str r3, [r4, #0] attributes.stack_size = INTERFACE_THREAD_STACK_SIZE * 2; 8003448: f44f 6300 mov.w r3, #2048 @ 0x800 800344c: 6163 str r3, [r4, #20] attributes.priority = osPriorityBelowNormal; 800344e: 2310 movs r3, #16 8003450: 61a3 str r3, [r4, #24] osThreadNew(ethernet_link_thread, &gnetif, &attributes); 8003452: 4622 mov r2, r4 8003454: 4629 mov r1, r5 8003456: 480f ldr r0, [pc, #60] @ (8003494 ) 8003458: f000 fcbe bl 8003dd8 dhcp_start(&gnetif); 800345c: 4628 mov r0, r5 800345e: f005 fe87 bl 8009170 UNLOCK_TCPIP_CORE(); 8003462: f000 fb47 bl 8003af4 } 8003466: b004 add sp, #16 8003468: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} netif_set_down(&gnetif); 800346c: 4803 ldr r0, [pc, #12] @ (800347c ) 800346e: f008 faef bl 800ba50 8003472: e7dc b.n 800342e 8003474: 24000db0 .word 0x24000db0 8003478: 24000dac .word 0x24000dac 800347c: 24000db4 .word 0x24000db4 8003480: 08011421 .word 0x08011421 8003484: 080039dd .word 0x080039dd 8003488: 080033cb .word 0x080033cb 800348c: 24000d84 .word 0x24000d84 8003490: 080144ac .word 0x080144ac 8003494: 08003c5d .word 0x08003c5d 8003498: 24000da8 .word 0x24000da8 0800349c : * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_DeInit (void) { return 0; } 800349c: 2000 movs r0, #0 800349e: 4770 bx lr 080034a0 : { 80034a0: b500 push {lr} 80034a2: b083 sub sp, #12 struct pbuf *p = NULL; 80034a4: 2300 movs r3, #0 80034a6: 9301 str r3, [sp, #4] if(RxAllocStatus == RX_ALLOC_OK) 80034a8: 4b05 ldr r3, [pc, #20] @ (80034c0 ) 80034aa: 781b ldrb r3, [r3, #0] 80034ac: b11b cbz r3, 80034b6 } 80034ae: 9801 ldr r0, [sp, #4] 80034b0: b003 add sp, #12 80034b2: f85d fb04 ldr.w pc, [sp], #4 HAL_ETH_ReadData(&heth, (void **)&p); 80034b6: a901 add r1, sp, #4 80034b8: 4802 ldr r0, [pc, #8] @ (80034c4 ) 80034ba: f7fe fa93 bl 80019e4 80034be: e7f6 b.n 80034ae 80034c0: 24000f04 .word 0x24000f04 80034c4: 24000e4c .word 0x24000e4c 080034c8 : { 80034c8: b538 push {r3, r4, r5, lr} 80034ca: 4605 mov r5, r0 if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK) 80034cc: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80034d0: 4b0b ldr r3, [pc, #44] @ (8003500 ) 80034d2: 6818 ldr r0, [r3, #0] 80034d4: f000 fdf0 bl 80040b8 80034d8: 2800 cmp r0, #0 80034da: d1f7 bne.n 80034cc 80034dc: e001 b.n 80034e2 } while(p!=NULL); 80034de: 2c00 cmp r4, #0 80034e0: d0f4 beq.n 80034cc p = low_level_input( netif ); 80034e2: 4628 mov r0, r5 80034e4: f7ff ffdc bl 80034a0 if (p != NULL) 80034e8: 4604 mov r4, r0 80034ea: 2800 cmp r0, #0 80034ec: d0f7 beq.n 80034de if (netif->input( p, netif) != ERR_OK ) 80034ee: 692b ldr r3, [r5, #16] 80034f0: 4629 mov r1, r5 80034f2: 4798 blx r3 80034f4: 2800 cmp r0, #0 80034f6: d0f2 beq.n 80034de pbuf_free(p); 80034f8: 4620 mov r0, r4 80034fa: f008 fc51 bl 800bda0 80034fe: e7ee b.n 80034de 8003500: 24000f00 .word 0x24000f00 08003504 : { 8003504: b530 push {r4, r5, lr} 8003506: b08d sub sp, #52 @ 0x34 8003508: 460c mov r4, r1 memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef)); 800350a: 2230 movs r2, #48 @ 0x30 800350c: 2100 movs r1, #0 800350e: 4668 mov r0, sp 8003510: f010 f8d2 bl 80136b8 for(q = p; q != NULL; q = q->next) 8003514: 4622 mov r2, r4 uint32_t i = 0U; 8003516: 2300 movs r3, #0 for(q = p; q != NULL; q = q->next) 8003518: e003 b.n 8003522 if(q->next == NULL) 800351a: 6811 ldr r1, [r2, #0] 800351c: b1f1 cbz r1, 800355c i++; 800351e: 3301 adds r3, #1 for(q = p; q != NULL; q = q->next) 8003520: 6812 ldr r2, [r2, #0] 8003522: b322 cbz r2, 800356e if(i >= ETH_TX_DESC_CNT) 8003524: 2b03 cmp r3, #3 8003526: d83b bhi.n 80035a0 Txbuffer[i].buffer = q->payload; 8003528: 6851 ldr r1, [r2, #4] 800352a: eb03 0c43 add.w ip, r3, r3, lsl #1 800352e: a80c add r0, sp, #48 @ 0x30 8003530: eb00 0c8c add.w ip, r0, ip, lsl #2 8003534: f84c 1c30 str.w r1, [ip, #-48] Txbuffer[i].len = q->len; 8003538: 8951 ldrh r1, [r2, #10] 800353a: f84c 1c2c str.w r1, [ip, #-44] if(i>0) 800353e: 2b00 cmp r3, #0 8003540: d0eb beq.n 800351a Txbuffer[i-1].next = &Txbuffer[i]; 8003542: f103 3cff add.w ip, r3, #4294967295 @ 0xffffffff 8003546: eb03 0143 add.w r1, r3, r3, lsl #1 800354a: eb0d 0181 add.w r1, sp, r1, lsl #2 800354e: eb0c 0c4c add.w ip, ip, ip, lsl #1 8003552: eb00 0c8c add.w ip, r0, ip, lsl #2 8003556: f84c 1c28 str.w r1, [ip, #-40] 800355a: e7de b.n 800351a Txbuffer[i].next = NULL; 800355c: eb03 0143 add.w r1, r3, r3, lsl #1 8003560: a80c add r0, sp, #48 @ 0x30 8003562: eb00 0181 add.w r1, r0, r1, lsl #2 8003566: 2000 movs r0, #0 8003568: f841 0c28 str.w r0, [r1, #-40] 800356c: e7d7 b.n 800351e TxConfig.Length = p->tot_len; 800356e: 8923 ldrh r3, [r4, #8] 8003570: 4d0d ldr r5, [pc, #52] @ (80035a8 ) 8003572: 606b str r3, [r5, #4] TxConfig.TxBuffer = Txbuffer; 8003574: f8c5 d008 str.w sp, [r5, #8] TxConfig.pData = p; 8003578: 636c str r4, [r5, #52] @ 0x34 pbuf_ref(p); 800357a: 4620 mov r0, r4 800357c: f008 fd9e bl 800c0bc HAL_ETH_Transmit_IT(&heth, &TxConfig); 8003580: 4c0a ldr r4, [pc, #40] @ (80035ac ) 8003582: 4629 mov r1, r5 8003584: 4620 mov r0, r4 8003586: f7fe f9f9 bl 800197c osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(1000)); 800358a: f44f 717a mov.w r1, #1000 @ 0x3e8 800358e: 4b08 ldr r3, [pc, #32] @ (80035b0 ) 8003590: 6818 ldr r0, [r3, #0] 8003592: f000 fd91 bl 80040b8 HAL_ETH_ReleaseTxPacket(&heth); 8003596: 4620 mov r0, r4 8003598: f7fe faa3 bl 8001ae2 return errval; 800359c: 2000 movs r0, #0 800359e: e001 b.n 80035a4 return ERR_IF; 80035a0: f06f 000b mvn.w r0, #11 } 80035a4: b00d add sp, #52 @ 0x34 80035a6: bd30 pop {r4, r5, pc} 80035a8: 24000e14 .word 0x24000e14 80035ac: 24000e4c .word 0x24000e4c 80035b0: 24000efc .word 0x24000efc 080035b4 : { 80035b4: b508 push {r3, lr} 80035b6: 4601 mov r1, r0 LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf); 80035b8: 4807 ldr r0, [pc, #28] @ (80035d8 ) 80035ba: f008 f83d bl 800b638 if (RxAllocStatus == RX_ALLOC_ERROR) 80035be: 4b07 ldr r3, [pc, #28] @ (80035dc ) 80035c0: 781b ldrb r3, [r3, #0] 80035c2: 2b01 cmp r3, #1 80035c4: d000 beq.n 80035c8 } 80035c6: bd08 pop {r3, pc} RxAllocStatus = RX_ALLOC_OK; 80035c8: 4b04 ldr r3, [pc, #16] @ (80035dc ) 80035ca: 2200 movs r2, #0 80035cc: 701a strb r2, [r3, #0] osSemaphoreRelease(RxPktSemaphore); 80035ce: 4b04 ldr r3, [pc, #16] @ (80035e0 ) 80035d0: 6818 ldr r0, [r3, #0] 80035d2: f000 fda5 bl 8004120 } 80035d6: e7f6 b.n 80035c6 80035d8: 0801463c .word 0x0801463c 80035dc: 24000f04 .word 0x24000f04 80035e0: 24000f00 .word 0x24000f00 080035e4 : /** * @brief Get the time in millisecons used for internal PHY driver process. * @retval Time value */ int32_t ETH_PHY_IO_GetTick(void) { 80035e4: b508 push {r3, lr} return HAL_GetTick(); 80035e6: f7fd fc51 bl 8000e8c } 80035ea: bd08 pop {r3, pc} 080035ec : { 80035ec: b508 push {r3, lr} HAL_ETH_SetMDIOClockRange(&heth); 80035ee: 4802 ldr r0, [pc, #8] @ (80035f8 ) 80035f0: f7fe fce6 bl 8001fc0 } 80035f4: 2000 movs r0, #0 80035f6: bd08 pop {r3, pc} 80035f8: 24000e4c .word 0x24000e4c 080035fc : { 80035fc: b508 push {r3, lr} 80035fe: 4613 mov r3, r2 if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK) 8003600: 460a mov r2, r1 8003602: 4601 mov r1, r0 8003604: 4803 ldr r0, [pc, #12] @ (8003614 ) 8003606: f7fe fb75 bl 8001cf4 800360a: b900 cbnz r0, 800360e } 800360c: bd08 pop {r3, pc} return -1; 800360e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8003612: e7fb b.n 800360c 8003614: 24000e4c .word 0x24000e4c 08003618 : { 8003618: b508 push {r3, lr} 800361a: 4613 mov r3, r2 if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK) 800361c: 460a mov r2, r1 800361e: 4601 mov r1, r0 8003620: 4803 ldr r0, [pc, #12] @ (8003630 ) 8003622: f7fe fb97 bl 8001d54 8003626: b900 cbnz r0, 800362a } 8003628: bd08 pop {r3, pc} return -1; 800362a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800362e: e7fb b.n 8003628 8003630: 24000e4c .word 0x24000e4c 08003634 : { 8003634: b508 push {r3, lr} osSemaphoreRelease(RxPktSemaphore); 8003636: 4b02 ldr r3, [pc, #8] @ (8003640 ) 8003638: 6818 ldr r0, [r3, #0] 800363a: f000 fd71 bl 8004120 } 800363e: bd08 pop {r3, pc} 8003640: 24000f00 .word 0x24000f00 08003644 : { 8003644: b508 push {r3, lr} osSemaphoreRelease(TxPktSemaphore); 8003646: 4b02 ldr r3, [pc, #8] @ (8003650 ) 8003648: 6818 ldr r0, [r3, #0] 800364a: f000 fd69 bl 8004120 } 800364e: bd08 pop {r3, pc} 8003650: 24000efc .word 0x24000efc 08003654 : { 8003654: b508 push {r3, lr} if((HAL_ETH_GetDMAError(handlerEth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU) 8003656: f7fe fd95 bl 8002184 800365a: f010 0f80 tst.w r0, #128 @ 0x80 800365e: d100 bne.n 8003662 } 8003660: bd08 pop {r3, pc} osSemaphoreRelease(RxPktSemaphore); 8003662: 4b02 ldr r3, [pc, #8] @ (800366c ) 8003664: 6818 ldr r0, [r3, #0] 8003666: f000 fd5b bl 8004120 } 800366a: e7f9 b.n 8003660 800366c: 24000f00 .word 0x24000f00 08003670 : { 8003670: b508 push {r3, lr} return HAL_GetTick(); 8003672: f7fd fc0b bl 8000e8c } 8003676: bd08 pop {r3, pc} 08003678 : { 8003678: b5f0 push {r4, r5, r6, r7, lr} 800367a: b08f sub sp, #60 @ 0x3c GPIO_InitTypeDef GPIO_InitStruct = {0}; 800367c: 2300 movs r3, #0 800367e: 9309 str r3, [sp, #36] @ 0x24 8003680: 930a str r3, [sp, #40] @ 0x28 8003682: 930b str r3, [sp, #44] @ 0x2c 8003684: 930c str r3, [sp, #48] @ 0x30 8003686: 930d str r3, [sp, #52] @ 0x34 if(ethHandle->Instance==ETH) 8003688: 6802 ldr r2, [r0, #0] 800368a: 4b5d ldr r3, [pc, #372] @ (8003800 ) 800368c: 429a cmp r2, r3 800368e: d001 beq.n 8003694 } 8003690: b00f add sp, #60 @ 0x3c 8003692: bdf0 pop {r4, r5, r6, r7, pc} __HAL_RCC_ETH1MAC_CLK_ENABLE(); 8003694: 4b5b ldr r3, [pc, #364] @ (8003804 ) 8003696: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8 800369a: f442 4200 orr.w r2, r2, #32768 @ 0x8000 800369e: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8 80036a2: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8 80036a6: f402 4200 and.w r2, r2, #32768 @ 0x8000 80036aa: 9200 str r2, [sp, #0] 80036ac: 9a00 ldr r2, [sp, #0] __HAL_RCC_ETH1TX_CLK_ENABLE(); 80036ae: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8 80036b2: f442 3280 orr.w r2, r2, #65536 @ 0x10000 80036b6: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8 80036ba: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8 80036be: f402 3280 and.w r2, r2, #65536 @ 0x10000 80036c2: 9201 str r2, [sp, #4] 80036c4: 9a01 ldr r2, [sp, #4] __HAL_RCC_ETH1RX_CLK_ENABLE(); 80036c6: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8 80036ca: f442 3200 orr.w r2, r2, #131072 @ 0x20000 80036ce: f8c3 20d8 str.w r2, [r3, #216] @ 0xd8 80036d2: f8d3 20d8 ldr.w r2, [r3, #216] @ 0xd8 80036d6: f402 3200 and.w r2, r2, #131072 @ 0x20000 80036da: 9202 str r2, [sp, #8] 80036dc: 9a02 ldr r2, [sp, #8] __HAL_RCC_GPIOG_CLK_ENABLE(); 80036de: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80036e2: f042 0240 orr.w r2, r2, #64 @ 0x40 80036e6: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 80036ea: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80036ee: f002 0240 and.w r2, r2, #64 @ 0x40 80036f2: 9203 str r2, [sp, #12] 80036f4: 9a03 ldr r2, [sp, #12] __HAL_RCC_GPIOE_CLK_ENABLE(); 80036f6: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 80036fa: f042 0210 orr.w r2, r2, #16 80036fe: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 8003702: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8003706: f002 0210 and.w r2, r2, #16 800370a: 9204 str r2, [sp, #16] 800370c: 9a04 ldr r2, [sp, #16] __HAL_RCC_GPIOI_CLK_ENABLE(); 800370e: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8003712: f442 7280 orr.w r2, r2, #256 @ 0x100 8003716: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 800371a: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 800371e: f402 7280 and.w r2, r2, #256 @ 0x100 8003722: 9205 str r2, [sp, #20] 8003724: 9a05 ldr r2, [sp, #20] __HAL_RCC_GPIOC_CLK_ENABLE(); 8003726: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 800372a: f042 0204 orr.w r2, r2, #4 800372e: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 8003732: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8003736: f002 0204 and.w r2, r2, #4 800373a: 9206 str r2, [sp, #24] 800373c: 9a06 ldr r2, [sp, #24] __HAL_RCC_GPIOA_CLK_ENABLE(); 800373e: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 8003742: f042 0201 orr.w r2, r2, #1 8003746: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 800374a: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 800374e: f002 0201 and.w r2, r2, #1 8003752: 9207 str r2, [sp, #28] 8003754: 9a07 ldr r2, [sp, #28] __HAL_RCC_GPIOB_CLK_ENABLE(); 8003756: f8d3 20e0 ldr.w r2, [r3, #224] @ 0xe0 800375a: f042 0202 orr.w r2, r2, #2 800375e: f8c3 20e0 str.w r2, [r3, #224] @ 0xe0 8003762: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003766: f003 0302 and.w r3, r3, #2 800376a: 9308 str r3, [sp, #32] 800376c: 9b08 ldr r3, [sp, #32] GPIO_InitStruct.Pin = MII_TX_EN_Pin|MII_TXD1_Pin|MII_TXD0_Pin; 800376e: f44f 5360 mov.w r3, #14336 @ 0x3800 8003772: 9309 str r3, [sp, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003774: 2702 movs r7, #2 8003776: 970a str r7, [sp, #40] @ 0x28 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8003778: 2403 movs r4, #3 800377a: 940c str r4, [sp, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 800377c: 260b movs r6, #11 800377e: 960d str r6, [sp, #52] @ 0x34 HAL_GPIO_Init(GPIOG, &GPIO_InitStruct); 8003780: a909 add r1, sp, #36 @ 0x24 8003782: 4821 ldr r0, [pc, #132] @ (8003808 ) 8003784: f7fe fd02 bl 800218c GPIO_InitStruct.Pin = MII_TXD3_Pin; 8003788: 2304 movs r3, #4 800378a: 9309 str r3, [sp, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 800378c: 970a str r7, [sp, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 800378e: 2500 movs r5, #0 8003790: 950b str r5, [sp, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8003792: 940c str r4, [sp, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8003794: 960d str r6, [sp, #52] @ 0x34 HAL_GPIO_Init(MII_TXD3_GPIO_Port, &GPIO_InitStruct); 8003796: a909 add r1, sp, #36 @ 0x24 8003798: 481c ldr r0, [pc, #112] @ (800380c ) 800379a: f7fe fcf7 bl 800218c GPIO_InitStruct.Pin = MII_RX_ER_Pin; 800379e: f44f 6380 mov.w r3, #1024 @ 0x400 80037a2: 9309 str r3, [sp, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80037a4: 970a str r7, [sp, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80037a6: 950b str r5, [sp, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80037a8: 940c str r4, [sp, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80037aa: 960d str r6, [sp, #52] @ 0x34 HAL_GPIO_Init(MII_RX_ER_GPIO_Port, &GPIO_InitStruct); 80037ac: a909 add r1, sp, #36 @ 0x24 80037ae: 4818 ldr r0, [pc, #96] @ (8003810 ) 80037b0: f7fe fcec bl 800218c GPIO_InitStruct.Pin = MII_MDC_Pin|MII_TXD2_Pin|MII_TX_CLK_Pin|MII_RXD0_Pin 80037b4: 233e movs r3, #62 @ 0x3e 80037b6: 9309 str r3, [sp, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80037b8: 970a str r7, [sp, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80037ba: 950b str r5, [sp, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80037bc: 940c str r4, [sp, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80037be: 960d str r6, [sp, #52] @ 0x34 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 80037c0: a909 add r1, sp, #36 @ 0x24 80037c2: 4814 ldr r0, [pc, #80] @ (8003814 ) 80037c4: f7fe fce2 bl 800218c GPIO_InitStruct.Pin = MII_MDIO_Pin|GPIO_PIN_1|MII_CRS_Pin|GPIO_PIN_7 80037c8: 238f movs r3, #143 @ 0x8f 80037ca: 9309 str r3, [sp, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80037cc: 970a str r7, [sp, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80037ce: 950b str r5, [sp, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80037d0: 940c str r4, [sp, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80037d2: 960d str r6, [sp, #52] @ 0x34 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 80037d4: a909 add r1, sp, #36 @ 0x24 80037d6: 4810 ldr r0, [pc, #64] @ (8003818 ) 80037d8: f7fe fcd8 bl 800218c GPIO_InitStruct.Pin = MII_RXD3_Pin|MII_RXD2_Pin; 80037dc: 9409 str r4, [sp, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 80037de: 970a str r7, [sp, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 80037e0: 950b str r5, [sp, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 80037e2: 940c str r4, [sp, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 80037e4: 960d str r6, [sp, #52] @ 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 80037e6: a909 add r1, sp, #36 @ 0x24 80037e8: 480c ldr r0, [pc, #48] @ (800381c ) 80037ea: f7fe fccf bl 800218c HAL_NVIC_SetPriority(ETH_IRQn, 5, 0); 80037ee: 462a mov r2, r5 80037f0: 2105 movs r1, #5 80037f2: 203d movs r0, #61 @ 0x3d 80037f4: f7fd fbb2 bl 8000f5c HAL_NVIC_EnableIRQ(ETH_IRQn); 80037f8: 203d movs r0, #61 @ 0x3d 80037fa: f7fd fbbf bl 8000f7c } 80037fe: e747 b.n 8003690 8003800: 40028000 .word 0x40028000 8003804: 58024400 .word 0x58024400 8003808: 58021800 .word 0x58021800 800380c: 58021000 .word 0x58021000 8003810: 58022000 .word 0x58022000 8003814: 58020800 .word 0x58020800 8003818: 58020000 .word 0x58020000 800381c: 58020400 .word 0x58020400 08003820 : __weak void ethernetif_notify_conn_changed(struct netif *netif) { /* NOTE : This is function could be implemented in user file when the callback is needed, */ } 8003820: 4770 bx lr ... 08003824 : { 8003824: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8003828: b0a4 sub sp, #144 @ 0x90 800382a: 4604 mov r4, r0 ETH_MACConfigTypeDef MACConf = {0}; 800382c: 2264 movs r2, #100 @ 0x64 800382e: 2100 movs r1, #0 8003830: a802 add r0, sp, #8 8003832: f00f ff41 bl 80136b8 heth.Instance = ETH; 8003836: 4d5d ldr r5, [pc, #372] @ (80039ac ) 8003838: 4b5d ldr r3, [pc, #372] @ (80039b0 ) 800383a: 602b str r3, [r5, #0] MACAddr[0] = 0x7C; 800383c: 237c movs r3, #124 @ 0x7c 800383e: f88d 3000 strb.w r3, [sp] MACAddr[1] = 0xF6; 8003842: 23f6 movs r3, #246 @ 0xf6 8003844: f88d 3001 strb.w r3, [sp, #1] MACAddr[2] = 0x66; 8003848: 2366 movs r3, #102 @ 0x66 800384a: f88d 3002 strb.w r3, [sp, #2] MACAddr[3] = 0xE4; 800384e: 23e4 movs r3, #228 @ 0xe4 8003850: f88d 3003 strb.w r3, [sp, #3] MACAddr[4] = 0xB5; 8003854: 23b5 movs r3, #181 @ 0xb5 8003856: f88d 3004 strb.w r3, [sp, #4] MACAddr[5] = 0x41; 800385a: 2341 movs r3, #65 @ 0x41 800385c: f88d 3005 strb.w r3, [sp, #5] heth.Init.MACAddr = &MACAddr[0]; 8003860: f8c5 d004 str.w sp, [r5, #4] heth.Init.MediaInterface = HAL_ETH_MII_MODE; 8003864: 2600 movs r6, #0 8003866: 722e strb r6, [r5, #8] heth.Init.TxDesc = DMATxDscrTab; 8003868: 4b52 ldr r3, [pc, #328] @ (80039b4 ) 800386a: 60eb str r3, [r5, #12] heth.Init.RxDesc = DMARxDscrTab; 800386c: 4b52 ldr r3, [pc, #328] @ (80039b8 ) 800386e: 612b str r3, [r5, #16] heth.Init.RxBuffLen = 1536; 8003870: f44f 63c0 mov.w r3, #1536 @ 0x600 8003874: 616b str r3, [r5, #20] hal_eth_init_status = HAL_ETH_Init(&heth); 8003876: 4628 mov r0, r5 8003878: f7fe fbde bl 8002038 800387c: 4607 mov r7, r0 memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig)); 800387e: f8df 8158 ldr.w r8, [pc, #344] @ 80039d8 8003882: 2238 movs r2, #56 @ 0x38 8003884: 4631 mov r1, r6 8003886: 4640 mov r0, r8 8003888: f00f ff16 bl 80136b8 TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD; 800388c: 2321 movs r3, #33 @ 0x21 800388e: f8c8 3000 str.w r3, [r8] TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC; 8003892: f44f 3340 mov.w r3, #196608 @ 0x30000 8003896: f8c8 3014 str.w r3, [r8, #20] LWIP_MEMPOOL_INIT(RX_POOL); 800389a: 4848 ldr r0, [pc, #288] @ (80039bc ) 800389c: f007 fe78 bl 800b590 netif->hwaddr_len = ETH_HWADDR_LEN; 80038a0: 2306 movs r3, #6 80038a2: f884 3030 strb.w r3, [r4, #48] @ 0x30 netif->hwaddr[0] = heth.Init.MACAddr[0]; 80038a6: 686b ldr r3, [r5, #4] 80038a8: 781a ldrb r2, [r3, #0] 80038aa: f884 202a strb.w r2, [r4, #42] @ 0x2a netif->hwaddr[1] = heth.Init.MACAddr[1]; 80038ae: 785a ldrb r2, [r3, #1] 80038b0: f884 202b strb.w r2, [r4, #43] @ 0x2b netif->hwaddr[2] = heth.Init.MACAddr[2]; 80038b4: 789a ldrb r2, [r3, #2] 80038b6: f884 202c strb.w r2, [r4, #44] @ 0x2c netif->hwaddr[3] = heth.Init.MACAddr[3]; 80038ba: 78da ldrb r2, [r3, #3] 80038bc: f884 202d strb.w r2, [r4, #45] @ 0x2d netif->hwaddr[4] = heth.Init.MACAddr[4]; 80038c0: 791a ldrb r2, [r3, #4] 80038c2: f884 202e strb.w r2, [r4, #46] @ 0x2e netif->hwaddr[5] = heth.Init.MACAddr[5]; 80038c6: 795b ldrb r3, [r3, #5] 80038c8: f884 302f strb.w r3, [r4, #47] @ 0x2f netif->mtu = ETH_MAX_PAYLOAD; 80038cc: f240 53dc movw r3, #1500 @ 0x5dc 80038d0: 8523 strh r3, [r4, #40] @ 0x28 netif->flags |= NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; 80038d2: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 80038d6: f043 030a orr.w r3, r3, #10 80038da: f884 3031 strb.w r3, [r4, #49] @ 0x31 RxPktSemaphore = osSemaphoreNew(1, 1, NULL); 80038de: 4632 mov r2, r6 80038e0: 2101 movs r1, #1 80038e2: 4608 mov r0, r1 80038e4: f000 fb8c bl 8004000 80038e8: 4b35 ldr r3, [pc, #212] @ (80039c0 ) 80038ea: 6018 str r0, [r3, #0] TxPktSemaphore = osSemaphoreNew(1, 1, NULL); 80038ec: 4632 mov r2, r6 80038ee: 2101 movs r1, #1 80038f0: 4608 mov r0, r1 80038f2: f000 fb85 bl 8004000 80038f6: 4b33 ldr r3, [pc, #204] @ (80039c4 ) 80038f8: 6018 str r0, [r3, #0] memset(&attributes, 0x0, sizeof(osThreadAttr_t)); 80038fa: 2224 movs r2, #36 @ 0x24 80038fc: 4631 mov r1, r6 80038fe: a81b add r0, sp, #108 @ 0x6c 8003900: f00f feda bl 80136b8 attributes.name = "EthIf"; 8003904: 4b30 ldr r3, [pc, #192] @ (80039c8 ) 8003906: 931b str r3, [sp, #108] @ 0x6c attributes.stack_size = INTERFACE_THREAD_STACK_SIZE; 8003908: f44f 6380 mov.w r3, #1024 @ 0x400 800390c: 9320 str r3, [sp, #128] @ 0x80 attributes.priority = osPriorityRealtime; 800390e: 2330 movs r3, #48 @ 0x30 8003910: 9321 str r3, [sp, #132] @ 0x84 osThreadNew(ethernetif_input, netif, &attributes); 8003912: aa1b add r2, sp, #108 @ 0x6c 8003914: 4621 mov r1, r4 8003916: 482d ldr r0, [pc, #180] @ (80039cc ) 8003918: f000 fa5e bl 8003dd8 LAN8742_RegisterBusIO(&LAN8742, &LAN8742_IOCtx); 800391c: 4d2c ldr r5, [pc, #176] @ (80039d0 ) 800391e: 492d ldr r1, [pc, #180] @ (80039d4 ) 8003920: 4628 mov r0, r5 8003922: f7fd f990 bl 8000c46 LAN8742_Init(&LAN8742); 8003926: 4628 mov r0, r5 8003928: f7fd f9ac bl 8000c84 if (hal_eth_init_status == HAL_OK) 800392c: bbc7 cbnz r7, 80039a0 PHYLinkState = LAN8742_GetLinkState(&LAN8742); 800392e: 4628 mov r0, r5 8003930: f7fd fa10 bl 8000d54 if(PHYLinkState <= LAN8742_STATUS_LINK_DOWN) 8003934: 2801 cmp r0, #1 8003936: dd21 ble.n 800397c switch (PHYLinkState) 8003938: 2804 cmp r0, #4 800393a: d02a beq.n 8003992 800393c: 2805 cmp r0, #5 800393e: d02c beq.n 800399a 8003940: 2803 cmp r0, #3 8003942: d022 beq.n 800398a 8003944: f44f 4680 mov.w r6, #16384 @ 0x4000 8003948: f44f 5700 mov.w r7, #8192 @ 0x2000 HAL_ETH_GetMACConfig(&heth, &MACConf); 800394c: 4d17 ldr r5, [pc, #92] @ (80039ac ) 800394e: a902 add r1, sp, #8 8003950: 4628 mov r0, r5 8003952: f7fe fa33 bl 8001dbc MACConf.DuplexMode = duplex; 8003956: 9708 str r7, [sp, #32] MACConf.Speed = speed; 8003958: 9607 str r6, [sp, #28] HAL_ETH_SetMACConfig(&heth, &MACConf); 800395a: a902 add r1, sp, #8 800395c: 4628 mov r0, r5 800395e: f7fe fb20 bl 8001fa2 HAL_ETH_Start_IT(&heth); 8003962: 4628 mov r0, r5 8003964: f7fd ff62 bl 800182c netif_set_up(netif); 8003968: 4620 mov r0, r4 800396a: f008 f84f bl 800ba0c netif_set_link_up(netif); 800396e: 4620 mov r0, r4 8003970: f008 f892 bl 800ba98 ethernetif_notify_conn_changed(netif); 8003974: 4620 mov r0, r4 8003976: f7ff ff53 bl 8003820 800397a: e013 b.n 80039a4 netif_set_link_down(netif); 800397c: 4620 mov r0, r4 800397e: f008 f8b5 bl 800baec netif_set_down(netif); 8003982: 4620 mov r0, r4 8003984: f008 f864 bl 800ba50 8003988: e00c b.n 80039a4 speed = ETH_SPEED_100M; 800398a: f44f 4680 mov.w r6, #16384 @ 0x4000 duplex = ETH_HALFDUPLEX_MODE; 800398e: 2700 movs r7, #0 8003990: e7dc b.n 800394c speed = ETH_SPEED_10M; 8003992: 2600 movs r6, #0 duplex = ETH_FULLDUPLEX_MODE; 8003994: f44f 5700 mov.w r7, #8192 @ 0x2000 8003998: e7d8 b.n 800394c speed = ETH_SPEED_10M; 800399a: 2600 movs r6, #0 duplex = ETH_HALFDUPLEX_MODE; 800399c: 4637 mov r7, r6 800399e: e7d5 b.n 800394c Error_Handler(); 80039a0: f7fc fe4c bl 800063c } 80039a4: b024 add sp, #144 @ 0x90 80039a6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80039aa: bf00 nop 80039ac: 24000e4c .word 0x24000e4c 80039b0: 40028000 .word 0x40028000 80039b4: 30040100 .word 0x30040100 80039b8: 30040000 .word 0x30040000 80039bc: 0801463c .word 0x0801463c 80039c0: 24000f00 .word 0x24000f00 80039c4: 24000efc .word 0x24000efc 80039c8: 080144b4 .word 0x080144b4 80039cc: 080034c9 .word 0x080034c9 80039d0: 24000df4 .word 0x24000df4 80039d4: 24000010 .word 0x24000010 80039d8: 24000e14 .word 0x24000e14 080039dc : { 80039dc: b510 push {r4, lr} LWIP_ASSERT("netif != NULL", (netif != NULL)); 80039de: 4604 mov r4, r0 80039e0: b170 cbz r0, 8003a00 netif->name[0] = IFNAME0; 80039e2: 2373 movs r3, #115 @ 0x73 80039e4: f884 3032 strb.w r3, [r4, #50] @ 0x32 netif->name[1] = IFNAME1; 80039e8: 2374 movs r3, #116 @ 0x74 80039ea: f884 3033 strb.w r3, [r4, #51] @ 0x33 netif->output = etharp_output; 80039ee: 4b08 ldr r3, [pc, #32] @ (8003a10 ) 80039f0: 6163 str r3, [r4, #20] netif->linkoutput = low_level_output; 80039f2: 4b08 ldr r3, [pc, #32] @ (8003a14 ) 80039f4: 61a3 str r3, [r4, #24] low_level_init(netif); 80039f6: 4620 mov r0, r4 80039f8: f7ff ff14 bl 8003824 } 80039fc: 2000 movs r0, #0 80039fe: bd10 pop {r4, pc} LWIP_ASSERT("netif != NULL", (netif != NULL)); 8003a00: 4b05 ldr r3, [pc, #20] @ (8003a18 ) 8003a02: f240 222b movw r2, #555 @ 0x22b 8003a06: 4905 ldr r1, [pc, #20] @ (8003a1c ) 8003a08: 4805 ldr r0, [pc, #20] @ (8003a20 ) 8003a0a: f00f fcfd bl 8013408 8003a0e: e7e8 b.n 80039e2 8003a10: 08009b29 .word 0x08009b29 8003a14: 08003505 .word 0x08003505 8003a18: 080144bc .word 0x080144bc 8003a1c: 080144d8 .word 0x080144d8 8003a20: 080144e8 .word 0x080144e8 08003a24 : void HAL_ETH_RxAllocateCallback(uint8_t **buff) { 8003a24: b510 push {r4, lr} 8003a26: b082 sub sp, #8 8003a28: 4604 mov r4, r0 /* USER CODE BEGIN HAL ETH RxAllocateCallback */ struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL); 8003a2a: 480e ldr r0, [pc, #56] @ (8003a64 ) 8003a2c: f007 fdd4 bl 800b5d8 if (p) 8003a30: b188 cbz r0, 8003a56 8003a32: 4603 mov r3, r0 { /* Get the buff from the struct pbuf address. */ *buff = (uint8_t *)p + offsetof(RxBuff_t, buff); 8003a34: f100 0220 add.w r2, r0, #32 8003a38: 6022 str r2, [r4, #0] p->custom_free_function = pbuf_free_custom; 8003a3a: 4a0b ldr r2, [pc, #44] @ (8003a68 ) 8003a3c: 6102 str r2, [r0, #16] /* Initialize the struct pbuf. * This must be performed whenever a buffer's allocated because it may be * changed by lwIP or the app, e.g., pbuf_free decrements ref. */ pbuf_alloced_custom(PBUF_RAW, 0, PBUF_REF, p, *buff, ETH_RX_BUFFER_SIZE); 8003a3e: f44f 62c0 mov.w r2, #1536 @ 0x600 8003a42: 9201 str r2, [sp, #4] 8003a44: 6822 ldr r2, [r4, #0] 8003a46: 9200 str r2, [sp, #0] 8003a48: 2241 movs r2, #65 @ 0x41 8003a4a: 2100 movs r1, #0 8003a4c: 4608 mov r0, r1 8003a4e: f008 f93d bl 800bccc { RxAllocStatus = RX_ALLOC_ERROR; *buff = NULL; } /* USER CODE END HAL ETH RxAllocateCallback */ } 8003a52: b002 add sp, #8 8003a54: bd10 pop {r4, pc} RxAllocStatus = RX_ALLOC_ERROR; 8003a56: 4b05 ldr r3, [pc, #20] @ (8003a6c ) 8003a58: 2201 movs r2, #1 8003a5a: 701a strb r2, [r3, #0] *buff = NULL; 8003a5c: 2300 movs r3, #0 8003a5e: 6023 str r3, [r4, #0] } 8003a60: e7f7 b.n 8003a52 8003a62: bf00 nop 8003a64: 0801463c .word 0x0801463c 8003a68: 080035b5 .word 0x080035b5 8003a6c: 24000f04 .word 0x24000f04 08003a70 : void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length) { 8003a70: b430 push {r4, r5} struct pbuf **ppStart = (struct pbuf **)pStart; struct pbuf **ppEnd = (struct pbuf **)pEnd; struct pbuf *p = NULL; /* Get the struct pbuf from the buff address. */ p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff)); 8003a72: f1a2 0420 sub.w r4, r2, #32 p->next = NULL; 8003a76: 2500 movs r5, #0 8003a78: f842 5c20 str.w r5, [r2, #-32] p->tot_len = 0; 8003a7c: f822 5c18 strh.w r5, [r2, #-24] p->len = Length; 8003a80: f822 3c16 strh.w r3, [r2, #-22] /* Chain the buffer. */ if (!*ppStart) 8003a84: 6805 ldr r5, [r0, #0] 8003a86: b125 cbz r5, 8003a92 *ppStart = p; } else { /* Chain the buffer to the end of the packet. */ (*ppEnd)->next = p; 8003a88: 680d ldr r5, [r1, #0] 8003a8a: 602c str r4, [r5, #0] } *ppEnd = p; 8003a8c: 600c str r4, [r1, #0] /* Update the total length of all the buffers of the chain. Each pbuf in the chain should have its tot_len * set to its own length, plus the length of all the following pbufs in the chain. */ for (p = *ppStart; p != NULL; p = p->next) 8003a8e: 6801 ldr r1, [r0, #0] 8003a90: e005 b.n 8003a9e *ppStart = p; 8003a92: 6004 str r4, [r0, #0] 8003a94: e7fa b.n 8003a8c { p->tot_len += Length; 8003a96: 8908 ldrh r0, [r1, #8] 8003a98: 4418 add r0, r3 8003a9a: 8108 strh r0, [r1, #8] for (p = *ppStart; p != NULL; p = p->next) 8003a9c: 6809 ldr r1, [r1, #0] 8003a9e: 2900 cmp r1, #0 8003aa0: d1f9 bne.n 8003a96 if ( dsize > 0 ) { 8003aa2: b183 cbz r3, 8003ac6 int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); 8003aa4: 4611 mov r1, r2 8003aa6: f002 021f and.w r2, r2, #31 8003aaa: 4413 add r3, r2 8003aac: f3bf 8f4f dsb sy SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ 8003ab0: 4a06 ldr r2, [pc, #24] @ (8003acc ) 8003ab2: f8c2 125c str.w r1, [r2, #604] @ 0x25c op_addr += __SCB_DCACHE_LINE_SIZE; 8003ab6: 3120 adds r1, #32 op_size -= __SCB_DCACHE_LINE_SIZE; 8003ab8: 3b20 subs r3, #32 } while ( op_size > 0 ); 8003aba: 2b00 cmp r3, #0 8003abc: dcf8 bgt.n 8003ab0 8003abe: f3bf 8f4f dsb sy __ASM volatile ("isb 0xF":::"memory"); 8003ac2: f3bf 8f6f isb sy /* Invalidate data cache because Rx DMA's writing to physical memory makes it stale. */ SCB_InvalidateDCache_by_Addr((uint32_t *)buff, Length); /* USER CODE END HAL ETH RxLinkCallback */ } 8003ac6: bc30 pop {r4, r5} 8003ac8: 4770 bx lr 8003aca: bf00 nop 8003acc: e000ed00 .word 0xe000ed00 08003ad0 : void HAL_ETH_TxFreeCallback(uint32_t * buff) { 8003ad0: b508 push {r3, lr} /* USER CODE BEGIN HAL ETH TxFreeCallback */ pbuf_free((struct pbuf *)buff); 8003ad2: f008 f965 bl 800bda0 /* USER CODE END HAL ETH TxFreeCallback */ } 8003ad6: bd08 pop {r3, pc} 08003ad8 : /* ETH_CODE: add functions needed for proper multithreading support and check */ static osThreadId_t lwip_core_lock_holder_thread_id; static osThreadId_t lwip_tcpip_thread_id; void sys_lock_tcpip_core(void){ 8003ad8: b508 push {r3, lr} sys_mutex_lock(&lock_tcpip_core); 8003ada: 4804 ldr r0, [pc, #16] @ (8003aec ) 8003adc: f009 faa6 bl 800d02c lwip_core_lock_holder_thread_id = osThreadGetId(); 8003ae0: f000 f9d8 bl 8003e94 8003ae4: 4b02 ldr r3, [pc, #8] @ (8003af0 ) 8003ae6: 6018 str r0, [r3, #0] } 8003ae8: bd08 pop {r3, pc} 8003aea: bf00 nop 8003aec: 24019c24 .word 0x24019c24 8003af0: 24000df0 .word 0x24000df0 08003af4 : void sys_unlock_tcpip_core(void){ 8003af4: b508 push {r3, lr} lwip_core_lock_holder_thread_id = 0; 8003af6: 4b03 ldr r3, [pc, #12] @ (8003b04 ) 8003af8: 2200 movs r2, #0 8003afa: 601a str r2, [r3, #0] sys_mutex_unlock(&lock_tcpip_core); 8003afc: 4802 ldr r0, [pc, #8] @ (8003b08 ) 8003afe: f009 fa9c bl 800d03a } 8003b02: bd08 pop {r3, pc} 8003b04: 24000df0 .word 0x24000df0 8003b08: 24019c24 .word 0x24019c24 08003b0c : void sys_check_core_locking(void){ 8003b0c: b510 push {r4, lr} /* Embedded systems should check we are NOT in an interrupt context here */ LWIP_ASSERT("Function called from interrupt context", (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0); 8003b0e: 4b12 ldr r3, [pc, #72] @ (8003b58 ) 8003b10: 685b ldr r3, [r3, #4] 8003b12: f3c3 0308 ubfx r3, r3, #0, #9 8003b16: b9b3 cbnz r3, 8003b46 if (lwip_tcpip_thread_id != 0) { 8003b18: 4b10 ldr r3, [pc, #64] @ (8003b5c ) 8003b1a: 681b ldr r3, [r3, #0] 8003b1c: b193 cbz r3, 8003b44 osThreadId_t current_thread_id = osThreadGetId(); 8003b1e: f000 f9b9 bl 8003e94 8003b22: 4604 mov r4, r0 #if LWIP_TCPIP_CORE_LOCKING LWIP_ASSERT("Function called without core lock", current_thread_id == lwip_core_lock_holder_thread_id); 8003b24: 4b0e ldr r3, [pc, #56] @ (8003b60 ) 8003b26: 681b ldr r3, [r3, #0] 8003b28: 4283 cmp r3, r0 8003b2a: d006 beq.n 8003b3a 8003b2c: 4b0d ldr r3, [pc, #52] @ (8003b64 ) 8003b2e: f240 4224 movw r2, #1060 @ 0x424 8003b32: 490d ldr r1, [pc, #52] @ (8003b68 ) 8003b34: 480d ldr r0, [pc, #52] @ (8003b6c ) 8003b36: f00f fc67 bl 8013408 /* ETH_CODE: to easily check that example has correct handling of core lock * This will trigger breakpoint (__BKPT) */ #warning Below check should be removed in production code if(current_thread_id != lwip_core_lock_holder_thread_id) __BKPT(0); 8003b3a: 4b09 ldr r3, [pc, #36] @ (8003b60 ) 8003b3c: 681b ldr r3, [r3, #0] 8003b3e: 42a3 cmp r3, r4 8003b40: d000 beq.n 8003b44 8003b42: be00 bkpt 0x0000 #else /* LWIP_TCPIP_CORE_LOCKING */ LWIP_ASSERT("Function called from wrong thread", current_thread_id == lwip_tcpip_thread_id); #endif /* LWIP_TCPIP_CORE_LOCKING */ LWIP_UNUSED_ARG(current_thread_id); /* for LWIP_NOASSERT */ } } 8003b44: bd10 pop {r4, pc} LWIP_ASSERT("Function called from interrupt context", (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) == 0); 8003b46: 4b07 ldr r3, [pc, #28] @ (8003b64 ) 8003b48: f240 421e movw r2, #1054 @ 0x41e 8003b4c: 4908 ldr r1, [pc, #32] @ (8003b70 ) 8003b4e: 4807 ldr r0, [pc, #28] @ (8003b6c ) 8003b50: f00f fc5a bl 8013408 8003b54: e7e0 b.n 8003b18 8003b56: bf00 nop 8003b58: e000ed00 .word 0xe000ed00 8003b5c: 24000dec .word 0x24000dec 8003b60: 24000df0 .word 0x24000df0 8003b64: 080144bc .word 0x080144bc 8003b68: 08014538 .word 0x08014538 8003b6c: 080144e8 .word 0x080144e8 8003b70: 08014510 .word 0x08014510 08003b74 : void sys_mark_tcpip_thread(void){ 8003b74: b508 push {r3, lr} lwip_tcpip_thread_id = osThreadGetId(); 8003b76: f000 f98d bl 8003e94 8003b7a: 4b01 ldr r3, [pc, #4] @ (8003b80 ) 8003b7c: 6018 str r0, [r3, #0] } 8003b7e: bd08 pop {r3, pc} 8003b80: 24000dec .word 0x24000dec 08003b84 : void dhcp_sm(struct netif *netif, enum dhcp_states *state) { 8003b84: b530 push {r4, r5, lr} 8003b86: b089 sub sp, #36 @ 0x24 8003b88: 4605 mov r5, r0 8003b8a: 460c mov r4, r1 ip_addr_t gw; #ifdef DHCP_USER_LOGS uint8_t iptxt[20]; #endif switch(*state) 8003b8c: 780b ldrb r3, [r1, #0] 8003b8e: 2b02 cmp r3, #2 8003b90: d00b beq.n 8003baa 8003b92: 2b03 cmp r3, #3 8003b94: d04c beq.n 8003c30 8003b96: 2b01 cmp r3, #1 8003b98: d001 beq.n 8003b9e } break; default: break; } } 8003b9a: b009 add sp, #36 @ 0x24 8003b9c: bd30 pop {r4, r5, pc} *state = DHCP_WAIT_ADDRESS; 8003b9e: 2302 movs r3, #2 8003ba0: 700b strb r3, [r1, #0] printf(" State: Looking for DHCP server ...\n"); 8003ba2: 4827 ldr r0, [pc, #156] @ (8003c40 ) 8003ba4: f00f fc98 bl 80134d8 break; 8003ba8: e7f7 b.n 8003b9a if (dhcp_supplied_address(netif)) 8003baa: f005 fa67 bl 800907c 8003bae: bb88 cbnz r0, 8003c14 dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 8003bb0: 6a6b ldr r3, [r5, #36] @ 0x24 if (dhcp->tries > MAX_DHCP_TRIES) 8003bb2: 799b ldrb r3, [r3, #6] 8003bb4: 2b04 cmp r3, #4 8003bb6: d9f0 bls.n 8003b9a *state = DHCP_TIMEOUT; 8003bb8: 2304 movs r3, #4 8003bba: 7023 strb r3, [r4, #0] LOCK_TCPIP_CORE(); 8003bbc: f7ff ff8c bl 8003ad8 dhcp_stop(netif); 8003bc0: 4628 mov r0, r5 8003bc2: f005 fbb5 bl 8009330 UNLOCK_TCPIP_CORE(); 8003bc6: f7ff ff95 bl 8003af4 ipaddr_aton(STATIC_IP, &ipaddr); 8003bca: a907 add r1, sp, #28 8003bcc: 481d ldr r0, [pc, #116] @ (8003c44 ) 8003bce: f006 fc61 bl 800a494 ipaddr_aton(STATIC_MASK, &netmask); 8003bd2: a906 add r1, sp, #24 8003bd4: 481c ldr r0, [pc, #112] @ (8003c48 ) 8003bd6: f006 fc5d bl 800a494 ipaddr_aton(STATIC_GW, &gw); 8003bda: a905 add r1, sp, #20 8003bdc: 481b ldr r0, [pc, #108] @ (8003c4c ) 8003bde: f006 fc59 bl 800a494 LOCK_TCPIP_CORE(); 8003be2: f7ff ff79 bl 8003ad8 netif_set_addr(netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw)); 8003be6: ab05 add r3, sp, #20 8003be8: aa06 add r2, sp, #24 8003bea: a907 add r1, sp, #28 8003bec: 4628 mov r0, r5 8003bee: f007 fe2d bl 800b84c UNLOCK_TCPIP_CORE(); 8003bf2: f7ff ff7f bl 8003af4 sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 8003bf6: 1d28 adds r0, r5, #4 8003bf8: f006 fd5c bl 800a6b4 8003bfc: 4601 mov r1, r0 8003bfe: 4668 mov r0, sp 8003c00: f00f fe37 bl 8013872 printf("DHCP Timeout !! \n"); 8003c04: 4812 ldr r0, [pc, #72] @ (8003c50 ) 8003c06: f00f fc67 bl 80134d8 printf("Static IP address: %s\n", iptxt); 8003c0a: 4669 mov r1, sp 8003c0c: 4811 ldr r0, [pc, #68] @ (8003c54 ) 8003c0e: f00f fbfb bl 8013408 8003c12: e7c2 b.n 8003b9a *state = DHCP_ADDRESS_ASSIGNED; 8003c14: 2303 movs r3, #3 8003c16: 7023 strb r3, [r4, #0] sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 8003c18: 1d28 adds r0, r5, #4 8003c1a: f006 fd4b bl 800a6b4 8003c1e: 4601 mov r1, r0 8003c20: 4668 mov r0, sp 8003c22: f00f fe26 bl 8013872 printf("IP address assigned by a DHCP server: %s\n", iptxt); 8003c26: 4669 mov r1, sp 8003c28: 480b ldr r0, [pc, #44] @ (8003c58 ) 8003c2a: f00f fbed bl 8013408 8003c2e: e7b4 b.n 8003b9a dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 8003c30: 6a43 ldr r3, [r0, #36] @ 0x24 if(dhcp->state == 3) 8003c32: 795b ldrb r3, [r3, #5] 8003c34: 2b03 cmp r3, #3 8003c36: d1b0 bne.n 8003b9a *state = DHCP_START; 8003c38: 2301 movs r3, #1 8003c3a: 700b strb r3, [r1, #0] } 8003c3c: e7ad b.n 8003b9a 8003c3e: bf00 nop 8003c40: 0801455c .word 0x0801455c 8003c44: 080145b0 .word 0x080145b0 8003c48: 080145c0 .word 0x080145c0 8003c4c: 080145d0 .word 0x080145d0 8003c50: 080145dc .word 0x080145dc 8003c54: 080145f0 .word 0x080145f0 8003c58: 08014584 .word 0x08014584 08003c5c : { 8003c5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8003c60: b09a sub sp, #104 @ 0x68 8003c62: 4604 mov r4, r0 ETH_MACConfigTypeDef MACConf = {0}; 8003c64: 2264 movs r2, #100 @ 0x64 8003c66: 2100 movs r1, #0 8003c68: a801 add r0, sp, #4 8003c6a: f00f fd25 bl 80136b8 enum dhcp_states DHCP_state = DHCP_START; 8003c6e: 2301 movs r3, #1 8003c70: f88d 3003 strb.w r3, [sp, #3] uint32_t linkchanged = 0U, speed = 0U, duplex = 0U; 8003c74: 2600 movs r6, #0 8003c76: 4637 mov r7, r6 8003c78: 4635 mov r5, r6 8003c7a: e028 b.n 8003cce else if(!netif_is_link_up(netif) && (PHYLinkState > LAN8742_STATUS_LINK_DOWN)) 8003c7c: f013 0f04 tst.w r3, #4 8003c80: d11c bne.n 8003cbc 8003c82: 2801 cmp r0, #1 8003c84: dd1a ble.n 8003cbc switch (PHYLinkState) 8003c86: 3802 subs r0, #2 8003c88: 2803 cmp r0, #3 8003c8a: d816 bhi.n 8003cba 8003c8c: e8df f000 tbb [pc, r0] 8003c90: 0c070210 .word 0x0c070210 duplex = ETH_HALFDUPLEX_MODE; 8003c94: 2600 movs r6, #0 speed = ETH_SPEED_100M; 8003c96: f44f 4780 mov.w r7, #16384 @ 0x4000 linkchanged = 1; 8003c9a: 2501 movs r5, #1 break; 8003c9c: e00d b.n 8003cba duplex = ETH_FULLDUPLEX_MODE; 8003c9e: f44f 5600 mov.w r6, #8192 @ 0x2000 speed = ETH_SPEED_10M; 8003ca2: 2700 movs r7, #0 linkchanged = 1; 8003ca4: 2501 movs r5, #1 break; 8003ca6: e008 b.n 8003cba duplex = ETH_HALFDUPLEX_MODE; 8003ca8: 2600 movs r6, #0 speed = ETH_SPEED_10M; 8003caa: 4637 mov r7, r6 linkchanged = 1; 8003cac: 2501 movs r5, #1 break; 8003cae: e004 b.n 8003cba duplex = ETH_FULLDUPLEX_MODE; 8003cb0: f44f 5600 mov.w r6, #8192 @ 0x2000 speed = ETH_SPEED_100M; 8003cb4: f44f 4780 mov.w r7, #16384 @ 0x4000 linkchanged = 1; 8003cb8: 2501 movs r5, #1 if(linkchanged) 8003cba: bb1d cbnz r5, 8003d04 dhcp_sm(netif, &DHCP_state); 8003cbc: f10d 0103 add.w r1, sp, #3 8003cc0: 4620 mov r0, r4 8003cc2: f7ff ff5f bl 8003b84 osDelay(pdMS_TO_TICKS(500)); 8003cc6: f44f 70fa mov.w r0, #500 @ 0x1f4 8003cca: f000 f8e7 bl 8003e9c PHYLinkState = LAN8742_GetLinkState(&LAN8742); 8003cce: 481c ldr r0, [pc, #112] @ (8003d40 ) 8003cd0: f7fd f840 bl 8000d54 if(netif_is_link_up(netif) && (PHYLinkState <= LAN8742_STATUS_LINK_DOWN)) 8003cd4: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 8003cd8: f013 0f04 tst.w r3, #4 8003cdc: d0ce beq.n 8003c7c 8003cde: 2801 cmp r0, #1 8003ce0: dccc bgt.n 8003c7c HAL_ETH_Stop_IT(&heth); 8003ce2: 4818 ldr r0, [pc, #96] @ (8003d44 ) 8003ce4: f7fd fe00 bl 80018e8 LOCK_TCPIP_CORE(); 8003ce8: f7ff fef6 bl 8003ad8 netif_set_down(netif); 8003cec: 4620 mov r0, r4 8003cee: f007 feaf bl 800ba50 netif_set_link_down(netif); 8003cf2: 4620 mov r0, r4 8003cf4: f007 fefa bl 800baec UNLOCK_TCPIP_CORE(); 8003cf8: f7ff fefc bl 8003af4 printf("Link down...\r\n"); 8003cfc: 4812 ldr r0, [pc, #72] @ (8003d48 ) 8003cfe: f00f fbeb bl 80134d8 8003d02: e7db b.n 8003cbc HAL_ETH_GetMACConfig(&heth, &MACConf); 8003d04: f8df 803c ldr.w r8, [pc, #60] @ 8003d44 8003d08: a901 add r1, sp, #4 8003d0a: 4640 mov r0, r8 8003d0c: f7fe f856 bl 8001dbc MACConf.DuplexMode = duplex; 8003d10: 9607 str r6, [sp, #28] MACConf.Speed = speed; 8003d12: 9706 str r7, [sp, #24] HAL_ETH_SetMACConfig(&heth, &MACConf); 8003d14: a901 add r1, sp, #4 8003d16: 4640 mov r0, r8 8003d18: f7fe f943 bl 8001fa2 HAL_ETH_Start(&heth); 8003d1c: 4640 mov r0, r8 8003d1e: f7fd fd85 bl 800182c LOCK_TCPIP_CORE(); 8003d22: f7ff fed9 bl 8003ad8 netif_set_up(netif); 8003d26: 4620 mov r0, r4 8003d28: f007 fe70 bl 800ba0c netif_set_link_up(netif); 8003d2c: 4620 mov r0, r4 8003d2e: f007 feb3 bl 800ba98 UNLOCK_TCPIP_CORE(); 8003d32: f7ff fedf bl 8003af4 printf("Link up...\r\n"); 8003d36: 4805 ldr r0, [pc, #20] @ (8003d4c ) 8003d38: f00f fbce bl 80134d8 8003d3c: e7be b.n 8003cbc 8003d3e: bf00 nop 8003d40: 24000df4 .word 0x24000df4 8003d44: 24000e4c .word 0x24000e4c 8003d48: 08014608 .word 0x08014608 8003d4c: 08014618 .word 0x08014618 08003d50 : /* SysTick handler implementation that also clears overflow flag. */ #if (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0) void SysTick_Handler (void) { 8003d50: b508 push {r3, lr} /* Clear overflow flag */ SysTick->CTRL; 8003d52: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8003d56: 691b ldr r3, [r3, #16] if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) { 8003d58: f002 f92a bl 8005fb0 8003d5c: 2801 cmp r0, #1 8003d5e: d100 bne.n 8003d62 /* Call tick handler */ xPortSysTickHandler(); } } 8003d60: bd08 pop {r3, pc} xPortSysTickHandler(); 8003d62: f000 fd67 bl 8004834 } 8003d66: e7fb b.n 8003d60 08003d68 : __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8003d68: f3ef 8305 mrs r3, IPSR /*---------------------------------------------------------------------------*/ osStatus_t osKernelInitialize (void) { osStatus_t stat; if (IS_IRQ()) { 8003d6c: b92b cbnz r3, 8003d7a stat = osErrorISR; } else { if (KernelState == osKernelInactive) { 8003d6e: 4b06 ldr r3, [pc, #24] @ (8003d88 ) 8003d70: 6818 ldr r0, [r3, #0] 8003d72: b928 cbnz r0, 8003d80 EvrFreeRTOSSetup(0U); #endif #if defined(USE_FreeRTOS_HEAP_5) && (HEAP_5_REGION_SETUP == 1) vPortDefineHeapRegions (configHEAP_5_REGIONS); #endif KernelState = osKernelReady; 8003d74: 2201 movs r2, #1 8003d76: 601a str r2, [r3, #0] stat = osOK; 8003d78: 4770 bx lr stat = osErrorISR; 8003d7a: f06f 0005 mvn.w r0, #5 8003d7e: 4770 bx lr } else { stat = osError; 8003d80: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } } return (stat); } 8003d84: 4770 bx lr 8003d86: bf00 nop 8003d88: 2400285c .word 0x2400285c 08003d8c : 8003d8c: f3ef 8305 mrs r3, IPSR } osStatus_t osKernelStart (void) { osStatus_t stat; if (IS_IRQ()) { 8003d90: b973 cbnz r3, 8003db0 stat = osErrorISR; } else { if (KernelState == osKernelReady) { 8003d92: 4b0a ldr r3, [pc, #40] @ (8003dbc ) 8003d94: 681b ldr r3, [r3, #0] 8003d96: 2b01 cmp r3, #1 8003d98: d10d bne.n 8003db6 osStatus_t osKernelStart (void) { 8003d9a: b510 push {r4, lr} SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8003d9c: 2400 movs r4, #0 8003d9e: 4b08 ldr r3, [pc, #32] @ (8003dc0 ) 8003da0: 77dc strb r4, [r3, #31] /* Ensure SVC priority is at the reset value */ SVC_Setup(); /* Change state to enable IRQ masking check */ KernelState = osKernelRunning; 8003da2: 4b06 ldr r3, [pc, #24] @ (8003dbc ) 8003da4: 2202 movs r2, #2 8003da6: 601a str r2, [r3, #0] /* Start the kernel scheduler */ vTaskStartScheduler(); 8003da8: f001 fe34 bl 8005a14 stat = osOK; 8003dac: 4620 mov r0, r4 stat = osError; } } return (stat); } 8003dae: bd10 pop {r4, pc} stat = osErrorISR; 8003db0: f06f 0005 mvn.w r0, #5 8003db4: 4770 bx lr stat = osError; 8003db6: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } 8003dba: 4770 bx lr 8003dbc: 2400285c .word 0x2400285c 8003dc0: e000ed00 .word 0xe000ed00 08003dc4 : } return (lock); } uint32_t osKernelGetTickCount (void) { 8003dc4: b508 push {r3, lr} 8003dc6: f3ef 8305 mrs r3, IPSR TickType_t ticks; if (IS_IRQ()) { 8003dca: b113 cbz r3, 8003dd2 ticks = xTaskGetTickCountFromISR(); 8003dcc: f001 fe86 bl 8005adc } else { ticks = xTaskGetTickCount(); } return (ticks); } 8003dd0: bd08 pop {r3, pc} ticks = xTaskGetTickCount(); 8003dd2: f001 fe7d bl 8005ad0 return (ticks); 8003dd6: e7fb b.n 8003dd0 08003dd8 : return (configCPU_CLOCK_HZ); } /*---------------------------------------------------------------------------*/ osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) { 8003dd8: b5f0 push {r4, r5, r6, r7, lr} 8003dda: b087 sub sp, #28 uint32_t stack; TaskHandle_t hTask; UBaseType_t prio; int32_t mem; hTask = NULL; 8003ddc: 2400 movs r4, #0 8003dde: 9405 str r4, [sp, #20] 8003de0: f3ef 8405 mrs r4, IPSR if (!IS_IRQ() && (func != NULL)) { 8003de4: bb74 cbnz r4, 8003e44 8003de6: b368 cbz r0, 8003e44 prio = (UBaseType_t)osPriorityNormal; name = NULL; mem = -1; if (attr != NULL) { 8003de8: b322 cbz r2, 8003e34 if (attr->name != NULL) { 8003dea: 6815 ldr r5, [r2, #0] name = attr->name; } if (attr->priority != osPriorityNone) { 8003dec: 6993 ldr r3, [r2, #24] 8003dee: b903 cbnz r3, 8003df2 prio = (UBaseType_t)osPriorityNormal; 8003df0: 2318 movs r3, #24 prio = (UBaseType_t)attr->priority; } if ((prio < osPriorityIdle) || (prio > osPriorityISR) || ((attr->attr_bits & osThreadJoinable) == osThreadJoinable)) { 8003df2: 1e5c subs r4, r3, #1 8003df4: 2c37 cmp r4, #55 @ 0x37 8003df6: d849 bhi.n 8003e8c 8003df8: 6854 ldr r4, [r2, #4] 8003dfa: f014 0f01 tst.w r4, #1 8003dfe: d147 bne.n 8003e90 return (NULL); } if (attr->stack_size > 0U) { 8003e00: 6956 ldr r6, [r2, #20] 8003e02: b16e cbz r6, 8003e20 /* In FreeRTOS stack is not in bytes, but in sizeof(StackType_t) which is 4 on ARM ports. */ /* Stack size should be therefore 4 byte aligned in order to avoid division caused side effects */ stack = attr->stack_size / sizeof(StackType_t); 8003e04: ea4f 0c96 mov.w ip, r6, lsr #2 } if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) && 8003e08: 6894 ldr r4, [r2, #8] 8003e0a: b12c cbz r4, 8003e18 8003e0c: 68d7 ldr r7, [r2, #12] 8003e0e: 2fa7 cmp r7, #167 @ 0xa7 8003e10: d902 bls.n 8003e18 8003e12: 6917 ldr r7, [r2, #16] 8003e14: b107 cbz r7, 8003e18 (attr->stack_mem != NULL) && (attr->stack_size > 0U)) { 8003e16: b9c6 cbnz r6, 8003e4a mem = 1; } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) { 8003e18: b12c cbz r4, 8003e26 mem = -1; 8003e1a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 8003e1e: e00e b.n 8003e3e stack = configMINIMAL_STACK_SIZE; 8003e20: f44f 7c00 mov.w ip, #512 @ 0x200 8003e24: e7f0 b.n 8003e08 if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) { 8003e26: 68d4 ldr r4, [r2, #12] 8003e28: b98c cbnz r4, 8003e4e 8003e2a: 6914 ldr r4, [r2, #16] 8003e2c: b194 cbz r4, 8003e54 mem = -1; 8003e2e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 8003e32: e004 b.n 8003e3e name = NULL; 8003e34: 4615 mov r5, r2 mem = 0; } } } else { mem = 0; 8003e36: 2400 movs r4, #0 prio = (UBaseType_t)osPriorityNormal; 8003e38: 2318 movs r3, #24 stack = configMINIMAL_STACK_SIZE; 8003e3a: f44f 7c00 mov.w ip, #512 @ 0x200 } if (mem == 1) { 8003e3e: 2c01 cmp r4, #1 8003e40: d00a beq.n 8003e58 hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, (StaticTask_t *)attr->cb_mem); #endif } else { if (mem == 0) { 8003e42: b1ac cbz r4, 8003e70 #endif } } } return ((osThreadId_t)hTask); 8003e44: 9805 ldr r0, [sp, #20] } 8003e46: b007 add sp, #28 8003e48: bdf0 pop {r4, r5, r6, r7, pc} mem = 1; 8003e4a: 2401 movs r4, #1 8003e4c: e7f7 b.n 8003e3e mem = -1; 8003e4e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 8003e52: e7f4 b.n 8003e3e mem = 0; 8003e54: 2400 movs r4, #0 8003e56: e7f2 b.n 8003e3e hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 8003e58: 6914 ldr r4, [r2, #16] (StaticTask_t *)attr->cb_mem); 8003e5a: 6892 ldr r2, [r2, #8] hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 8003e5c: 9202 str r2, [sp, #8] 8003e5e: 9401 str r4, [sp, #4] 8003e60: 9300 str r3, [sp, #0] 8003e62: 460b mov r3, r1 8003e64: 4662 mov r2, ip 8003e66: 4629 mov r1, r5 8003e68: f001 fd66 bl 8005938 8003e6c: 9005 str r0, [sp, #20] 8003e6e: e7e9 b.n 8003e44 if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) { 8003e70: aa05 add r2, sp, #20 8003e72: 9201 str r2, [sp, #4] 8003e74: 9300 str r3, [sp, #0] 8003e76: 460b mov r3, r1 8003e78: fa1f f28c uxth.w r2, ip 8003e7c: 4629 mov r1, r5 8003e7e: f001 fd96 bl 80059ae 8003e82: 2801 cmp r0, #1 8003e84: d0de beq.n 8003e44 hTask = NULL; 8003e86: 2300 movs r3, #0 8003e88: 9305 str r3, [sp, #20] 8003e8a: e7db b.n 8003e44 return (NULL); 8003e8c: 2000 movs r0, #0 8003e8e: e7da b.n 8003e46 8003e90: 2000 movs r0, #0 8003e92: e7d8 b.n 8003e46 08003e94 : } return (name); } osThreadId_t osThreadGetId (void) { 8003e94: b508 push {r3, lr} osThreadId_t id; id = (osThreadId_t)xTaskGetCurrentTaskHandle(); 8003e96: f002 f885 bl 8005fa4 return (id); } 8003e9a: bd08 pop {r3, pc} 08003e9c : /* Return flags before clearing */ return (rflags); } #endif /* (configUSE_OS2_THREAD_FLAGS == 1) */ osStatus_t osDelay (uint32_t ticks) { 8003e9c: b508 push {r3, lr} 8003e9e: f3ef 8305 mrs r3, IPSR osStatus_t stat; if (IS_IRQ()) { 8003ea2: b933 cbnz r3, 8003eb2 stat = osErrorISR; } else { stat = osOK; if (ticks != 0U) { 8003ea4: b908 cbnz r0, 8003eaa stat = osOK; 8003ea6: 2000 movs r0, #0 vTaskDelay(ticks); } } return (stat); } 8003ea8: bd08 pop {r3, pc} vTaskDelay(ticks); 8003eaa: f001 ff27 bl 8005cfc stat = osOK; 8003eae: 2000 movs r0, #0 8003eb0: e7fa b.n 8003ea8 stat = osErrorISR; 8003eb2: f06f 0005 mvn.w r0, #5 8003eb6: e7f7 b.n 8003ea8 08003eb8 : } /*---------------------------------------------------------------------------*/ #if (configUSE_OS2_MUTEX == 1) osMutexId_t osMutexNew (const osMutexAttr_t *attr) { 8003eb8: b570 push {r4, r5, r6, lr} 8003eba: f3ef 8305 mrs r3, IPSR const char *name; #endif hMutex = NULL; if (!IS_IRQ()) { 8003ebe: 2b00 cmp r3, #0 8003ec0: d143 bne.n 8003f4a 8003ec2: 4604 mov r4, r0 if (attr != NULL) { 8003ec4: b100 cbz r0, 8003ec8 type = attr->attr_bits; 8003ec6: 6843 ldr r3, [r0, #4] } else { type = 0U; } if ((type & osMutexRecursive) == osMutexRecursive) { 8003ec8: f013 0601 ands.w r6, r3, #1 8003ecc: d000 beq.n 8003ed0 rmtx = 1U; 8003ece: 2601 movs r6, #1 } else { rmtx = 0U; } if ((type & osMutexRobust) != osMutexRobust) { 8003ed0: f013 0f08 tst.w r3, #8 8003ed4: d13c bne.n 8003f50 mem = -1; if (attr != NULL) { 8003ed6: b36c cbz r4, 8003f34 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 8003ed8: 68a1 ldr r1, [r4, #8] 8003eda: b111 cbz r1, 8003ee2 8003edc: 68e3 ldr r3, [r4, #12] 8003ede: 2b4f cmp r3, #79 @ 0x4f 8003ee0: d81d bhi.n 8003f1e mem = 1; } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8003ee2: b1b9 cbz r1, 8003f14 mem = -1; 8003ee4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem); } #endif } else { if (mem == 0) { 8003ee8: bb6b cbnz r3, 8003f46 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) if (rmtx != 0U) { 8003eea: b33e cbz r6, 8003f3c #if (configUSE_RECURSIVE_MUTEXES == 1) hMutex = xSemaphoreCreateRecursiveMutex (); 8003eec: 2004 movs r0, #4 8003eee: f001 f808 bl 8004f02 8003ef2: 4605 mov r5, r0 #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hMutex != NULL) { 8003ef4: b12d cbz r5, 8003f02 if (attr != NULL) { 8003ef6: b104 cbz r4, 8003efa name = attr->name; 8003ef8: 6824 ldr r4, [r4, #0] } else { name = NULL; } vQueueAddToRegistry (hMutex, name); 8003efa: 4621 mov r1, r4 8003efc: 4628 mov r0, r5 8003efe: f001 fb13 bl 8005528 } #endif if ((hMutex != NULL) && (rmtx != 0U)) { 8003f02: 2d00 cmp r5, #0 8003f04: bf0c ite eq 8003f06: 2600 moveq r6, #0 8003f08: f006 0601 andne.w r6, r6, #1 8003f0c: b1f6 cbz r6, 8003f4c hMutex = (SemaphoreHandle_t)((uint32_t)hMutex | 1U); 8003f0e: f045 0501 orr.w r5, r5, #1 8003f12: e01b b.n 8003f4c if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8003f14: 68e3 ldr r3, [r4, #12] 8003f16: b17b cbz r3, 8003f38 mem = -1; 8003f18: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8003f1c: e7e4 b.n 8003ee8 if (rmtx != 0U) { 8003f1e: b126 cbz r6, 8003f2a hMutex = xSemaphoreCreateRecursiveMutexStatic (attr->cb_mem); 8003f20: 2004 movs r0, #4 8003f22: f000 fff9 bl 8004f18 8003f26: 4605 mov r5, r0 8003f28: e7e4 b.n 8003ef4 hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem); 8003f2a: 2001 movs r0, #1 8003f2c: f000 fff4 bl 8004f18 8003f30: 4605 mov r5, r0 8003f32: e7df b.n 8003ef4 mem = 0; 8003f34: 2300 movs r3, #0 8003f36: e7d7 b.n 8003ee8 mem = 0; 8003f38: 2300 movs r3, #0 8003f3a: e7d5 b.n 8003ee8 hMutex = xSemaphoreCreateMutex (); 8003f3c: 2001 movs r0, #1 8003f3e: f000 ffe0 bl 8004f02 8003f42: 4605 mov r5, r0 8003f44: e7d6 b.n 8003ef4 hMutex = NULL; 8003f46: 2500 movs r5, #0 8003f48: e7db b.n 8003f02 8003f4a: 2500 movs r5, #0 } } } return ((osMutexId_t)hMutex); } 8003f4c: 4628 mov r0, r5 8003f4e: bd70 pop {r4, r5, r6, pc} hMutex = NULL; 8003f50: 2500 movs r5, #0 return ((osMutexId_t)hMutex); 8003f52: e7fb b.n 8003f4c 08003f54 : 8003f54: f3ef 8205 mrs r2, IPSR rmtx = (uint32_t)mutex_id & 1U; stat = osOK; if (IS_IRQ()) { 8003f58: b9da cbnz r2, 8003f92 osStatus_t osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) { 8003f5a: b510 push {r4, lr} 8003f5c: 4603 mov r3, r0 8003f5e: 460c mov r4, r1 8003f60: f020 0001 bic.w r0, r0, #1 8003f64: f003 0101 and.w r1, r3, #1 stat = osErrorISR; } else if (hMutex == NULL) { 8003f68: 2b01 cmp r3, #1 8003f6a: d915 bls.n 8003f98 stat = osErrorParameter; } else { if (rmtx != 0U) { 8003f6c: b141 cbz r1, 8003f80 #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreTakeRecursive (hMutex, timeout) != pdPASS) { 8003f6e: 4621 mov r1, r4 8003f70: f001 fa43 bl 80053fa 8003f74: 2801 cmp r0, #1 8003f76: d012 beq.n 8003f9e if (timeout != 0U) { 8003f78: b19c cbz r4, 8003fa2 stat = osErrorTimeout; 8003f7a: f06f 0001 mvn.w r0, #1 8003f7e: e00f b.n 8003fa0 } } #endif } else { if (xSemaphoreTake (hMutex, timeout) != pdPASS) { 8003f80: 4621 mov r1, r4 8003f82: f001 f967 bl 8005254 8003f86: 2801 cmp r0, #1 8003f88: d00e beq.n 8003fa8 if (timeout != 0U) { 8003f8a: b17c cbz r4, 8003fac stat = osErrorTimeout; 8003f8c: f06f 0001 mvn.w r0, #1 8003f90: e006 b.n 8003fa0 stat = osErrorISR; 8003f92: f06f 0005 mvn.w r0, #5 } } } return (stat); } 8003f96: 4770 bx lr stat = osErrorParameter; 8003f98: f06f 0003 mvn.w r0, #3 8003f9c: e000 b.n 8003fa0 stat = osOK; 8003f9e: 2000 movs r0, #0 } 8003fa0: bd10 pop {r4, pc} stat = osErrorResource; 8003fa2: f06f 0002 mvn.w r0, #2 8003fa6: e7fb b.n 8003fa0 stat = osOK; 8003fa8: 2000 movs r0, #0 8003faa: e7f9 b.n 8003fa0 stat = osErrorResource; 8003fac: f06f 0002 mvn.w r0, #2 return (stat); 8003fb0: e7f6 b.n 8003fa0 08003fb2 : 8003fb2: f3ef 8205 mrs r2, IPSR rmtx = (uint32_t)mutex_id & 1U; stat = osOK; if (IS_IRQ()) { 8003fb6: b9ba cbnz r2, 8003fe8 osStatus_t osMutexRelease (osMutexId_t mutex_id) { 8003fb8: b508 push {r3, lr} 8003fba: 4603 mov r3, r0 8003fbc: f020 0001 bic.w r0, r0, #1 8003fc0: f003 0101 and.w r1, r3, #1 stat = osErrorISR; } else if (hMutex == NULL) { 8003fc4: 2b01 cmp r3, #1 8003fc6: d912 bls.n 8003fee stat = osErrorParameter; } else { if (rmtx != 0U) { 8003fc8: b129 cbz r1, 8003fd6 #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreGiveRecursive (hMutex) != pdPASS) { 8003fca: f000 ffb4 bl 8004f36 8003fce: 2801 cmp r0, #1 8003fd0: d110 bne.n 8003ff4 stat = osOK; 8003fd2: 2000 movs r0, #0 } } } return (stat); } 8003fd4: bd08 pop {r3, pc} if (xSemaphoreGive (hMutex) != pdPASS) { 8003fd6: 2300 movs r3, #0 8003fd8: 461a mov r2, r3 8003fda: 4619 mov r1, r3 8003fdc: f000 fec1 bl 8004d62 8003fe0: 2801 cmp r0, #1 8003fe2: d10a bne.n 8003ffa stat = osOK; 8003fe4: 2000 movs r0, #0 8003fe6: e7f5 b.n 8003fd4 stat = osErrorISR; 8003fe8: f06f 0005 mvn.w r0, #5 } 8003fec: 4770 bx lr stat = osErrorParameter; 8003fee: f06f 0003 mvn.w r0, #3 8003ff2: e7ef b.n 8003fd4 stat = osErrorResource; 8003ff4: f06f 0002 mvn.w r0, #2 8003ff8: e7ec b.n 8003fd4 stat = osErrorResource; 8003ffa: f06f 0002 mvn.w r0, #2 return (stat); 8003ffe: e7e9 b.n 8003fd4 08004000 : } #endif /* (configUSE_OS2_MUTEX == 1) */ /*---------------------------------------------------------------------------*/ osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) { 8004000: b570 push {r4, r5, r6, lr} 8004002: b082 sub sp, #8 8004004: f3ef 8305 mrs r3, IPSR const char *name; #endif hSemaphore = NULL; if (!IS_IRQ() && (max_count > 0U) && (initial_count <= max_count)) { 8004008: 2b00 cmp r3, #0 800400a: d14d bne.n 80040a8 800400c: 460e mov r6, r1 800400e: 4614 mov r4, r2 8004010: 4288 cmp r0, r1 8004012: bf34 ite cc 8004014: 2300 movcc r3, #0 8004016: 2301 movcs r3, #1 8004018: 2800 cmp r0, #0 800401a: d049 beq.n 80040b0 800401c: 2b00 cmp r3, #0 800401e: d047 beq.n 80040b0 mem = -1; if (attr != NULL) { 8004020: b14a cbz r2, 8004036 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 8004022: 6895 ldr r5, [r2, #8] 8004024: b115 cbz r5, 800402c 8004026: 68d3 ldr r3, [r2, #12] 8004028: 2b4f cmp r3, #79 @ 0x4f 800402a: d814 bhi.n 8004056 mem = 1; } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 800402c: 2d00 cmp r5, #0 800402e: d141 bne.n 80040b4 8004030: 68e3 ldr r3, [r4, #12] 8004032: b10b cbz r3, 8004038 8004034: e039 b.n 80040aa mem = 0; } } } else { mem = 0; 8004036: 2300 movs r3, #0 } if (mem != -1) { if (max_count == 1U) { 8004038: 2801 cmp r0, #1 800403a: d00e beq.n 800405a hSemaphore = NULL; } } } else { if (mem == 1) { 800403c: bb73 cbnz r3, 800409c hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem); #endif } else { #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateCounting (max_count, initial_count); 800403e: 4631 mov r1, r6 8004040: f000 fe71 bl 8004d26 8004044: 4605 mov r5, r0 #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hSemaphore != NULL) { 8004046: b385 cbz r5, 80040aa if (attr != NULL) { 8004048: b104 cbz r4, 800404c name = attr->name; 800404a: 6824 ldr r4, [r4, #0] } else { name = NULL; } vQueueAddToRegistry (hSemaphore, name); 800404c: 4621 mov r1, r4 800404e: 4628 mov r0, r5 8004050: f001 fa6a bl 8005528 8004054: e029 b.n 80040aa mem = 1; 8004056: 2301 movs r3, #1 8004058: e7ee b.n 8004038 if (mem == 1) { 800405a: b9b3 cbnz r3, 800408a hSemaphore = xSemaphoreCreateBinary(); 800405c: 2203 movs r2, #3 800405e: 2100 movs r1, #0 8004060: 2001 movs r0, #1 8004062: f000 fe19 bl 8004c98 8004066: 4605 mov r5, r0 if ((hSemaphore != NULL) && (initial_count != 0U)) { 8004068: 2d00 cmp r5, #0 800406a: bf18 it ne 800406c: 2e00 cmpne r6, #0 800406e: d0ea beq.n 8004046 if (xSemaphoreGive (hSemaphore) != pdPASS) { 8004070: 2300 movs r3, #0 8004072: 461a mov r2, r3 8004074: 4619 mov r1, r3 8004076: 4628 mov r0, r5 8004078: f000 fe73 bl 8004d62 800407c: 2801 cmp r0, #1 800407e: d0e2 beq.n 8004046 vSemaphoreDelete (hSemaphore); 8004080: 4628 mov r0, r5 8004082: f001 fa7b bl 800557c hSemaphore = NULL; 8004086: 2500 movs r5, #0 8004088: e00f b.n 80040aa hSemaphore = xSemaphoreCreateBinaryStatic ((StaticSemaphore_t *)attr->cb_mem); 800408a: 68a3 ldr r3, [r4, #8] 800408c: 2203 movs r2, #3 800408e: 9200 str r2, [sp, #0] 8004090: 2200 movs r2, #0 8004092: 4611 mov r1, r2 8004094: f000 fdad bl 8004bf2 8004098: 4605 mov r5, r0 800409a: e7e5 b.n 8004068 hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem); 800409c: 68a2 ldr r2, [r4, #8] 800409e: 4631 mov r1, r6 80040a0: f000 fe1e bl 8004ce0 80040a4: 4605 mov r5, r0 80040a6: e7ce b.n 8004046 hSemaphore = NULL; 80040a8: 2500 movs r5, #0 #endif } } return ((osSemaphoreId_t)hSemaphore); } 80040aa: 4628 mov r0, r5 80040ac: b002 add sp, #8 80040ae: bd70 pop {r4, r5, r6, pc} hSemaphore = NULL; 80040b0: 2500 movs r5, #0 80040b2: e7fa b.n 80040aa 80040b4: 2500 movs r5, #0 return ((osSemaphoreId_t)hSemaphore); 80040b6: e7f8 b.n 80040aa 080040b8 : osStatus_t stat; BaseType_t yield; stat = osOK; if (hSemaphore == NULL) { 80040b8: b320 cbz r0, 8004104 osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) { 80040ba: b510 push {r4, lr} 80040bc: b082 sub sp, #8 80040be: 460c mov r4, r1 80040c0: f3ef 8305 mrs r3, IPSR stat = osErrorParameter; } else if (IS_IRQ()) { 80040c4: b1b3 cbz r3, 80040f4 if (timeout != 0U) { 80040c6: bb01 cbnz r1, 800410a stat = osErrorParameter; } else { yield = pdFALSE; 80040c8: 2100 movs r1, #0 80040ca: 9101 str r1, [sp, #4] if (xSemaphoreTakeFromISR (hSemaphore, &yield) != pdPASS) { 80040cc: aa01 add r2, sp, #4 80040ce: f001 f9b4 bl 800543a 80040d2: 2801 cmp r0, #1 80040d4: d11c bne.n 8004110 stat = osErrorResource; } else { portYIELD_FROM_ISR (yield); 80040d6: 9801 ldr r0, [sp, #4] 80040d8: b150 cbz r0, 80040f0 80040da: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 80040de: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80040e2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 80040e6: f3bf 8f4f dsb sy 80040ea: f3bf 8f6f isb sy stat = osOK; 80040ee: 2000 movs r0, #0 } } } return (stat); } 80040f0: b002 add sp, #8 80040f2: bd10 pop {r4, pc} if (xSemaphoreTake (hSemaphore, (TickType_t)timeout) != pdPASS) { 80040f4: f001 f8ae bl 8005254 80040f8: 2801 cmp r0, #1 80040fa: d00c beq.n 8004116 if (timeout != 0U) { 80040fc: b16c cbz r4, 800411a stat = osErrorTimeout; 80040fe: f06f 0001 mvn.w r0, #1 8004102: e7f5 b.n 80040f0 stat = osErrorParameter; 8004104: f06f 0003 mvn.w r0, #3 } 8004108: 4770 bx lr stat = osErrorParameter; 800410a: f06f 0003 mvn.w r0, #3 800410e: e7ef b.n 80040f0 stat = osErrorResource; 8004110: f06f 0002 mvn.w r0, #2 8004114: e7ec b.n 80040f0 stat = osOK; 8004116: 2000 movs r0, #0 8004118: e7ea b.n 80040f0 stat = osErrorResource; 800411a: f06f 0002 mvn.w r0, #2 return (stat); 800411e: e7e7 b.n 80040f0 08004120 : osStatus_t stat; BaseType_t yield; stat = osOK; if (hSemaphore == NULL) { 8004120: b320 cbz r0, 800416c osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id) { 8004122: b500 push {lr} 8004124: b083 sub sp, #12 8004126: f3ef 8305 mrs r3, IPSR stat = osErrorParameter; } else if (IS_IRQ()) { 800412a: b1a3 cbz r3, 8004156 yield = pdFALSE; 800412c: 2300 movs r3, #0 800412e: 9301 str r3, [sp, #4] if (xSemaphoreGiveFromISR (hSemaphore, &yield) != pdTRUE) { 8004130: a901 add r1, sp, #4 8004132: f000 ff87 bl 8005044 8004136: 2801 cmp r0, #1 8004138: d11b bne.n 8004172 stat = osErrorResource; } else { portYIELD_FROM_ISR (yield); 800413a: 9801 ldr r0, [sp, #4] 800413c: b198 cbz r0, 8004166 800413e: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004142: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8004146: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 800414a: f3bf 8f4f dsb sy 800414e: f3bf 8f6f isb sy stat = osOK; 8004152: 2000 movs r0, #0 8004154: e007 b.n 8004166 } } else { if (xSemaphoreGive (hSemaphore) != pdPASS) { 8004156: 2300 movs r3, #0 8004158: 461a mov r2, r3 800415a: 4619 mov r1, r3 800415c: f000 fe01 bl 8004d62 8004160: 2801 cmp r0, #1 8004162: d109 bne.n 8004178 stat = osOK; 8004164: 2000 movs r0, #0 stat = osErrorResource; } } return (stat); } 8004166: b003 add sp, #12 8004168: f85d fb04 ldr.w pc, [sp], #4 stat = osErrorParameter; 800416c: f06f 0003 mvn.w r0, #3 } 8004170: 4770 bx lr stat = osErrorResource; 8004172: f06f 0002 mvn.w r0, #2 8004176: e7f6 b.n 8004166 stat = osErrorResource; 8004178: f06f 0002 mvn.w r0, #2 return (stat); 800417c: e7f3 b.n 8004166 0800417e : 800417e: f3ef 8305 mrs r3, IPSR osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) { SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8004182: b94b cbnz r3, 8004198 osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) { 8004184: b510 push {r4, lr} 8004186: 4604 mov r4, r0 stat = osErrorISR; } else if (hSemaphore == NULL) { 8004188: b148 cbz r0, 800419e stat = osErrorParameter; } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hSemaphore); 800418a: f001 f9e1 bl 8005550 #endif stat = osOK; vSemaphoreDelete (hSemaphore); 800418e: 4620 mov r0, r4 8004190: f001 f9f4 bl 800557c stat = osOK; 8004194: 2000 movs r0, #0 #else stat = osError; #endif return (stat); } 8004196: bd10 pop {r4, pc} stat = osErrorISR; 8004198: f06f 0005 mvn.w r0, #5 } 800419c: 4770 bx lr stat = osErrorParameter; 800419e: f06f 0003 mvn.w r0, #3 return (stat); 80041a2: e7f8 b.n 8004196 080041a4 : /*---------------------------------------------------------------------------*/ osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) { 80041a4: b570 push {r4, r5, r6, lr} 80041a6: b082 sub sp, #8 80041a8: f3ef 8305 mrs r3, IPSR const char *name; #endif hQueue = NULL; if (!IS_IRQ() && (msg_count > 0U) && (msg_size > 0U)) { 80041ac: 2b00 cmp r3, #0 80041ae: d13d bne.n 800422c 80041b0: 4614 mov r4, r2 80041b2: 1e0b subs r3, r1, #0 80041b4: bf18 it ne 80041b6: 2301 movne r3, #1 80041b8: 2800 cmp r0, #0 80041ba: d03b beq.n 8004234 80041bc: 2b00 cmp r3, #0 80041be: d039 beq.n 8004234 mem = -1; if (attr != NULL) { 80041c0: b36a cbz r2, 800421e if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 80041c2: 6893 ldr r3, [r2, #8] 80041c4: b14b cbz r3, 80041da 80041c6: 68d2 ldr r2, [r2, #12] 80041c8: 2a4f cmp r2, #79 @ 0x4f 80041ca: d906 bls.n 80041da (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 80041cc: 6922 ldr r2, [r4, #16] if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 80041ce: b122 cbz r2, 80041da (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 80041d0: fb01 f500 mul.w r5, r1, r0 80041d4: 6966 ldr r6, [r4, #20] 80041d6: 42ae cmp r6, r5 80041d8: d21b bcs.n 8004212 mem = 1; } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 80041da: b173 cbz r3, 80041fa mem = -1; 80041dc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff #if (configSUPPORT_STATIC_ALLOCATION == 1) hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem); #endif } else { if (mem == 0) { 80041e0: bb53 cbnz r3, 8004238 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hQueue = xQueueCreate (msg_count, msg_size); 80041e2: 2200 movs r2, #0 80041e4: f000 fd58 bl 8004c98 80041e8: 4605 mov r5, r0 #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hQueue != NULL) { 80041ea: b305 cbz r5, 800422e if (attr != NULL) { 80041ec: b104 cbz r4, 80041f0 name = attr->name; 80041ee: 6824 ldr r4, [r4, #0] } else { name = NULL; } vQueueAddToRegistry (hQueue, name); 80041f0: 4621 mov r1, r4 80041f2: 4628 mov r0, r5 80041f4: f001 f998 bl 8005528 80041f8: e019 b.n 800422e if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 80041fa: 68e3 ldr r3, [r4, #12] 80041fc: b98b cbnz r3, 8004222 (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 80041fe: 6923 ldr r3, [r4, #16] if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 8004200: b113 cbz r3, 8004208 mem = -1; 8004202: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004206: e7eb b.n 80041e0 (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 8004208: 6963 ldr r3, [r4, #20] 800420a: b16b cbz r3, 8004228 mem = -1; 800420c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004210: e7e6 b.n 80041e0 hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem); 8004212: 2500 movs r5, #0 8004214: 9500 str r5, [sp, #0] 8004216: f000 fcec bl 8004bf2 800421a: 4605 mov r5, r0 800421c: e7e5 b.n 80041ea mem = 0; 800421e: 2300 movs r3, #0 8004220: e7de b.n 80041e0 mem = -1; 8004222: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004226: e7db b.n 80041e0 mem = 0; 8004228: 2300 movs r3, #0 800422a: e7d9 b.n 80041e0 hQueue = NULL; 800422c: 2500 movs r5, #0 #endif } return ((osMessageQueueId_t)hQueue); } 800422e: 4628 mov r0, r5 8004230: b002 add sp, #8 8004232: bd70 pop {r4, r5, r6, pc} hQueue = NULL; 8004234: 2500 movs r5, #0 8004236: e7fa b.n 800422e 8004238: 2500 movs r5, #0 return ((osMessageQueueId_t)hQueue); 800423a: e7f8 b.n 800422e 0800423c : osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) { 800423c: b510 push {r4, lr} 800423e: b082 sub sp, #8 8004240: 461c mov r4, r3 8004242: f3ef 8305 mrs r3, IPSR (void)msg_prio; /* Message priority is ignored */ stat = osOK; if (IS_IRQ()) { 8004246: b1d3 cbz r3, 800427e if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 8004248: 2900 cmp r1, #0 800424a: bf18 it ne 800424c: 2800 cmpne r0, #0 800424e: d024 beq.n 800429a 8004250: bb34 cbnz r4, 80042a0 stat = osErrorParameter; } else { yield = pdFALSE; 8004252: 2300 movs r3, #0 8004254: 9301 str r3, [sp, #4] if (xQueueSendToBackFromISR (hQueue, msg_ptr, &yield) != pdTRUE) { 8004256: aa01 add r2, sp, #4 8004258: f000 fe8d bl 8004f76 800425c: 2801 cmp r0, #1 800425e: d122 bne.n 80042a6 stat = osErrorResource; } else { portYIELD_FROM_ISR (yield); 8004260: 9801 ldr r0, [sp, #4] 8004262: b150 cbz r0, 800427a 8004264: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004268: f04f 5280 mov.w r2, #268435456 @ 0x10000000 800426c: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8004270: f3bf 8f4f dsb sy 8004274: f3bf 8f6f isb sy stat = osOK; 8004278: 2000 movs r0, #0 } } } return (stat); } 800427a: b002 add sp, #8 800427c: bd10 pop {r4, pc} if ((hQueue == NULL) || (msg_ptr == NULL)) { 800427e: 2900 cmp r1, #0 8004280: bf18 it ne 8004282: 2800 cmpne r0, #0 8004284: d012 beq.n 80042ac if (xQueueSendToBack (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 8004286: 2300 movs r3, #0 8004288: 4622 mov r2, r4 800428a: f000 fd6a bl 8004d62 800428e: 2801 cmp r0, #1 8004290: d00f beq.n 80042b2 if (timeout != 0U) { 8004292: b184 cbz r4, 80042b6 stat = osErrorTimeout; 8004294: f06f 0001 mvn.w r0, #1 8004298: e7ef b.n 800427a stat = osErrorParameter; 800429a: f06f 0003 mvn.w r0, #3 800429e: e7ec b.n 800427a 80042a0: f06f 0003 mvn.w r0, #3 80042a4: e7e9 b.n 800427a stat = osErrorResource; 80042a6: f06f 0002 mvn.w r0, #2 80042aa: e7e6 b.n 800427a stat = osErrorParameter; 80042ac: f06f 0003 mvn.w r0, #3 80042b0: e7e3 b.n 800427a stat = osOK; 80042b2: 2000 movs r0, #0 80042b4: e7e1 b.n 800427a stat = osErrorResource; 80042b6: f06f 0002 mvn.w r0, #2 return (stat); 80042ba: e7de b.n 800427a 080042bc : osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) { 80042bc: b510 push {r4, lr} 80042be: b082 sub sp, #8 80042c0: 461c mov r4, r3 80042c2: f3ef 8305 mrs r3, IPSR (void)msg_prio; /* Message priority is ignored */ stat = osOK; if (IS_IRQ()) { 80042c6: b1d3 cbz r3, 80042fe if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 80042c8: 2900 cmp r1, #0 80042ca: bf18 it ne 80042cc: 2800 cmpne r0, #0 80042ce: d023 beq.n 8004318 80042d0: bb2c cbnz r4, 800431e stat = osErrorParameter; } else { yield = pdFALSE; 80042d2: 2300 movs r3, #0 80042d4: 9301 str r3, [sp, #4] if (xQueueReceiveFromISR (hQueue, msg_ptr, &yield) != pdPASS) { 80042d6: aa01 add r2, sp, #4 80042d8: f001 f8af bl 800543a 80042dc: 2801 cmp r0, #1 80042de: d121 bne.n 8004324 stat = osErrorResource; } else { portYIELD_FROM_ISR (yield); 80042e0: 9801 ldr r0, [sp, #4] 80042e2: b150 cbz r0, 80042fa 80042e4: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 80042e8: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80042ec: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 80042f0: f3bf 8f4f dsb sy 80042f4: f3bf 8f6f isb sy stat = osOK; 80042f8: 2000 movs r0, #0 } } } return (stat); } 80042fa: b002 add sp, #8 80042fc: bd10 pop {r4, pc} if ((hQueue == NULL) || (msg_ptr == NULL)) { 80042fe: 2900 cmp r1, #0 8004300: bf18 it ne 8004302: 2800 cmpne r0, #0 8004304: d011 beq.n 800432a if (xQueueReceive (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 8004306: 4622 mov r2, r4 8004308: f000 fef5 bl 80050f6 800430c: 2801 cmp r0, #1 800430e: d00f beq.n 8004330 if (timeout != 0U) { 8004310: b184 cbz r4, 8004334 stat = osErrorTimeout; 8004312: f06f 0001 mvn.w r0, #1 8004316: e7f0 b.n 80042fa stat = osErrorParameter; 8004318: f06f 0003 mvn.w r0, #3 800431c: e7ed b.n 80042fa 800431e: f06f 0003 mvn.w r0, #3 8004322: e7ea b.n 80042fa stat = osErrorResource; 8004324: f06f 0002 mvn.w r0, #2 8004328: e7e7 b.n 80042fa stat = osErrorParameter; 800432a: f06f 0003 mvn.w r0, #3 800432e: e7e4 b.n 80042fa stat = osOK; 8004330: 2000 movs r0, #0 8004332: e7e2 b.n 80042fa stat = osErrorResource; 8004334: f06f 0002 mvn.w r0, #2 return (stat); 8004338: e7df b.n 80042fa 0800433a : uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) { QueueHandle_t hQueue = (QueueHandle_t)mq_id; UBaseType_t count; if (hQueue == NULL) { 800433a: b148 cbz r0, 8004350 uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) { 800433c: b508 push {r3, lr} 800433e: f3ef 8205 mrs r2, IPSR count = 0U; } else if (IS_IRQ()) { 8004342: b112 cbz r2, 800434a count = uxQueueMessagesWaitingFromISR (hQueue); 8004344: f001 f8e3 bl 800550e else { count = uxQueueMessagesWaiting (hQueue); } return ((uint32_t)count); } 8004348: bd08 pop {r3, pc} count = uxQueueMessagesWaiting (hQueue); 800434a: f001 f8cd bl 80054e8 800434e: e7fb b.n 8004348 count = 0U; 8004350: 2000 movs r0, #0 } 8004352: 4770 bx lr 08004354 : 8004354: f3ef 8305 mrs r3, IPSR osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) { QueueHandle_t hQueue = (QueueHandle_t)mq_id; osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8004358: b94b cbnz r3, 800436e osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) { 800435a: b510 push {r4, lr} 800435c: 4604 mov r4, r0 stat = osErrorISR; } else if (hQueue == NULL) { 800435e: b148 cbz r0, 8004374 stat = osErrorParameter; } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hQueue); 8004360: f001 f8f6 bl 8005550 #endif stat = osOK; vQueueDelete (hQueue); 8004364: 4620 mov r0, r4 8004366: f001 f909 bl 800557c stat = osOK; 800436a: 2000 movs r0, #0 #else stat = osError; #endif return (stat); } 800436c: bd10 pop {r4, pc} stat = osErrorISR; 800436e: f06f 0005 mvn.w r0, #5 } 8004372: 4770 bx lr stat = osErrorParameter; 8004374: f06f 0003 mvn.w r0, #3 return (stat); 8004378: e7f8 b.n 800436c ... 0800437c : __WEAK void vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) { /* Idle task control block and stack */ static StaticTask_t Idle_TCB; static StackType_t Idle_Stack[configMINIMAL_STACK_SIZE]; *ppxIdleTaskTCBBuffer = &Idle_TCB; 800437c: 4b03 ldr r3, [pc, #12] @ (800438c ) 800437e: 6003 str r3, [r0, #0] *ppxIdleTaskStackBuffer = &Idle_Stack[0]; 8004380: 4b03 ldr r3, [pc, #12] @ (8004390 ) 8004382: 600b str r3, [r1, #0] *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE; 8004384: f44f 7300 mov.w r3, #512 @ 0x200 8004388: 6013 str r3, [r2, #0] } 800438a: 4770 bx lr 800438c: 240027b4 .word 0x240027b4 8004390: 24001fb4 .word 0x24001fb4 08004394 : __WEAK void vApplicationGetTimerTaskMemory (StaticTask_t **ppxTimerTaskTCBBuffer, StackType_t **ppxTimerTaskStackBuffer, uint32_t *pulTimerTaskStackSize) { /* Timer task control block and stack */ static StaticTask_t Timer_TCB; static StackType_t Timer_Stack[configTIMER_TASK_STACK_DEPTH]; *ppxTimerTaskTCBBuffer = &Timer_TCB; 8004394: 4b03 ldr r3, [pc, #12] @ (80043a4 ) 8004396: 6003 str r3, [r0, #0] *ppxTimerTaskStackBuffer = &Timer_Stack[0]; 8004398: 4b03 ldr r3, [pc, #12] @ (80043a8 ) 800439a: 600b str r3, [r1, #0] *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH; 800439c: f44f 6380 mov.w r3, #1024 @ 0x400 80043a0: 6013 str r3, [r2, #0] } 80043a2: 4770 bx lr 80043a4: 24001f0c .word 0x24001f0c 80043a8: 24000f0c .word 0x24000f0c 080043ac : uint8_t *pucAlignedHeap; size_t uxAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; /* Ensure the heap starts on a correctly aligned boundary. */ uxAddress = ( size_t ) ucHeap; 80043ac: 4a12 ldr r2, [pc, #72] @ (80043f8 ) if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 80043ae: f012 0f07 tst.w r2, #7 80043b2: d01e beq.n 80043f2 { uxAddress += ( portBYTE_ALIGNMENT - 1 ); 80043b4: 1dd1 adds r1, r2, #7 uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 80043b6: f021 0107 bic.w r1, r1, #7 xTotalHeapSize -= uxAddress - ( size_t ) ucHeap; 80043ba: f5c1 3380 rsb r3, r1, #65536 @ 0x10000 80043be: 4413 add r3, r2 uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 80043c0: 460a mov r2, r1 pucAlignedHeap = ( uint8_t * ) uxAddress; /* xStart is used to hold a pointer to the first item in the list of free blocks. The void cast is used to prevent compiler warnings. */ xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap; 80043c2: 480e ldr r0, [pc, #56] @ (80043fc ) 80043c4: 6002 str r2, [r0, #0] xStart.xBlockSize = ( size_t ) 0; 80043c6: 2100 movs r1, #0 80043c8: 6041 str r1, [r0, #4] /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the heap space. */ uxAddress = ( ( size_t ) pucAlignedHeap ) + xTotalHeapSize; 80043ca: 4413 add r3, r2 uxAddress -= xHeapStructSize; 80043cc: 3b08 subs r3, #8 uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 80043ce: f023 0307 bic.w r3, r3, #7 pxEnd = ( void * ) uxAddress; 80043d2: 480b ldr r0, [pc, #44] @ (8004400 ) 80043d4: 6003 str r3, [r0, #0] pxEnd->xBlockSize = 0; 80043d6: 6059 str r1, [r3, #4] pxEnd->pxNextFreeBlock = NULL; 80043d8: 6019 str r1, [r3, #0] /* To start with there is a single free block that is sized to take up the entire heap space, minus the space taken by pxEnd. */ pxFirstFreeBlock = ( void * ) pucAlignedHeap; pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock; 80043da: 1a99 subs r1, r3, r2 80043dc: 6051 str r1, [r2, #4] pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 80043de: 6013 str r3, [r2, #0] /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 80043e0: 4b08 ldr r3, [pc, #32] @ (8004404 ) 80043e2: 6019 str r1, [r3, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 80043e4: 4b08 ldr r3, [pc, #32] @ (8004408 ) 80043e6: 6019 str r1, [r3, #0] /* Work out the position of the top bit in a size_t variable. */ xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); 80043e8: 4b08 ldr r3, [pc, #32] @ (800440c ) 80043ea: f04f 4200 mov.w r2, #2147483648 @ 0x80000000 80043ee: 601a str r2, [r3, #0] } 80043f0: 4770 bx lr size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 80043f2: f44f 3380 mov.w r3, #65536 @ 0x10000 80043f6: e7e4 b.n 80043c2 80043f8: 24002880 .word 0x24002880 80043fc: 24002878 .word 0x24002878 8004400: 24002874 .word 0x24002874 8004404: 2400286c .word 0x2400286c 8004408: 24002870 .word 0x24002870 800440c: 24002860 .word 0x24002860 08004410 : BlockLink_t *pxIterator; uint8_t *puc; /* Iterate through the list until a block is found that has a higher address than the block being inserted. */ for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock ) 8004410: 4b16 ldr r3, [pc, #88] @ (800446c ) 8004412: 461a mov r2, r3 8004414: 681b ldr r3, [r3, #0] 8004416: 4283 cmp r3, r0 8004418: d3fb bcc.n 8004412 } /* Do the block being inserted, and the block it is being inserted after make a contiguous block of memory? */ puc = ( uint8_t * ) pxIterator; if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) 800441a: 6851 ldr r1, [r2, #4] 800441c: eb02 0c01 add.w ip, r2, r1 8004420: 4584 cmp ip, r0 8004422: d009 beq.n 8004438 } /* Do the block being inserted, and the block it is being inserted before make a contiguous block of memory? */ puc = ( uint8_t * ) pxBlockToInsert; if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) 8004424: 6841 ldr r1, [r0, #4] 8004426: eb00 0c01 add.w ip, r0, r1 800442a: 4563 cmp r3, ip 800442c: d009 beq.n 8004442 pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 800442e: 6003 str r3, [r0, #0] /* If the block being inserted plugged a gab, so was merged with the block before and the block after, then it's pxNextFreeBlock pointer will have already been set, and should not be set here as that would make it point to itself. */ if( pxIterator != pxBlockToInsert ) 8004430: 4290 cmp r0, r2 8004432: d019 beq.n 8004468 { pxIterator->pxNextFreeBlock = pxBlockToInsert; 8004434: 6010 str r0, [r2, #0] } else { mtCOVERAGE_TEST_MARKER(); 8004436: 4770 bx lr pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 8004438: 6840 ldr r0, [r0, #4] 800443a: 4401 add r1, r0 800443c: 6051 str r1, [r2, #4] pxBlockToInsert = pxIterator; 800443e: 4610 mov r0, r2 8004440: e7f0 b.n 8004424 { 8004442: b410 push {r4} if( pxIterator->pxNextFreeBlock != pxEnd ) 8004444: 4c0a ldr r4, [pc, #40] @ (8004470 ) 8004446: 6824 ldr r4, [r4, #0] 8004448: 42a3 cmp r3, r4 800444a: d00b beq.n 8004464 pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; 800444c: 685b ldr r3, [r3, #4] 800444e: 4419 add r1, r3 8004450: 6041 str r1, [r0, #4] pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 8004452: 6813 ldr r3, [r2, #0] 8004454: 681b ldr r3, [r3, #0] 8004456: 6003 str r3, [r0, #0] if( pxIterator != pxBlockToInsert ) 8004458: 4290 cmp r0, r2 800445a: d000 beq.n 800445e pxIterator->pxNextFreeBlock = pxBlockToInsert; 800445c: 6010 str r0, [r2, #0] } } 800445e: f85d 4b04 ldr.w r4, [sp], #4 8004462: 4770 bx lr pxBlockToInsert->pxNextFreeBlock = pxEnd; 8004464: 6004 str r4, [r0, #0] 8004466: e7f7 b.n 8004458 8004468: 4770 bx lr 800446a: bf00 nop 800446c: 24002878 .word 0x24002878 8004470: 24002874 .word 0x24002874 08004474 : { 8004474: b538 push {r3, r4, r5, lr} 8004476: 4604 mov r4, r0 vTaskSuspendAll(); 8004478: f001 fb22 bl 8005ac0 if( pxEnd == NULL ) 800447c: 4b38 ldr r3, [pc, #224] @ (8004560 ) 800447e: 681b ldr r3, [r3, #0] 8004480: b1b3 cbz r3, 80044b0 if( ( xWantedSize & xBlockAllocatedBit ) == 0 ) 8004482: 4b38 ldr r3, [pc, #224] @ (8004564 ) 8004484: 681b ldr r3, [r3, #0] 8004486: 421c tst r4, r3 8004488: d150 bne.n 800452c if( xWantedSize > 0 ) 800448a: 2c00 cmp r4, #0 800448c: d050 beq.n 8004530 xWantedSize += xHeapStructSize; 800448e: f104 0208 add.w r2, r4, #8 if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) 8004492: f014 0f07 tst.w r4, #7 8004496: d002 beq.n 800449e xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 8004498: f022 0207 bic.w r2, r2, #7 800449c: 3208 adds r2, #8 if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 800449e: 2a00 cmp r2, #0 80044a0: d055 beq.n 800454e 80044a2: 4b31 ldr r3, [pc, #196] @ (8004568 ) 80044a4: 681b ldr r3, [r3, #0] 80044a6: 4293 cmp r3, r2 80044a8: d353 bcc.n 8004552 pxBlock = xStart.pxNextFreeBlock; 80044aa: 4930 ldr r1, [pc, #192] @ (800456c ) 80044ac: 680c ldr r4, [r1, #0] while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 80044ae: e004 b.n 80044ba prvHeapInit(); 80044b0: f7ff ff7c bl 80043ac 80044b4: e7e5 b.n 8004482 pxPreviousBlock = pxBlock; 80044b6: 4621 mov r1, r4 pxBlock = pxBlock->pxNextFreeBlock; 80044b8: 461c mov r4, r3 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 80044ba: 6863 ldr r3, [r4, #4] 80044bc: 4293 cmp r3, r2 80044be: d202 bcs.n 80044c6 80044c0: 6823 ldr r3, [r4, #0] 80044c2: 2b00 cmp r3, #0 80044c4: d1f7 bne.n 80044b6 if( pxBlock != pxEnd ) 80044c6: 4b26 ldr r3, [pc, #152] @ (8004560 ) 80044c8: 681b ldr r3, [r3, #0] 80044ca: 42a3 cmp r3, r4 80044cc: d043 beq.n 8004556 pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 80044ce: 680d ldr r5, [r1, #0] 80044d0: 3508 adds r5, #8 pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; 80044d2: 6823 ldr r3, [r4, #0] 80044d4: 600b str r3, [r1, #0] if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) 80044d6: 6863 ldr r3, [r4, #4] 80044d8: 1a9b subs r3, r3, r2 80044da: 2b10 cmp r3, #16 80044dc: d910 bls.n 8004500 pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); 80044de: 18a0 adds r0, r4, r2 configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 80044e0: f010 0f07 tst.w r0, #7 80044e4: d008 beq.n 80044f8 portFORCE_INLINE static void vPortRaiseBASEPRI( void ) { uint32_t ulNewBASEPRI; __asm volatile 80044e6: f04f 0350 mov.w r3, #80 @ 0x50 80044ea: f383 8811 msr BASEPRI, r3 80044ee: f3bf 8f6f isb sy 80044f2: f3bf 8f4f dsb sy 80044f6: e7fe b.n 80044f6 pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 80044f8: 6043 str r3, [r0, #4] pxBlock->xBlockSize = xWantedSize; 80044fa: 6062 str r2, [r4, #4] prvInsertBlockIntoFreeList( pxNewBlockLink ); 80044fc: f7ff ff88 bl 8004410 xFreeBytesRemaining -= pxBlock->xBlockSize; 8004500: 6862 ldr r2, [r4, #4] 8004502: 4919 ldr r1, [pc, #100] @ (8004568 ) 8004504: 680b ldr r3, [r1, #0] 8004506: 1a9b subs r3, r3, r2 8004508: 600b str r3, [r1, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 800450a: 4919 ldr r1, [pc, #100] @ (8004570 ) 800450c: 6809 ldr r1, [r1, #0] 800450e: 428b cmp r3, r1 8004510: d201 bcs.n 8004516 xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 8004512: 4917 ldr r1, [pc, #92] @ (8004570 ) 8004514: 600b str r3, [r1, #0] pxBlock->xBlockSize |= xBlockAllocatedBit; 8004516: 4b13 ldr r3, [pc, #76] @ (8004564 ) 8004518: 681b ldr r3, [r3, #0] 800451a: 4313 orrs r3, r2 800451c: 6063 str r3, [r4, #4] pxBlock->pxNextFreeBlock = NULL; 800451e: 2300 movs r3, #0 8004520: 6023 str r3, [r4, #0] xNumberOfSuccessfulAllocations++; 8004522: 4a14 ldr r2, [pc, #80] @ (8004574 ) 8004524: 6813 ldr r3, [r2, #0] 8004526: 3301 adds r3, #1 8004528: 6013 str r3, [r2, #0] 800452a: e002 b.n 8004532 void *pvReturn = NULL; 800452c: 2500 movs r5, #0 800452e: e000 b.n 8004532 8004530: 2500 movs r5, #0 ( void ) xTaskResumeAll(); 8004532: f001 fb67 bl 8005c04 configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 ); 8004536: f015 0f07 tst.w r5, #7 800453a: d00e beq.n 800455a 800453c: f04f 0350 mov.w r3, #80 @ 0x50 8004540: f383 8811 msr BASEPRI, r3 8004544: f3bf 8f6f isb sy 8004548: f3bf 8f4f dsb sy 800454c: e7fe b.n 800454c void *pvReturn = NULL; 800454e: 2500 movs r5, #0 8004550: e7ef b.n 8004532 8004552: 2500 movs r5, #0 8004554: e7ed b.n 8004532 8004556: 2500 movs r5, #0 8004558: e7eb b.n 8004532 } 800455a: 4628 mov r0, r5 800455c: bd38 pop {r3, r4, r5, pc} 800455e: bf00 nop 8004560: 24002874 .word 0x24002874 8004564: 24002860 .word 0x24002860 8004568: 24002870 .word 0x24002870 800456c: 24002878 .word 0x24002878 8004570: 2400286c .word 0x2400286c 8004574: 24002868 .word 0x24002868 08004578 : if( pv != NULL ) 8004578: 2800 cmp r0, #0 800457a: d034 beq.n 80045e6 { 800457c: b538 push {r3, r4, r5, lr} 800457e: 4604 mov r4, r0 puc -= xHeapStructSize; 8004580: f1a0 0508 sub.w r5, r0, #8 configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 8004584: f850 3c04 ldr.w r3, [r0, #-4] 8004588: 4a17 ldr r2, [pc, #92] @ (80045e8 ) 800458a: 6812 ldr r2, [r2, #0] 800458c: 4213 tst r3, r2 800458e: d108 bne.n 80045a2 8004590: f04f 0350 mov.w r3, #80 @ 0x50 8004594: f383 8811 msr BASEPRI, r3 8004598: f3bf 8f6f isb sy 800459c: f3bf 8f4f dsb sy 80045a0: e7fe b.n 80045a0 configASSERT( pxLink->pxNextFreeBlock == NULL ); 80045a2: f850 1c08 ldr.w r1, [r0, #-8] 80045a6: b141 cbz r1, 80045ba 80045a8: f04f 0350 mov.w r3, #80 @ 0x50 80045ac: f383 8811 msr BASEPRI, r3 80045b0: f3bf 8f6f isb sy 80045b4: f3bf 8f4f dsb sy 80045b8: e7fe b.n 80045b8 pxLink->xBlockSize &= ~xBlockAllocatedBit; 80045ba: ea23 0302 bic.w r3, r3, r2 80045be: f840 3c04 str.w r3, [r0, #-4] vTaskSuspendAll(); 80045c2: f001 fa7d bl 8005ac0 xFreeBytesRemaining += pxLink->xBlockSize; 80045c6: f854 1c04 ldr.w r1, [r4, #-4] 80045ca: 4a08 ldr r2, [pc, #32] @ (80045ec ) 80045cc: 6813 ldr r3, [r2, #0] 80045ce: 440b add r3, r1 80045d0: 6013 str r3, [r2, #0] prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 80045d2: 4628 mov r0, r5 80045d4: f7ff ff1c bl 8004410 xNumberOfSuccessfulFrees++; 80045d8: 4a05 ldr r2, [pc, #20] @ (80045f0 ) 80045da: 6813 ldr r3, [r2, #0] 80045dc: 3301 adds r3, #1 80045de: 6013 str r3, [r2, #0] ( void ) xTaskResumeAll(); 80045e0: f001 fb10 bl 8005c04 } 80045e4: bd38 pop {r3, r4, r5, pc} 80045e6: 4770 bx lr 80045e8: 24002860 .word 0x24002860 80045ec: 24002870 .word 0x24002870 80045f0: 24002864 .word 0x24002864 080045f4 : void vListInitialise( List_t * const pxList ) { /* The list structure contains a list item which is used to mark the end of the list. To initialise the list the list end is inserted as the only list entry. */ pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 80045f4: f100 0308 add.w r3, r0, #8 80045f8: 6043 str r3, [r0, #4] /* The list end value is the highest possible value in the list to ensure it remains at the end of the list. */ pxList->xListEnd.xItemValue = portMAX_DELAY; 80045fa: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80045fe: 6082 str r2, [r0, #8] /* The list end next and previous pointers point to itself so we know when the list is empty. */ pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 8004600: 60c3 str r3, [r0, #12] pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 8004602: 6103 str r3, [r0, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 8004604: 2300 movs r3, #0 8004606: 6003 str r3, [r0, #0] /* Write known values into the list if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList ); listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList ); } 8004608: 4770 bx lr 0800460a : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { /* Make sure the list item is not recorded as being on a list. */ pxItem->pxContainer = NULL; 800460a: 2300 movs r3, #0 800460c: 6103 str r3, [r0, #16] /* Write known values into the list item if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ); listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ); } 800460e: 4770 bx lr 08004610 : /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; 8004610: 6843 ldr r3, [r0, #4] listTEST_LIST_ITEM_INTEGRITY( pxNewListItem ); /* Insert a new list item into pxList, but rather than sort the list, makes the new list item the last item to be removed by a call to listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; 8004612: 604b str r3, [r1, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 8004614: 689a ldr r2, [r3, #8] 8004616: 608a str r2, [r1, #8] /* Only used during decision coverage testing. */ mtCOVERAGE_TEST_DELAY(); pxIndex->pxPrevious->pxNext = pxNewListItem; 8004618: 6051 str r1, [r2, #4] pxIndex->pxPrevious = pxNewListItem; 800461a: 6099 str r1, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pxContainer = pxList; 800461c: 6108 str r0, [r1, #16] ( pxList->uxNumberOfItems )++; 800461e: 6803 ldr r3, [r0, #0] 8004620: 3301 adds r3, #1 8004622: 6003 str r3, [r0, #0] } 8004624: 4770 bx lr 08004626 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 8004626: b430 push {r4, r5} ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 8004628: 680d ldr r5, [r1, #0] new list item should be placed after it. This ensures that TCBs which are stored in ready lists (all of which have the same xItemValue value) get a share of the CPU. However, if the xItemValue is the same as the back marker the iteration loop below will not end. Therefore the value is checked first, and the algorithm slightly modified if necessary. */ if( xValueOfInsertion == portMAX_DELAY ) 800462a: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff 800462e: d011 beq.n 8004654 4) Using a queue or semaphore before it has been initialised or before the scheduler has been started (are interrupts firing before vTaskStartScheduler() has been called?). **********************************************************************/ for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */ 8004630: f100 0308 add.w r3, r0, #8 8004634: 461c mov r4, r3 8004636: 685b ldr r3, [r3, #4] 8004638: 681a ldr r2, [r3, #0] 800463a: 42aa cmp r2, r5 800463c: d9fa bls.n 8004634 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 800463e: 6863 ldr r3, [r4, #4] 8004640: 604b str r3, [r1, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 8004642: 6099 str r1, [r3, #8] pxNewListItem->pxPrevious = pxIterator; 8004644: 608c str r4, [r1, #8] pxIterator->pxNext = pxNewListItem; 8004646: 6061 str r1, [r4, #4] /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pxContainer = pxList; 8004648: 6108 str r0, [r1, #16] ( pxList->uxNumberOfItems )++; 800464a: 6803 ldr r3, [r0, #0] 800464c: 3301 adds r3, #1 800464e: 6003 str r3, [r0, #0] } 8004650: bc30 pop {r4, r5} 8004652: 4770 bx lr pxIterator = pxList->xListEnd.pxPrevious; 8004654: 6904 ldr r4, [r0, #16] 8004656: e7f2 b.n 800463e 08004658 : UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) { /* The list item knows which list it is in. Obtain the list from the list item. */ List_t * const pxList = pxItemToRemove->pxContainer; 8004658: 6903 ldr r3, [r0, #16] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 800465a: 6841 ldr r1, [r0, #4] 800465c: 6882 ldr r2, [r0, #8] 800465e: 608a str r2, [r1, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 8004660: 6841 ldr r1, [r0, #4] 8004662: 6051 str r1, [r2, #4] /* Only used during decision coverage testing. */ mtCOVERAGE_TEST_DELAY(); /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) 8004664: 685a ldr r2, [r3, #4] 8004666: 4282 cmp r2, r0 8004668: d006 beq.n 8004678 else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pxContainer = NULL; 800466a: 2200 movs r2, #0 800466c: 6102 str r2, [r0, #16] ( pxList->uxNumberOfItems )--; 800466e: 681a ldr r2, [r3, #0] 8004670: 3a01 subs r2, #1 8004672: 601a str r2, [r3, #0] return pxList->uxNumberOfItems; 8004674: 6818 ldr r0, [r3, #0] } 8004676: 4770 bx lr pxList->pxIndex = pxItemToRemove->pxPrevious; 8004678: 6882 ldr r2, [r0, #8] 800467a: 605a str r2, [r3, #4] 800467c: e7f5 b.n 800466a ... 08004680 : return pxTopOfStack; } /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 8004680: b082 sub sp, #8 volatile uint32_t ulDummy = 0; 8004682: 2300 movs r3, #0 8004684: 9301 str r3, [sp, #4] its caller as there is nothing to return to. If a task wants to exit it should instead call vTaskDelete( NULL ). Artificially force an assert() to be triggered if configASSERT() is defined, then stop here so application writers can catch the error. */ configASSERT( uxCriticalNesting == ~0UL ); 8004686: 4b0d ldr r3, [pc, #52] @ (80046bc ) 8004688: 681b ldr r3, [r3, #0] 800468a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 800468e: d008 beq.n 80046a2 8004690: f04f 0350 mov.w r3, #80 @ 0x50 8004694: f383 8811 msr BASEPRI, r3 8004698: f3bf 8f6f isb sy 800469c: f3bf 8f4f dsb sy 80046a0: e7fe b.n 80046a0 80046a2: f04f 0350 mov.w r3, #80 @ 0x50 80046a6: f383 8811 msr BASEPRI, r3 80046aa: f3bf 8f6f isb sy 80046ae: f3bf 8f4f dsb sy portDISABLE_INTERRUPTS(); while( ulDummy == 0 ) 80046b2: 9b01 ldr r3, [sp, #4] 80046b4: 2b00 cmp r3, #0 80046b6: d0fc beq.n 80046b2 about code appearing after this function is called - making ulDummy volatile makes the compiler think the function could return and therefore not output an 'unreachable code' warning for code that appears after it. */ } } 80046b8: b002 add sp, #8 80046ba: 4770 bx lr 80046bc: 24000024 .word 0x24000024 080046c0 : { /* Start the first task. This also clears the bit that indicates the FPU is in use in case the FPU was used before the scheduler was started - which would otherwise result in the unnecessary leaving of space in the SVC stack for lazy saving of FPU registers. */ __asm volatile( 80046c0: 4808 ldr r0, [pc, #32] @ (80046e4 ) 80046c2: 6800 ldr r0, [r0, #0] 80046c4: 6800 ldr r0, [r0, #0] 80046c6: f380 8808 msr MSP, r0 80046ca: f04f 0000 mov.w r0, #0 80046ce: f380 8814 msr CONTROL, r0 80046d2: b662 cpsie i 80046d4: b661 cpsie f 80046d6: f3bf 8f4f dsb sy 80046da: f3bf 8f6f isb sy 80046de: df00 svc 0 80046e0: bf00 nop " dsb \n" " isb \n" " svc 0 \n" /* System call to start first task. */ " nop \n" ); } 80046e2: 0000 .short 0x0000 80046e4: e000ed08 .word 0xe000ed08 080046e8 : /*-----------------------------------------------------------*/ /* This is a naked function. */ static void vPortEnableVFP( void ) { __asm volatile 80046e8: f8df 000c ldr.w r0, [pc, #12] @ 80046f8 80046ec: 6801 ldr r1, [r0, #0] 80046ee: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000 80046f2: 6001 str r1, [r0, #0] 80046f4: 4770 bx lr " \n" " orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */ " str r1, [r0] \n" " bx r14 " ); } 80046f6: 0000 .short 0x0000 80046f8: e000ed88 .word 0xe000ed88 080046fc : *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ 80046fc: f04f 7380 mov.w r3, #16777216 @ 0x1000000 8004700: f840 3c04 str.w r3, [r0, #-4] *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */ 8004704: f021 0101 bic.w r1, r1, #1 8004708: f840 1c08 str.w r1, [r0, #-8] *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 800470c: 4b05 ldr r3, [pc, #20] @ (8004724 ) 800470e: f840 3c0c str.w r3, [r0, #-12] *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 8004712: f840 2c20 str.w r2, [r0, #-32] *pxTopOfStack = portINITIAL_EXC_RETURN; 8004716: f06f 0302 mvn.w r3, #2 800471a: f840 3c24 str.w r3, [r0, #-36] } 800471e: 3844 subs r0, #68 @ 0x44 8004720: 4770 bx lr 8004722: bf00 nop 8004724: 08004681 .word 0x08004681 ... 08004730 : __asm volatile ( 8004730: 4b07 ldr r3, [pc, #28] @ (8004750 ) 8004732: 6819 ldr r1, [r3, #0] 8004734: 6808 ldr r0, [r1, #0] 8004736: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 800473a: f380 8809 msr PSP, r0 800473e: f3bf 8f6f isb sy 8004742: f04f 0000 mov.w r0, #0 8004746: f380 8811 msr BASEPRI, r0 800474a: 4770 bx lr 800474c: f3af 8000 nop.w 08004750 : 8004750: 24012dc4 .word 0x24012dc4 08004754 : 8004754: f04f 0350 mov.w r3, #80 @ 0x50 8004758: f383 8811 msr BASEPRI, r3 800475c: f3bf 8f6f isb sy 8004760: f3bf 8f4f dsb sy uxCriticalNesting++; 8004764: 4a0b ldr r2, [pc, #44] @ (8004794 ) 8004766: 6813 ldr r3, [r2, #0] 8004768: 3301 adds r3, #1 800476a: 6013 str r3, [r2, #0] if( uxCriticalNesting == 1 ) 800476c: 2b01 cmp r3, #1 800476e: d000 beq.n 8004772 } 8004770: 4770 bx lr configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 8004772: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004776: f8d3 3d04 ldr.w r3, [r3, #3332] @ 0xd04 800477a: f013 0fff tst.w r3, #255 @ 0xff 800477e: d0f7 beq.n 8004770 8004780: f04f 0350 mov.w r3, #80 @ 0x50 8004784: f383 8811 msr BASEPRI, r3 8004788: f3bf 8f6f isb sy 800478c: f3bf 8f4f dsb sy 8004790: e7fe b.n 8004790 8004792: bf00 nop 8004794: 24000024 .word 0x24000024 08004798 : configASSERT( uxCriticalNesting ); 8004798: 4b09 ldr r3, [pc, #36] @ (80047c0 ) 800479a: 681b ldr r3, [r3, #0] 800479c: b943 cbnz r3, 80047b0 800479e: f04f 0350 mov.w r3, #80 @ 0x50 80047a2: f383 8811 msr BASEPRI, r3 80047a6: f3bf 8f6f isb sy 80047aa: f3bf 8f4f dsb sy 80047ae: e7fe b.n 80047ae uxCriticalNesting--; 80047b0: 3b01 subs r3, #1 80047b2: 4a03 ldr r2, [pc, #12] @ (80047c0 ) 80047b4: 6013 str r3, [r2, #0] if( uxCriticalNesting == 0 ) 80047b6: b90b cbnz r3, 80047bc } /*-----------------------------------------------------------*/ portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue ) { __asm volatile 80047b8: f383 8811 msr BASEPRI, r3 } 80047bc: 4770 bx lr 80047be: bf00 nop 80047c0: 24000024 .word 0x24000024 ... 080047d0 : __asm volatile 80047d0: f3ef 8009 mrs r0, PSP 80047d4: f3bf 8f6f isb sy 80047d8: 4b15 ldr r3, [pc, #84] @ (8004830 ) 80047da: 681a ldr r2, [r3, #0] 80047dc: f01e 0f10 tst.w lr, #16 80047e0: bf08 it eq 80047e2: ed20 8a10 vstmdbeq r0!, {s16-s31} 80047e6: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80047ea: 6010 str r0, [r2, #0] 80047ec: e92d 0009 stmdb sp!, {r0, r3} 80047f0: f04f 0050 mov.w r0, #80 @ 0x50 80047f4: f380 8811 msr BASEPRI, r0 80047f8: f3bf 8f4f dsb sy 80047fc: f3bf 8f6f isb sy 8004800: f001 faa2 bl 8005d48 8004804: f04f 0000 mov.w r0, #0 8004808: f380 8811 msr BASEPRI, r0 800480c: bc09 pop {r0, r3} 800480e: 6819 ldr r1, [r3, #0] 8004810: 6808 ldr r0, [r1, #0] 8004812: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8004816: f01e 0f10 tst.w lr, #16 800481a: bf08 it eq 800481c: ecb0 8a10 vldmiaeq r0!, {s16-s31} 8004820: f380 8809 msr PSP, r0 8004824: f3bf 8f6f isb sy 8004828: 4770 bx lr 800482a: bf00 nop 800482c: f3af 8000 nop.w 08004830 : 8004830: 24012dc4 .word 0x24012dc4 08004834 : { 8004834: b508 push {r3, lr} __asm volatile 8004836: f04f 0350 mov.w r3, #80 @ 0x50 800483a: f383 8811 msr BASEPRI, r3 800483e: f3bf 8f6f isb sy 8004842: f3bf 8f4f dsb sy if( xTaskIncrementTick() != pdFALSE ) 8004846: f001 f951 bl 8005aec 800484a: b128 cbz r0, 8004858 portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 800484c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004850: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8004854: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 __asm volatile 8004858: 2300 movs r3, #0 800485a: f383 8811 msr BASEPRI, r3 } 800485e: bd08 pop {r3, pc} 08004860 : portNVIC_SYSTICK_CTRL_REG = 0UL; 8004860: f04f 22e0 mov.w r2, #3758153728 @ 0xe000e000 8004864: 2300 movs r3, #0 8004866: 6113 str r3, [r2, #16] portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL; 8004868: 6193 str r3, [r2, #24] portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; 800486a: 4b05 ldr r3, [pc, #20] @ (8004880 ) 800486c: 681b ldr r3, [r3, #0] 800486e: 4905 ldr r1, [pc, #20] @ (8004884 ) 8004870: fba1 1303 umull r1, r3, r1, r3 8004874: 099b lsrs r3, r3, #6 8004876: 3b01 subs r3, #1 8004878: 6153 str r3, [r2, #20] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 800487a: 2307 movs r3, #7 800487c: 6113 str r3, [r2, #16] } 800487e: 4770 bx lr 8004880: 24000004 .word 0x24000004 8004884: 10624dd3 .word 0x10624dd3 08004888 : configASSERT( portCPUID != portCORTEX_M7_r0p1_ID ); 8004888: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 800488c: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 8004890: 4b3d ldr r3, [pc, #244] @ (8004988 ) 8004892: 429a cmp r2, r3 8004894: d01c beq.n 80048d0 configASSERT( portCPUID != portCORTEX_M7_r0p0_ID ); 8004896: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 800489a: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 800489e: 4b3b ldr r3, [pc, #236] @ (800498c ) 80048a0: 429a cmp r2, r3 80048a2: d01e beq.n 80048e2 { 80048a4: b530 push {r4, r5, lr} 80048a6: b083 sub sp, #12 ulOriginalPriority = *pucFirstUserPriorityRegister; 80048a8: 4b39 ldr r3, [pc, #228] @ (8004990 ) 80048aa: 781a ldrb r2, [r3, #0] 80048ac: b2d2 uxtb r2, r2 80048ae: 9201 str r2, [sp, #4] *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 80048b0: 22ff movs r2, #255 @ 0xff 80048b2: 701a strb r2, [r3, #0] ucMaxPriorityValue = *pucFirstUserPriorityRegister; 80048b4: 781b ldrb r3, [r3, #0] 80048b6: b2db uxtb r3, r3 80048b8: f88d 3003 strb.w r3, [sp, #3] ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 80048bc: f89d 3003 ldrb.w r3, [sp, #3] 80048c0: f003 0350 and.w r3, r3, #80 @ 0x50 80048c4: 4a33 ldr r2, [pc, #204] @ (8004994 ) 80048c6: 7013 strb r3, [r2, #0] ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 80048c8: 4b33 ldr r3, [pc, #204] @ (8004998 ) 80048ca: 2207 movs r2, #7 80048cc: 601a str r2, [r3, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 80048ce: e01b b.n 8004908 __asm volatile 80048d0: f04f 0350 mov.w r3, #80 @ 0x50 80048d4: f383 8811 msr BASEPRI, r3 80048d8: f3bf 8f6f isb sy 80048dc: f3bf 8f4f dsb sy configASSERT( portCPUID != portCORTEX_M7_r0p1_ID ); 80048e0: e7fe b.n 80048e0 80048e2: f04f 0350 mov.w r3, #80 @ 0x50 80048e6: f383 8811 msr BASEPRI, r3 80048ea: f3bf 8f6f isb sy 80048ee: f3bf 8f4f dsb sy configASSERT( portCPUID != portCORTEX_M7_r0p0_ID ); 80048f2: e7fe b.n 80048f2 ulMaxPRIGROUPValue--; 80048f4: 4a28 ldr r2, [pc, #160] @ (8004998 ) 80048f6: 6813 ldr r3, [r2, #0] 80048f8: 3b01 subs r3, #1 80048fa: 6013 str r3, [r2, #0] ucMaxPriorityValue <<= ( uint8_t ) 0x01; 80048fc: f89d 3003 ldrb.w r3, [sp, #3] 8004900: 005b lsls r3, r3, #1 8004902: b2db uxtb r3, r3 8004904: f88d 3003 strb.w r3, [sp, #3] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 8004908: f89d 3003 ldrb.w r3, [sp, #3] 800490c: f013 0f80 tst.w r3, #128 @ 0x80 8004910: d1f0 bne.n 80048f4 configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == configPRIO_BITS ); 8004912: 4b21 ldr r3, [pc, #132] @ (8004998 ) 8004914: 681b ldr r3, [r3, #0] 8004916: 2b03 cmp r3, #3 8004918: d008 beq.n 800492c 800491a: f04f 0350 mov.w r3, #80 @ 0x50 800491e: f383 8811 msr BASEPRI, r3 8004922: f3bf 8f6f isb sy 8004926: f3bf 8f4f dsb sy 800492a: e7fe b.n 800492a ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 800492c: 021b lsls r3, r3, #8 800492e: 4a1a ldr r2, [pc, #104] @ (8004998 ) 8004930: 6013 str r3, [r2, #0] ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 8004932: f403 63e0 and.w r3, r3, #1792 @ 0x700 8004936: 6013 str r3, [r2, #0] *pucFirstUserPriorityRegister = ulOriginalPriority; 8004938: 9b01 ldr r3, [sp, #4] 800493a: b2db uxtb r3, r3 800493c: 4a14 ldr r2, [pc, #80] @ (8004990 ) 800493e: 7013 strb r3, [r2, #0] portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 8004940: f04f 24e0 mov.w r4, #3758153728 @ 0xe000e000 8004944: f8d4 3d20 ldr.w r3, [r4, #3360] @ 0xd20 8004948: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 800494c: f8c4 3d20 str.w r3, [r4, #3360] @ 0xd20 portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 8004950: f8d4 3d20 ldr.w r3, [r4, #3360] @ 0xd20 8004954: f043 4370 orr.w r3, r3, #4026531840 @ 0xf0000000 8004958: f8c4 3d20 str.w r3, [r4, #3360] @ 0xd20 vPortSetupTimerInterrupt(); 800495c: f7ff ff80 bl 8004860 uxCriticalNesting = 0; 8004960: 2500 movs r5, #0 8004962: 4b0e ldr r3, [pc, #56] @ (800499c ) 8004964: 601d str r5, [r3, #0] vPortEnableVFP(); 8004966: f7ff febf bl 80046e8 *( portFPCCR ) |= portASPEN_AND_LSPEN_BITS; 800496a: f8d4 3f34 ldr.w r3, [r4, #3892] @ 0xf34 800496e: f043 4340 orr.w r3, r3, #3221225472 @ 0xc0000000 8004972: f8c4 3f34 str.w r3, [r4, #3892] @ 0xf34 prvPortStartFirstTask(); 8004976: f7ff fea3 bl 80046c0 vTaskSwitchContext(); 800497a: f001 f9e5 bl 8005d48 prvTaskExitError(); 800497e: f7ff fe7f bl 8004680 } 8004982: 4628 mov r0, r5 8004984: b003 add sp, #12 8004986: bd30 pop {r4, r5, pc} 8004988: 410fc271 .word 0x410fc271 800498c: 410fc270 .word 0x410fc270 8004990: e000e400 .word 0xe000e400 8004994: 24012884 .word 0x24012884 8004998: 24012880 .word 0x24012880 800499c: 24000024 .word 0x24000024 080049a0 : { uint32_t ulCurrentInterrupt; uint8_t ucCurrentPriority; /* Obtain the number of the currently executing interrupt. */ __asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) :: "memory" ); 80049a0: f3ef 8305 mrs r3, IPSR /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 80049a4: 2b0f cmp r3, #15 80049a6: d90f bls.n 80049c8 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 80049a8: 4a11 ldr r2, [pc, #68] @ (80049f0 ) 80049aa: 5c9b ldrb r3, [r3, r2] 80049ac: b2db uxtb r3, r3 interrupt entry is as fast and simple as possible. The following links provide detailed information: http://www.freertos.org/RTOS-Cortex-M3-M4.html http://www.freertos.org/FAQHelp.html */ configASSERT( ucCurrentPriority >= ucMaxSysCallPriority ); 80049ae: 4a11 ldr r2, [pc, #68] @ (80049f4 ) 80049b0: 7812 ldrb r2, [r2, #0] 80049b2: 429a cmp r2, r3 80049b4: d908 bls.n 80049c8 80049b6: f04f 0350 mov.w r3, #80 @ 0x50 80049ba: f383 8811 msr BASEPRI, r3 80049be: f3bf 8f6f isb sy 80049c2: f3bf 8f4f dsb sy 80049c6: e7fe b.n 80049c6 configuration then the correct setting can be achieved on all Cortex-M devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the scheduler. Note however that some vendor specific peripheral libraries assume a non-zero priority group setting, in which cases using a value of zero will result in unpredictable behaviour. */ configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue ); 80049c8: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 80049cc: f8d3 3d0c ldr.w r3, [r3, #3340] @ 0xd0c 80049d0: f403 63e0 and.w r3, r3, #1792 @ 0x700 80049d4: 4a08 ldr r2, [pc, #32] @ (80049f8 ) 80049d6: 6812 ldr r2, [r2, #0] 80049d8: 4293 cmp r3, r2 80049da: d908 bls.n 80049ee 80049dc: f04f 0350 mov.w r3, #80 @ 0x50 80049e0: f383 8811 msr BASEPRI, r3 80049e4: f3bf 8f6f isb sy 80049e8: f3bf 8f4f dsb sy 80049ec: e7fe b.n 80049ec } 80049ee: 4770 bx lr 80049f0: e000e3f0 .word 0xe000e3f0 80049f4: 24012884 .word 0x24012884 80049f8: 24012880 .word 0x24012880 080049fc : /*-----------------------------------------------------------*/ #if( configUSE_MUTEXES == 1 ) static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue ) { 80049fc: 4603 mov r3, r0 priority, but the waiting task times out, then the holder should disinherit the priority - but only down to the highest priority of any other tasks that are waiting for the same mutex. For this purpose, return the priority of the highest priority task that is waiting for the mutex. */ if( listCURRENT_LIST_LENGTH( &( pxQueue->xTasksWaitingToReceive ) ) > 0U ) 80049fe: 6a40 ldr r0, [r0, #36] @ 0x24 8004a00: b118 cbz r0, 8004a0a { uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) ); 8004a02: 6b1b ldr r3, [r3, #48] @ 0x30 8004a04: 6818 ldr r0, [r3, #0] 8004a06: f1c0 0038 rsb r0, r0, #56 @ 0x38 { uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY; } return uxHighestPriorityOfWaitingTasks; } 8004a0a: 4770 bx lr 08004a0c : return xReturn; } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { 8004a0c: b510 push {r4, lr} 8004a0e: 4604 mov r4, r0 BaseType_t xReturn; taskENTER_CRITICAL(); 8004a10: f7ff fea0 bl 8004754 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 8004a14: 6ba2 ldr r2, [r4, #56] @ 0x38 8004a16: 6be3 ldr r3, [r4, #60] @ 0x3c 8004a18: 429a cmp r2, r3 8004a1a: d004 beq.n 8004a26 { xReturn = pdTRUE; } else { xReturn = pdFALSE; 8004a1c: 2400 movs r4, #0 } } taskEXIT_CRITICAL(); 8004a1e: f7ff febb bl 8004798 return xReturn; } 8004a22: 4620 mov r0, r4 8004a24: bd10 pop {r4, pc} xReturn = pdTRUE; 8004a26: 2401 movs r4, #1 8004a28: e7f9 b.n 8004a1e 08004a2a : { 8004a2a: b510 push {r4, lr} 8004a2c: 4604 mov r4, r0 taskENTER_CRITICAL(); 8004a2e: f7ff fe91 bl 8004754 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 8004a32: 6ba3 ldr r3, [r4, #56] @ 0x38 8004a34: b923 cbnz r3, 8004a40 xReturn = pdTRUE; 8004a36: 2401 movs r4, #1 taskEXIT_CRITICAL(); 8004a38: f7ff feae bl 8004798 } 8004a3c: 4620 mov r0, r4 8004a3e: bd10 pop {r4, pc} xReturn = pdFALSE; 8004a40: 2400 movs r4, #0 8004a42: e7f9 b.n 8004a38 08004a44 : { 8004a44: b570 push {r4, r5, r6, lr} 8004a46: 4604 mov r4, r0 8004a48: 4615 mov r5, r2 uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8004a4a: 6b86 ldr r6, [r0, #56] @ 0x38 if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 8004a4c: 6c02 ldr r2, [r0, #64] @ 0x40 8004a4e: b95a cbnz r2, 8004a68 if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8004a50: 6803 ldr r3, [r0, #0] 8004a52: b11b cbz r3, 8004a5c BaseType_t xReturn = pdFALSE; 8004a54: 2000 movs r0, #0 pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1; 8004a56: 3601 adds r6, #1 8004a58: 63a6 str r6, [r4, #56] @ 0x38 } 8004a5a: bd70 pop {r4, r5, r6, pc} xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder ); 8004a5c: 6880 ldr r0, [r0, #8] 8004a5e: f001 fb03 bl 8006068 pxQueue->u.xSemaphore.xMutexHolder = NULL; 8004a62: 2300 movs r3, #0 8004a64: 60a3 str r3, [r4, #8] 8004a66: e7f6 b.n 8004a56 else if( xPosition == queueSEND_TO_BACK ) 8004a68: b96d cbnz r5, 8004a86 ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */ 8004a6a: 6840 ldr r0, [r0, #4] 8004a6c: f00e ff09 bl 8013882 pxQueue->pcWriteTo += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */ 8004a70: 6863 ldr r3, [r4, #4] 8004a72: 6c22 ldr r2, [r4, #64] @ 0x40 8004a74: 4413 add r3, r2 8004a76: 6063 str r3, [r4, #4] if( pxQueue->pcWriteTo >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 8004a78: 68a2 ldr r2, [r4, #8] 8004a7a: 4293 cmp r3, r2 8004a7c: d319 bcc.n 8004ab2 pxQueue->pcWriteTo = pxQueue->pcHead; 8004a7e: 6823 ldr r3, [r4, #0] 8004a80: 6063 str r3, [r4, #4] BaseType_t xReturn = pdFALSE; 8004a82: 4628 mov r0, r5 8004a84: e7e7 b.n 8004a56 ( void ) memcpy( ( void * ) pxQueue->u.xQueue.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e9087 !e418 MISRA exception as the casts are only redundant for some ports. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. Assert checks null pointer only used when length is 0. */ 8004a86: 68c0 ldr r0, [r0, #12] 8004a88: f00e fefb bl 8013882 pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize; 8004a8c: 68e3 ldr r3, [r4, #12] 8004a8e: 6c22 ldr r2, [r4, #64] @ 0x40 8004a90: 4251 negs r1, r2 8004a92: 1a9b subs r3, r3, r2 8004a94: 60e3 str r3, [r4, #12] if( pxQueue->u.xQueue.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 8004a96: 6822 ldr r2, [r4, #0] 8004a98: 4293 cmp r3, r2 8004a9a: d202 bcs.n 8004aa2 pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize ); 8004a9c: 68a3 ldr r3, [r4, #8] 8004a9e: 440b add r3, r1 8004aa0: 60e3 str r3, [r4, #12] if( xPosition == queueOVERWRITE ) 8004aa2: 2d02 cmp r5, #2 8004aa4: d001 beq.n 8004aaa BaseType_t xReturn = pdFALSE; 8004aa6: 2000 movs r0, #0 8004aa8: e7d5 b.n 8004a56 if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 8004aaa: b126 cbz r6, 8004ab6 --uxMessagesWaiting; 8004aac: 3e01 subs r6, #1 BaseType_t xReturn = pdFALSE; 8004aae: 2000 movs r0, #0 8004ab0: e7d1 b.n 8004a56 8004ab2: 4628 mov r0, r5 8004ab4: e7cf b.n 8004a56 8004ab6: 2000 movs r0, #0 8004ab8: e7cd b.n 8004a56 08004aba : { 8004aba: 4603 mov r3, r0 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 8004abc: 6c02 ldr r2, [r0, #64] @ 0x40 8004abe: b16a cbz r2, 8004adc { 8004ac0: b510 push {r4, lr} 8004ac2: 4608 mov r0, r1 pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */ 8004ac4: 68d9 ldr r1, [r3, #12] 8004ac6: 4411 add r1, r2 8004ac8: 60d9 str r1, [r3, #12] if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ 8004aca: 689c ldr r4, [r3, #8] 8004acc: 42a1 cmp r1, r4 8004ace: d301 bcc.n 8004ad4 pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; 8004ad0: 6819 ldr r1, [r3, #0] 8004ad2: 60d9 str r1, [r3, #12] ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */ 8004ad4: 68d9 ldr r1, [r3, #12] 8004ad6: f00e fed4 bl 8013882 } 8004ada: bd10 pop {r4, pc} 8004adc: 4770 bx lr 08004ade : { 8004ade: b538 push {r3, r4, r5, lr} 8004ae0: 4605 mov r5, r0 taskENTER_CRITICAL(); 8004ae2: f7ff fe37 bl 8004754 int8_t cTxLock = pxQueue->cTxLock; 8004ae6: f895 4045 ldrb.w r4, [r5, #69] @ 0x45 8004aea: b264 sxtb r4, r4 while( cTxLock > queueLOCKED_UNMODIFIED ) 8004aec: e001 b.n 8004af2 --cTxLock; 8004aee: 3c01 subs r4, #1 8004af0: b264 sxtb r4, r4 while( cTxLock > queueLOCKED_UNMODIFIED ) 8004af2: 2c00 cmp r4, #0 8004af4: dd0a ble.n 8004b0c if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8004af6: 6a6b ldr r3, [r5, #36] @ 0x24 8004af8: b143 cbz r3, 8004b0c if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8004afa: f105 0024 add.w r0, r5, #36 @ 0x24 8004afe: f001 f9b7 bl 8005e70 8004b02: 2800 cmp r0, #0 8004b04: d0f3 beq.n 8004aee vTaskMissedYield(); 8004b06: f001 fa47 bl 8005f98 8004b0a: e7f0 b.n 8004aee pxQueue->cTxLock = queueUNLOCKED; 8004b0c: 23ff movs r3, #255 @ 0xff 8004b0e: f885 3045 strb.w r3, [r5, #69] @ 0x45 taskEXIT_CRITICAL(); 8004b12: f7ff fe41 bl 8004798 taskENTER_CRITICAL(); 8004b16: f7ff fe1d bl 8004754 int8_t cRxLock = pxQueue->cRxLock; 8004b1a: f895 4044 ldrb.w r4, [r5, #68] @ 0x44 8004b1e: b264 sxtb r4, r4 while( cRxLock > queueLOCKED_UNMODIFIED ) 8004b20: e001 b.n 8004b26 --cRxLock; 8004b22: 3c01 subs r4, #1 8004b24: b264 sxtb r4, r4 while( cRxLock > queueLOCKED_UNMODIFIED ) 8004b26: 2c00 cmp r4, #0 8004b28: dd0a ble.n 8004b40 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8004b2a: 692b ldr r3, [r5, #16] 8004b2c: b143 cbz r3, 8004b40 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8004b2e: f105 0010 add.w r0, r5, #16 8004b32: f001 f99d bl 8005e70 8004b36: 2800 cmp r0, #0 8004b38: d0f3 beq.n 8004b22 vTaskMissedYield(); 8004b3a: f001 fa2d bl 8005f98 8004b3e: e7f0 b.n 8004b22 pxQueue->cRxLock = queueUNLOCKED; 8004b40: 23ff movs r3, #255 @ 0xff 8004b42: f885 3044 strb.w r3, [r5, #68] @ 0x44 taskEXIT_CRITICAL(); 8004b46: f7ff fe27 bl 8004798 } 8004b4a: bd38 pop {r3, r4, r5, pc} 08004b4c : { 8004b4c: b538 push {r3, r4, r5, lr} configASSERT( pxQueue ); 8004b4e: b1e0 cbz r0, 8004b8a 8004b50: 460d mov r5, r1 8004b52: 4604 mov r4, r0 taskENTER_CRITICAL(); 8004b54: f7ff fdfe bl 8004754 pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 8004b58: 6823 ldr r3, [r4, #0] 8004b5a: 6be2 ldr r2, [r4, #60] @ 0x3c 8004b5c: 6c21 ldr r1, [r4, #64] @ 0x40 8004b5e: fb01 3002 mla r0, r1, r2, r3 8004b62: 60a0 str r0, [r4, #8] pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 8004b64: 2000 movs r0, #0 8004b66: 63a0 str r0, [r4, #56] @ 0x38 pxQueue->pcWriteTo = pxQueue->pcHead; 8004b68: 6063 str r3, [r4, #4] pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - 1U ) * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 8004b6a: 3a01 subs r2, #1 8004b6c: fb02 3301 mla r3, r2, r1, r3 8004b70: 60e3 str r3, [r4, #12] pxQueue->cRxLock = queueUNLOCKED; 8004b72: 23ff movs r3, #255 @ 0xff 8004b74: f884 3044 strb.w r3, [r4, #68] @ 0x44 pxQueue->cTxLock = queueUNLOCKED; 8004b78: f884 3045 strb.w r3, [r4, #69] @ 0x45 if( xNewQueue == pdFALSE ) 8004b7c: b9fd cbnz r5, 8004bbe if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8004b7e: 6923 ldr r3, [r4, #16] 8004b80: b963 cbnz r3, 8004b9c taskEXIT_CRITICAL(); 8004b82: f7ff fe09 bl 8004798 } 8004b86: 2001 movs r0, #1 8004b88: bd38 pop {r3, r4, r5, pc} 8004b8a: f04f 0350 mov.w r3, #80 @ 0x50 8004b8e: f383 8811 msr BASEPRI, r3 8004b92: f3bf 8f6f isb sy 8004b96: f3bf 8f4f dsb sy configASSERT( pxQueue ); 8004b9a: e7fe b.n 8004b9a if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8004b9c: f104 0010 add.w r0, r4, #16 8004ba0: f001 f966 bl 8005e70 8004ba4: 2800 cmp r0, #0 8004ba6: d0ec beq.n 8004b82 queueYIELD_IF_USING_PREEMPTION(); 8004ba8: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004bac: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8004bb0: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8004bb4: f3bf 8f4f dsb sy 8004bb8: f3bf 8f6f isb sy 8004bbc: e7e1 b.n 8004b82 vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 8004bbe: f104 0010 add.w r0, r4, #16 8004bc2: f7ff fd17 bl 80045f4 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 8004bc6: f104 0024 add.w r0, r4, #36 @ 0x24 8004bca: f7ff fd13 bl 80045f4 8004bce: e7d8 b.n 8004b82 08004bd0 : { 8004bd0: b538 push {r3, r4, r5, lr} 8004bd2: 461d mov r5, r3 8004bd4: 9c04 ldr r4, [sp, #16] if( uxItemSize == ( UBaseType_t ) 0 ) 8004bd6: 460b mov r3, r1 8004bd8: b949 cbnz r1, 8004bee pxNewQueue->pcHead = ( int8_t * ) pxNewQueue; 8004bda: 6024 str r4, [r4, #0] pxNewQueue->uxLength = uxQueueLength; 8004bdc: 63e0 str r0, [r4, #60] @ 0x3c pxNewQueue->uxItemSize = uxItemSize; 8004bde: 6423 str r3, [r4, #64] @ 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 8004be0: 2101 movs r1, #1 8004be2: 4620 mov r0, r4 8004be4: f7ff ffb2 bl 8004b4c pxNewQueue->ucQueueType = ucQueueType; 8004be8: f884 504c strb.w r5, [r4, #76] @ 0x4c } 8004bec: bd38 pop {r3, r4, r5, pc} pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage; 8004bee: 6022 str r2, [r4, #0] 8004bf0: e7f4 b.n 8004bdc 08004bf2 : configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 8004bf2: b940 cbnz r0, 8004c06 8004bf4: f04f 0350 mov.w r3, #80 @ 0x50 8004bf8: f383 8811 msr BASEPRI, r3 8004bfc: f3bf 8f6f isb sy 8004c00: f3bf 8f4f dsb sy 8004c04: e7fe b.n 8004c04 { 8004c06: b510 push {r4, lr} 8004c08: b084 sub sp, #16 8004c0a: 461c mov r4, r3 configASSERT( pxStaticQueue != NULL ); 8004c0c: b183 cbz r3, 8004c30 configASSERT( !( ( pucQueueStorage != NULL ) && ( uxItemSize == 0 ) ) ); 8004c0e: 1e0b subs r3, r1, #0 8004c10: bf18 it ne 8004c12: 2301 movne r3, #1 8004c14: 2a00 cmp r2, #0 8004c16: bf08 it eq 8004c18: f043 0301 orreq.w r3, r3, #1 8004c1c: b98b cbnz r3, 8004c42 8004c1e: f04f 0350 mov.w r3, #80 @ 0x50 8004c22: f383 8811 msr BASEPRI, r3 8004c26: f3bf 8f6f isb sy 8004c2a: f3bf 8f4f dsb sy 8004c2e: e7fe b.n 8004c2e 8004c30: f04f 0350 mov.w r3, #80 @ 0x50 8004c34: f383 8811 msr BASEPRI, r3 8004c38: f3bf 8f6f isb sy 8004c3c: f3bf 8f4f dsb sy configASSERT( pxStaticQueue != NULL ); 8004c40: e7fe b.n 8004c40 configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) ); 8004c42: fab1 f381 clz r3, r1 8004c46: 095b lsrs r3, r3, #5 8004c48: 2a00 cmp r2, #0 8004c4a: bf18 it ne 8004c4c: f043 0301 orrne.w r3, r3, #1 8004c50: b943 cbnz r3, 8004c64 8004c52: f04f 0350 mov.w r3, #80 @ 0x50 8004c56: f383 8811 msr BASEPRI, r3 8004c5a: f3bf 8f6f isb sy 8004c5e: f3bf 8f4f dsb sy 8004c62: e7fe b.n 8004c62 volatile size_t xSize = sizeof( StaticQueue_t ); 8004c64: 2350 movs r3, #80 @ 0x50 8004c66: 9303 str r3, [sp, #12] configASSERT( xSize == sizeof( Queue_t ) ); 8004c68: 9b03 ldr r3, [sp, #12] 8004c6a: 2b50 cmp r3, #80 @ 0x50 8004c6c: d008 beq.n 8004c80 8004c6e: f04f 0350 mov.w r3, #80 @ 0x50 8004c72: f383 8811 msr BASEPRI, r3 8004c76: f3bf 8f6f isb sy 8004c7a: f3bf 8f4f dsb sy 8004c7e: e7fe b.n 8004c7e ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ 8004c80: 9b03 ldr r3, [sp, #12] pxNewQueue->ucStaticallyAllocated = pdTRUE; 8004c82: 2301 movs r3, #1 8004c84: f884 3046 strb.w r3, [r4, #70] @ 0x46 prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 8004c88: 9400 str r4, [sp, #0] 8004c8a: f89d 3018 ldrb.w r3, [sp, #24] 8004c8e: f7ff ff9f bl 8004bd0 } 8004c92: 4620 mov r0, r4 8004c94: b004 add sp, #16 8004c96: bd10 pop {r4, pc} 08004c98 : configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 8004c98: b940 cbnz r0, 8004cac 8004c9a: f04f 0350 mov.w r3, #80 @ 0x50 8004c9e: f383 8811 msr BASEPRI, r3 8004ca2: f3bf 8f6f isb sy 8004ca6: f3bf 8f4f dsb sy 8004caa: e7fe b.n 8004caa { 8004cac: b5f0 push {r4, r5, r6, r7, lr} 8004cae: b083 sub sp, #12 8004cb0: 460d mov r5, r1 8004cb2: 4614 mov r4, r2 8004cb4: 4606 mov r6, r0 xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8004cb6: fb01 f000 mul.w r0, r1, r0 pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes ); /*lint !e9087 !e9079 see comment above. */ 8004cba: 3050 adds r0, #80 @ 0x50 8004cbc: f7ff fbda bl 8004474 if( pxNewQueue != NULL ) 8004cc0: 4607 mov r7, r0 8004cc2: b150 cbz r0, 8004cda pxNewQueue->ucStaticallyAllocated = pdFALSE; 8004cc4: 2300 movs r3, #0 8004cc6: f880 3046 strb.w r3, [r0, #70] @ 0x46 prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 8004cca: 9000 str r0, [sp, #0] 8004ccc: 4623 mov r3, r4 8004cce: f100 0250 add.w r2, r0, #80 @ 0x50 8004cd2: 4629 mov r1, r5 8004cd4: 4630 mov r0, r6 8004cd6: f7ff ff7b bl 8004bd0 } 8004cda: 4638 mov r0, r7 8004cdc: b003 add sp, #12 8004cde: bdf0 pop {r4, r5, r6, r7, pc} 08004ce0 : configASSERT( uxMaxCount != 0 ); 8004ce0: b940 cbnz r0, 8004cf4 8004ce2: f04f 0350 mov.w r3, #80 @ 0x50 8004ce6: f383 8811 msr BASEPRI, r3 8004cea: f3bf 8f6f isb sy 8004cee: f3bf 8f4f dsb sy 8004cf2: e7fe b.n 8004cf2 { 8004cf4: b510 push {r4, lr} 8004cf6: b082 sub sp, #8 8004cf8: 460c mov r4, r1 configASSERT( uxInitialCount <= uxMaxCount ); 8004cfa: 4288 cmp r0, r1 8004cfc: d208 bcs.n 8004d10 8004cfe: f04f 0350 mov.w r3, #80 @ 0x50 8004d02: f383 8811 msr BASEPRI, r3 8004d06: f3bf 8f6f isb sy 8004d0a: f3bf 8f4f dsb sy 8004d0e: e7fe b.n 8004d0e xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 8004d10: 2302 movs r3, #2 8004d12: 9300 str r3, [sp, #0] 8004d14: 4613 mov r3, r2 8004d16: 2200 movs r2, #0 8004d18: 4611 mov r1, r2 8004d1a: f7ff ff6a bl 8004bf2 if( xHandle != NULL ) 8004d1e: b100 cbz r0, 8004d22 ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 8004d20: 6384 str r4, [r0, #56] @ 0x38 } 8004d22: b002 add sp, #8 8004d24: bd10 pop {r4, pc} 08004d26 : configASSERT( uxMaxCount != 0 ); 8004d26: b940 cbnz r0, 8004d3a 8004d28: f04f 0350 mov.w r3, #80 @ 0x50 8004d2c: f383 8811 msr BASEPRI, r3 8004d30: f3bf 8f6f isb sy 8004d34: f3bf 8f4f dsb sy 8004d38: e7fe b.n 8004d38 { 8004d3a: b510 push {r4, lr} 8004d3c: 460c mov r4, r1 configASSERT( uxInitialCount <= uxMaxCount ); 8004d3e: 4288 cmp r0, r1 8004d40: d208 bcs.n 8004d54 8004d42: f04f 0350 mov.w r3, #80 @ 0x50 8004d46: f383 8811 msr BASEPRI, r3 8004d4a: f3bf 8f6f isb sy 8004d4e: f3bf 8f4f dsb sy 8004d52: e7fe b.n 8004d52 xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 8004d54: 2202 movs r2, #2 8004d56: 2100 movs r1, #0 8004d58: f7ff ff9e bl 8004c98 if( xHandle != NULL ) 8004d5c: b100 cbz r0, 8004d60 ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 8004d5e: 6384 str r4, [r0, #56] @ 0x38 } 8004d60: bd10 pop {r4, pc} 08004d62 : { 8004d62: b5f0 push {r4, r5, r6, r7, lr} 8004d64: b085 sub sp, #20 8004d66: 9201 str r2, [sp, #4] configASSERT( pxQueue ); 8004d68: b188 cbz r0, 8004d8e 8004d6a: 460f mov r7, r1 8004d6c: 461d mov r5, r3 8004d6e: 4604 mov r4, r0 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8004d70: b1b1 cbz r1, 8004da0 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8004d72: 2d02 cmp r5, #2 8004d74: d120 bne.n 8004db8 8004d76: 6be3 ldr r3, [r4, #60] @ 0x3c 8004d78: 2b01 cmp r3, #1 8004d7a: d01d beq.n 8004db8 8004d7c: f04f 0350 mov.w r3, #80 @ 0x50 8004d80: f383 8811 msr BASEPRI, r3 8004d84: f3bf 8f6f isb sy 8004d88: f3bf 8f4f dsb sy 8004d8c: e7fe b.n 8004d8c 8004d8e: f04f 0350 mov.w r3, #80 @ 0x50 8004d92: f383 8811 msr BASEPRI, r3 8004d96: f3bf 8f6f isb sy 8004d9a: f3bf 8f4f dsb sy configASSERT( pxQueue ); 8004d9e: e7fe b.n 8004d9e configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8004da0: 6c03 ldr r3, [r0, #64] @ 0x40 8004da2: 2b00 cmp r3, #0 8004da4: d0e5 beq.n 8004d72 8004da6: f04f 0350 mov.w r3, #80 @ 0x50 8004daa: f383 8811 msr BASEPRI, r3 8004dae: f3bf 8f6f isb sy 8004db2: f3bf 8f4f dsb sy 8004db6: e7fe b.n 8004db6 configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8004db8: f001 f8fa bl 8005fb0 8004dbc: 4606 mov r6, r0 8004dbe: b958 cbnz r0, 8004dd8 8004dc0: 9b01 ldr r3, [sp, #4] 8004dc2: 2b00 cmp r3, #0 8004dc4: d048 beq.n 8004e58 8004dc6: f04f 0350 mov.w r3, #80 @ 0x50 8004dca: f383 8811 msr BASEPRI, r3 8004dce: f3bf 8f6f isb sy 8004dd2: f3bf 8f4f dsb sy 8004dd6: e7fe b.n 8004dd6 8004dd8: 2600 movs r6, #0 8004dda: e03d b.n 8004e58 xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 8004ddc: 462a mov r2, r5 8004dde: 4639 mov r1, r7 8004de0: 4620 mov r0, r4 8004de2: f7ff fe2f bl 8004a44 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8004de6: 6a63 ldr r3, [r4, #36] @ 0x24 8004de8: b97b cbnz r3, 8004e0a else if( xYieldRequired != pdFALSE ) 8004dea: b148 cbz r0, 8004e00 queueYIELD_IF_USING_PREEMPTION(); 8004dec: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004df0: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8004df4: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8004df8: f3bf 8f4f dsb sy 8004dfc: f3bf 8f6f isb sy taskEXIT_CRITICAL(); 8004e00: f7ff fcca bl 8004798 return pdPASS; 8004e04: 2001 movs r0, #1 } 8004e06: b005 add sp, #20 8004e08: bdf0 pop {r4, r5, r6, r7, pc} if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8004e0a: f104 0024 add.w r0, r4, #36 @ 0x24 8004e0e: f001 f82f bl 8005e70 8004e12: 2800 cmp r0, #0 8004e14: d0f4 beq.n 8004e00 queueYIELD_IF_USING_PREEMPTION(); 8004e16: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004e1a: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8004e1e: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8004e22: f3bf 8f4f dsb sy 8004e26: f3bf 8f6f isb sy 8004e2a: e7e9 b.n 8004e00 taskEXIT_CRITICAL(); 8004e2c: f7ff fcb4 bl 8004798 return errQUEUE_FULL; 8004e30: 2000 movs r0, #0 8004e32: e7e8 b.n 8004e06 vTaskInternalSetTimeOutState( &xTimeOut ); 8004e34: a802 add r0, sp, #8 8004e36: f001 f861 bl 8005efc xEntryTimeSet = pdTRUE; 8004e3a: 2601 movs r6, #1 8004e3c: e019 b.n 8004e72 prvLockQueue( pxQueue ); 8004e3e: 2300 movs r3, #0 8004e40: f884 3044 strb.w r3, [r4, #68] @ 0x44 8004e44: e021 b.n 8004e8a 8004e46: 2300 movs r3, #0 8004e48: f884 3045 strb.w r3, [r4, #69] @ 0x45 8004e4c: e023 b.n 8004e96 prvUnlockQueue( pxQueue ); 8004e4e: 4620 mov r0, r4 8004e50: f7ff fe45 bl 8004ade ( void ) xTaskResumeAll(); 8004e54: f000 fed6 bl 8005c04 taskENTER_CRITICAL(); 8004e58: f7ff fc7c bl 8004754 if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 8004e5c: 6ba2 ldr r2, [r4, #56] @ 0x38 8004e5e: 6be3 ldr r3, [r4, #60] @ 0x3c 8004e60: 429a cmp r2, r3 8004e62: d3bb bcc.n 8004ddc 8004e64: 2d02 cmp r5, #2 8004e66: d0b9 beq.n 8004ddc if( xTicksToWait == ( TickType_t ) 0 ) 8004e68: 9b01 ldr r3, [sp, #4] 8004e6a: 2b00 cmp r3, #0 8004e6c: d0de beq.n 8004e2c else if( xEntryTimeSet == pdFALSE ) 8004e6e: 2e00 cmp r6, #0 8004e70: d0e0 beq.n 8004e34 taskEXIT_CRITICAL(); 8004e72: f7ff fc91 bl 8004798 vTaskSuspendAll(); 8004e76: f000 fe23 bl 8005ac0 prvLockQueue( pxQueue ); 8004e7a: f7ff fc6b bl 8004754 8004e7e: f894 2044 ldrb.w r2, [r4, #68] @ 0x44 8004e82: b252 sxtb r2, r2 8004e84: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 8004e88: d0d9 beq.n 8004e3e 8004e8a: f894 2045 ldrb.w r2, [r4, #69] @ 0x45 8004e8e: b252 sxtb r2, r2 8004e90: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 8004e94: d0d7 beq.n 8004e46 8004e96: f7ff fc7f bl 8004798 if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8004e9a: a901 add r1, sp, #4 8004e9c: a802 add r0, sp, #8 8004e9e: f001 f839 bl 8005f14 8004ea2: b9d8 cbnz r0, 8004edc if( prvIsQueueFull( pxQueue ) != pdFALSE ) 8004ea4: 4620 mov r0, r4 8004ea6: f7ff fdb1 bl 8004a0c 8004eaa: 2800 cmp r0, #0 8004eac: d0cf beq.n 8004e4e vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 8004eae: 9901 ldr r1, [sp, #4] 8004eb0: f104 0010 add.w r0, r4, #16 8004eb4: f000 ffa8 bl 8005e08 prvUnlockQueue( pxQueue ); 8004eb8: 4620 mov r0, r4 8004eba: f7ff fe10 bl 8004ade if( xTaskResumeAll() == pdFALSE ) 8004ebe: f000 fea1 bl 8005c04 8004ec2: 2800 cmp r0, #0 8004ec4: d1c8 bne.n 8004e58 portYIELD_WITHIN_API(); 8004ec6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8004eca: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8004ece: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8004ed2: f3bf 8f4f dsb sy 8004ed6: f3bf 8f6f isb sy 8004eda: e7bd b.n 8004e58 prvUnlockQueue( pxQueue ); 8004edc: 4620 mov r0, r4 8004ede: f7ff fdfe bl 8004ade ( void ) xTaskResumeAll(); 8004ee2: f000 fe8f bl 8005c04 return errQUEUE_FULL; 8004ee6: 2000 movs r0, #0 8004ee8: e78d b.n 8004e06 08004eea : if( pxNewQueue != NULL ) 8004eea: b148 cbz r0, 8004f00 { 8004eec: b508 push {r3, lr} pxNewQueue->u.xSemaphore.xMutexHolder = NULL; 8004eee: 2100 movs r1, #0 8004ef0: 6081 str r1, [r0, #8] pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; 8004ef2: 6001 str r1, [r0, #0] pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0; 8004ef4: 60c1 str r1, [r0, #12] ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK ); 8004ef6: 460b mov r3, r1 8004ef8: 460a mov r2, r1 8004efa: f7ff ff32 bl 8004d62 } 8004efe: bd08 pop {r3, pc} 8004f00: 4770 bx lr 08004f02 : { 8004f02: b510 push {r4, lr} 8004f04: 4602 mov r2, r0 xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType ); 8004f06: 2100 movs r1, #0 8004f08: 2001 movs r0, #1 8004f0a: f7ff fec5 bl 8004c98 8004f0e: 4604 mov r4, r0 prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 8004f10: f7ff ffeb bl 8004eea } 8004f14: 4620 mov r0, r4 8004f16: bd10 pop {r4, pc} 08004f18 : { 8004f18: b510 push {r4, lr} 8004f1a: b082 sub sp, #8 8004f1c: 460b mov r3, r1 xNewQueue = xQueueGenericCreateStatic( uxMutexLength, uxMutexSize, NULL, pxStaticQueue, ucQueueType ); 8004f1e: 9000 str r0, [sp, #0] 8004f20: 2200 movs r2, #0 8004f22: 4611 mov r1, r2 8004f24: 2001 movs r0, #1 8004f26: f7ff fe64 bl 8004bf2 8004f2a: 4604 mov r4, r0 prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 8004f2c: f7ff ffdd bl 8004eea } 8004f30: 4620 mov r0, r4 8004f32: b002 add sp, #8 8004f34: bd10 pop {r4, pc} 08004f36 : { 8004f36: b538 push {r3, r4, r5, lr} configASSERT( pxMutex ); 8004f38: b138 cbz r0, 8004f4a 8004f3a: 4604 mov r4, r0 if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() ) 8004f3c: 6885 ldr r5, [r0, #8] 8004f3e: f001 f831 bl 8005fa4 8004f42: 4285 cmp r5, r0 8004f44: d00a beq.n 8004f5c xReturn = pdFAIL; 8004f46: 2000 movs r0, #0 } 8004f48: bd38 pop {r3, r4, r5, pc} 8004f4a: f04f 0350 mov.w r3, #80 @ 0x50 8004f4e: f383 8811 msr BASEPRI, r3 8004f52: f3bf 8f6f isb sy 8004f56: f3bf 8f4f dsb sy configASSERT( pxMutex ); 8004f5a: e7fe b.n 8004f5a ( pxMutex->u.xSemaphore.uxRecursiveCallCount )--; 8004f5c: 68e3 ldr r3, [r4, #12] 8004f5e: 3b01 subs r3, #1 8004f60: 60e3 str r3, [r4, #12] if( pxMutex->u.xSemaphore.uxRecursiveCallCount == ( UBaseType_t ) 0 ) 8004f62: b10b cbz r3, 8004f68 xReturn = pdPASS; 8004f64: 2001 movs r0, #1 return xReturn; 8004f66: e7ef b.n 8004f48 ( void ) xQueueGenericSend( pxMutex, NULL, queueMUTEX_GIVE_BLOCK_TIME, queueSEND_TO_BACK ); 8004f68: 461a mov r2, r3 8004f6a: 4619 mov r1, r3 8004f6c: 4620 mov r0, r4 8004f6e: f7ff fef8 bl 8004d62 xReturn = pdPASS; 8004f72: 2001 movs r0, #1 8004f74: e7e8 b.n 8004f48 08004f76 : { 8004f76: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} configASSERT( pxQueue ); 8004f7a: b190 cbz r0, 8004fa2 8004f7c: 460f mov r7, r1 8004f7e: 4616 mov r6, r2 8004f80: 461c mov r4, r3 8004f82: 4605 mov r5, r0 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8004f84: b1b1 cbz r1, 8004fb4 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8004f86: 2c02 cmp r4, #2 8004f88: d120 bne.n 8004fcc 8004f8a: 6beb ldr r3, [r5, #60] @ 0x3c 8004f8c: 2b01 cmp r3, #1 8004f8e: d01d beq.n 8004fcc 8004f90: f04f 0350 mov.w r3, #80 @ 0x50 8004f94: f383 8811 msr BASEPRI, r3 8004f98: f3bf 8f6f isb sy 8004f9c: f3bf 8f4f dsb sy 8004fa0: e7fe b.n 8004fa0 8004fa2: f04f 0350 mov.w r3, #80 @ 0x50 8004fa6: f383 8811 msr BASEPRI, r3 8004faa: f3bf 8f6f isb sy 8004fae: f3bf 8f4f dsb sy configASSERT( pxQueue ); 8004fb2: e7fe b.n 8004fb2 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8004fb4: 6c03 ldr r3, [r0, #64] @ 0x40 8004fb6: 2b00 cmp r3, #0 8004fb8: d0e5 beq.n 8004f86 8004fba: f04f 0350 mov.w r3, #80 @ 0x50 8004fbe: f383 8811 msr BASEPRI, r3 8004fc2: f3bf 8f6f isb sy 8004fc6: f3bf 8f4f dsb sy 8004fca: e7fe b.n 8004fca portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 8004fcc: f7ff fce8 bl 80049a0 __asm volatile 8004fd0: f3ef 8811 mrs r8, BASEPRI 8004fd4: f04f 0350 mov.w r3, #80 @ 0x50 8004fd8: f383 8811 msr BASEPRI, r3 8004fdc: f3bf 8f6f isb sy 8004fe0: f3bf 8f4f dsb sy if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 8004fe4: 6baa ldr r2, [r5, #56] @ 0x38 8004fe6: 6beb ldr r3, [r5, #60] @ 0x3c 8004fe8: 429a cmp r2, r3 8004fea: d306 bcc.n 8004ffa 8004fec: 2c02 cmp r4, #2 8004fee: d004 beq.n 8004ffa xReturn = errQUEUE_FULL; 8004ff0: 2000 movs r0, #0 __asm volatile 8004ff2: f388 8811 msr BASEPRI, r8 } 8004ff6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} const int8_t cTxLock = pxQueue->cTxLock; 8004ffa: f895 9045 ldrb.w r9, [r5, #69] @ 0x45 8004ffe: fa4f f989 sxtb.w r9, r9 const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting; 8005002: 6bab ldr r3, [r5, #56] @ 0x38 ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 8005004: 4622 mov r2, r4 8005006: 4639 mov r1, r7 8005008: 4628 mov r0, r5 800500a: f7ff fd1b bl 8004a44 if( cTxLock == queueUNLOCKED ) 800500e: f1b9 3fff cmp.w r9, #4294967295 @ 0xffffffff 8005012: d006 beq.n 8005022 pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 ); 8005014: f109 0301 add.w r3, r9, #1 8005018: b25b sxtb r3, r3 800501a: f885 3045 strb.w r3, [r5, #69] @ 0x45 xReturn = pdPASS; 800501e: 2001 movs r0, #1 8005020: e7e7 b.n 8004ff2 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8005022: 6a6b ldr r3, [r5, #36] @ 0x24 8005024: b90b cbnz r3, 800502a xReturn = pdPASS; 8005026: 2001 movs r0, #1 8005028: e7e3 b.n 8004ff2 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 800502a: f105 0024 add.w r0, r5, #36 @ 0x24 800502e: f000 ff1f bl 8005e70 8005032: b118 cbz r0, 800503c if( pxHigherPriorityTaskWoken != NULL ) 8005034: b126 cbz r6, 8005040 *pxHigherPriorityTaskWoken = pdTRUE; 8005036: 2001 movs r0, #1 8005038: 6030 str r0, [r6, #0] 800503a: e7da b.n 8004ff2 xReturn = pdPASS; 800503c: 2001 movs r0, #1 800503e: e7d8 b.n 8004ff2 8005040: 2001 movs r0, #1 8005042: e7d6 b.n 8004ff2 08005044 : configASSERT( pxQueue ); 8005044: b168 cbz r0, 8005062 { 8005046: b570 push {r4, r5, r6, lr} 8005048: 460c mov r4, r1 800504a: 4605 mov r5, r0 configASSERT( pxQueue->uxItemSize == 0 ); 800504c: 6c03 ldr r3, [r0, #64] @ 0x40 800504e: b18b cbz r3, 8005074 __asm volatile 8005050: f04f 0350 mov.w r3, #80 @ 0x50 8005054: f383 8811 msr BASEPRI, r3 8005058: f3bf 8f6f isb sy 800505c: f3bf 8f4f dsb sy 8005060: e7fe b.n 8005060 8005062: f04f 0350 mov.w r3, #80 @ 0x50 8005066: f383 8811 msr BASEPRI, r3 800506a: f3bf 8f6f isb sy 800506e: f3bf 8f4f dsb sy configASSERT( pxQueue ); 8005072: e7fe b.n 8005072 configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) ); 8005074: 6803 ldr r3, [r0, #0] 8005076: b1eb cbz r3, 80050b4 portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 8005078: f7ff fc92 bl 80049a0 __asm volatile 800507c: f3ef 8611 mrs r6, BASEPRI 8005080: f04f 0350 mov.w r3, #80 @ 0x50 8005084: f383 8811 msr BASEPRI, r3 8005088: f3bf 8f6f isb sy 800508c: f3bf 8f4f dsb sy const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8005090: 6baa ldr r2, [r5, #56] @ 0x38 if( uxMessagesWaiting < pxQueue->uxLength ) 8005092: 6beb ldr r3, [r5, #60] @ 0x3c 8005094: 4293 cmp r3, r2 8005096: d926 bls.n 80050e6 const int8_t cTxLock = pxQueue->cTxLock; 8005098: f895 3045 ldrb.w r3, [r5, #69] @ 0x45 800509c: b25b sxtb r3, r3 pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1; 800509e: 3201 adds r2, #1 80050a0: 63aa str r2, [r5, #56] @ 0x38 if( cTxLock == queueUNLOCKED ) 80050a2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80050a6: d011 beq.n 80050cc pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 ); 80050a8: 3301 adds r3, #1 80050aa: b25b sxtb r3, r3 80050ac: f885 3045 strb.w r3, [r5, #69] @ 0x45 xReturn = pdPASS; 80050b0: 2001 movs r0, #1 80050b2: e019 b.n 80050e8 configASSERT( !( ( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) && ( pxQueue->u.xSemaphore.xMutexHolder != NULL ) ) ); 80050b4: 6883 ldr r3, [r0, #8] 80050b6: 2b00 cmp r3, #0 80050b8: d0de beq.n 8005078 __asm volatile 80050ba: f04f 0350 mov.w r3, #80 @ 0x50 80050be: f383 8811 msr BASEPRI, r3 80050c2: f3bf 8f6f isb sy 80050c6: f3bf 8f4f dsb sy 80050ca: e7fe b.n 80050ca if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80050cc: 6a6b ldr r3, [r5, #36] @ 0x24 80050ce: b90b cbnz r3, 80050d4 xReturn = pdPASS; 80050d0: 2001 movs r0, #1 80050d2: e009 b.n 80050e8 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80050d4: f105 0024 add.w r0, r5, #36 @ 0x24 80050d8: f000 feca bl 8005e70 80050dc: b138 cbz r0, 80050ee if( pxHigherPriorityTaskWoken != NULL ) 80050de: b144 cbz r4, 80050f2 *pxHigherPriorityTaskWoken = pdTRUE; 80050e0: 2001 movs r0, #1 80050e2: 6020 str r0, [r4, #0] 80050e4: e000 b.n 80050e8 xReturn = errQUEUE_FULL; 80050e6: 2000 movs r0, #0 __asm volatile 80050e8: f386 8811 msr BASEPRI, r6 } 80050ec: bd70 pop {r4, r5, r6, pc} xReturn = pdPASS; 80050ee: 2001 movs r0, #1 80050f0: e7fa b.n 80050e8 80050f2: 2001 movs r0, #1 80050f4: e7f8 b.n 80050e8 080050f6 : { 80050f6: b5f0 push {r4, r5, r6, r7, lr} 80050f8: b085 sub sp, #20 80050fa: 9201 str r2, [sp, #4] configASSERT( ( pxQueue ) ); 80050fc: b190 cbz r0, 8005124 80050fe: 460f mov r7, r1 8005100: 4604 mov r4, r0 configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8005102: b1c1 cbz r1, 8005136 configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8005104: f000 ff54 bl 8005fb0 8005108: 4606 mov r6, r0 800510a: bb00 cbnz r0, 800514e 800510c: 9b01 ldr r3, [sp, #4] 800510e: 2b00 cmp r3, #0 8005110: d05e beq.n 80051d0 __asm volatile 8005112: f04f 0350 mov.w r3, #80 @ 0x50 8005116: f383 8811 msr BASEPRI, r3 800511a: f3bf 8f6f isb sy 800511e: f3bf 8f4f dsb sy 8005122: e7fe b.n 8005122 8005124: f04f 0350 mov.w r3, #80 @ 0x50 8005128: f383 8811 msr BASEPRI, r3 800512c: f3bf 8f6f isb sy 8005130: f3bf 8f4f dsb sy configASSERT( ( pxQueue ) ); 8005134: e7fe b.n 8005134 configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8005136: 6c03 ldr r3, [r0, #64] @ 0x40 8005138: 2b00 cmp r3, #0 800513a: d0e3 beq.n 8005104 800513c: f04f 0350 mov.w r3, #80 @ 0x50 8005140: f383 8811 msr BASEPRI, r3 8005144: f3bf 8f6f isb sy 8005148: f3bf 8f4f dsb sy 800514c: e7fe b.n 800514c 800514e: 2600 movs r6, #0 8005150: e03e b.n 80051d0 prvCopyDataFromQueue( pxQueue, pvBuffer ); 8005152: 4639 mov r1, r7 8005154: 4620 mov r0, r4 8005156: f7ff fcb0 bl 8004aba pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 800515a: 3d01 subs r5, #1 800515c: 63a5 str r5, [r4, #56] @ 0x38 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 800515e: 6923 ldr r3, [r4, #16] 8005160: b923 cbnz r3, 800516c taskEXIT_CRITICAL(); 8005162: f7ff fb19 bl 8004798 return pdPASS; 8005166: 2001 movs r0, #1 } 8005168: b005 add sp, #20 800516a: bdf0 pop {r4, r5, r6, r7, pc} if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 800516c: f104 0010 add.w r0, r4, #16 8005170: f000 fe7e bl 8005e70 8005174: 2800 cmp r0, #0 8005176: d0f4 beq.n 8005162 queueYIELD_IF_USING_PREEMPTION(); 8005178: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 800517c: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8005180: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8005184: f3bf 8f4f dsb sy 8005188: f3bf 8f6f isb sy 800518c: e7e9 b.n 8005162 taskEXIT_CRITICAL(); 800518e: f7ff fb03 bl 8004798 return errQUEUE_EMPTY; 8005192: 2000 movs r0, #0 8005194: e7e8 b.n 8005168 vTaskInternalSetTimeOutState( &xTimeOut ); 8005196: a802 add r0, sp, #8 8005198: f000 feb0 bl 8005efc xEntryTimeSet = pdTRUE; 800519c: 2601 movs r6, #1 800519e: e021 b.n 80051e4 prvLockQueue( pxQueue ); 80051a0: 2300 movs r3, #0 80051a2: f884 3044 strb.w r3, [r4, #68] @ 0x44 80051a6: e029 b.n 80051fc 80051a8: 2300 movs r3, #0 80051aa: f884 3045 strb.w r3, [r4, #69] @ 0x45 80051ae: e02b b.n 8005208 prvUnlockQueue( pxQueue ); 80051b0: 4620 mov r0, r4 80051b2: f7ff fc94 bl 8004ade ( void ) xTaskResumeAll(); 80051b6: f000 fd25 bl 8005c04 80051ba: e009 b.n 80051d0 prvUnlockQueue( pxQueue ); 80051bc: 4620 mov r0, r4 80051be: f7ff fc8e bl 8004ade ( void ) xTaskResumeAll(); 80051c2: f000 fd1f bl 8005c04 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 80051c6: 4620 mov r0, r4 80051c8: f7ff fc2f bl 8004a2a 80051cc: 2800 cmp r0, #0 80051ce: d13f bne.n 8005250 taskENTER_CRITICAL(); 80051d0: f7ff fac0 bl 8004754 const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 80051d4: 6ba5 ldr r5, [r4, #56] @ 0x38 if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 80051d6: 2d00 cmp r5, #0 80051d8: d1bb bne.n 8005152 if( xTicksToWait == ( TickType_t ) 0 ) 80051da: 9b01 ldr r3, [sp, #4] 80051dc: 2b00 cmp r3, #0 80051de: d0d6 beq.n 800518e else if( xEntryTimeSet == pdFALSE ) 80051e0: 2e00 cmp r6, #0 80051e2: d0d8 beq.n 8005196 taskEXIT_CRITICAL(); 80051e4: f7ff fad8 bl 8004798 vTaskSuspendAll(); 80051e8: f000 fc6a bl 8005ac0 prvLockQueue( pxQueue ); 80051ec: f7ff fab2 bl 8004754 80051f0: f894 3044 ldrb.w r3, [r4, #68] @ 0x44 80051f4: b25b sxtb r3, r3 80051f6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80051fa: d0d1 beq.n 80051a0 80051fc: f894 3045 ldrb.w r3, [r4, #69] @ 0x45 8005200: b25b sxtb r3, r3 8005202: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8005206: d0cf beq.n 80051a8 8005208: f7ff fac6 bl 8004798 if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 800520c: a901 add r1, sp, #4 800520e: a802 add r0, sp, #8 8005210: f000 fe80 bl 8005f14 8005214: 2800 cmp r0, #0 8005216: d1d1 bne.n 80051bc if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 8005218: 4620 mov r0, r4 800521a: f7ff fc06 bl 8004a2a 800521e: 2800 cmp r0, #0 8005220: d0c6 beq.n 80051b0 vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 8005222: 9901 ldr r1, [sp, #4] 8005224: f104 0024 add.w r0, r4, #36 @ 0x24 8005228: f000 fdee bl 8005e08 prvUnlockQueue( pxQueue ); 800522c: 4620 mov r0, r4 800522e: f7ff fc56 bl 8004ade if( xTaskResumeAll() == pdFALSE ) 8005232: f000 fce7 bl 8005c04 8005236: 2800 cmp r0, #0 8005238: d1ca bne.n 80051d0 portYIELD_WITHIN_API(); 800523a: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 800523e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8005242: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8005246: f3bf 8f4f dsb sy 800524a: f3bf 8f6f isb sy 800524e: e7bf b.n 80051d0 return errQUEUE_EMPTY; 8005250: 2000 movs r0, #0 8005252: e789 b.n 8005168 08005254 : { 8005254: b570 push {r4, r5, r6, lr} 8005256: b084 sub sp, #16 8005258: 9101 str r1, [sp, #4] configASSERT( ( pxQueue ) ); 800525a: b158 cbz r0, 8005274 800525c: 4604 mov r4, r0 configASSERT( pxQueue->uxItemSize == 0 ); 800525e: 6c03 ldr r3, [r0, #64] @ 0x40 8005260: b18b cbz r3, 8005286 8005262: f04f 0350 mov.w r3, #80 @ 0x50 8005266: f383 8811 msr BASEPRI, r3 800526a: f3bf 8f6f isb sy 800526e: f3bf 8f4f dsb sy 8005272: e7fe b.n 8005272 8005274: f04f 0350 mov.w r3, #80 @ 0x50 8005278: f383 8811 msr BASEPRI, r3 800527c: f3bf 8f6f isb sy 8005280: f3bf 8f4f dsb sy configASSERT( ( pxQueue ) ); 8005284: e7fe b.n 8005284 configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8005286: f000 fe93 bl 8005fb0 800528a: 4605 mov r5, r0 800528c: b950 cbnz r0, 80052a4 800528e: 9b01 ldr r3, [sp, #4] 8005290: b15b cbz r3, 80052aa 8005292: f04f 0350 mov.w r3, #80 @ 0x50 8005296: f383 8811 msr BASEPRI, r3 800529a: f3bf 8f6f isb sy 800529e: f3bf 8f4f dsb sy 80052a2: e7fe b.n 80052a2 80052a4: 2600 movs r6, #0 80052a6: 4635 mov r5, r6 80052a8: e055 b.n 8005356 80052aa: 4606 mov r6, r0 80052ac: e053 b.n 8005356 pxQueue->uxMessagesWaiting = uxSemaphoreCount - ( UBaseType_t ) 1; 80052ae: 3b01 subs r3, #1 80052b0: 63a3 str r3, [r4, #56] @ 0x38 if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 80052b2: 6823 ldr r3, [r4, #0] 80052b4: b13b cbz r3, 80052c6 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 80052b6: 6923 ldr r3, [r4, #16] 80052b8: b94b cbnz r3, 80052ce taskEXIT_CRITICAL(); 80052ba: f7ff fa6d bl 8004798 return pdPASS; 80052be: 2601 movs r6, #1 } 80052c0: 4630 mov r0, r6 80052c2: b004 add sp, #16 80052c4: bd70 pop {r4, r5, r6, pc} pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount(); 80052c6: f000 ff67 bl 8006198 80052ca: 60a0 str r0, [r4, #8] 80052cc: e7f3 b.n 80052b6 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80052ce: f104 0010 add.w r0, r4, #16 80052d2: f000 fdcd bl 8005e70 80052d6: 2800 cmp r0, #0 80052d8: d0ef beq.n 80052ba queueYIELD_IF_USING_PREEMPTION(); 80052da: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 80052de: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80052e2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 80052e6: f3bf 8f4f dsb sy 80052ea: f3bf 8f6f isb sy 80052ee: e7e4 b.n 80052ba configASSERT( xInheritanceOccurred == pdFALSE ); 80052f0: b146 cbz r6, 8005304 80052f2: f04f 0350 mov.w r3, #80 @ 0x50 80052f6: f383 8811 msr BASEPRI, r3 80052fa: f3bf 8f6f isb sy 80052fe: f3bf 8f4f dsb sy 8005302: e7fe b.n 8005302 taskEXIT_CRITICAL(); 8005304: f7ff fa48 bl 8004798 return errQUEUE_EMPTY; 8005308: e7da b.n 80052c0 vTaskInternalSetTimeOutState( &xTimeOut ); 800530a: a802 add r0, sp, #8 800530c: f000 fdf6 bl 8005efc xEntryTimeSet = pdTRUE; 8005310: 2501 movs r5, #1 8005312: e02a b.n 800536a prvLockQueue( pxQueue ); 8005314: 2300 movs r3, #0 8005316: f884 3044 strb.w r3, [r4, #68] @ 0x44 800531a: e032 b.n 8005382 800531c: 2300 movs r3, #0 800531e: f884 3045 strb.w r3, [r4, #69] @ 0x45 8005322: e034 b.n 800538e taskENTER_CRITICAL(); 8005324: f7ff fa16 bl 8004754 xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder ); 8005328: 68a0 ldr r0, [r4, #8] 800532a: f000 fe51 bl 8005fd0 800532e: 4606 mov r6, r0 taskEXIT_CRITICAL(); 8005330: f7ff fa32 bl 8004798 8005334: e03b b.n 80053ae prvUnlockQueue( pxQueue ); 8005336: 4620 mov r0, r4 8005338: f7ff fbd1 bl 8004ade ( void ) xTaskResumeAll(); 800533c: f000 fc62 bl 8005c04 8005340: e009 b.n 8005356 prvUnlockQueue( pxQueue ); 8005342: 4620 mov r0, r4 8005344: f7ff fbcb bl 8004ade ( void ) xTaskResumeAll(); 8005348: f000 fc5c bl 8005c04 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 800534c: 4620 mov r0, r4 800534e: f7ff fb6c bl 8004a2a 8005352: 2800 cmp r0, #0 8005354: d142 bne.n 80053dc taskENTER_CRITICAL(); 8005356: f7ff f9fd bl 8004754 const UBaseType_t uxSemaphoreCount = pxQueue->uxMessagesWaiting; 800535a: 6ba3 ldr r3, [r4, #56] @ 0x38 if( uxSemaphoreCount > ( UBaseType_t ) 0 ) 800535c: 2b00 cmp r3, #0 800535e: d1a6 bne.n 80052ae if( xTicksToWait == ( TickType_t ) 0 ) 8005360: 9b01 ldr r3, [sp, #4] 8005362: 2b00 cmp r3, #0 8005364: d0c4 beq.n 80052f0 else if( xEntryTimeSet == pdFALSE ) 8005366: 2d00 cmp r5, #0 8005368: d0cf beq.n 800530a taskEXIT_CRITICAL(); 800536a: f7ff fa15 bl 8004798 vTaskSuspendAll(); 800536e: f000 fba7 bl 8005ac0 prvLockQueue( pxQueue ); 8005372: f7ff f9ef bl 8004754 8005376: f894 3044 ldrb.w r3, [r4, #68] @ 0x44 800537a: b25b sxtb r3, r3 800537c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8005380: d0c8 beq.n 8005314 8005382: f894 3045 ldrb.w r3, [r4, #69] @ 0x45 8005386: b25b sxtb r3, r3 8005388: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 800538c: d0c6 beq.n 800531c 800538e: f7ff fa03 bl 8004798 if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8005392: a901 add r1, sp, #4 8005394: a802 add r0, sp, #8 8005396: f000 fdbd bl 8005f14 800539a: 2800 cmp r0, #0 800539c: d1d1 bne.n 8005342 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 800539e: 4620 mov r0, r4 80053a0: f7ff fb43 bl 8004a2a 80053a4: 2800 cmp r0, #0 80053a6: d0c6 beq.n 8005336 if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 80053a8: 6823 ldr r3, [r4, #0] 80053aa: 2b00 cmp r3, #0 80053ac: d0ba beq.n 8005324 vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 80053ae: 9901 ldr r1, [sp, #4] 80053b0: f104 0024 add.w r0, r4, #36 @ 0x24 80053b4: f000 fd28 bl 8005e08 prvUnlockQueue( pxQueue ); 80053b8: 4620 mov r0, r4 80053ba: f7ff fb90 bl 8004ade if( xTaskResumeAll() == pdFALSE ) 80053be: f000 fc21 bl 8005c04 80053c2: 2800 cmp r0, #0 80053c4: d1c7 bne.n 8005356 portYIELD_WITHIN_API(); 80053c6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 80053ca: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80053ce: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 80053d2: f3bf 8f4f dsb sy 80053d6: f3bf 8f6f isb sy 80053da: e7bc b.n 8005356 if( xInheritanceOccurred != pdFALSE ) 80053dc: b90e cbnz r6, 80053e2 return errQUEUE_EMPTY; 80053de: 2600 movs r6, #0 80053e0: e76e b.n 80052c0 taskENTER_CRITICAL(); 80053e2: f7ff f9b7 bl 8004754 uxHighestWaitingPriority = prvGetDisinheritPriorityAfterTimeout( pxQueue ); 80053e6: 4620 mov r0, r4 80053e8: f7ff fb08 bl 80049fc 80053ec: 4601 mov r1, r0 vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority ); 80053ee: 68a0 ldr r0, [r4, #8] 80053f0: f000 fe82 bl 80060f8 taskEXIT_CRITICAL(); 80053f4: f7ff f9d0 bl 8004798 80053f8: e7f1 b.n 80053de 080053fa : configASSERT( pxMutex ); 80053fa: b180 cbz r0, 800541e { 80053fc: b570 push {r4, r5, r6, lr} 80053fe: 460c mov r4, r1 8005400: 4605 mov r5, r0 if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() ) 8005402: 6886 ldr r6, [r0, #8] 8005404: f000 fdce bl 8005fa4 8005408: 4286 cmp r6, r0 800540a: d011 beq.n 8005430 xReturn = xQueueSemaphoreTake( pxMutex, xTicksToWait ); 800540c: 4621 mov r1, r4 800540e: 4628 mov r0, r5 8005410: f7ff ff20 bl 8005254 if( xReturn != pdFAIL ) 8005414: b180 cbz r0, 8005438 ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 8005416: 68eb ldr r3, [r5, #12] 8005418: 3301 adds r3, #1 800541a: 60eb str r3, [r5, #12] return xReturn; 800541c: e00c b.n 8005438 800541e: f04f 0350 mov.w r3, #80 @ 0x50 8005422: f383 8811 msr BASEPRI, r3 8005426: f3bf 8f6f isb sy 800542a: f3bf 8f4f dsb sy configASSERT( pxMutex ); 800542e: e7fe b.n 800542e ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 8005430: 68eb ldr r3, [r5, #12] 8005432: 3301 adds r3, #1 8005434: 60eb str r3, [r5, #12] xReturn = pdPASS; 8005436: 2001 movs r0, #1 } 8005438: bd70 pop {r4, r5, r6, pc} 0800543a : { 800543a: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} configASSERT( pxQueue ); 800543e: b1b0 cbz r0, 800546e 8005440: 460d mov r5, r1 8005442: 4690 mov r8, r2 8005444: 4604 mov r4, r0 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8005446: b1d9 cbz r1, 8005480 portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 8005448: f7ff faaa bl 80049a0 __asm volatile 800544c: f3ef 8711 mrs r7, BASEPRI 8005450: f04f 0350 mov.w r3, #80 @ 0x50 8005454: f383 8811 msr BASEPRI, r3 8005458: f3bf 8f6f isb sy 800545c: f3bf 8f4f dsb sy const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8005460: 6ba6 ldr r6, [r4, #56] @ 0x38 if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 8005462: b9ce cbnz r6, 8005498 xReturn = pdFAIL; 8005464: 2000 movs r0, #0 __asm volatile 8005466: f387 8811 msr BASEPRI, r7 } 800546a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} __asm volatile 800546e: f04f 0350 mov.w r3, #80 @ 0x50 8005472: f383 8811 msr BASEPRI, r3 8005476: f3bf 8f6f isb sy 800547a: f3bf 8f4f dsb sy configASSERT( pxQueue ); 800547e: e7fe b.n 800547e configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8005480: 6c03 ldr r3, [r0, #64] @ 0x40 8005482: 2b00 cmp r3, #0 8005484: d0e0 beq.n 8005448 8005486: f04f 0350 mov.w r3, #80 @ 0x50 800548a: f383 8811 msr BASEPRI, r3 800548e: f3bf 8f6f isb sy 8005492: f3bf 8f4f dsb sy 8005496: e7fe b.n 8005496 const int8_t cRxLock = pxQueue->cRxLock; 8005498: f894 9044 ldrb.w r9, [r4, #68] @ 0x44 800549c: fa4f f989 sxtb.w r9, r9 prvCopyDataFromQueue( pxQueue, pvBuffer ); 80054a0: 4629 mov r1, r5 80054a2: 4620 mov r0, r4 80054a4: f7ff fb09 bl 8004aba pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 80054a8: 1e73 subs r3, r6, #1 80054aa: 63a3 str r3, [r4, #56] @ 0x38 if( cRxLock == queueUNLOCKED ) 80054ac: f1b9 3fff cmp.w r9, #4294967295 @ 0xffffffff 80054b0: d006 beq.n 80054c0 pxQueue->cRxLock = ( int8_t ) ( cRxLock + 1 ); 80054b2: f109 0301 add.w r3, r9, #1 80054b6: b25b sxtb r3, r3 80054b8: f884 3044 strb.w r3, [r4, #68] @ 0x44 xReturn = pdPASS; 80054bc: 2001 movs r0, #1 80054be: e7d2 b.n 8005466 if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 80054c0: 6923 ldr r3, [r4, #16] 80054c2: b90b cbnz r3, 80054c8 xReturn = pdPASS; 80054c4: 2001 movs r0, #1 80054c6: e7ce b.n 8005466 if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80054c8: f104 0010 add.w r0, r4, #16 80054cc: f000 fcd0 bl 8005e70 80054d0: b130 cbz r0, 80054e0 if( pxHigherPriorityTaskWoken != NULL ) 80054d2: f1b8 0f00 cmp.w r8, #0 80054d6: d005 beq.n 80054e4 *pxHigherPriorityTaskWoken = pdTRUE; 80054d8: 2001 movs r0, #1 80054da: f8c8 0000 str.w r0, [r8] 80054de: e7c2 b.n 8005466 xReturn = pdPASS; 80054e0: 2001 movs r0, #1 80054e2: e7c0 b.n 8005466 80054e4: 2001 movs r0, #1 80054e6: e7be b.n 8005466 080054e8 : configASSERT( xQueue ); 80054e8: b140 cbz r0, 80054fc { 80054ea: b510 push {r4, lr} 80054ec: 4604 mov r4, r0 taskENTER_CRITICAL(); 80054ee: f7ff f931 bl 8004754 uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting; 80054f2: 6ba4 ldr r4, [r4, #56] @ 0x38 taskEXIT_CRITICAL(); 80054f4: f7ff f950 bl 8004798 } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 80054f8: 4620 mov r0, r4 80054fa: bd10 pop {r4, pc} 80054fc: f04f 0350 mov.w r3, #80 @ 0x50 8005500: f383 8811 msr BASEPRI, r3 8005504: f3bf 8f6f isb sy 8005508: f3bf 8f4f dsb sy configASSERT( xQueue ); 800550c: e7fe b.n 800550c 0800550e : configASSERT( pxQueue ); 800550e: b108 cbz r0, 8005514 uxReturn = pxQueue->uxMessagesWaiting; 8005510: 6b80 ldr r0, [r0, #56] @ 0x38 } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 8005512: 4770 bx lr 8005514: f04f 0350 mov.w r3, #80 @ 0x50 8005518: f383 8811 msr BASEPRI, r3 800551c: f3bf 8f6f isb sy 8005520: f3bf 8f4f dsb sy configASSERT( pxQueue ); 8005524: e7fe b.n 8005524 ... 08005528 : { UBaseType_t ux; /* See if there is an empty space in the registry. A NULL name denotes a free slot. */ for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8005528: 2300 movs r3, #0 800552a: 2b07 cmp r3, #7 800552c: d80c bhi.n 8005548 { if( xQueueRegistry[ ux ].pcQueueName == NULL ) 800552e: 4a07 ldr r2, [pc, #28] @ (800554c ) 8005530: f852 2033 ldr.w r2, [r2, r3, lsl #3] 8005534: b10a cbz r2, 800553a for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8005536: 3301 adds r3, #1 8005538: e7f7 b.n 800552a { /* Store the information on this queue. */ xQueueRegistry[ ux ].pcQueueName = pcQueueName; 800553a: 4a04 ldr r2, [pc, #16] @ (800554c ) 800553c: f842 1033 str.w r1, [r2, r3, lsl #3] xQueueRegistry[ ux ].xHandle = xQueue; 8005540: eb02 02c3 add.w r2, r2, r3, lsl #3 8005544: 6050 str r0, [r2, #4] traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ); break; 8005546: 4770 bx lr else { mtCOVERAGE_TEST_MARKER(); } } } 8005548: 4770 bx lr 800554a: bf00 nop 800554c: 24012888 .word 0x24012888 08005550 : { UBaseType_t ux; /* See if the handle of the queue being unregistered in actually in the registry. */ for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8005550: 2300 movs r3, #0 8005552: 2b07 cmp r3, #7 8005554: d80f bhi.n 8005576 { if( xQueueRegistry[ ux ].xHandle == xQueue ) 8005556: 4a08 ldr r2, [pc, #32] @ (8005578 ) 8005558: eb02 02c3 add.w r2, r2, r3, lsl #3 800555c: 6852 ldr r2, [r2, #4] 800555e: 4282 cmp r2, r0 8005560: d001 beq.n 8005566 for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8005562: 3301 adds r3, #1 8005564: e7f5 b.n 8005552 { /* Set the name to NULL to show that this slot if free again. */ xQueueRegistry[ ux ].pcQueueName = NULL; 8005566: 4a04 ldr r2, [pc, #16] @ (8005578 ) 8005568: 2100 movs r1, #0 800556a: f842 1033 str.w r1, [r2, r3, lsl #3] /* Set the handle to NULL to ensure the same queue handle cannot appear in the registry twice if it is added, removed, then added again. */ xQueueRegistry[ ux ].xHandle = ( QueueHandle_t ) 0; 800556e: eb02 02c3 add.w r2, r2, r3, lsl #3 8005572: 6051 str r1, [r2, #4] break; 8005574: 4770 bx lr { mtCOVERAGE_TEST_MARKER(); } } } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ 8005576: 4770 bx lr 8005578: 24012888 .word 0x24012888 0800557c : configASSERT( pxQueue ); 800557c: b138 cbz r0, 800558e { 800557e: b510 push {r4, lr} 8005580: 4604 mov r4, r0 vQueueUnregisterQueue( pxQueue ); 8005582: f7ff ffe5 bl 8005550 if( pxQueue->ucStaticallyAllocated == ( uint8_t ) pdFALSE ) 8005586: f894 3046 ldrb.w r3, [r4, #70] @ 0x46 800558a: b14b cbz r3, 80055a0 } 800558c: bd10 pop {r4, pc} 800558e: f04f 0350 mov.w r3, #80 @ 0x50 8005592: f383 8811 msr BASEPRI, r3 8005596: f3bf 8f6f isb sy 800559a: f3bf 8f4f dsb sy configASSERT( pxQueue ); 800559e: e7fe b.n 800559e vPortFree( pxQueue ); 80055a0: 4620 mov r0, r4 80055a2: f7fe ffe9 bl 8004578 } 80055a6: e7f1 b.n 800558c 080055a8 : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { 80055a8: b570 push {r4, r5, r6, lr} 80055aa: 4604 mov r4, r0 80055ac: 460d mov r5, r1 80055ae: 4616 mov r6, r2 will not actually cause the task to block, just place it on a blocked list. It will not block until the scheduler is unlocked - at which time a yield will be performed. If an item is added to the queue while the queue is locked, and the calling task blocks on the queue, then the calling task will be immediately unblocked when the queue is unlocked. */ prvLockQueue( pxQueue ); 80055b0: f7ff f8d0 bl 8004754 80055b4: f894 3044 ldrb.w r3, [r4, #68] @ 0x44 80055b8: b25b sxtb r3, r3 80055ba: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80055be: d00d beq.n 80055dc 80055c0: f894 3045 ldrb.w r3, [r4, #69] @ 0x45 80055c4: b25b sxtb r3, r3 80055c6: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80055ca: d00b beq.n 80055e4 80055cc: f7ff f8e4 bl 8004798 if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 80055d0: 6ba3 ldr r3, [r4, #56] @ 0x38 80055d2: b15b cbz r3, 80055ec } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 80055d4: 4620 mov r0, r4 80055d6: f7ff fa82 bl 8004ade } 80055da: bd70 pop {r4, r5, r6, pc} prvLockQueue( pxQueue ); 80055dc: 2300 movs r3, #0 80055de: f884 3044 strb.w r3, [r4, #68] @ 0x44 80055e2: e7ed b.n 80055c0 80055e4: 2300 movs r3, #0 80055e6: f884 3045 strb.w r3, [r4, #69] @ 0x45 80055ea: e7ef b.n 80055cc vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely ); 80055ec: 4632 mov r2, r6 80055ee: 4629 mov r1, r5 80055f0: f104 0024 add.w r0, r4, #36 @ 0x24 80055f4: f000 fc20 bl 8005e38 80055f8: e7ec b.n 80055d4 ... 080055fc : static void prvResetNextTaskUnblockTime( void ) { TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 80055fc: 4b08 ldr r3, [pc, #32] @ (8005620 ) 80055fe: 681b ldr r3, [r3, #0] 8005600: 681b ldr r3, [r3, #0] 8005602: b923 cbnz r3, 800560e { /* The new current delayed list is empty. Set xNextTaskUnblockTime to the maximum possible value so it is extremely unlikely that the if( xTickCount >= xNextTaskUnblockTime ) test will pass until there is an item in the delayed list. */ xNextTaskUnblockTime = portMAX_DELAY; 8005604: 4b07 ldr r3, [pc, #28] @ (8005624 ) 8005606: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 800560a: 601a str r2, [r3, #0] 800560c: 4770 bx lr { /* The new current delayed list is not empty, get the value of the item at the head of the delayed list. This is the time at which the task at the head of the delayed list should be removed from the Blocked state. */ ( pxTCB ) = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 800560e: 4b04 ldr r3, [pc, #16] @ (8005620 ) 8005610: 681b ldr r3, [r3, #0] 8005612: 68db ldr r3, [r3, #12] 8005614: 68db ldr r3, [r3, #12] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) ); 8005616: 685a ldr r2, [r3, #4] 8005618: 4b02 ldr r3, [pc, #8] @ (8005624 ) 800561a: 601a str r2, [r3, #0] } } 800561c: 4770 bx lr 800561e: bf00 nop 8005620: 24012938 .word 0x24012938 8005624: 240128d0 .word 0x240128d0 08005628 : { 8005628: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 800562c: 4680 mov r8, r0 800562e: 460d mov r5, r1 8005630: 4617 mov r7, r2 8005632: 4699 mov r9, r3 8005634: 9e08 ldr r6, [sp, #32] 8005636: f8dd a024 ldr.w sl, [sp, #36] @ 0x24 800563a: 9c0a ldr r4, [sp, #40] @ 0x28 ( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) ); 800563c: 0092 lsls r2, r2, #2 800563e: 21a5 movs r1, #165 @ 0xa5 8005640: 6b20 ldr r0, [r4, #48] @ 0x30 8005642: f00e f839 bl 80136b8 pxTopOfStack = &( pxNewTCB->pxStack[ ulStackDepth - ( uint32_t ) 1 ] ); 8005646: 6b23 ldr r3, [r4, #48] @ 0x30 8005648: f06f 4240 mvn.w r2, #3221225472 @ 0xc0000000 800564c: 443a add r2, r7 800564e: eb03 0782 add.w r7, r3, r2, lsl #2 pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) ); /*lint !e923 !e9033 !e9078 MISRA exception. Avoiding casts between pointers and integers is not practical. Size differences accounted for using portPOINTER_SIZE_TYPE type. Checked by assert(). */ 8005652: f027 0707 bic.w r7, r7, #7 if( pcName != NULL ) 8005656: 2d00 cmp r5, #0 8005658: d042 beq.n 80056e0 for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 800565a: f04f 0c00 mov.w ip, #0 800565e: f1bc 0f0f cmp.w ip, #15 8005662: d809 bhi.n 8005678 pxNewTCB->pcTaskName[ x ] = pcName[ x ]; 8005664: f815 300c ldrb.w r3, [r5, ip] 8005668: eb04 020c add.w r2, r4, ip 800566c: f882 3034 strb.w r3, [r2, #52] @ 0x34 if( pcName[ x ] == ( char ) 0x00 ) 8005670: b113 cbz r3, 8005678 for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8005672: f10c 0c01 add.w ip, ip, #1 8005676: e7f2 b.n 800565e pxNewTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0'; 8005678: 2300 movs r3, #0 800567a: f884 3043 strb.w r3, [r4, #67] @ 0x43 if( uxPriority >= ( UBaseType_t ) configMAX_PRIORITIES ) 800567e: 2e37 cmp r6, #55 @ 0x37 8005680: d900 bls.n 8005684 uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U; 8005682: 2637 movs r6, #55 @ 0x37 pxNewTCB->uxPriority = uxPriority; 8005684: 62e6 str r6, [r4, #44] @ 0x2c pxNewTCB->uxBasePriority = uxPriority; 8005686: 64e6 str r6, [r4, #76] @ 0x4c pxNewTCB->uxMutexesHeld = 0; 8005688: 2500 movs r5, #0 800568a: 6525 str r5, [r4, #80] @ 0x50 vListInitialiseItem( &( pxNewTCB->xStateListItem ) ); 800568c: 1d20 adds r0, r4, #4 800568e: f7fe ffbc bl 800460a vListInitialiseItem( &( pxNewTCB->xEventListItem ) ); 8005692: f104 0018 add.w r0, r4, #24 8005696: f7fe ffb8 bl 800460a listSET_LIST_ITEM_OWNER( &( pxNewTCB->xStateListItem ), pxNewTCB ); 800569a: 6124 str r4, [r4, #16] listSET_LIST_ITEM_VALUE( &( pxNewTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 800569c: f1c6 0638 rsb r6, r6, #56 @ 0x38 80056a0: 61a6 str r6, [r4, #24] listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB ); 80056a2: 6264 str r4, [r4, #36] @ 0x24 pxNewTCB->ulNotifiedValue = 0; 80056a4: f8c4 50a0 str.w r5, [r4, #160] @ 0xa0 pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 80056a8: f884 50a4 strb.w r5, [r4, #164] @ 0xa4 _REENT_INIT_PTR( ( &( pxNewTCB->xNewLib_reent ) ) ); 80056ac: 224c movs r2, #76 @ 0x4c 80056ae: 4629 mov r1, r5 80056b0: f104 0054 add.w r0, r4, #84 @ 0x54 80056b4: f00e f800 bl 80136b8 80056b8: 4b0b ldr r3, [pc, #44] @ (80056e8 ) 80056ba: 65a3 str r3, [r4, #88] @ 0x58 80056bc: f103 0268 add.w r2, r3, #104 @ 0x68 80056c0: 65e2 str r2, [r4, #92] @ 0x5c 80056c2: 33d0 adds r3, #208 @ 0xd0 80056c4: 6623 str r3, [r4, #96] @ 0x60 pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters ); 80056c6: 464a mov r2, r9 80056c8: 4641 mov r1, r8 80056ca: 4638 mov r0, r7 80056cc: f7ff f816 bl 80046fc 80056d0: 6020 str r0, [r4, #0] if( pxCreatedTask != NULL ) 80056d2: f1ba 0f00 cmp.w sl, #0 80056d6: d001 beq.n 80056dc *pxCreatedTask = ( TaskHandle_t ) pxNewTCB; 80056d8: f8ca 4000 str.w r4, [sl] } 80056dc: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} pxNewTCB->pcTaskName[ 0 ] = 0x00; 80056e0: 2300 movs r3, #0 80056e2: f884 3034 strb.w r3, [r4, #52] @ 0x34 80056e6: e7ca b.n 800567e 80056e8: 24019c50 .word 0x24019c50 080056ec : { 80056ec: b538 push {r3, r4, r5, lr} for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 80056ee: 2400 movs r4, #0 80056f0: e007 b.n 8005702 vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 80056f2: eb04 0284 add.w r2, r4, r4, lsl #2 80056f6: 0093 lsls r3, r2, #2 80056f8: 480e ldr r0, [pc, #56] @ (8005734 ) 80056fa: 4418 add r0, r3 80056fc: f7fe ff7a bl 80045f4 for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 8005700: 3401 adds r4, #1 8005702: 2c37 cmp r4, #55 @ 0x37 8005704: d9f5 bls.n 80056f2 vListInitialise( &xDelayedTaskList1 ); 8005706: 4d0c ldr r5, [pc, #48] @ (8005738 ) 8005708: 4628 mov r0, r5 800570a: f7fe ff73 bl 80045f4 vListInitialise( &xDelayedTaskList2 ); 800570e: 4c0b ldr r4, [pc, #44] @ (800573c ) 8005710: 4620 mov r0, r4 8005712: f7fe ff6f bl 80045f4 vListInitialise( &xPendingReadyList ); 8005716: 480a ldr r0, [pc, #40] @ (8005740 ) 8005718: f7fe ff6c bl 80045f4 vListInitialise( &xTasksWaitingTermination ); 800571c: 4809 ldr r0, [pc, #36] @ (8005744 ) 800571e: f7fe ff69 bl 80045f4 vListInitialise( &xSuspendedTaskList ); 8005722: 4809 ldr r0, [pc, #36] @ (8005748 ) 8005724: f7fe ff66 bl 80045f4 pxDelayedTaskList = &xDelayedTaskList1; 8005728: 4b08 ldr r3, [pc, #32] @ (800574c ) 800572a: 601d str r5, [r3, #0] pxOverflowDelayedTaskList = &xDelayedTaskList2; 800572c: 4b08 ldr r3, [pc, #32] @ (8005750 ) 800572e: 601c str r4, [r3, #0] } 8005730: bd38 pop {r3, r4, r5, pc} 8005732: bf00 nop 8005734: 24012964 .word 0x24012964 8005738: 24012950 .word 0x24012950 800573c: 2401293c .word 0x2401293c 8005740: 24012920 .word 0x24012920 8005744: 2401290c .word 0x2401290c 8005748: 240128f4 .word 0x240128f4 800574c: 24012938 .word 0x24012938 8005750: 24012934 .word 0x24012934 08005754 : { 8005754: b510 push {r4, lr} 8005756: 4604 mov r4, r0 taskENTER_CRITICAL(); 8005758: f7fe fffc bl 8004754 uxCurrentNumberOfTasks++; 800575c: 4a22 ldr r2, [pc, #136] @ (80057e8 ) 800575e: 6813 ldr r3, [r2, #0] 8005760: 3301 adds r3, #1 8005762: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 8005764: 4b21 ldr r3, [pc, #132] @ (80057ec ) 8005766: 681b ldr r3, [r3, #0] 8005768: b15b cbz r3, 8005782 if( xSchedulerRunning == pdFALSE ) 800576a: 4b21 ldr r3, [pc, #132] @ (80057f0 ) 800576c: 681b ldr r3, [r3, #0] 800576e: b96b cbnz r3, 800578c if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority ) 8005770: 4b1e ldr r3, [pc, #120] @ (80057ec ) 8005772: 681b ldr r3, [r3, #0] 8005774: 6ada ldr r2, [r3, #44] @ 0x2c 8005776: 6ae3 ldr r3, [r4, #44] @ 0x2c 8005778: 429a cmp r2, r3 800577a: d807 bhi.n 800578c pxCurrentTCB = pxNewTCB; 800577c: 4b1b ldr r3, [pc, #108] @ (80057ec ) 800577e: 601c str r4, [r3, #0] 8005780: e004 b.n 800578c pxCurrentTCB = pxNewTCB; 8005782: 4b1a ldr r3, [pc, #104] @ (80057ec ) 8005784: 601c str r4, [r3, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 8005786: 6813 ldr r3, [r2, #0] 8005788: 2b01 cmp r3, #1 800578a: d029 beq.n 80057e0 uxTaskNumber++; 800578c: 4a19 ldr r2, [pc, #100] @ (80057f4 ) 800578e: 6813 ldr r3, [r2, #0] 8005790: 3301 adds r3, #1 8005792: 6013 str r3, [r2, #0] pxNewTCB->uxTCBNumber = uxTaskNumber; 8005794: 6463 str r3, [r4, #68] @ 0x44 prvAddTaskToReadyList( pxNewTCB ); 8005796: 6ae0 ldr r0, [r4, #44] @ 0x2c 8005798: 4b17 ldr r3, [pc, #92] @ (80057f8 ) 800579a: 681b ldr r3, [r3, #0] 800579c: 4298 cmp r0, r3 800579e: d901 bls.n 80057a4 80057a0: 4b15 ldr r3, [pc, #84] @ (80057f8 ) 80057a2: 6018 str r0, [r3, #0] 80057a4: eb00 0080 add.w r0, r0, r0, lsl #2 80057a8: 1d21 adds r1, r4, #4 80057aa: 4b14 ldr r3, [pc, #80] @ (80057fc ) 80057ac: eb03 0080 add.w r0, r3, r0, lsl #2 80057b0: f7fe ff2e bl 8004610 taskEXIT_CRITICAL(); 80057b4: f7fe fff0 bl 8004798 if( xSchedulerRunning != pdFALSE ) 80057b8: 4b0d ldr r3, [pc, #52] @ (80057f0 ) 80057ba: 681b ldr r3, [r3, #0] 80057bc: b17b cbz r3, 80057de if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority ) 80057be: 4b0b ldr r3, [pc, #44] @ (80057ec ) 80057c0: 681b ldr r3, [r3, #0] 80057c2: 6ada ldr r2, [r3, #44] @ 0x2c 80057c4: 6ae3 ldr r3, [r4, #44] @ 0x2c 80057c6: 429a cmp r2, r3 80057c8: d209 bcs.n 80057de taskYIELD_IF_USING_PREEMPTION(); 80057ca: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 80057ce: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80057d2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 80057d6: f3bf 8f4f dsb sy 80057da: f3bf 8f6f isb sy } 80057de: bd10 pop {r4, pc} prvInitialiseTaskLists(); 80057e0: f7ff ff84 bl 80056ec 80057e4: e7d2 b.n 800578c 80057e6: bf00 nop 80057e8: 240128f0 .word 0x240128f0 80057ec: 24012dc4 .word 0x24012dc4 80057f0: 240128e4 .word 0x240128e4 80057f4: 240128d4 .word 0x240128d4 80057f8: 240128e8 .word 0x240128e8 80057fc: 24012964 .word 0x24012964 08005800 : { 8005800: b510 push {r4, lr} 8005802: 4604 mov r4, r0 _reclaim_reent( &( pxTCB->xNewLib_reent ) ); 8005804: 3054 adds r0, #84 @ 0x54 8005806: f00d ff81 bl 801370c <_reclaim_reent> if( pxTCB->ucStaticallyAllocated == tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB ) 800580a: f894 30a5 ldrb.w r3, [r4, #165] @ 0xa5 800580e: b163 cbz r3, 800582a else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY ) 8005810: 2b01 cmp r3, #1 8005812: d011 beq.n 8005838 configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); 8005814: 2b02 cmp r3, #2 8005816: d00e beq.n 8005836 8005818: f04f 0350 mov.w r3, #80 @ 0x50 800581c: f383 8811 msr BASEPRI, r3 8005820: f3bf 8f6f isb sy 8005824: f3bf 8f4f dsb sy 8005828: e7fe b.n 8005828 vPortFree( pxTCB->pxStack ); 800582a: 6b20 ldr r0, [r4, #48] @ 0x30 800582c: f7fe fea4 bl 8004578 vPortFree( pxTCB ); 8005830: 4620 mov r0, r4 8005832: f7fe fea1 bl 8004578 } 8005836: bd10 pop {r4, pc} vPortFree( pxTCB ); 8005838: 4620 mov r0, r4 800583a: f7fe fe9d bl 8004578 800583e: e7fa b.n 8005836 08005840 : while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) 8005840: 4b0f ldr r3, [pc, #60] @ (8005880 ) 8005842: 681b ldr r3, [r3, #0] 8005844: b1d3 cbz r3, 800587c { 8005846: b510 push {r4, lr} taskENTER_CRITICAL(); 8005848: f7fe ff84 bl 8004754 pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 800584c: 4b0d ldr r3, [pc, #52] @ (8005884 ) 800584e: 68db ldr r3, [r3, #12] 8005850: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8005852: 1d20 adds r0, r4, #4 8005854: f7fe ff00 bl 8004658 --uxCurrentNumberOfTasks; 8005858: 4a0b ldr r2, [pc, #44] @ (8005888 ) 800585a: 6813 ldr r3, [r2, #0] 800585c: 3b01 subs r3, #1 800585e: 6013 str r3, [r2, #0] --uxDeletedTasksWaitingCleanUp; 8005860: 4a07 ldr r2, [pc, #28] @ (8005880 ) 8005862: 6813 ldr r3, [r2, #0] 8005864: 3b01 subs r3, #1 8005866: 6013 str r3, [r2, #0] taskEXIT_CRITICAL(); 8005868: f7fe ff96 bl 8004798 prvDeleteTCB( pxTCB ); 800586c: 4620 mov r0, r4 800586e: f7ff ffc7 bl 8005800 while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) 8005872: 4b03 ldr r3, [pc, #12] @ (8005880 ) 8005874: 681b ldr r3, [r3, #0] 8005876: 2b00 cmp r3, #0 8005878: d1e6 bne.n 8005848 } 800587a: bd10 pop {r4, pc} 800587c: 4770 bx lr 800587e: bf00 nop 8005880: 24012908 .word 0x24012908 8005884: 2401290c .word 0x2401290c 8005888: 240128f0 .word 0x240128f0 0800588c : { 800588c: b508 push {r3, lr} prvCheckTasksWaitingTermination(); 800588e: f7ff ffd7 bl 8005840 if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 ) 8005892: 4b07 ldr r3, [pc, #28] @ (80058b0 ) 8005894: 681b ldr r3, [r3, #0] 8005896: 2b01 cmp r3, #1 8005898: d9f9 bls.n 800588e taskYIELD(); 800589a: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 800589e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80058a2: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 80058a6: f3bf 8f4f dsb sy 80058aa: f3bf 8f6f isb sy 80058ae: e7ee b.n 800588e 80058b0: 24012964 .word 0x24012964 080058b4 : #endif /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely ) { 80058b4: b570 push {r4, r5, r6, lr} 80058b6: 4604 mov r4, r0 80058b8: 460d mov r5, r1 TickType_t xTimeToWake; const TickType_t xConstTickCount = xTickCount; 80058ba: 4b19 ldr r3, [pc, #100] @ (8005920 ) 80058bc: 681e ldr r6, [r3, #0] } #endif /* Remove the task from the ready list before adding it to the blocked list as the same list item is used for both lists. */ if( uxListRemove( &( pxCurrentTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 80058be: 4b19 ldr r3, [pc, #100] @ (8005924 ) 80058c0: 6818 ldr r0, [r3, #0] 80058c2: 3004 adds r0, #4 80058c4: f7fe fec8 bl 8004658 mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) ) 80058c8: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff 80058cc: bf14 ite ne 80058ce: 2300 movne r3, #0 80058d0: 2301 moveq r3, #1 80058d2: 2d00 cmp r5, #0 80058d4: bf08 it eq 80058d6: 2300 moveq r3, #0 80058d8: b96b cbnz r3, 80058f6 else { /* Calculate the time at which the task should be woken if the event does not occur. This may overflow but this doesn't matter, the kernel will manage it correctly. */ xTimeToWake = xConstTickCount + xTicksToWait; 80058da: 4434 add r4, r6 /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake ); 80058dc: 4b11 ldr r3, [pc, #68] @ (8005924 ) 80058de: 681b ldr r3, [r3, #0] 80058e0: 605c str r4, [r3, #4] if( xTimeToWake < xConstTickCount ) 80058e2: 42a6 cmp r6, r4 80058e4: d90e bls.n 8005904 { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 80058e6: 4b10 ldr r3, [pc, #64] @ (8005928 ) 80058e8: 6818 ldr r0, [r3, #0] 80058ea: 4b0e ldr r3, [pc, #56] @ (8005924 ) 80058ec: 6819 ldr r1, [r3, #0] 80058ee: 3104 adds r1, #4 80058f0: f7fe fe99 bl 8004626 /* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */ ( void ) xCanBlockIndefinitely; } #endif /* INCLUDE_vTaskSuspend */ } 80058f4: bd70 pop {r4, r5, r6, pc} vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); 80058f6: 4b0b ldr r3, [pc, #44] @ (8005924 ) 80058f8: 6819 ldr r1, [r3, #0] 80058fa: 3104 adds r1, #4 80058fc: 480b ldr r0, [pc, #44] @ (800592c ) 80058fe: f7fe fe87 bl 8004610 8005902: e7f7 b.n 80058f4 vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 8005904: 4b0a ldr r3, [pc, #40] @ (8005930 ) 8005906: 6818 ldr r0, [r3, #0] 8005908: 4b06 ldr r3, [pc, #24] @ (8005924 ) 800590a: 6819 ldr r1, [r3, #0] 800590c: 3104 adds r1, #4 800590e: f7fe fe8a bl 8004626 if( xTimeToWake < xNextTaskUnblockTime ) 8005912: 4b08 ldr r3, [pc, #32] @ (8005934 ) 8005914: 681b ldr r3, [r3, #0] 8005916: 42a3 cmp r3, r4 8005918: d9ec bls.n 80058f4 xNextTaskUnblockTime = xTimeToWake; 800591a: 4b06 ldr r3, [pc, #24] @ (8005934 ) 800591c: 601c str r4, [r3, #0] } 800591e: e7e9 b.n 80058f4 8005920: 240128ec .word 0x240128ec 8005924: 24012dc4 .word 0x24012dc4 8005928: 24012934 .word 0x24012934 800592c: 240128f4 .word 0x240128f4 8005930: 24012938 .word 0x24012938 8005934: 240128d0 .word 0x240128d0 08005938 : { 8005938: b530 push {r4, r5, lr} 800593a: b087 sub sp, #28 800593c: 9c0b ldr r4, [sp, #44] @ 0x2c configASSERT( puxStackBuffer != NULL ); 800593e: b17c cbz r4, 8005960 configASSERT( pxTaskBuffer != NULL ); 8005940: 9d0c ldr r5, [sp, #48] @ 0x30 8005942: b1b5 cbz r5, 8005972 volatile size_t xSize = sizeof( StaticTask_t ); 8005944: 25a8 movs r5, #168 @ 0xa8 8005946: 9504 str r5, [sp, #16] configASSERT( xSize == sizeof( TCB_t ) ); 8005948: 9d04 ldr r5, [sp, #16] 800594a: 2da8 cmp r5, #168 @ 0xa8 800594c: d01a beq.n 8005984 800594e: f04f 0350 mov.w r3, #80 @ 0x50 8005952: f383 8811 msr BASEPRI, r3 8005956: f3bf 8f6f isb sy 800595a: f3bf 8f4f dsb sy 800595e: e7fe b.n 800595e 8005960: f04f 0350 mov.w r3, #80 @ 0x50 8005964: f383 8811 msr BASEPRI, r3 8005968: f3bf 8f6f isb sy 800596c: f3bf 8f4f dsb sy configASSERT( puxStackBuffer != NULL ); 8005970: e7fe b.n 8005970 8005972: f04f 0350 mov.w r3, #80 @ 0x50 8005976: f383 8811 msr BASEPRI, r3 800597a: f3bf 8f6f isb sy 800597e: f3bf 8f4f dsb sy configASSERT( pxTaskBuffer != NULL ); 8005982: e7fe b.n 8005982 ( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */ 8005984: 9d04 ldr r5, [sp, #16] pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer; 8005986: 9d0c ldr r5, [sp, #48] @ 0x30 8005988: 632c str r4, [r5, #48] @ 0x30 pxNewTCB->ucStaticallyAllocated = tskSTATICALLY_ALLOCATED_STACK_AND_TCB; 800598a: 2402 movs r4, #2 800598c: f885 40a5 strb.w r4, [r5, #165] @ 0xa5 prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL ); 8005990: 2400 movs r4, #0 8005992: 9403 str r4, [sp, #12] 8005994: 9502 str r5, [sp, #8] 8005996: ac05 add r4, sp, #20 8005998: 9401 str r4, [sp, #4] 800599a: 9c0a ldr r4, [sp, #40] @ 0x28 800599c: 9400 str r4, [sp, #0] 800599e: f7ff fe43 bl 8005628 prvAddNewTaskToReadyList( pxNewTCB ); 80059a2: 980c ldr r0, [sp, #48] @ 0x30 80059a4: f7ff fed6 bl 8005754 } 80059a8: 9805 ldr r0, [sp, #20] 80059aa: b007 add sp, #28 80059ac: bd30 pop {r4, r5, pc} 080059ae : { 80059ae: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 80059b2: b085 sub sp, #20 80059b4: 4607 mov r7, r0 80059b6: 4688 mov r8, r1 80059b8: 4614 mov r4, r2 80059ba: 461e mov r6, r3 pxStack = pvPortMalloc( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ) ); /*lint !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack and this allocation is the stack. */ 80059bc: 0090 lsls r0, r2, #2 80059be: f7fe fd59 bl 8004474 if( pxStack != NULL ) 80059c2: b308 cbz r0, 8005a08 80059c4: 4681 mov r9, r0 pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) ); /*lint !e9087 !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack, and the first member of TCB_t is always a pointer to the task's stack. */ 80059c6: 20a8 movs r0, #168 @ 0xa8 80059c8: f7fe fd54 bl 8004474 if( pxNewTCB != NULL ) 80059cc: 4605 mov r5, r0 80059ce: b1a8 cbz r0, 80059fc pxNewTCB->pxStack = pxStack; 80059d0: f8c0 9030 str.w r9, [r0, #48] @ 0x30 pxNewTCB->ucStaticallyAllocated = tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB; 80059d4: 2300 movs r3, #0 80059d6: f880 30a5 strb.w r3, [r0, #165] @ 0xa5 prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL ); 80059da: 9303 str r3, [sp, #12] 80059dc: 9002 str r0, [sp, #8] 80059de: 9b0d ldr r3, [sp, #52] @ 0x34 80059e0: 9301 str r3, [sp, #4] 80059e2: 9b0c ldr r3, [sp, #48] @ 0x30 80059e4: 9300 str r3, [sp, #0] 80059e6: 4633 mov r3, r6 80059e8: 4622 mov r2, r4 80059ea: 4641 mov r1, r8 80059ec: 4638 mov r0, r7 80059ee: f7ff fe1b bl 8005628 prvAddNewTaskToReadyList( pxNewTCB ); 80059f2: 4628 mov r0, r5 80059f4: f7ff feae bl 8005754 xReturn = pdPASS; 80059f8: 2001 movs r0, #1 80059fa: e007 b.n 8005a0c vPortFree( pxStack ); 80059fc: 4648 mov r0, r9 80059fe: f7fe fdbb bl 8004578 xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 8005a02: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8005a06: e001 b.n 8005a0c 8005a08: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } 8005a0c: b005 add sp, #20 8005a0e: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} ... 08005a14 : { 8005a14: b510 push {r4, lr} 8005a16: b088 sub sp, #32 StaticTask_t *pxIdleTaskTCBBuffer = NULL; 8005a18: 2400 movs r4, #0 8005a1a: 9405 str r4, [sp, #20] StackType_t *pxIdleTaskStackBuffer = NULL; 8005a1c: 9406 str r4, [sp, #24] vApplicationGetIdleTaskMemory( &pxIdleTaskTCBBuffer, &pxIdleTaskStackBuffer, &ulIdleTaskStackSize ); 8005a1e: aa07 add r2, sp, #28 8005a20: a906 add r1, sp, #24 8005a22: a805 add r0, sp, #20 8005a24: f7fe fcaa bl 800437c xIdleTaskHandle = xTaskCreateStatic( prvIdleTask, 8005a28: 9b05 ldr r3, [sp, #20] 8005a2a: 9302 str r3, [sp, #8] 8005a2c: 9b06 ldr r3, [sp, #24] 8005a2e: 9301 str r3, [sp, #4] 8005a30: 9400 str r4, [sp, #0] 8005a32: 4623 mov r3, r4 8005a34: 9a07 ldr r2, [sp, #28] 8005a36: 491a ldr r1, [pc, #104] @ (8005aa0 ) 8005a38: 481a ldr r0, [pc, #104] @ (8005aa4 ) 8005a3a: f7ff ff7d bl 8005938 8005a3e: 4b1a ldr r3, [pc, #104] @ (8005aa8 ) 8005a40: 6018 str r0, [r3, #0] if( xIdleTaskHandle != NULL ) 8005a42: b1e8 cbz r0, 8005a80 xReturn = xTimerCreateTimerTask(); 8005a44: f000 fc26 bl 8006294 if( xReturn == pdPASS ) 8005a48: 2801 cmp r0, #1 8005a4a: d11a bne.n 8005a82 8005a4c: f04f 0350 mov.w r3, #80 @ 0x50 8005a50: f383 8811 msr BASEPRI, r3 8005a54: f3bf 8f6f isb sy 8005a58: f3bf 8f4f dsb sy _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); 8005a5c: 4b13 ldr r3, [pc, #76] @ (8005aac ) 8005a5e: 681b ldr r3, [r3, #0] 8005a60: 3354 adds r3, #84 @ 0x54 8005a62: 4a13 ldr r2, [pc, #76] @ (8005ab0 ) 8005a64: 6013 str r3, [r2, #0] xNextTaskUnblockTime = portMAX_DELAY; 8005a66: 4b13 ldr r3, [pc, #76] @ (8005ab4 ) 8005a68: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8005a6c: 601a str r2, [r3, #0] xSchedulerRunning = pdTRUE; 8005a6e: 4b12 ldr r3, [pc, #72] @ (8005ab8 ) 8005a70: 2201 movs r2, #1 8005a72: 601a str r2, [r3, #0] xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT; 8005a74: 4b11 ldr r3, [pc, #68] @ (8005abc ) 8005a76: 2200 movs r2, #0 8005a78: 601a str r2, [r3, #0] if( xPortStartScheduler() != pdFALSE ) 8005a7a: f7fe ff05 bl 8004888 8005a7e: e003 b.n 8005a88 xReturn = pdFAIL; 8005a80: 2000 movs r0, #0 configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ); 8005a82: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 8005a86: d001 beq.n 8005a8c } 8005a88: b008 add sp, #32 8005a8a: bd10 pop {r4, pc} 8005a8c: f04f 0350 mov.w r3, #80 @ 0x50 8005a90: f383 8811 msr BASEPRI, r3 8005a94: f3bf 8f6f isb sy 8005a98: f3bf 8f4f dsb sy configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ); 8005a9c: e7fe b.n 8005a9c 8005a9e: bf00 nop 8005aa0: 0801464c .word 0x0801464c 8005aa4: 0800588d .word 0x0800588d 8005aa8: 240128cc .word 0x240128cc 8005aac: 24012dc4 .word 0x24012dc4 8005ab0: 2400003c .word 0x2400003c 8005ab4: 240128d0 .word 0x240128d0 8005ab8: 240128e4 .word 0x240128e4 8005abc: 240128ec .word 0x240128ec 08005ac0 : ++uxSchedulerSuspended; 8005ac0: 4a02 ldr r2, [pc, #8] @ (8005acc ) 8005ac2: 6813 ldr r3, [r2, #0] 8005ac4: 3301 adds r3, #1 8005ac6: 6013 str r3, [r2, #0] } 8005ac8: 4770 bx lr 8005aca: bf00 nop 8005acc: 240128c8 .word 0x240128c8 08005ad0 : xTicks = xTickCount; 8005ad0: 4b01 ldr r3, [pc, #4] @ (8005ad8 ) 8005ad2: 6818 ldr r0, [r3, #0] } 8005ad4: 4770 bx lr 8005ad6: bf00 nop 8005ad8: 240128ec .word 0x240128ec 08005adc : { 8005adc: b508 push {r3, lr} portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 8005ade: f7fe ff5f bl 80049a0 xReturn = xTickCount; 8005ae2: 4b01 ldr r3, [pc, #4] @ (8005ae8 ) 8005ae4: 6818 ldr r0, [r3, #0] } 8005ae6: bd08 pop {r3, pc} 8005ae8: 240128ec .word 0x240128ec 08005aec : { 8005aec: b5f8 push {r3, r4, r5, r6, r7, lr} if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8005aee: 4b3a ldr r3, [pc, #232] @ (8005bd8 ) 8005af0: 681b ldr r3, [r3, #0] 8005af2: 2b00 cmp r3, #0 8005af4: d169 bne.n 8005bca const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1; 8005af6: 4b39 ldr r3, [pc, #228] @ (8005bdc ) 8005af8: 681d ldr r5, [r3, #0] 8005afa: 3501 adds r5, #1 xTickCount = xConstTickCount; 8005afc: 601d str r5, [r3, #0] if( xConstTickCount == ( TickType_t ) 0U ) /*lint !e774 'if' does not always evaluate to false as it is looking for an overflow. */ 8005afe: b9c5 cbnz r5, 8005b32 taskSWITCH_DELAYED_LISTS(); 8005b00: 4b37 ldr r3, [pc, #220] @ (8005be0 ) 8005b02: 681b ldr r3, [r3, #0] 8005b04: 681b ldr r3, [r3, #0] 8005b06: b143 cbz r3, 8005b1a 8005b08: f04f 0350 mov.w r3, #80 @ 0x50 8005b0c: f383 8811 msr BASEPRI, r3 8005b10: f3bf 8f6f isb sy 8005b14: f3bf 8f4f dsb sy 8005b18: e7fe b.n 8005b18 8005b1a: 4a31 ldr r2, [pc, #196] @ (8005be0 ) 8005b1c: 6811 ldr r1, [r2, #0] 8005b1e: 4b31 ldr r3, [pc, #196] @ (8005be4 ) 8005b20: 6818 ldr r0, [r3, #0] 8005b22: 6010 str r0, [r2, #0] 8005b24: 6019 str r1, [r3, #0] 8005b26: 4a30 ldr r2, [pc, #192] @ (8005be8 ) 8005b28: 6813 ldr r3, [r2, #0] 8005b2a: 3301 adds r3, #1 8005b2c: 6013 str r3, [r2, #0] 8005b2e: f7ff fd65 bl 80055fc if( xConstTickCount >= xNextTaskUnblockTime ) 8005b32: 4b2e ldr r3, [pc, #184] @ (8005bec ) 8005b34: 681b ldr r3, [r3, #0] 8005b36: 42ab cmp r3, r5 8005b38: d93d bls.n 8005bb6 BaseType_t xSwitchRequired = pdFALSE; 8005b3a: 2700 movs r7, #0 if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 ) 8005b3c: 4b2c ldr r3, [pc, #176] @ (8005bf0 ) 8005b3e: 681b ldr r3, [r3, #0] 8005b40: 6adb ldr r3, [r3, #44] @ 0x2c 8005b42: eb03 0383 add.w r3, r3, r3, lsl #2 8005b46: 009a lsls r2, r3, #2 8005b48: 4b2a ldr r3, [pc, #168] @ (8005bf4 ) 8005b4a: 589b ldr r3, [r3, r2] 8005b4c: 2b01 cmp r3, #1 8005b4e: d900 bls.n 8005b52 xSwitchRequired = pdTRUE; 8005b50: 2701 movs r7, #1 if( xYieldPending != pdFALSE ) 8005b52: 4b29 ldr r3, [pc, #164] @ (8005bf8 ) 8005b54: 681b ldr r3, [r3, #0] 8005b56: 2b00 cmp r3, #0 8005b58: d03c beq.n 8005bd4 xSwitchRequired = pdTRUE; 8005b5a: 2701 movs r7, #1 return xSwitchRequired; 8005b5c: e03a b.n 8005bd4 xSwitchRequired = pdTRUE; 8005b5e: 2701 movs r7, #1 if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 8005b60: 4b1f ldr r3, [pc, #124] @ (8005be0 ) 8005b62: 681b ldr r3, [r3, #0] 8005b64: 681b ldr r3, [r3, #0] 8005b66: b343 cbz r3, 8005bba pxTCB = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8005b68: 4b1d ldr r3, [pc, #116] @ (8005be0 ) 8005b6a: 681b ldr r3, [r3, #0] 8005b6c: 68db ldr r3, [r3, #12] 8005b6e: 68dc ldr r4, [r3, #12] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) ); 8005b70: 6863 ldr r3, [r4, #4] if( xConstTickCount < xItemValue ) 8005b72: 429d cmp r5, r3 8005b74: d326 bcc.n 8005bc4 ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8005b76: 1d26 adds r6, r4, #4 8005b78: 4630 mov r0, r6 8005b7a: f7fe fd6d bl 8004658 if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 8005b7e: 6aa3 ldr r3, [r4, #40] @ 0x28 8005b80: b11b cbz r3, 8005b8a ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8005b82: f104 0018 add.w r0, r4, #24 8005b86: f7fe fd67 bl 8004658 prvAddTaskToReadyList( pxTCB ); 8005b8a: 6ae3 ldr r3, [r4, #44] @ 0x2c 8005b8c: 4a1b ldr r2, [pc, #108] @ (8005bfc ) 8005b8e: 6812 ldr r2, [r2, #0] 8005b90: 4293 cmp r3, r2 8005b92: d901 bls.n 8005b98 8005b94: 4a19 ldr r2, [pc, #100] @ (8005bfc ) 8005b96: 6013 str r3, [r2, #0] 8005b98: eb03 0383 add.w r3, r3, r3, lsl #2 8005b9c: 009a lsls r2, r3, #2 8005b9e: 4631 mov r1, r6 8005ba0: 4814 ldr r0, [pc, #80] @ (8005bf4 ) 8005ba2: 4410 add r0, r2 8005ba4: f7fe fd34 bl 8004610 if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 8005ba8: 6ae2 ldr r2, [r4, #44] @ 0x2c 8005baa: 4b11 ldr r3, [pc, #68] @ (8005bf0 ) 8005bac: 681b ldr r3, [r3, #0] 8005bae: 6adb ldr r3, [r3, #44] @ 0x2c 8005bb0: 429a cmp r2, r3 8005bb2: d2d4 bcs.n 8005b5e 8005bb4: e7d4 b.n 8005b60 BaseType_t xSwitchRequired = pdFALSE; 8005bb6: 2700 movs r7, #0 8005bb8: e7d2 b.n 8005b60 xNextTaskUnblockTime = portMAX_DELAY; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8005bba: 4b0c ldr r3, [pc, #48] @ (8005bec ) 8005bbc: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8005bc0: 601a str r2, [r3, #0] break; 8005bc2: e7bb b.n 8005b3c xNextTaskUnblockTime = xItemValue; 8005bc4: 4a09 ldr r2, [pc, #36] @ (8005bec ) 8005bc6: 6013 str r3, [r2, #0] break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */ 8005bc8: e7b8 b.n 8005b3c ++xPendedTicks; 8005bca: 4a0d ldr r2, [pc, #52] @ (8005c00 ) 8005bcc: 6813 ldr r3, [r2, #0] 8005bce: 3301 adds r3, #1 8005bd0: 6013 str r3, [r2, #0] BaseType_t xSwitchRequired = pdFALSE; 8005bd2: 2700 movs r7, #0 } 8005bd4: 4638 mov r0, r7 8005bd6: bdf8 pop {r3, r4, r5, r6, r7, pc} 8005bd8: 240128c8 .word 0x240128c8 8005bdc: 240128ec .word 0x240128ec 8005be0: 24012938 .word 0x24012938 8005be4: 24012934 .word 0x24012934 8005be8: 240128d8 .word 0x240128d8 8005bec: 240128d0 .word 0x240128d0 8005bf0: 24012dc4 .word 0x24012dc4 8005bf4: 24012964 .word 0x24012964 8005bf8: 240128dc .word 0x240128dc 8005bfc: 240128e8 .word 0x240128e8 8005c00: 240128e0 .word 0x240128e0 08005c04 : { 8005c04: b538 push {r3, r4, r5, lr} configASSERT( uxSchedulerSuspended ); 8005c06: 4b35 ldr r3, [pc, #212] @ (8005cdc ) 8005c08: 681b ldr r3, [r3, #0] 8005c0a: b943 cbnz r3, 8005c1e 8005c0c: f04f 0350 mov.w r3, #80 @ 0x50 8005c10: f383 8811 msr BASEPRI, r3 8005c14: f3bf 8f6f isb sy 8005c18: f3bf 8f4f dsb sy 8005c1c: e7fe b.n 8005c1c taskENTER_CRITICAL(); 8005c1e: f7fe fd99 bl 8004754 --uxSchedulerSuspended; 8005c22: 4b2e ldr r3, [pc, #184] @ (8005cdc ) 8005c24: 681a ldr r2, [r3, #0] 8005c26: 3a01 subs r2, #1 8005c28: 601a str r2, [r3, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8005c2a: 681b ldr r3, [r3, #0] 8005c2c: 2b00 cmp r3, #0 8005c2e: d14f bne.n 8005cd0 if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 8005c30: 4b2b ldr r3, [pc, #172] @ (8005ce0 ) 8005c32: 681b ldr r3, [r3, #0] 8005c34: b90b cbnz r3, 8005c3a BaseType_t xAlreadyYielded = pdFALSE; 8005c36: 2400 movs r4, #0 8005c38: e04b b.n 8005cd2 TCB_t *pxTCB = NULL; 8005c3a: 2400 movs r4, #0 while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8005c3c: 4b29 ldr r3, [pc, #164] @ (8005ce4 ) 8005c3e: 681b ldr r3, [r3, #0] 8005c40: b31b cbz r3, 8005c8a pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8005c42: 4b28 ldr r3, [pc, #160] @ (8005ce4 ) 8005c44: 68db ldr r3, [r3, #12] 8005c46: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8005c48: f104 0018 add.w r0, r4, #24 8005c4c: f7fe fd04 bl 8004658 ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8005c50: 1d25 adds r5, r4, #4 8005c52: 4628 mov r0, r5 8005c54: f7fe fd00 bl 8004658 prvAddTaskToReadyList( pxTCB ); 8005c58: 6ae0 ldr r0, [r4, #44] @ 0x2c 8005c5a: 4b23 ldr r3, [pc, #140] @ (8005ce8 ) 8005c5c: 681b ldr r3, [r3, #0] 8005c5e: 4298 cmp r0, r3 8005c60: d901 bls.n 8005c66 8005c62: 4b21 ldr r3, [pc, #132] @ (8005ce8 ) 8005c64: 6018 str r0, [r3, #0] 8005c66: eb00 0080 add.w r0, r0, r0, lsl #2 8005c6a: 4629 mov r1, r5 8005c6c: 4b1f ldr r3, [pc, #124] @ (8005cec ) 8005c6e: eb03 0080 add.w r0, r3, r0, lsl #2 8005c72: f7fe fccd bl 8004610 if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 8005c76: 6ae2 ldr r2, [r4, #44] @ 0x2c 8005c78: 4b1d ldr r3, [pc, #116] @ (8005cf0 ) 8005c7a: 681b ldr r3, [r3, #0] 8005c7c: 6adb ldr r3, [r3, #44] @ 0x2c 8005c7e: 429a cmp r2, r3 8005c80: d3dc bcc.n 8005c3c xYieldPending = pdTRUE; 8005c82: 4b1c ldr r3, [pc, #112] @ (8005cf4 ) 8005c84: 2201 movs r2, #1 8005c86: 601a str r2, [r3, #0] 8005c88: e7d8 b.n 8005c3c if( pxTCB != NULL ) 8005c8a: b10c cbz r4, 8005c90 prvResetNextTaskUnblockTime(); 8005c8c: f7ff fcb6 bl 80055fc TickType_t xPendedCounts = xPendedTicks; /* Non-volatile copy. */ 8005c90: 4b19 ldr r3, [pc, #100] @ (8005cf8 ) 8005c92: 681c ldr r4, [r3, #0] if( xPendedCounts > ( TickType_t ) 0U ) 8005c94: b984 cbnz r4, 8005cb8 if( xYieldPending != pdFALSE ) 8005c96: 4b17 ldr r3, [pc, #92] @ (8005cf4 ) 8005c98: 681c ldr r4, [r3, #0] 8005c9a: b1d4 cbz r4, 8005cd2 taskYIELD_IF_USING_PREEMPTION(); 8005c9c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8005ca0: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8005ca4: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8005ca8: f3bf 8f4f dsb sy 8005cac: f3bf 8f6f isb sy xAlreadyYielded = pdTRUE; 8005cb0: 2401 movs r4, #1 8005cb2: e00e b.n 8005cd2 } while( xPendedCounts > ( TickType_t ) 0U ); 8005cb4: 3c01 subs r4, #1 8005cb6: d007 beq.n 8005cc8 if( xTaskIncrementTick() != pdFALSE ) 8005cb8: f7ff ff18 bl 8005aec 8005cbc: 2800 cmp r0, #0 8005cbe: d0f9 beq.n 8005cb4 xYieldPending = pdTRUE; 8005cc0: 4b0c ldr r3, [pc, #48] @ (8005cf4 ) 8005cc2: 2201 movs r2, #1 8005cc4: 601a str r2, [r3, #0] 8005cc6: e7f5 b.n 8005cb4 xPendedTicks = 0; 8005cc8: 4b0b ldr r3, [pc, #44] @ (8005cf8 ) 8005cca: 2200 movs r2, #0 8005ccc: 601a str r2, [r3, #0] 8005cce: e7e2 b.n 8005c96 BaseType_t xAlreadyYielded = pdFALSE; 8005cd0: 2400 movs r4, #0 taskEXIT_CRITICAL(); 8005cd2: f7fe fd61 bl 8004798 } 8005cd6: 4620 mov r0, r4 8005cd8: bd38 pop {r3, r4, r5, pc} 8005cda: bf00 nop 8005cdc: 240128c8 .word 0x240128c8 8005ce0: 240128f0 .word 0x240128f0 8005ce4: 24012920 .word 0x24012920 8005ce8: 240128e8 .word 0x240128e8 8005cec: 24012964 .word 0x24012964 8005cf0: 24012dc4 .word 0x24012dc4 8005cf4: 240128dc .word 0x240128dc 8005cf8: 240128e0 .word 0x240128e0 08005cfc : { 8005cfc: b510 push {r4, lr} if( xTicksToDelay > ( TickType_t ) 0U ) 8005cfe: b1a8 cbz r0, 8005d2c 8005d00: 4604 mov r4, r0 configASSERT( uxSchedulerSuspended == 0 ); 8005d02: 4b10 ldr r3, [pc, #64] @ (8005d44 ) 8005d04: 681b ldr r3, [r3, #0] 8005d06: b143 cbz r3, 8005d1a 8005d08: f04f 0350 mov.w r3, #80 @ 0x50 8005d0c: f383 8811 msr BASEPRI, r3 8005d10: f3bf 8f6f isb sy 8005d14: f3bf 8f4f dsb sy 8005d18: e7fe b.n 8005d18 vTaskSuspendAll(); 8005d1a: f7ff fed1 bl 8005ac0 prvAddCurrentTaskToDelayedList( xTicksToDelay, pdFALSE ); 8005d1e: 2100 movs r1, #0 8005d20: 4620 mov r0, r4 8005d22: f7ff fdc7 bl 80058b4 xAlreadyYielded = xTaskResumeAll(); 8005d26: f7ff ff6d bl 8005c04 if( xAlreadyYielded == pdFALSE ) 8005d2a: b948 cbnz r0, 8005d40 portYIELD_WITHIN_API(); 8005d2c: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 8005d30: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8005d34: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 8005d38: f3bf 8f4f dsb sy 8005d3c: f3bf 8f6f isb sy } 8005d40: bd10 pop {r4, pc} 8005d42: bf00 nop 8005d44: 240128c8 .word 0x240128c8 08005d48 : { 8005d48: b508 push {r3, lr} if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 8005d4a: 4b29 ldr r3, [pc, #164] @ (8005df0 ) 8005d4c: 681b ldr r3, [r3, #0] 8005d4e: b11b cbz r3, 8005d58 xYieldPending = pdTRUE; 8005d50: 4b28 ldr r3, [pc, #160] @ (8005df4 ) 8005d52: 2201 movs r2, #1 8005d54: 601a str r2, [r3, #0] } 8005d56: bd08 pop {r3, pc} xYieldPending = pdFALSE; 8005d58: 4b26 ldr r3, [pc, #152] @ (8005df4 ) 8005d5a: 2200 movs r2, #0 8005d5c: 601a str r2, [r3, #0] taskCHECK_FOR_STACK_OVERFLOW(); 8005d5e: 4b26 ldr r3, [pc, #152] @ (8005df8 ) 8005d60: 681a ldr r2, [r3, #0] 8005d62: 6812 ldr r2, [r2, #0] 8005d64: 681b ldr r3, [r3, #0] 8005d66: 6b1b ldr r3, [r3, #48] @ 0x30 8005d68: 429a cmp r2, r3 8005d6a: d90a bls.n 8005d82 taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8005d6c: 4b23 ldr r3, [pc, #140] @ (8005dfc ) 8005d6e: 681b ldr r3, [r3, #0] 8005d70: eb03 0183 add.w r1, r3, r3, lsl #2 8005d74: 008a lsls r2, r1, #2 8005d76: 4922 ldr r1, [pc, #136] @ (8005e00 ) 8005d78: 588a ldr r2, [r1, r2] 8005d7a: b992 cbnz r2, 8005da2 8005d7c: b143 cbz r3, 8005d90 8005d7e: 3b01 subs r3, #1 8005d80: e7f6 b.n 8005d70 taskCHECK_FOR_STACK_OVERFLOW(); 8005d82: 4b1d ldr r3, [pc, #116] @ (8005df8 ) 8005d84: 6818 ldr r0, [r3, #0] 8005d86: 6819 ldr r1, [r3, #0] 8005d88: 3134 adds r1, #52 @ 0x34 8005d8a: f7fa fb83 bl 8000494 8005d8e: e7ed b.n 8005d6c 8005d90: f04f 0350 mov.w r3, #80 @ 0x50 8005d94: f383 8811 msr BASEPRI, r3 8005d98: f3bf 8f6f isb sy 8005d9c: f3bf 8f4f dsb sy taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8005da0: e7fe b.n 8005da0 8005da2: 4608 mov r0, r1 8005da4: eb03 0183 add.w r1, r3, r3, lsl #2 8005da8: 008a lsls r2, r1, #2 8005daa: 4402 add r2, r0 8005dac: 6851 ldr r1, [r2, #4] 8005dae: 6849 ldr r1, [r1, #4] 8005db0: 6051 str r1, [r2, #4] 8005db2: eb03 0c83 add.w ip, r3, r3, lsl #2 8005db6: ea4f 028c mov.w r2, ip, lsl #2 8005dba: 3208 adds r2, #8 8005dbc: 4402 add r2, r0 8005dbe: 4291 cmp r1, r2 8005dc0: d00f beq.n 8005de2 8005dc2: eb03 0283 add.w r2, r3, r3, lsl #2 8005dc6: 0091 lsls r1, r2, #2 8005dc8: 4a0d ldr r2, [pc, #52] @ (8005e00 ) 8005dca: 440a add r2, r1 8005dcc: 6852 ldr r2, [r2, #4] 8005dce: 68d1 ldr r1, [r2, #12] 8005dd0: 4a09 ldr r2, [pc, #36] @ (8005df8 ) 8005dd2: 6011 str r1, [r2, #0] 8005dd4: 4909 ldr r1, [pc, #36] @ (8005dfc ) 8005dd6: 600b str r3, [r1, #0] _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); 8005dd8: 6813 ldr r3, [r2, #0] 8005dda: 3354 adds r3, #84 @ 0x54 8005ddc: 4a09 ldr r2, [pc, #36] @ (8005e04 ) 8005dde: 6013 str r3, [r2, #0] } 8005de0: e7b9 b.n 8005d56 taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8005de2: 6848 ldr r0, [r1, #4] 8005de4: 4662 mov r2, ip 8005de6: 0091 lsls r1, r2, #2 8005de8: 4a05 ldr r2, [pc, #20] @ (8005e00 ) 8005dea: 440a add r2, r1 8005dec: 6050 str r0, [r2, #4] 8005dee: e7e8 b.n 8005dc2 8005df0: 240128c8 .word 0x240128c8 8005df4: 240128dc .word 0x240128dc 8005df8: 24012dc4 .word 0x24012dc4 8005dfc: 240128e8 .word 0x240128e8 8005e00: 24012964 .word 0x24012964 8005e04: 2400003c .word 0x2400003c 08005e08 : configASSERT( pxEventList ); 8005e08: b158 cbz r0, 8005e22 { 8005e0a: b510 push {r4, lr} 8005e0c: 460c mov r4, r1 vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) ); 8005e0e: 4a09 ldr r2, [pc, #36] @ (8005e34 ) 8005e10: 6811 ldr r1, [r2, #0] 8005e12: 3118 adds r1, #24 8005e14: f7fe fc07 bl 8004626 prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); 8005e18: 2101 movs r1, #1 8005e1a: 4620 mov r0, r4 8005e1c: f7ff fd4a bl 80058b4 } 8005e20: bd10 pop {r4, pc} 8005e22: f04f 0350 mov.w r3, #80 @ 0x50 8005e26: f383 8811 msr BASEPRI, r3 8005e2a: f3bf 8f6f isb sy 8005e2e: f3bf 8f4f dsb sy configASSERT( pxEventList ); 8005e32: e7fe b.n 8005e32 8005e34: 24012dc4 .word 0x24012dc4 08005e38 : { 8005e38: b538 push {r3, r4, r5, lr} configASSERT( pxEventList ); 8005e3a: b170 cbz r0, 8005e5a 8005e3c: 460d mov r5, r1 8005e3e: 4614 mov r4, r2 vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) ); 8005e40: 4a0a ldr r2, [pc, #40] @ (8005e6c ) 8005e42: 6811 ldr r1, [r2, #0] 8005e44: 3118 adds r1, #24 8005e46: f7fe fbe3 bl 8004610 if( xWaitIndefinitely != pdFALSE ) 8005e4a: b10c cbz r4, 8005e50 xTicksToWait = portMAX_DELAY; 8005e4c: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely ); 8005e50: 4621 mov r1, r4 8005e52: 4628 mov r0, r5 8005e54: f7ff fd2e bl 80058b4 } 8005e58: bd38 pop {r3, r4, r5, pc} 8005e5a: f04f 0350 mov.w r3, #80 @ 0x50 8005e5e: f383 8811 msr BASEPRI, r3 8005e62: f3bf 8f6f isb sy 8005e66: f3bf 8f4f dsb sy configASSERT( pxEventList ); 8005e6a: e7fe b.n 8005e6a 8005e6c: 24012dc4 .word 0x24012dc4 08005e70 : { 8005e70: b538 push {r3, r4, r5, lr} pxUnblockedTCB = listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8005e72: 68c3 ldr r3, [r0, #12] 8005e74: 68dc ldr r4, [r3, #12] configASSERT( pxUnblockedTCB ); 8005e76: b324 cbz r4, 8005ec2 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 8005e78: f104 0518 add.w r5, r4, #24 8005e7c: 4628 mov r0, r5 8005e7e: f7fe fbeb bl 8004658 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8005e82: 4b18 ldr r3, [pc, #96] @ (8005ee4 ) 8005e84: 681b ldr r3, [r3, #0] 8005e86: bb2b cbnz r3, 8005ed4 ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) ); 8005e88: 1d25 adds r5, r4, #4 8005e8a: 4628 mov r0, r5 8005e8c: f7fe fbe4 bl 8004658 prvAddTaskToReadyList( pxUnblockedTCB ); 8005e90: 6ae0 ldr r0, [r4, #44] @ 0x2c 8005e92: 4b15 ldr r3, [pc, #84] @ (8005ee8 ) 8005e94: 681b ldr r3, [r3, #0] 8005e96: 4298 cmp r0, r3 8005e98: d901 bls.n 8005e9e 8005e9a: 4b13 ldr r3, [pc, #76] @ (8005ee8 ) 8005e9c: 6018 str r0, [r3, #0] 8005e9e: eb00 0080 add.w r0, r0, r0, lsl #2 8005ea2: 4629 mov r1, r5 8005ea4: 4b11 ldr r3, [pc, #68] @ (8005eec ) 8005ea6: eb03 0080 add.w r0, r3, r0, lsl #2 8005eaa: f7fe fbb1 bl 8004610 if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 8005eae: 6ae2 ldr r2, [r4, #44] @ 0x2c 8005eb0: 4b0f ldr r3, [pc, #60] @ (8005ef0 ) 8005eb2: 681b ldr r3, [r3, #0] 8005eb4: 6adb ldr r3, [r3, #44] @ 0x2c 8005eb6: 429a cmp r2, r3 8005eb8: d911 bls.n 8005ede xYieldPending = pdTRUE; 8005eba: 2001 movs r0, #1 8005ebc: 4b0d ldr r3, [pc, #52] @ (8005ef4 ) 8005ebe: 6018 str r0, [r3, #0] } 8005ec0: bd38 pop {r3, r4, r5, pc} 8005ec2: f04f 0350 mov.w r3, #80 @ 0x50 8005ec6: f383 8811 msr BASEPRI, r3 8005eca: f3bf 8f6f isb sy 8005ece: f3bf 8f4f dsb sy configASSERT( pxUnblockedTCB ); 8005ed2: e7fe b.n 8005ed2 vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 8005ed4: 4629 mov r1, r5 8005ed6: 4808 ldr r0, [pc, #32] @ (8005ef8 ) 8005ed8: f7fe fb9a bl 8004610 8005edc: e7e7 b.n 8005eae xReturn = pdFALSE; 8005ede: 2000 movs r0, #0 return xReturn; 8005ee0: e7ee b.n 8005ec0 8005ee2: bf00 nop 8005ee4: 240128c8 .word 0x240128c8 8005ee8: 240128e8 .word 0x240128e8 8005eec: 24012964 .word 0x24012964 8005ef0: 24012dc4 .word 0x24012dc4 8005ef4: 240128dc .word 0x240128dc 8005ef8: 24012920 .word 0x24012920 08005efc : pxTimeOut->xOverflowCount = xNumOfOverflows; 8005efc: 4b03 ldr r3, [pc, #12] @ (8005f0c ) 8005efe: 681b ldr r3, [r3, #0] 8005f00: 6003 str r3, [r0, #0] pxTimeOut->xTimeOnEntering = xTickCount; 8005f02: 4b03 ldr r3, [pc, #12] @ (8005f10 ) 8005f04: 681b ldr r3, [r3, #0] 8005f06: 6043 str r3, [r0, #4] } 8005f08: 4770 bx lr 8005f0a: bf00 nop 8005f0c: 240128d8 .word 0x240128d8 8005f10: 240128ec .word 0x240128ec 08005f14 : { 8005f14: b5f8 push {r3, r4, r5, r6, r7, lr} configASSERT( pxTimeOut ); 8005f16: b1c8 cbz r0, 8005f4c 8005f18: 460c mov r4, r1 8005f1a: 4605 mov r5, r0 configASSERT( pxTicksToWait ); 8005f1c: b1f9 cbz r1, 8005f5e taskENTER_CRITICAL(); 8005f1e: f7fe fc19 bl 8004754 const TickType_t xConstTickCount = xTickCount; 8005f22: 4b1b ldr r3, [pc, #108] @ (8005f90 ) 8005f24: 6819 ldr r1, [r3, #0] const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering; 8005f26: 686b ldr r3, [r5, #4] 8005f28: 1ac8 subs r0, r1, r3 if( *pxTicksToWait == portMAX_DELAY ) 8005f2a: 6822 ldr r2, [r4, #0] 8005f2c: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 8005f30: d026 beq.n 8005f80 if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */ 8005f32: 4e18 ldr r6, [pc, #96] @ (8005f94 ) 8005f34: 6836 ldr r6, [r6, #0] 8005f36: 682f ldr r7, [r5, #0] 8005f38: 42b7 cmp r7, r6 8005f3a: d001 beq.n 8005f40 8005f3c: 428b cmp r3, r1 8005f3e: d924 bls.n 8005f8a else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */ 8005f40: 4282 cmp r2, r0 8005f42: d815 bhi.n 8005f70 *pxTicksToWait = 0; 8005f44: 2300 movs r3, #0 8005f46: 6023 str r3, [r4, #0] xReturn = pdTRUE; 8005f48: 2401 movs r4, #1 8005f4a: e01a b.n 8005f82 8005f4c: f04f 0350 mov.w r3, #80 @ 0x50 8005f50: f383 8811 msr BASEPRI, r3 8005f54: f3bf 8f6f isb sy 8005f58: f3bf 8f4f dsb sy configASSERT( pxTimeOut ); 8005f5c: e7fe b.n 8005f5c 8005f5e: f04f 0350 mov.w r3, #80 @ 0x50 8005f62: f383 8811 msr BASEPRI, r3 8005f66: f3bf 8f6f isb sy 8005f6a: f3bf 8f4f dsb sy configASSERT( pxTicksToWait ); 8005f6e: e7fe b.n 8005f6e *pxTicksToWait -= xElapsedTime; 8005f70: 1a5b subs r3, r3, r1 8005f72: 4413 add r3, r2 8005f74: 6023 str r3, [r4, #0] vTaskInternalSetTimeOutState( pxTimeOut ); 8005f76: 4628 mov r0, r5 8005f78: f7ff ffc0 bl 8005efc xReturn = pdFALSE; 8005f7c: 2400 movs r4, #0 8005f7e: e000 b.n 8005f82 xReturn = pdFALSE; 8005f80: 2400 movs r4, #0 taskEXIT_CRITICAL(); 8005f82: f7fe fc09 bl 8004798 } 8005f86: 4620 mov r0, r4 8005f88: bdf8 pop {r3, r4, r5, r6, r7, pc} xReturn = pdTRUE; 8005f8a: 2401 movs r4, #1 8005f8c: e7f9 b.n 8005f82 8005f8e: bf00 nop 8005f90: 240128ec .word 0x240128ec 8005f94: 240128d8 .word 0x240128d8 08005f98 : xYieldPending = pdTRUE; 8005f98: 4b01 ldr r3, [pc, #4] @ (8005fa0 ) 8005f9a: 2201 movs r2, #1 8005f9c: 601a str r2, [r3, #0] } 8005f9e: 4770 bx lr 8005fa0: 240128dc .word 0x240128dc 08005fa4 : xReturn = pxCurrentTCB; 8005fa4: 4b01 ldr r3, [pc, #4] @ (8005fac ) 8005fa6: 6818 ldr r0, [r3, #0] } 8005fa8: 4770 bx lr 8005faa: bf00 nop 8005fac: 24012dc4 .word 0x24012dc4 08005fb0 : if( xSchedulerRunning == pdFALSE ) 8005fb0: 4b05 ldr r3, [pc, #20] @ (8005fc8 ) 8005fb2: 681b ldr r3, [r3, #0] 8005fb4: b133 cbz r3, 8005fc4 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8005fb6: 4b05 ldr r3, [pc, #20] @ (8005fcc ) 8005fb8: 681b ldr r3, [r3, #0] 8005fba: b10b cbz r3, 8005fc0 xReturn = taskSCHEDULER_SUSPENDED; 8005fbc: 2000 movs r0, #0 } 8005fbe: 4770 bx lr xReturn = taskSCHEDULER_RUNNING; 8005fc0: 2002 movs r0, #2 8005fc2: 4770 bx lr xReturn = taskSCHEDULER_NOT_STARTED; 8005fc4: 2001 movs r0, #1 8005fc6: 4770 bx lr 8005fc8: 240128e4 .word 0x240128e4 8005fcc: 240128c8 .word 0x240128c8 08005fd0 : if( pxMutexHolder != NULL ) 8005fd0: 2800 cmp r0, #0 8005fd2: d03e beq.n 8006052 { 8005fd4: b538 push {r3, r4, r5, lr} 8005fd6: 4604 mov r4, r0 if( pxMutexHolderTCB->uxPriority < pxCurrentTCB->uxPriority ) 8005fd8: 6ac3 ldr r3, [r0, #44] @ 0x2c 8005fda: 4a20 ldr r2, [pc, #128] @ (800605c ) 8005fdc: 6812 ldr r2, [r2, #0] 8005fde: 6ad2 ldr r2, [r2, #44] @ 0x2c 8005fe0: 4293 cmp r3, r2 8005fe2: d22e bcs.n 8006042 if( ( listGET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL ) 8005fe4: 6982 ldr r2, [r0, #24] 8005fe6: 2a00 cmp r2, #0 8005fe8: db05 blt.n 8005ff6 listSET_LIST_ITEM_VALUE( &( pxMutexHolderTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8005fea: 4a1c ldr r2, [pc, #112] @ (800605c ) 8005fec: 6812 ldr r2, [r2, #0] 8005fee: 6ad2 ldr r2, [r2, #44] @ 0x2c 8005ff0: f1c2 0238 rsb r2, r2, #56 @ 0x38 8005ff4: 6182 str r2, [r0, #24] if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxMutexHolderTCB->uxPriority ] ), &( pxMutexHolderTCB->xStateListItem ) ) != pdFALSE ) 8005ff6: 6961 ldr r1, [r4, #20] 8005ff8: eb03 0383 add.w r3, r3, r3, lsl #2 8005ffc: 4a18 ldr r2, [pc, #96] @ (8006060 ) 8005ffe: eb02 0383 add.w r3, r2, r3, lsl #2 8006002: 4299 cmp r1, r3 8006004: d005 beq.n 8006012 pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 8006006: 4b15 ldr r3, [pc, #84] @ (800605c ) 8006008: 681b ldr r3, [r3, #0] 800600a: 6adb ldr r3, [r3, #44] @ 0x2c 800600c: 62e3 str r3, [r4, #44] @ 0x2c xReturn = pdTRUE; 800600e: 2001 movs r0, #1 } 8006010: bd38 pop {r3, r4, r5, pc} if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8006012: 1d25 adds r5, r4, #4 8006014: 4628 mov r0, r5 8006016: f7fe fb1f bl 8004658 pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 800601a: 4b10 ldr r3, [pc, #64] @ (800605c ) 800601c: 681b ldr r3, [r3, #0] 800601e: 6ad8 ldr r0, [r3, #44] @ 0x2c 8006020: 62e0 str r0, [r4, #44] @ 0x2c prvAddTaskToReadyList( pxMutexHolderTCB ); 8006022: 4b10 ldr r3, [pc, #64] @ (8006064 ) 8006024: 681b ldr r3, [r3, #0] 8006026: 4298 cmp r0, r3 8006028: d901 bls.n 800602e 800602a: 4b0e ldr r3, [pc, #56] @ (8006064 ) 800602c: 6018 str r0, [r3, #0] 800602e: eb00 0080 add.w r0, r0, r0, lsl #2 8006032: 4629 mov r1, r5 8006034: 4b0a ldr r3, [pc, #40] @ (8006060 ) 8006036: eb03 0080 add.w r0, r3, r0, lsl #2 800603a: f7fe fae9 bl 8004610 xReturn = pdTRUE; 800603e: 2001 movs r0, #1 8006040: e7e6 b.n 8006010 if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority ) 8006042: 6cc2 ldr r2, [r0, #76] @ 0x4c 8006044: 4b05 ldr r3, [pc, #20] @ (800605c ) 8006046: 681b ldr r3, [r3, #0] 8006048: 6adb ldr r3, [r3, #44] @ 0x2c 800604a: 429a cmp r2, r3 800604c: d303 bcc.n 8006056 BaseType_t xReturn = pdFALSE; 800604e: 2000 movs r0, #0 8006050: e7de b.n 8006010 8006052: 2000 movs r0, #0 } 8006054: 4770 bx lr xReturn = pdTRUE; 8006056: 2001 movs r0, #1 return xReturn; 8006058: e7da b.n 8006010 800605a: bf00 nop 800605c: 24012dc4 .word 0x24012dc4 8006060: 24012964 .word 0x24012964 8006064: 240128e8 .word 0x240128e8 08006068 : if( pxMutexHolder != NULL ) 8006068: 2800 cmp r0, #0 800606a: d03b beq.n 80060e4 { 800606c: b538 push {r3, r4, r5, lr} 800606e: 4604 mov r4, r0 configASSERT( pxTCB == pxCurrentTCB ); 8006070: 4b1e ldr r3, [pc, #120] @ (80060ec ) 8006072: 681b ldr r3, [r3, #0] 8006074: 4283 cmp r3, r0 8006076: d008 beq.n 800608a 8006078: f04f 0350 mov.w r3, #80 @ 0x50 800607c: f383 8811 msr BASEPRI, r3 8006080: f3bf 8f6f isb sy 8006084: f3bf 8f4f dsb sy 8006088: e7fe b.n 8006088 configASSERT( pxTCB->uxMutexesHeld ); 800608a: 6d03 ldr r3, [r0, #80] @ 0x50 800608c: b943 cbnz r3, 80060a0 800608e: f04f 0350 mov.w r3, #80 @ 0x50 8006092: f383 8811 msr BASEPRI, r3 8006096: f3bf 8f6f isb sy 800609a: f3bf 8f4f dsb sy 800609e: e7fe b.n 800609e ( pxTCB->uxMutexesHeld )--; 80060a0: 3b01 subs r3, #1 80060a2: 6503 str r3, [r0, #80] @ 0x50 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 80060a4: 6ac1 ldr r1, [r0, #44] @ 0x2c 80060a6: 6cc2 ldr r2, [r0, #76] @ 0x4c 80060a8: 4291 cmp r1, r2 80060aa: d01d beq.n 80060e8 if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 80060ac: b10b cbz r3, 80060b2 BaseType_t xReturn = pdFALSE; 80060ae: 2000 movs r0, #0 } 80060b0: bd38 pop {r3, r4, r5, pc} if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 80060b2: 1d05 adds r5, r0, #4 80060b4: 4628 mov r0, r5 80060b6: f7fe facf bl 8004658 pxTCB->uxPriority = pxTCB->uxBasePriority; 80060ba: 6ce0 ldr r0, [r4, #76] @ 0x4c 80060bc: 62e0 str r0, [r4, #44] @ 0x2c listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 80060be: f1c0 0338 rsb r3, r0, #56 @ 0x38 80060c2: 61a3 str r3, [r4, #24] prvAddTaskToReadyList( pxTCB ); 80060c4: 4b0a ldr r3, [pc, #40] @ (80060f0 ) 80060c6: 681b ldr r3, [r3, #0] 80060c8: 4298 cmp r0, r3 80060ca: d901 bls.n 80060d0 80060cc: 4b08 ldr r3, [pc, #32] @ (80060f0 ) 80060ce: 6018 str r0, [r3, #0] 80060d0: eb00 0080 add.w r0, r0, r0, lsl #2 80060d4: 4629 mov r1, r5 80060d6: 4b07 ldr r3, [pc, #28] @ (80060f4 ) 80060d8: eb03 0080 add.w r0, r3, r0, lsl #2 80060dc: f7fe fa98 bl 8004610 xReturn = pdTRUE; 80060e0: 2001 movs r0, #1 80060e2: e7e5 b.n 80060b0 BaseType_t xReturn = pdFALSE; 80060e4: 2000 movs r0, #0 } 80060e6: 4770 bx lr BaseType_t xReturn = pdFALSE; 80060e8: 2000 movs r0, #0 80060ea: e7e1 b.n 80060b0 80060ec: 24012dc4 .word 0x24012dc4 80060f0: 240128e8 .word 0x240128e8 80060f4: 24012964 .word 0x24012964 080060f8 : if( pxMutexHolder != NULL ) 80060f8: 2800 cmp r0, #0 80060fa: d046 beq.n 800618a { 80060fc: b538 push {r3, r4, r5, lr} 80060fe: 4604 mov r4, r0 configASSERT( pxTCB->uxMutexesHeld ); 8006100: 6d03 ldr r3, [r0, #80] @ 0x50 8006102: b943 cbnz r3, 8006116 8006104: f04f 0350 mov.w r3, #80 @ 0x50 8006108: f383 8811 msr BASEPRI, r3 800610c: f3bf 8f6f isb sy 8006110: f3bf 8f4f dsb sy 8006114: e7fe b.n 8006114 if( pxTCB->uxBasePriority < uxHighestPriorityWaitingTask ) 8006116: 6cc2 ldr r2, [r0, #76] @ 0x4c 8006118: 428a cmp r2, r1 800611a: d200 bcs.n 800611e uxPriorityToUse = uxHighestPriorityWaitingTask; 800611c: 460a mov r2, r1 if( pxTCB->uxPriority != uxPriorityToUse ) 800611e: 6ae1 ldr r1, [r4, #44] @ 0x2c 8006120: 4291 cmp r1, r2 8006122: d001 beq.n 8006128 if( pxTCB->uxMutexesHeld == uxOnlyOneMutexHeld ) 8006124: 2b01 cmp r3, #1 8006126: d000 beq.n 800612a } 8006128: bd38 pop {r3, r4, r5, pc} configASSERT( pxTCB != pxCurrentTCB ); 800612a: 4b18 ldr r3, [pc, #96] @ (800618c ) 800612c: 681b ldr r3, [r3, #0] 800612e: 42a3 cmp r3, r4 8006130: d022 beq.n 8006178 pxTCB->uxPriority = uxPriorityToUse; 8006132: 62e2 str r2, [r4, #44] @ 0x2c if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL ) 8006134: 69a3 ldr r3, [r4, #24] 8006136: 2b00 cmp r3, #0 8006138: db02 blt.n 8006140 listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriorityToUse ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 800613a: f1c2 0238 rsb r2, r2, #56 @ 0x38 800613e: 61a2 str r2, [r4, #24] if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ uxPriorityUsedOnEntry ] ), &( pxTCB->xStateListItem ) ) != pdFALSE ) 8006140: 6962 ldr r2, [r4, #20] 8006142: eb01 0181 add.w r1, r1, r1, lsl #2 8006146: 4b12 ldr r3, [pc, #72] @ (8006190 ) 8006148: eb03 0381 add.w r3, r3, r1, lsl #2 800614c: 429a cmp r2, r3 800614e: d1eb bne.n 8006128 if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8006150: 1d25 adds r5, r4, #4 8006152: 4628 mov r0, r5 8006154: f7fe fa80 bl 8004658 prvAddTaskToReadyList( pxTCB ); 8006158: 6ae0 ldr r0, [r4, #44] @ 0x2c 800615a: 4b0e ldr r3, [pc, #56] @ (8006194 ) 800615c: 681b ldr r3, [r3, #0] 800615e: 4298 cmp r0, r3 8006160: d901 bls.n 8006166 8006162: 4b0c ldr r3, [pc, #48] @ (8006194 ) 8006164: 6018 str r0, [r3, #0] 8006166: eb00 0080 add.w r0, r0, r0, lsl #2 800616a: 4629 mov r1, r5 800616c: 4b08 ldr r3, [pc, #32] @ (8006190 ) 800616e: eb03 0080 add.w r0, r3, r0, lsl #2 8006172: f7fe fa4d bl 8004610 } 8006176: e7d7 b.n 8006128 8006178: f04f 0350 mov.w r3, #80 @ 0x50 800617c: f383 8811 msr BASEPRI, r3 8006180: f3bf 8f6f isb sy 8006184: f3bf 8f4f dsb sy configASSERT( pxTCB != pxCurrentTCB ); 8006188: e7fe b.n 8006188 800618a: 4770 bx lr 800618c: 24012dc4 .word 0x24012dc4 8006190: 24012964 .word 0x24012964 8006194: 240128e8 .word 0x240128e8 08006198 : if( pxCurrentTCB != NULL ) 8006198: 4b05 ldr r3, [pc, #20] @ (80061b0 ) 800619a: 681b ldr r3, [r3, #0] 800619c: b123 cbz r3, 80061a8 ( pxCurrentTCB->uxMutexesHeld )++; 800619e: 4b04 ldr r3, [pc, #16] @ (80061b0 ) 80061a0: 681a ldr r2, [r3, #0] 80061a2: 6d13 ldr r3, [r2, #80] @ 0x50 80061a4: 3301 adds r3, #1 80061a6: 6513 str r3, [r2, #80] @ 0x50 return pxCurrentTCB; 80061a8: 4b01 ldr r3, [pc, #4] @ (80061b0 ) 80061aa: 6818 ldr r0, [r3, #0] } 80061ac: 4770 bx lr 80061ae: bf00 nop 80061b0: 24012dc4 .word 0x24012dc4 080061b4 : the timer with the nearest expiry time will expire. If there are no active timers then just set the next expire time to 0. That will cause this task to unblock when the tick count overflows, at which point the timer lists will be switched and the next expiry time can be re-assessed. */ *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList ); 80061b4: 4b06 ldr r3, [pc, #24] @ (80061d0 ) 80061b6: 681a ldr r2, [r3, #0] 80061b8: 6813 ldr r3, [r2, #0] 80061ba: b92b cbnz r3, 80061c8 80061bc: 2301 movs r3, #1 80061be: 6003 str r3, [r0, #0] if( *pxListWasEmpty == pdFALSE ) 80061c0: b923 cbnz r3, 80061cc { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 80061c2: 68d3 ldr r3, [r2, #12] 80061c4: 6818 ldr r0, [r3, #0] 80061c6: 4770 bx lr *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList ); 80061c8: 2300 movs r3, #0 80061ca: e7f8 b.n 80061be } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 80061cc: 2000 movs r0, #0 } return xNextExpireTime; } 80061ce: 4770 bx lr 80061d0: 24012ec8 .word 0x24012ec8 080061d4 : return xTimeNow; } /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 80061d4: b508 push {r3, lr} BaseType_t xProcessTimerNow = pdFALSE; listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime ); 80061d6: 6041 str r1, [r0, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 80061d8: 6100 str r0, [r0, #16] if( xNextExpiryTime <= xTimeNow ) 80061da: 4291 cmp r1, r2 80061dc: d80c bhi.n 80061f8 { /* Has the expiry time elapsed between the command to start/reset a timer was issued, and the time the command was processed? */ if( ( ( TickType_t ) ( xTimeNow - xCommandTime ) ) >= pxTimer->xTimerPeriodInTicks ) /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 80061de: 1ad2 subs r2, r2, r3 80061e0: 6983 ldr r3, [r0, #24] 80061e2: 429a cmp r2, r3 80061e4: d301 bcc.n 80061ea { /* The time between a command being issued and the command being processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; 80061e6: 2001 movs r0, #1 vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); } } return xProcessTimerNow; } 80061e8: bd08 pop {r3, pc} vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 80061ea: 1d01 adds r1, r0, #4 80061ec: 4b0b ldr r3, [pc, #44] @ (800621c ) 80061ee: 6818 ldr r0, [r3, #0] 80061f0: f7fe fa19 bl 8004626 BaseType_t xProcessTimerNow = pdFALSE; 80061f4: 2000 movs r0, #0 80061f6: e7f7 b.n 80061e8 if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 80061f8: 429a cmp r2, r3 80061fa: bf2c ite cs 80061fc: 2200 movcs r2, #0 80061fe: 2201 movcc r2, #1 8006200: 4299 cmp r1, r3 8006202: bf38 it cc 8006204: 2200 movcc r2, #0 8006206: b10a cbz r2, 800620c xProcessTimerNow = pdTRUE; 8006208: 2001 movs r0, #1 return xProcessTimerNow; 800620a: e7ed b.n 80061e8 vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 800620c: 1d01 adds r1, r0, #4 800620e: 4b04 ldr r3, [pc, #16] @ (8006220 ) 8006210: 6818 ldr r0, [r3, #0] 8006212: f7fe fa08 bl 8004626 BaseType_t xProcessTimerNow = pdFALSE; 8006216: 2000 movs r0, #0 8006218: e7e6 b.n 80061e8 800621a: bf00 nop 800621c: 24012ec4 .word 0x24012ec4 8006220: 24012ec8 .word 0x24012ec8 08006224 : pxOverflowTimerList = pxTemp; } /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 8006224: b530 push {r4, r5, lr} 8006226: b083 sub sp, #12 /* Check that the list from which active timers are referenced, and the queue used to communicate with the timer service, have been initialised. */ taskENTER_CRITICAL(); 8006228: f7fe fa94 bl 8004754 { if( xTimerQueue == NULL ) 800622c: 4b11 ldr r3, [pc, #68] @ (8006274 ) 800622e: 681b ldr r3, [r3, #0] 8006230: b11b cbz r3, 800623a else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8006232: f7fe fab1 bl 8004798 } 8006236: b003 add sp, #12 8006238: bd30 pop {r4, r5, pc} vListInitialise( &xActiveTimerList1 ); 800623a: 4d0f ldr r5, [pc, #60] @ (8006278 ) 800623c: 4628 mov r0, r5 800623e: f7fe f9d9 bl 80045f4 vListInitialise( &xActiveTimerList2 ); 8006242: 4c0e ldr r4, [pc, #56] @ (800627c ) 8006244: 4620 mov r0, r4 8006246: f7fe f9d5 bl 80045f4 pxCurrentTimerList = &xActiveTimerList1; 800624a: 4b0d ldr r3, [pc, #52] @ (8006280 ) 800624c: 601d str r5, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 800624e: 4b0d ldr r3, [pc, #52] @ (8006284 ) 8006250: 601c str r4, [r3, #0] xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue ); 8006252: 2300 movs r3, #0 8006254: 9300 str r3, [sp, #0] 8006256: 4b0c ldr r3, [pc, #48] @ (8006288 ) 8006258: 4a0c ldr r2, [pc, #48] @ (800628c ) 800625a: 2110 movs r1, #16 800625c: 200a movs r0, #10 800625e: f7fe fcc8 bl 8004bf2 8006262: 4b04 ldr r3, [pc, #16] @ (8006274 ) 8006264: 6018 str r0, [r3, #0] if( xTimerQueue != NULL ) 8006266: 2800 cmp r0, #0 8006268: d0e3 beq.n 8006232 vQueueAddToRegistry( xTimerQueue, "TmrQ" ); 800626a: 4909 ldr r1, [pc, #36] @ (8006290 ) 800626c: f7ff f95c bl 8005528 8006270: e7df b.n 8006232 8006272: bf00 nop 8006274: 24012ec0 .word 0x24012ec0 8006278: 24012ee0 .word 0x24012ee0 800627c: 24012ecc .word 0x24012ecc 8006280: 24012ec8 .word 0x24012ec8 8006284: 24012ec4 .word 0x24012ec4 8006288: 24012dc8 .word 0x24012dc8 800628c: 24012e18 .word 0x24012e18 8006290: 08014654 .word 0x08014654 08006294 : { 8006294: b510 push {r4, lr} 8006296: b088 sub sp, #32 prvCheckForValidListAndQueue(); 8006298: f7ff ffc4 bl 8006224 if( xTimerQueue != NULL ) 800629c: 4b12 ldr r3, [pc, #72] @ (80062e8 ) 800629e: 681b ldr r3, [r3, #0] 80062a0: b1cb cbz r3, 80062d6 StaticTask_t *pxTimerTaskTCBBuffer = NULL; 80062a2: 2400 movs r4, #0 80062a4: 9405 str r4, [sp, #20] StackType_t *pxTimerTaskStackBuffer = NULL; 80062a6: 9406 str r4, [sp, #24] vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize ); 80062a8: aa07 add r2, sp, #28 80062aa: a906 add r1, sp, #24 80062ac: a805 add r0, sp, #20 80062ae: f7fe f871 bl 8004394 xTimerTaskHandle = xTaskCreateStatic( prvTimerTask, 80062b2: 9b05 ldr r3, [sp, #20] 80062b4: 9302 str r3, [sp, #8] 80062b6: 9b06 ldr r3, [sp, #24] 80062b8: 9301 str r3, [sp, #4] 80062ba: 2302 movs r3, #2 80062bc: 9300 str r3, [sp, #0] 80062be: 4623 mov r3, r4 80062c0: 9a07 ldr r2, [sp, #28] 80062c2: 490a ldr r1, [pc, #40] @ (80062ec ) 80062c4: 480a ldr r0, [pc, #40] @ (80062f0 ) 80062c6: f7ff fb37 bl 8005938 80062ca: 4b0a ldr r3, [pc, #40] @ (80062f4 ) 80062cc: 6018 str r0, [r3, #0] if( xTimerTaskHandle != NULL ) 80062ce: b110 cbz r0, 80062d6 } 80062d0: 2001 movs r0, #1 80062d2: b008 add sp, #32 80062d4: bd10 pop {r4, pc} 80062d6: f04f 0350 mov.w r3, #80 @ 0x50 80062da: f383 8811 msr BASEPRI, r3 80062de: f3bf 8f6f isb sy 80062e2: f3bf 8f4f dsb sy configASSERT( xReturn ); 80062e6: e7fe b.n 80062e6 80062e8: 24012ec0 .word 0x24012ec0 80062ec: 0801465c .word 0x0801465c 80062f0: 080065fd .word 0x080065fd 80062f4: 24012ebc .word 0x24012ebc 080062f8 : configASSERT( xTimer ); 80062f8: b1b8 cbz r0, 800632a 80062fa: 469c mov ip, r3 80062fc: 4603 mov r3, r0 if( xTimerQueue != NULL ) 80062fe: 4818 ldr r0, [pc, #96] @ (8006360 ) 8006300: 6800 ldr r0, [r0, #0] 8006302: b358 cbz r0, 800635c { 8006304: b500 push {lr} 8006306: b085 sub sp, #20 xMessage.xMessageID = xCommandID; 8006308: 9100 str r1, [sp, #0] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 800630a: 9201 str r2, [sp, #4] xMessage.u.xTimerParameters.pxTimer = xTimer; 800630c: 9302 str r3, [sp, #8] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 800630e: 2905 cmp r1, #5 8006310: dc1c bgt.n 800634c if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 8006312: f7ff fe4d bl 8005fb0 8006316: 2802 cmp r0, #2 8006318: d010 beq.n 800633c xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 800631a: 2300 movs r3, #0 800631c: 461a mov r2, r3 800631e: 4669 mov r1, sp 8006320: 480f ldr r0, [pc, #60] @ (8006360 ) 8006322: 6800 ldr r0, [r0, #0] 8006324: f7fe fd1d bl 8004d62 8006328: e015 b.n 8006356 800632a: f04f 0350 mov.w r3, #80 @ 0x50 800632e: f383 8811 msr BASEPRI, r3 8006332: f3bf 8f6f isb sy 8006336: f3bf 8f4f dsb sy configASSERT( xTimer ); 800633a: e7fe b.n 800633a xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 800633c: 2300 movs r3, #0 800633e: 9a06 ldr r2, [sp, #24] 8006340: 4669 mov r1, sp 8006342: 4807 ldr r0, [pc, #28] @ (8006360 ) 8006344: 6800 ldr r0, [r0, #0] 8006346: f7fe fd0c bl 8004d62 800634a: e004 b.n 8006356 xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 800634c: 2300 movs r3, #0 800634e: 4662 mov r2, ip 8006350: 4669 mov r1, sp 8006352: f7fe fe10 bl 8004f76 } 8006356: b005 add sp, #20 8006358: f85d fb04 ldr.w pc, [sp], #4 BaseType_t xReturn = pdFAIL; 800635c: 2000 movs r0, #0 } 800635e: 4770 bx lr 8006360: 24012ec0 .word 0x24012ec0 08006364 : { 8006364: b570 push {r4, r5, r6, lr} 8006366: b082 sub sp, #8 while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) 8006368: 4b1b ldr r3, [pc, #108] @ (80063d8 ) 800636a: 681b ldr r3, [r3, #0] 800636c: 681a ldr r2, [r3, #0] 800636e: b362 cbz r2, 80063ca xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 8006370: 68db ldr r3, [r3, #12] 8006372: 681e ldr r6, [r3, #0] pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8006374: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 8006376: 1d25 adds r5, r4, #4 8006378: 4628 mov r0, r5 800637a: f7fe f96d bl 8004658 pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 800637e: 6a23 ldr r3, [r4, #32] 8006380: 4620 mov r0, r4 8006382: 4798 blx r3 if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 8006384: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006388: f013 0f04 tst.w r3, #4 800638c: d0ec beq.n 8006368 xReloadTime = ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ); 800638e: 69a3 ldr r3, [r4, #24] 8006390: 4433 add r3, r6 if( xReloadTime > xNextExpireTime ) 8006392: 429e cmp r6, r3 8006394: d207 bcs.n 80063a6 listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 8006396: 6063 str r3, [r4, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 8006398: 6124 str r4, [r4, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 800639a: 4629 mov r1, r5 800639c: 4b0e ldr r3, [pc, #56] @ (80063d8 ) 800639e: 6818 ldr r0, [r3, #0] 80063a0: f7fe f941 bl 8004626 80063a4: e7e0 b.n 8006368 xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 80063a6: 2100 movs r1, #0 80063a8: 9100 str r1, [sp, #0] 80063aa: 460b mov r3, r1 80063ac: 4632 mov r2, r6 80063ae: 4620 mov r0, r4 80063b0: f7ff ffa2 bl 80062f8 configASSERT( xResult ); 80063b4: 2800 cmp r0, #0 80063b6: d1d7 bne.n 8006368 80063b8: f04f 0350 mov.w r3, #80 @ 0x50 80063bc: f383 8811 msr BASEPRI, r3 80063c0: f3bf 8f6f isb sy 80063c4: f3bf 8f4f dsb sy 80063c8: e7fe b.n 80063c8 pxCurrentTimerList = pxOverflowTimerList; 80063ca: 4a04 ldr r2, [pc, #16] @ (80063dc ) 80063cc: 6810 ldr r0, [r2, #0] 80063ce: 4902 ldr r1, [pc, #8] @ (80063d8 ) 80063d0: 6008 str r0, [r1, #0] pxOverflowTimerList = pxTemp; 80063d2: 6013 str r3, [r2, #0] } 80063d4: b002 add sp, #8 80063d6: bd70 pop {r4, r5, r6, pc} 80063d8: 24012ec8 .word 0x24012ec8 80063dc: 24012ec4 .word 0x24012ec4 080063e0 : { 80063e0: b538 push {r3, r4, r5, lr} 80063e2: 4605 mov r5, r0 xTimeNow = xTaskGetTickCount(); 80063e4: f7ff fb74 bl 8005ad0 80063e8: 4604 mov r4, r0 if( xTimeNow < xLastTime ) 80063ea: 4b07 ldr r3, [pc, #28] @ (8006408 ) 80063ec: 681b ldr r3, [r3, #0] 80063ee: 4283 cmp r3, r0 80063f0: d805 bhi.n 80063fe *pxTimerListsWereSwitched = pdFALSE; 80063f2: 2300 movs r3, #0 80063f4: 602b str r3, [r5, #0] xLastTime = xTimeNow; 80063f6: 4b04 ldr r3, [pc, #16] @ (8006408 ) 80063f8: 601c str r4, [r3, #0] } 80063fa: 4620 mov r0, r4 80063fc: bd38 pop {r3, r4, r5, pc} prvSwitchTimerLists(); 80063fe: f7ff ffb1 bl 8006364 *pxTimerListsWereSwitched = pdTRUE; 8006402: 2301 movs r3, #1 8006404: 602b str r3, [r5, #0] 8006406: e7f6 b.n 80063f6 8006408: 24012eb8 .word 0x24012eb8 0800640c : { 800640c: b570 push {r4, r5, r6, lr} 800640e: b082 sub sp, #8 8006410: 4606 mov r6, r0 8006412: 460d mov r5, r1 Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ 8006414: 4917 ldr r1, [pc, #92] @ (8006474 ) 8006416: 6809 ldr r1, [r1, #0] 8006418: 68c9 ldr r1, [r1, #12] 800641a: 68cc ldr r4, [r1, #12] ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 800641c: 1d20 adds r0, r4, #4 800641e: f7fe f91b bl 8004658 if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 8006422: f894 c028 ldrb.w ip, [r4, #40] @ 0x28 8006426: f01c 0f04 tst.w ip, #4 800642a: d108 bne.n 800643e pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 800642c: f02c 0c01 bic.w ip, ip, #1 8006430: f884 c028 strb.w ip, [r4, #40] @ 0x28 pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 8006434: 6a23 ldr r3, [r4, #32] 8006436: 4620 mov r0, r4 8006438: 4798 blx r3 } 800643a: b002 add sp, #8 800643c: bd70 pop {r4, r5, r6, pc} if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) != pdFALSE ) 800643e: 69a1 ldr r1, [r4, #24] 8006440: 4633 mov r3, r6 8006442: 462a mov r2, r5 8006444: 4431 add r1, r6 8006446: 4620 mov r0, r4 8006448: f7ff fec4 bl 80061d4 800644c: 2800 cmp r0, #0 800644e: d0f1 beq.n 8006434 xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 8006450: 2100 movs r1, #0 8006452: 9100 str r1, [sp, #0] 8006454: 460b mov r3, r1 8006456: 4632 mov r2, r6 8006458: 4620 mov r0, r4 800645a: f7ff ff4d bl 80062f8 configASSERT( xResult ); 800645e: 2800 cmp r0, #0 8006460: d1e8 bne.n 8006434 8006462: f04f 0350 mov.w r3, #80 @ 0x50 8006466: f383 8811 msr BASEPRI, r3 800646a: f3bf 8f6f isb sy 800646e: f3bf 8f4f dsb sy 8006472: e7fe b.n 8006472 8006474: 24012ec8 .word 0x24012ec8 08006478 : { 8006478: b570 push {r4, r5, r6, lr} 800647a: b082 sub sp, #8 800647c: 4606 mov r6, r0 800647e: 460c mov r4, r1 vTaskSuspendAll(); 8006480: f7ff fb1e bl 8005ac0 xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); 8006484: a801 add r0, sp, #4 8006486: f7ff ffab bl 80063e0 if( xTimerListsWereSwitched == pdFALSE ) 800648a: 9b01 ldr r3, [sp, #4] 800648c: bb3b cbnz r3, 80064de 800648e: 4605 mov r5, r0 if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 8006490: 42b0 cmp r0, r6 8006492: bf28 it cs 8006494: 2c00 cmpcs r4, #0 8006496: d019 beq.n 80064cc if( xListWasEmpty != pdFALSE ) 8006498: b124 cbz r4, 80064a4 xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList ); 800649a: 4a13 ldr r2, [pc, #76] @ (80064e8 ) 800649c: 6812 ldr r2, [r2, #0] 800649e: 6812 ldr r2, [r2, #0] 80064a0: b9da cbnz r2, 80064da 80064a2: 2401 movs r4, #1 vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty ); 80064a4: 4622 mov r2, r4 80064a6: 1b71 subs r1, r6, r5 80064a8: 4b10 ldr r3, [pc, #64] @ (80064ec ) 80064aa: 6818 ldr r0, [r3, #0] 80064ac: f7ff f87c bl 80055a8 if( xTaskResumeAll() == pdFALSE ) 80064b0: f7ff fba8 bl 8005c04 80064b4: b9a8 cbnz r0, 80064e2 portYIELD_WITHIN_API(); 80064b6: f04f 23e0 mov.w r3, #3758153728 @ 0xe000e000 80064ba: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80064be: f8c3 2d04 str.w r2, [r3, #3332] @ 0xd04 80064c2: f3bf 8f4f dsb sy 80064c6: f3bf 8f6f isb sy 80064ca: e00a b.n 80064e2 ( void ) xTaskResumeAll(); 80064cc: f7ff fb9a bl 8005c04 prvProcessExpiredTimer( xNextExpireTime, xTimeNow ); 80064d0: 4629 mov r1, r5 80064d2: 4630 mov r0, r6 80064d4: f7ff ff9a bl 800640c 80064d8: e003 b.n 80064e2 xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList ); 80064da: 461c mov r4, r3 80064dc: e7e2 b.n 80064a4 ( void ) xTaskResumeAll(); 80064de: f7ff fb91 bl 8005c04 } 80064e2: b002 add sp, #8 80064e4: bd70 pop {r4, r5, r6, pc} 80064e6: bf00 nop 80064e8: 24012ec4 .word 0x24012ec4 80064ec: 24012ec0 .word 0x24012ec0 080064f0 : { 80064f0: b510 push {r4, lr} 80064f2: b088 sub sp, #32 while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ 80064f4: e002 b.n 80064fc if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 80064f6: 9b04 ldr r3, [sp, #16] 80064f8: 2b00 cmp r3, #0 80064fa: da0f bge.n 800651c while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ 80064fc: 2200 movs r2, #0 80064fe: a904 add r1, sp, #16 8006500: 4b3d ldr r3, [pc, #244] @ (80065f8 ) 8006502: 6818 ldr r0, [r3, #0] 8006504: f7fe fdf7 bl 80050f6 8006508: 2800 cmp r0, #0 800650a: d073 beq.n 80065f4 if( xMessage.xMessageID < ( BaseType_t ) 0 ) 800650c: 9b04 ldr r3, [sp, #16] 800650e: 2b00 cmp r3, #0 8006510: daf1 bge.n 80064f6 pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 ); 8006512: 9907 ldr r1, [sp, #28] 8006514: 9806 ldr r0, [sp, #24] 8006516: 9b05 ldr r3, [sp, #20] 8006518: 4798 blx r3 800651a: e7ec b.n 80064f6 pxTimer = xMessage.u.xTimerParameters.pxTimer; 800651c: 9c06 ldr r4, [sp, #24] if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */ 800651e: 6963 ldr r3, [r4, #20] 8006520: b113 cbz r3, 8006528 ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 8006522: 1d20 adds r0, r4, #4 8006524: f7fe f898 bl 8004658 xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); 8006528: a803 add r0, sp, #12 800652a: f7ff ff59 bl 80063e0 switch( xMessage.xMessageID ) 800652e: 9b04 ldr r3, [sp, #16] 8006530: 2b09 cmp r3, #9 8006532: d8e3 bhi.n 80064fc 8006534: e8df f003 tbb [pc, r3] 8006538: 30050505 .word 0x30050505 800653c: 05055037 .word 0x05055037 8006540: 3730 .short 0x3730 pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; 8006542: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006546: f043 0301 orr.w r3, r3, #1 800654a: f884 3028 strb.w r3, [r4, #40] @ 0x28 if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE ) 800654e: 9b05 ldr r3, [sp, #20] 8006550: 69a1 ldr r1, [r4, #24] 8006552: 4602 mov r2, r0 8006554: 4419 add r1, r3 8006556: 4620 mov r0, r4 8006558: f7ff fe3c bl 80061d4 800655c: 2800 cmp r0, #0 800655e: d0cd beq.n 80064fc pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 8006560: 6a23 ldr r3, [r4, #32] 8006562: 4620 mov r0, r4 8006564: 4798 blx r3 if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 8006566: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 800656a: f013 0f04 tst.w r3, #4 800656e: d0c5 beq.n 80064fc xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 8006570: 69a2 ldr r2, [r4, #24] 8006572: 2100 movs r1, #0 8006574: 9100 str r1, [sp, #0] 8006576: 460b mov r3, r1 8006578: 9805 ldr r0, [sp, #20] 800657a: 4402 add r2, r0 800657c: 4620 mov r0, r4 800657e: f7ff febb bl 80062f8 configASSERT( xResult ); 8006582: 2800 cmp r0, #0 8006584: d1ba bne.n 80064fc 8006586: f04f 0350 mov.w r3, #80 @ 0x50 800658a: f383 8811 msr BASEPRI, r3 800658e: f3bf 8f6f isb sy 8006592: f3bf 8f4f dsb sy 8006596: e7fe b.n 8006596 pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 8006598: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 800659c: f023 0301 bic.w r3, r3, #1 80065a0: f884 3028 strb.w r3, [r4, #40] @ 0x28 break; 80065a4: e7aa b.n 80064fc pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; 80065a6: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 80065aa: f043 0301 orr.w r3, r3, #1 80065ae: f884 3028 strb.w r3, [r4, #40] @ 0x28 pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 80065b2: 9905 ldr r1, [sp, #20] 80065b4: 61a1 str r1, [r4, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 80065b6: b131 cbz r1, 80065c6 ( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow ); 80065b8: 4603 mov r3, r0 80065ba: 4602 mov r2, r0 80065bc: 4401 add r1, r0 80065be: 4620 mov r0, r4 80065c0: f7ff fe08 bl 80061d4 break; 80065c4: e79a b.n 80064fc 80065c6: f04f 0350 mov.w r3, #80 @ 0x50 80065ca: f383 8811 msr BASEPRI, r3 80065ce: f3bf 8f6f isb sy 80065d2: f3bf 8f4f dsb sy configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 80065d6: e7fe b.n 80065d6 if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 ) 80065d8: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 80065dc: f013 0f02 tst.w r3, #2 80065e0: d004 beq.n 80065ec pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 80065e2: f023 0301 bic.w r3, r3, #1 80065e6: f884 3028 strb.w r3, [r4, #40] @ 0x28 80065ea: e787 b.n 80064fc vPortFree( pxTimer ); 80065ec: 4620 mov r0, r4 80065ee: f7fd ffc3 bl 8004578 80065f2: e783 b.n 80064fc } 80065f4: b008 add sp, #32 80065f6: bd10 pop {r4, pc} 80065f8: 24012ec0 .word 0x24012ec0 080065fc : { 80065fc: b500 push {lr} 80065fe: b083 sub sp, #12 xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty ); 8006600: a801 add r0, sp, #4 8006602: f7ff fdd7 bl 80061b4 prvProcessTimerOrBlockTask( xNextExpireTime, xListWasEmpty ); 8006606: 9901 ldr r1, [sp, #4] 8006608: f7ff ff36 bl 8006478 prvProcessReceivedCommands(); 800660c: f7ff ff70 bl 80064f0 for( ;; ) 8006610: e7f6 b.n 8006600 08006612 : * @param apimsg a struct containing the function to call and its parameters * @return ERR_OK if the function was called, another err_t if not */ static err_t netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg) { 8006612: b510 push {r4, lr} 8006614: 460c mov r4, r1 err_t err; #ifdef LWIP_DEBUG /* catch functions that don't set err */ apimsg->err = ERR_VAL; 8006616: 23fa movs r3, #250 @ 0xfa 8006618: 710b strb r3, [r1, #4] #if LWIP_NETCONN_SEM_PER_THREAD apimsg->op_completed_sem = LWIP_NETCONN_THREAD_SEM_GET(); #endif /* LWIP_NETCONN_SEM_PER_THREAD */ err = tcpip_send_msg_wait_sem(fn, apimsg, LWIP_API_MSG_SEM(apimsg)); 800661a: 680a ldr r2, [r1, #0] 800661c: 320c adds r2, #12 800661e: f00a ff41 bl 80114a4 if (err == ERR_OK) { 8006622: b100 cbz r0, 8006626 return apimsg->err; } return err; } 8006624: bd10 pop {r4, pc} return apimsg->err; 8006626: f994 0004 ldrsb.w r0, [r4, #4] 800662a: e7fb b.n 8006624 0800662c : } #if LWIP_TCP static err_t netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg *msg) { 800662c: b510 push {r4, lr} LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 800662e: b160 cbz r0, 800664a 8006630: 460c mov r4, r1 8006632: 4611 mov r1, r2 8006634: 7803 ldrb r3, [r0, #0] 8006636: f003 03f0 and.w r3, r3, #240 @ 0xf0 800663a: 2b10 cmp r3, #16 800663c: d105 bne.n 800664a NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); msg->conn = conn; 800663e: 6010 str r0, [r2, #0] msg->msg.r.len = len; 8006640: 6094 str r4, [r2, #8] return netconn_apimsg(lwip_netconn_do_recv, msg); 8006642: 4807 ldr r0, [pc, #28] @ (8006660 ) 8006644: f7ff ffe5 bl 8006612 } 8006648: bd10 pop {r4, pc} LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 800664a: 4b06 ldr r3, [pc, #24] @ (8006664 ) 800664c: f240 22a7 movw r2, #679 @ 0x2a7 8006650: 4905 ldr r1, [pc, #20] @ (8006668 ) 8006652: 4806 ldr r0, [pc, #24] @ (800666c ) 8006654: f00c fed8 bl 8013408 8006658: f06f 000f mvn.w r0, #15 800665c: e7f4 b.n 8006648 800665e: bf00 nop 8006660: 08007c13 .word 0x08007c13 8006664: 08014664 .word 0x08014664 8006668: 080146c8 .word 0x080146c8 800666c: 080144e8 .word 0x080144e8 08006670 : * @param how fully close or only shutdown one side? * @return ERR_OK if the netconn was closed, any other err_t on error */ static err_t netconn_close_shutdown(struct netconn *conn, u8_t how) { 8006670: b500 push {lr} 8006672: b089 sub sp, #36 @ 0x24 API_MSG_VAR_DECLARE(msg); err_t err; LWIP_UNUSED_ARG(how); LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;); 8006674: b160 cbz r0, 8006690 API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8006676: 9000 str r0, [sp, #0] #if LWIP_TCP /* shutting down both ends is the same as closing */ API_MSG_VAR_REF(msg).msg.sd.shut = how; 8006678: f88d 1008 strb.w r1, [sp, #8] #if LWIP_SO_SNDTIMEO || LWIP_SO_LINGER /* get the time we started, which is later compared to sys_now() + conn->send_timeout */ API_MSG_VAR_REF(msg).msg.sd.time_started = sys_now(); #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ API_MSG_VAR_REF(msg).msg.sd.polls_left = 800667c: 2329 movs r3, #41 @ 0x29 800667e: f88d 3009 strb.w r3, [sp, #9] ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ #endif /* LWIP_TCP */ err = netconn_apimsg(lwip_netconn_do_close, &API_MSG_VAR_REF(msg)); 8006682: 4669 mov r1, sp 8006684: 4807 ldr r0, [pc, #28] @ (80066a4 ) 8006686: f7ff ffc4 bl 8006612 API_MSG_VAR_FREE(msg); return err; } 800668a: b009 add sp, #36 @ 0x24 800668c: f85d fb04 ldr.w pc, [sp], #4 LWIP_ERROR("netconn_close: invalid conn", (conn != NULL), return ERR_ARG;); 8006690: 4b05 ldr r3, [pc, #20] @ (80066a8 ) 8006692: f240 4247 movw r2, #1095 @ 0x447 8006696: 4905 ldr r1, [pc, #20] @ (80066ac ) 8006698: 4805 ldr r0, [pc, #20] @ (80066b0 ) 800669a: f00c feb5 bl 8013408 800669e: f06f 000f mvn.w r0, #15 80066a2: e7f2 b.n 800668a 80066a4: 08007db9 .word 0x08007db9 80066a8: 08014664 .word 0x08014664 80066ac: 080146ec .word 0x080146ec 80066b0: 080144e8 .word 0x080144e8 080066b4 : { 80066b4: b570 push {r4, r5, r6, lr} 80066b6: b088 sub sp, #32 80066b8: 460c mov r4, r1 conn = netconn_alloc(t, callback); 80066ba: 4611 mov r1, r2 80066bc: f001 f878 bl 80077b0 if (conn != NULL) { 80066c0: 4605 mov r5, r0 80066c2: b138 cbz r0, 80066d4 API_MSG_VAR_REF(msg).msg.n.proto = proto; 80066c4: f88d 4008 strb.w r4, [sp, #8] API_MSG_VAR_REF(msg).conn = conn; 80066c8: 9000 str r0, [sp, #0] err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg)); 80066ca: 4669 mov r1, sp 80066cc: 4820 ldr r0, [pc, #128] @ (8006750 ) 80066ce: f7ff ffa0 bl 8006612 if (err != ERR_OK) { 80066d2: b910 cbnz r0, 80066da } 80066d4: 4628 mov r0, r5 80066d6: b008 add sp, #32 80066d8: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL); 80066da: 686b ldr r3, [r5, #4] 80066dc: b12b cbz r3, 80066ea 80066de: 4b1d ldr r3, [pc, #116] @ (8006754 ) 80066e0: 22a3 movs r2, #163 @ 0xa3 80066e2: 491d ldr r1, [pc, #116] @ (8006758 ) 80066e4: 481d ldr r0, [pc, #116] @ (800675c ) 80066e6: f00c fe8f bl 8013408 LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); 80066ea: f105 0410 add.w r4, r5, #16 80066ee: 4620 mov r0, r4 80066f0: f006 fc37 bl 800cf62 80066f4: b1b0 cbz r0, 8006724 LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); 80066f6: f105 0014 add.w r0, r5, #20 80066fa: f006 fc32 bl 800cf62 80066fe: b9c0 cbnz r0, 8006732 LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); 8006700: f105 060c add.w r6, r5, #12 8006704: 4630 mov r0, r6 8006706: f006 fc72 bl 800cfee 800670a: b1c8 cbz r0, 8006740 sys_sem_free(&conn->op_completed); 800670c: 4630 mov r0, r6 800670e: f006 fc69 bl 800cfe4 sys_mbox_free(&conn->recvmbox); 8006712: 4620 mov r0, r4 8006714: f006 fbe0 bl 800ced8 memp_free(MEMP_NETCONN, conn); 8006718: 4629 mov r1, r5 800671a: 2007 movs r0, #7 800671c: f004 ffa8 bl 800b670 return NULL; 8006720: 2500 movs r5, #0 8006722: e7d7 b.n 80066d4 LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); 8006724: 4b0b ldr r3, [pc, #44] @ (8006754 ) 8006726: 22a4 movs r2, #164 @ 0xa4 8006728: 490d ldr r1, [pc, #52] @ (8006760 ) 800672a: 480c ldr r0, [pc, #48] @ (800675c ) 800672c: f00c fe6c bl 8013408 8006730: e7e1 b.n 80066f6 LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); 8006732: 4b08 ldr r3, [pc, #32] @ (8006754 ) 8006734: 22a6 movs r2, #166 @ 0xa6 8006736: 490b ldr r1, [pc, #44] @ (8006764 ) 8006738: 4808 ldr r0, [pc, #32] @ (800675c ) 800673a: f00c fe65 bl 8013408 800673e: e7df b.n 8006700 LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); 8006740: 4b04 ldr r3, [pc, #16] @ (8006754 ) 8006742: 22a9 movs r2, #169 @ 0xa9 8006744: 4908 ldr r1, [pc, #32] @ (8006768 ) 8006746: 4805 ldr r0, [pc, #20] @ (800675c ) 8006748: f00c fe5e bl 8013408 800674c: e7de b.n 800670c 800674e: bf00 nop 8006750: 0800779d .word 0x0800779d 8006754: 08014664 .word 0x08014664 8006758: 08014708 .word 0x08014708 800675c: 080144e8 .word 0x080144e8 8006760: 0801472c .word 0x0801472c 8006764: 08014744 .word 0x08014744 8006768: 08014768 .word 0x08014768 0800676c : if (conn == NULL) { 800676c: b160 cbz r0, 8006788 { 800676e: b500 push {lr} 8006770: b089 sub sp, #36 @ 0x24 API_MSG_VAR_REF(msg).conn = conn; 8006772: 9000 str r0, [sp, #0] API_MSG_VAR_REF(msg).msg.sd.polls_left = 8006774: 2329 movs r3, #41 @ 0x29 8006776: f88d 3009 strb.w r3, [sp, #9] err = netconn_apimsg(lwip_netconn_do_delconn, &API_MSG_VAR_REF(msg)); 800677a: 4669 mov r1, sp 800677c: 4803 ldr r0, [pc, #12] @ (800678c ) 800677e: f7ff ff48 bl 8006612 } 8006782: b009 add sp, #36 @ 0x24 8006784: f85d fb04 ldr.w pc, [sp], #4 return ERR_OK; 8006788: 2000 movs r0, #0 } 800678a: 4770 bx lr 800678c: 0800796d .word 0x0800796d 08006790 : { 8006790: b538 push {r3, r4, r5, lr} if (conn == NULL) { 8006792: b150 cbz r0, 80067aa 8006794: 4605 mov r5, r0 err = netconn_prepare_delete(conn); 8006796: f7ff ffe9 bl 800676c if (err == ERR_OK) { 800679a: 4604 mov r4, r0 800679c: b108 cbz r0, 80067a2 } 800679e: 4620 mov r0, r4 80067a0: bd38 pop {r3, r4, r5, pc} netconn_free(conn); 80067a2: 4628 mov r0, r5 80067a4: f001 f850 bl 8007848 80067a8: e7f9 b.n 800679e return ERR_OK; 80067aa: 2400 movs r4, #0 80067ac: e7f7 b.n 800679e ... 080067b0 : { 80067b0: b510 push {r4, lr} 80067b2: b088 sub sp, #32 LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;); 80067b4: b160 cbz r0, 80067d0 LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;); 80067b6: b1a9 cbz r1, 80067e4 LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;); 80067b8: b1f2 cbz r2, 80067f8 API_MSG_VAR_REF(msg).conn = conn; 80067ba: 9000 str r0, [sp, #0] API_MSG_VAR_REF(msg).msg.ad.local = local; 80067bc: f88d 3010 strb.w r3, [sp, #16] msg.msg.ad.ipaddr = addr; 80067c0: 9102 str r1, [sp, #8] msg.msg.ad.port = port; 80067c2: 9203 str r2, [sp, #12] err = netconn_apimsg(lwip_netconn_do_getaddr, &msg); 80067c4: 4669 mov r1, sp 80067c6: 4811 ldr r0, [pc, #68] @ (800680c ) 80067c8: f7ff ff23 bl 8006612 } 80067cc: b008 add sp, #32 80067ce: bd10 pop {r4, pc} LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;); 80067d0: 4b0f ldr r3, [pc, #60] @ (8006810 ) 80067d2: f44f 7289 mov.w r2, #274 @ 0x112 80067d6: 490f ldr r1, [pc, #60] @ (8006814 ) 80067d8: 480f ldr r0, [pc, #60] @ (8006818 ) 80067da: f00c fe15 bl 8013408 80067de: f06f 000f mvn.w r0, #15 80067e2: e7f3 b.n 80067cc LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;); 80067e4: 4b0a ldr r3, [pc, #40] @ (8006810 ) 80067e6: f240 1213 movw r2, #275 @ 0x113 80067ea: 490c ldr r1, [pc, #48] @ (800681c ) 80067ec: 480a ldr r0, [pc, #40] @ (8006818 ) 80067ee: f00c fe0b bl 8013408 80067f2: f06f 000f mvn.w r0, #15 80067f6: e7e9 b.n 80067cc LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;); 80067f8: 4b05 ldr r3, [pc, #20] @ (8006810 ) 80067fa: f44f 728a mov.w r2, #276 @ 0x114 80067fe: 4908 ldr r1, [pc, #32] @ (8006820 ) 8006800: 4805 ldr r0, [pc, #20] @ (8006818 ) 8006802: f00c fe01 bl 8013408 8006806: f06f 000f mvn.w r0, #15 800680a: e7df b.n 80067cc 800680c: 08007d1d .word 0x08007d1d 8006810: 08014664 .word 0x08014664 8006814: 08014784 .word 0x08014784 8006818: 080144e8 .word 0x080144e8 800681c: 080147a4 .word 0x080147a4 8006820: 080147c4 .word 0x080147c4 08006824 : { 8006824: b500 push {lr} 8006826: b089 sub sp, #36 @ 0x24 LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 8006828: b160 cbz r0, 8006844 800682a: 4603 mov r3, r0 if (addr == NULL) { 800682c: b1a1 cbz r1, 8006858 API_MSG_VAR_REF(msg).conn = conn; 800682e: 9300 str r3, [sp, #0] API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); 8006830: 9102 str r1, [sp, #8] API_MSG_VAR_REF(msg).msg.bc.port = port; 8006832: f8ad 200c strh.w r2, [sp, #12] err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg)); 8006836: 4669 mov r1, sp 8006838: 4808 ldr r0, [pc, #32] @ (800685c ) 800683a: f7ff feea bl 8006612 } 800683e: b009 add sp, #36 @ 0x24 8006840: f85d fb04 ldr.w pc, [sp], #4 LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 8006844: 4b06 ldr r3, [pc, #24] @ (8006860 ) 8006846: f44f 72bf mov.w r2, #382 @ 0x17e 800684a: 4906 ldr r1, [pc, #24] @ (8006864 ) 800684c: 4806 ldr r0, [pc, #24] @ (8006868 ) 800684e: f00c fddb bl 8013408 8006852: f06f 000f mvn.w r0, #15 8006856: e7f2 b.n 800683e addr = IP4_ADDR_ANY; 8006858: 4904 ldr r1, [pc, #16] @ (800686c ) 800685a: e7e8 b.n 800682e 800685c: 08007aa9 .word 0x08007aa9 8006860: 08014664 .word 0x08014664 8006864: 080147e4 .word 0x080147e4 8006868: 080144e8 .word 0x080144e8 800686c: 080156d8 .word 0x080156d8 08006870 : { 8006870: b500 push {lr} 8006872: b089 sub sp, #36 @ 0x24 LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 8006874: b138 cbz r0, 8006886 API_MSG_VAR_REF(msg).conn = conn; 8006876: 9000 str r0, [sp, #0] err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); 8006878: 4669 mov r1, sp 800687a: 4808 ldr r0, [pc, #32] @ (800689c ) 800687c: f7ff fec9 bl 8006612 } 8006880: b009 add sp, #36 @ 0x24 8006882: f85d fb04 ldr.w pc, [sp], #4 LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 8006886: 4b06 ldr r3, [pc, #24] @ (80068a0 ) 8006888: f44f 72cf mov.w r2, #414 @ 0x19e 800688c: 4905 ldr r1, [pc, #20] @ (80068a4 ) 800688e: 4806 ldr r0, [pc, #24] @ (80068a8 ) 8006890: f00c fdba bl 8013408 8006894: f06f 000f mvn.w r0, #15 8006898: e7f2 b.n 8006880 800689a: bf00 nop 800689c: 08007ba5 .word 0x08007ba5 80068a0: 08014664 .word 0x08014664 80068a4: 08014804 .word 0x08014804 80068a8: 080144e8 .word 0x080144e8 080068ac : { 80068ac: b500 push {lr} 80068ae: b089 sub sp, #36 @ 0x24 LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 80068b0: b150 cbz r0, 80068c8 80068b2: 7803 ldrb r3, [r0, #0] 80068b4: f003 03f0 and.w r3, r3, #240 @ 0xf0 80068b8: 2b10 cmp r3, #16 80068ba: d105 bne.n 80068c8 err = netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg)); 80068bc: 466a mov r2, sp 80068be: f7ff feb5 bl 800662c } 80068c2: b009 add sp, #36 @ 0x24 80068c4: f85d fb04 ldr.w pc, [sp], #4 LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 80068c8: 4b04 ldr r3, [pc, #16] @ (80068dc ) 80068ca: f240 22b5 movw r2, #693 @ 0x2b5 80068ce: 4904 ldr r1, [pc, #16] @ (80068e0 ) 80068d0: 4804 ldr r0, [pc, #16] @ (80068e4 ) 80068d2: f00c fd99 bl 8013408 80068d6: f06f 000f mvn.w r0, #15 80068da: e7f2 b.n 80068c2 80068dc: 08014664 .word 0x08014664 80068e0: 080146c8 .word 0x080146c8 80068e4: 080144e8 .word 0x080144e8 080068e8 : { 80068e8: b500 push {lr} 80068ea: b089 sub sp, #36 @ 0x24 LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 80068ec: b140 cbz r0, 8006900 API_MSG_VAR_REF(msg).conn = conn; 80068ee: 9000 str r0, [sp, #0] API_MSG_VAR_REF(msg).msg.b = buf; 80068f0: 9102 str r1, [sp, #8] err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg)); 80068f2: 4669 mov r1, sp 80068f4: 4807 ldr r0, [pc, #28] @ (8006914 ) 80068f6: f7ff fe8c bl 8006612 } 80068fa: b009 add sp, #36 @ 0x24 80068fc: f85d fb04 ldr.w pc, [sp], #4 LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 8006900: 4b05 ldr r3, [pc, #20] @ (8006918 ) 8006902: f240 32b2 movw r2, #946 @ 0x3b2 8006906: 4905 ldr r1, [pc, #20] @ (800691c ) 8006908: 4805 ldr r0, [pc, #20] @ (8006920 ) 800690a: f00c fd7d bl 8013408 800690e: f06f 000f mvn.w r0, #15 8006912: e7f2 b.n 80068fa 8006914: 08007bc7 .word 0x08007bc7 8006918: 08014664 .word 0x08014664 800691c: 08014828 .word 0x08014828 8006920: 080144e8 .word 0x080144e8 08006924 : { 8006924: b5f0 push {r4, r5, r6, r7, lr} 8006926: b089 sub sp, #36 @ 0x24 8006928: 9e0e ldr r6, [sp, #56] @ 0x38 LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;); 800692a: b178 cbz r0, 800694c 800692c: 4684 mov ip, r0 LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;); 800692e: 7800 ldrb r0, [r0, #0] 8006930: f000 00f0 and.w r0, r0, #240 @ 0xf0 8006934: 2810 cmp r0, #16 8006936: d113 bne.n 8006960 dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8006938: f89c 0028 ldrb.w r0, [ip, #40] @ 0x28 800693c: f010 0f02 tst.w r0, #2 8006940: d118 bne.n 8006974 8006942: f013 0f04 tst.w r3, #4 8006946: d028 beq.n 800699a 8006948: 2001 movs r0, #1 800694a: e014 b.n 8006976 LWIP_ERROR("netconn_write: invalid conn", (conn != NULL), return ERR_ARG;); 800694c: 4b2d ldr r3, [pc, #180] @ (8006a04 ) 800694e: f240 32ee movw r2, #1006 @ 0x3ee 8006952: 492d ldr r1, [pc, #180] @ (8006a08 ) 8006954: 482d ldr r0, [pc, #180] @ (8006a0c ) 8006956: f00c fd57 bl 8013408 800695a: f06f 050f mvn.w r5, #15 800695e: e049 b.n 80069f4 LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;); 8006960: 4b28 ldr r3, [pc, #160] @ (8006a04 ) 8006962: f240 32ef movw r2, #1007 @ 0x3ef 8006966: 492a ldr r1, [pc, #168] @ (8006a10 ) 8006968: 4828 ldr r0, [pc, #160] @ (8006a0c ) 800696a: f00c fd4d bl 8013408 800696e: f06f 0505 mvn.w r5, #5 8006972: e03f b.n 80069f4 dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8006974: 2001 movs r0, #1 if (dontblock && !bytes_written) { 8006976: f000 07ff and.w r7, r0, #255 @ 0xff 800697a: 2e00 cmp r6, #0 800697c: bf14 ite ne 800697e: 2000 movne r0, #0 8006980: f000 0001 andeq.w r0, r0, #1 8006984: bb88 cbnz r0, 80069ea size = 0; 8006986: 4604 mov r4, r0 for (i = 0; i < vectorcnt; i++) { 8006988: 4282 cmp r2, r0 800698a: dd08 ble.n 800699e size += vectors[i].len; 800698c: eb01 05c0 add.w r5, r1, r0, lsl #3 8006990: 686d ldr r5, [r5, #4] if (size < vectors[i].len) { 8006992: 1964 adds r4, r4, r5 8006994: d22c bcs.n 80069f0 for (i = 0; i < vectorcnt; i++) { 8006996: 3001 adds r0, #1 8006998: e7f6 b.n 8006988 dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 800699a: 2000 movs r0, #0 800699c: e7eb b.n 8006976 if (size == 0) { 800699e: b364 cbz r4, 80069fa } else if (size > SSIZE_MAX) { 80069a0: 2c00 cmp r4, #0 80069a2: da02 bge.n 80069aa if (!bytes_written) { 80069a4: b35e cbz r6, 80069fe size = (size_t)limited; 80069a6: f06f 4400 mvn.w r4, #2147483648 @ 0x80000000 API_MSG_VAR_REF(msg).conn = conn; 80069aa: f8cd c000 str.w ip, [sp] API_MSG_VAR_REF(msg).msg.w.vector = vectors; 80069ae: 9102 str r1, [sp, #8] API_MSG_VAR_REF(msg).msg.w.vector_cnt = vectorcnt; 80069b0: f8ad 200c strh.w r2, [sp, #12] API_MSG_VAR_REF(msg).msg.w.vector_off = 0; 80069b4: 2200 movs r2, #0 80069b6: 9204 str r2, [sp, #16] API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; 80069b8: f88d 301c strb.w r3, [sp, #28] API_MSG_VAR_REF(msg).msg.w.len = size; 80069bc: 9405 str r4, [sp, #20] API_MSG_VAR_REF(msg).msg.w.offset = 0; 80069be: 9206 str r2, [sp, #24] err = netconn_apimsg(lwip_netconn_do_write, &API_MSG_VAR_REF(msg)); 80069c0: 4669 mov r1, sp 80069c2: 4814 ldr r0, [pc, #80] @ (8006a14 ) 80069c4: f7ff fe25 bl 8006612 if (err == ERR_OK) { 80069c8: 4605 mov r5, r0 80069ca: b998 cbnz r0, 80069f4 if (bytes_written != NULL) { 80069cc: b10e cbz r6, 80069d2 *bytes_written = API_MSG_VAR_REF(msg).msg.w.offset; 80069ce: 9b06 ldr r3, [sp, #24] 80069d0: 6033 str r3, [r6, #0] if (!dontblock) { 80069d2: b97f cbnz r7, 80069f4 LWIP_ASSERT("do_write failed to write all bytes", API_MSG_VAR_REF(msg).msg.w.offset == size); 80069d4: 9b06 ldr r3, [sp, #24] 80069d6: 42a3 cmp r3, r4 80069d8: d00c beq.n 80069f4 80069da: 4b0a ldr r3, [pc, #40] @ (8006a04 ) 80069dc: f44f 6286 mov.w r2, #1072 @ 0x430 80069e0: 490d ldr r1, [pc, #52] @ (8006a18 ) 80069e2: 480a ldr r0, [pc, #40] @ (8006a0c ) 80069e4: f00c fd10 bl 8013408 80069e8: e004 b.n 80069f4 return ERR_VAL; 80069ea: f06f 0505 mvn.w r5, #5 80069ee: e001 b.n 80069f4 return ERR_VAL; 80069f0: f06f 0505 mvn.w r5, #5 } 80069f4: 4628 mov r0, r5 80069f6: b009 add sp, #36 @ 0x24 80069f8: bdf0 pop {r4, r5, r6, r7, pc} return ERR_OK; 80069fa: 2500 movs r5, #0 80069fc: e7fa b.n 80069f4 return ERR_VAL; 80069fe: f06f 0505 mvn.w r5, #5 8006a02: e7f7 b.n 80069f4 8006a04: 08014664 .word 0x08014664 8006a08: 08014844 .word 0x08014844 8006a0c: 080144e8 .word 0x080144e8 8006a10: 08014860 .word 0x08014860 8006a14: 08007c51 .word 0x08007c51 8006a18: 08014884 .word 0x08014884 08006a1c : { 8006a1c: b500 push {lr} 8006a1e: b085 sub sp, #20 vector.ptr = dataptr; 8006a20: 9102 str r1, [sp, #8] vector.len = size; 8006a22: 9203 str r2, [sp, #12] return netconn_write_vectors_partly(conn, &vector, 1, apiflags, bytes_written); 8006a24: 9a06 ldr r2, [sp, #24] 8006a26: 9200 str r2, [sp, #0] 8006a28: 2201 movs r2, #1 8006a2a: a902 add r1, sp, #8 8006a2c: f7ff ff7a bl 8006924 } 8006a30: b005 add sp, #20 8006a32: f85d fb04 ldr.w pc, [sp], #4 08006a36 : * @param conn the netconn to get the error from * @return and pending error or ERR_OK if no error was pending */ err_t netconn_err(struct netconn *conn) { 8006a36: b538 push {r3, r4, r5, lr} err_t err; SYS_ARCH_DECL_PROTECT(lev); if (conn == NULL) { 8006a38: b150 cbz r0, 8006a50 8006a3a: 4604 mov r4, r0 return ERR_OK; } SYS_ARCH_PROTECT(lev); 8006a3c: f006 fb18 bl 800d070 err = conn->pending_err; 8006a40: f994 5008 ldrsb.w r5, [r4, #8] conn->pending_err = ERR_OK; 8006a44: 2300 movs r3, #0 8006a46: 7223 strb r3, [r4, #8] SYS_ARCH_UNPROTECT(lev); 8006a48: f006 fb1e bl 800d088 return err; } 8006a4c: 4628 mov r0, r5 8006a4e: bd38 pop {r3, r4, r5, pc} return ERR_OK; 8006a50: 2500 movs r5, #0 8006a52: e7fb b.n 8006a4c 08006a54 : { 8006a54: b5f0 push {r4, r5, r6, r7, lr} 8006a56: b083 sub sp, #12 void *buf = NULL; 8006a58: 2300 movs r3, #0 8006a5a: 9301 str r3, [sp, #4] LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); 8006a5c: 2900 cmp r1, #0 8006a5e: d040 beq.n 8006ae2 8006a60: 4604 mov r4, r0 8006a62: 4616 mov r6, r2 8006a64: 460f mov r7, r1 *new_buf = NULL; 8006a66: 2300 movs r3, #0 8006a68: 600b str r3, [r1, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 8006a6a: 2800 cmp r0, #0 8006a6c: d043 beq.n 8006af6 if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 8006a6e: f100 0510 add.w r5, r0, #16 8006a72: 4628 mov r0, r5 8006a74: f006 fa75 bl 800cf62 8006a78: 2800 cmp r0, #0 8006a7a: d046 beq.n 8006b0a if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || 8006a7c: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006a80: f013 0f02 tst.w r3, #2 8006a84: d109 bne.n 8006a9a 8006a86: f016 0f04 tst.w r6, #4 8006a8a: d106 bne.n 8006a9a 8006a8c: f013 0f01 tst.w r3, #1 8006a90: d103 bne.n 8006a9a (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { 8006a92: f994 3008 ldrsb.w r3, [r4, #8] 8006a96: 2b00 cmp r3, #0 8006a98: d04c beq.n 8006b34 if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) { 8006a9a: a901 add r1, sp, #4 8006a9c: 4628 mov r0, r5 8006a9e: f006 fa55 bl 800cf4c 8006aa2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 8006aa6: d038 beq.n 8006b1a if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) 8006aa8: 7823 ldrb r3, [r4, #0] 8006aaa: f003 03f0 and.w r3, r3, #240 @ 0xf0 8006aae: 2b10 cmp r3, #16 8006ab0: d04b beq.n 8006b4a LWIP_ASSERT("buf != NULL", buf != NULL); 8006ab2: 9b01 ldr r3, [sp, #4] 8006ab4: 2b00 cmp r3, #0 8006ab6: d058 beq.n 8006b6a len = netbuf_len((struct netbuf *)buf); 8006ab8: 9b01 ldr r3, [sp, #4] 8006aba: 681b ldr r3, [r3, #0] 8006abc: 891d ldrh r5, [r3, #8] SYS_ARCH_DEC(conn->recv_avail, len); 8006abe: f006 fad7 bl 800d070 8006ac2: 6a63 ldr r3, [r4, #36] @ 0x24 8006ac4: 1b5b subs r3, r3, r5 8006ac6: 6263 str r3, [r4, #36] @ 0x24 8006ac8: f006 fade bl 800d088 API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); 8006acc: 6b23 ldr r3, [r4, #48] @ 0x30 8006ace: b11b cbz r3, 8006ad8 8006ad0: 462a mov r2, r5 8006ad2: 2101 movs r1, #1 8006ad4: 4620 mov r0, r4 8006ad6: 4798 blx r3 *new_buf = buf; 8006ad8: 9b01 ldr r3, [sp, #4] 8006ada: 603b str r3, [r7, #0] return ERR_OK; 8006adc: 2000 movs r0, #0 } 8006ade: b003 add sp, #12 8006ae0: bdf0 pop {r4, r5, r6, r7, pc} LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); 8006ae2: 4b27 ldr r3, [pc, #156] @ (8006b80 ) 8006ae4: f44f 7212 mov.w r2, #584 @ 0x248 8006ae8: 4926 ldr r1, [pc, #152] @ (8006b84 ) 8006aea: 4827 ldr r0, [pc, #156] @ (8006b88 ) 8006aec: f00c fc8c bl 8013408 8006af0: f06f 000f mvn.w r0, #15 8006af4: e7f3 b.n 8006ade LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 8006af6: 4b22 ldr r3, [pc, #136] @ (8006b80 ) 8006af8: f240 224a movw r2, #586 @ 0x24a 8006afc: 4923 ldr r1, [pc, #140] @ (8006b8c ) 8006afe: 4822 ldr r0, [pc, #136] @ (8006b88 ) 8006b00: f00c fc82 bl 8013408 8006b04: f06f 000f mvn.w r0, #15 8006b08: e7e9 b.n 8006ade err_t err = netconn_err(conn); 8006b0a: 4620 mov r0, r4 8006b0c: f7ff ff93 bl 8006a36 if (err != ERR_OK) { 8006b10: 2800 cmp r0, #0 8006b12: d1e4 bne.n 8006ade return ERR_CONN; 8006b14: f06f 000a mvn.w r0, #10 8006b18: e7e1 b.n 8006ade err = netconn_err(conn); 8006b1a: 4620 mov r0, r4 8006b1c: f7ff ff8b bl 8006a36 if (err != ERR_OK) { 8006b20: 2800 cmp r0, #0 8006b22: d1dc bne.n 8006ade if (conn->flags & NETCONN_FLAG_MBOXCLOSED) { 8006b24: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006b28: f013 0f01 tst.w r3, #1 8006b2c: d025 beq.n 8006b7a return ERR_CONN; 8006b2e: f06f 000a mvn.w r0, #10 8006b32: e7d4 b.n 8006ade if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { 8006b34: 69e2 ldr r2, [r4, #28] 8006b36: a901 add r1, sp, #4 8006b38: 4628 mov r0, r5 8006b3a: f006 f9e6 bl 800cf0a 8006b3e: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 8006b42: d1b1 bne.n 8006aa8 return ERR_TIMEOUT; 8006b44: f06f 0002 mvn.w r0, #2 8006b48: e7c9 b.n 8006ade if (lwip_netconn_is_err_msg(buf, &err)) { 8006b4a: f10d 0103 add.w r1, sp, #3 8006b4e: 9801 ldr r0, [sp, #4] 8006b50: f000 fdf6 bl 8007740 8006b54: b130 cbz r0, 8006b64 if (err == ERR_CLSD) { 8006b56: f99d 0003 ldrsb.w r0, [sp, #3] 8006b5a: f110 0f0f cmn.w r0, #15 8006b5e: d1be bne.n 8006ade return ERR_OK; 8006b60: 2000 movs r0, #0 8006b62: e7bc b.n 8006ade len = ((struct pbuf *)buf)->tot_len; 8006b64: 9b01 ldr r3, [sp, #4] 8006b66: 891d ldrh r5, [r3, #8] 8006b68: e7a9 b.n 8006abe LWIP_ASSERT("buf != NULL", buf != NULL); 8006b6a: 4b05 ldr r3, [pc, #20] @ (8006b80 ) 8006b6c: f240 2291 movw r2, #657 @ 0x291 8006b70: 4907 ldr r1, [pc, #28] @ (8006b90 ) 8006b72: 4805 ldr r0, [pc, #20] @ (8006b88 ) 8006b74: f00c fc48 bl 8013408 8006b78: e79e b.n 8006ab8 return ERR_WOULDBLOCK; 8006b7a: f06f 0006 mvn.w r0, #6 8006b7e: e7ae b.n 8006ade 8006b80: 08014664 .word 0x08014664 8006b84: 080148a8 .word 0x080148a8 8006b88: 080144e8 .word 0x080144e8 8006b8c: 080148c8 .word 0x080148c8 8006b90: 080148e4 .word 0x080148e4 08006b94 : { 8006b94: b508 push {r3, lr} LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) && 8006b96: b138 cbz r0, 8006ba8 8006b98: 7803 ldrb r3, [r0, #0] 8006b9a: f003 03f0 and.w r3, r3, #240 @ 0xf0 8006b9e: 2b10 cmp r3, #16 8006ba0: d002 beq.n 8006ba8 return netconn_recv_data(conn, (void **)new_buf, apiflags); 8006ba2: f7ff ff57 bl 8006a54 } 8006ba6: bd08 pop {r3, pc} LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) && 8006ba8: 4b04 ldr r3, [pc, #16] @ (8006bbc ) 8006baa: f44f 7253 mov.w r2, #844 @ 0x34c 8006bae: 4904 ldr r1, [pc, #16] @ (8006bc0 ) 8006bb0: 4804 ldr r0, [pc, #16] @ (8006bc4 ) 8006bb2: f00c fc29 bl 8013408 8006bb6: f06f 000f mvn.w r0, #15 8006bba: e7f4 b.n 8006ba6 8006bbc: 08014664 .word 0x08014664 8006bc0: 080148f0 .word 0x080148f0 8006bc4: 080144e8 .word 0x080144e8 08006bc8 : { 8006bc8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8006bcc: b088 sub sp, #32 8006bce: 4604 mov r4, r0 8006bd0: 460f mov r7, r1 8006bd2: 4615 mov r5, r2 if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 8006bd4: 3010 adds r0, #16 8006bd6: f006 f9c4 bl 800cf62 8006bda: 2800 cmp r0, #0 8006bdc: d043 beq.n 8006c66 if (netconn_is_flag_set(conn, NETCONN_FIN_RX_PENDING)) { 8006bde: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006be2: f994 2028 ldrsb.w r2, [r4, #40] @ 0x28 8006be6: 2a00 cmp r2, #0 8006be8: db1f blt.n 8006c2a if (!(apiflags & NETCONN_NOAUTORCVD)) { 8006bea: f005 0808 and.w r8, r5, #8 err = netconn_recv_data(conn, (void **)new_buf, apiflags); 8006bee: 462a mov r2, r5 8006bf0: 4639 mov r1, r7 8006bf2: 4620 mov r0, r4 8006bf4: f7ff ff2e bl 8006a54 if (err != ERR_OK) { 8006bf8: 4606 mov r6, r0 8006bfa: bb38 cbnz r0, 8006c4c buf = *new_buf; 8006bfc: 683f ldr r7, [r7, #0] if (!(apiflags & NETCONN_NOAUTORCVD)) { 8006bfe: f1b8 0f00 cmp.w r8, #0 8006c02: d105 bne.n 8006c10 u16_t len = buf ? buf->tot_len : 1; 8006c04: b337 cbz r7, 8006c54 8006c06: 8939 ldrh r1, [r7, #8] netconn_tcp_recvd_msg(conn, len, &API_VAR_REF(msg)); 8006c08: 466a mov r2, sp 8006c0a: 4620 mov r0, r4 8006c0c: f7ff fd0e bl 800662c if (buf == NULL) { 8006c10: b9e7 cbnz r7, 8006c4c if (apiflags & NETCONN_NOFIN) { 8006c12: f015 0f10 tst.w r5, #16 8006c16: d00c beq.n 8006c32 netconn_set_flags(conn, NETCONN_FIN_RX_PENDING); 8006c18: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006c1c: f043 0380 orr.w r3, r3, #128 @ 0x80 8006c20: f884 3028 strb.w r3, [r4, #40] @ 0x28 return ERR_WOULDBLOCK; 8006c24: f06f 0606 mvn.w r6, #6 8006c28: e010 b.n 8006c4c netconn_clear_flags(conn, NETCONN_FIN_RX_PENDING); 8006c2a: f003 037f and.w r3, r3, #127 @ 0x7f 8006c2e: f884 3028 strb.w r3, [r4, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); 8006c32: 6b23 ldr r3, [r4, #48] @ 0x30 8006c34: b11b cbz r3, 8006c3e 8006c36: 2200 movs r2, #0 8006c38: 2101 movs r1, #1 8006c3a: 4620 mov r0, r4 8006c3c: 4798 blx r3 if (conn->pcb.ip == NULL) { 8006c3e: 6863 ldr r3, [r4, #4] 8006c40: b953 cbnz r3, 8006c58 err = netconn_err(conn); 8006c42: 4620 mov r0, r4 8006c44: f7ff fef7 bl 8006a36 if (err != ERR_OK) { 8006c48: 4606 mov r6, r0 8006c4a: b178 cbz r0, 8006c6c } 8006c4c: 4630 mov r0, r6 8006c4e: b008 add sp, #32 8006c50: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} u16_t len = buf ? buf->tot_len : 1; 8006c54: 2101 movs r1, #1 8006c56: e7d7 b.n 8006c08 netconn_close_shutdown(conn, NETCONN_SHUT_RD); 8006c58: 2101 movs r1, #1 8006c5a: 4620 mov r0, r4 8006c5c: f7ff fd08 bl 8006670 return ERR_CLSD; 8006c60: f06f 060e mvn.w r6, #14 8006c64: e7f2 b.n 8006c4c return ERR_CONN; 8006c66: f06f 060a mvn.w r6, #10 8006c6a: e7ef b.n 8006c4c return ERR_RST; 8006c6c: f06f 060d mvn.w r6, #13 8006c70: e7ec b.n 8006c4c ... 08006c74 : { 8006c74: b508 push {r3, lr} LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 8006c76: b138 cbz r0, 8006c88 8006c78: 7803 ldrb r3, [r0, #0] 8006c7a: f003 03f0 and.w r3, r3, #240 @ 0xf0 8006c7e: 2b10 cmp r3, #16 8006c80: d102 bne.n 8006c88 return netconn_recv_data_tcp(conn, new_buf, apiflags); 8006c82: f7ff ffa1 bl 8006bc8 } 8006c86: bd08 pop {r3, pc} LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 8006c88: 4b04 ldr r3, [pc, #16] @ (8006c9c ) 8006c8a: f240 3225 movw r2, #805 @ 0x325 8006c8e: 4904 ldr r1, [pc, #16] @ (8006ca0 ) 8006c90: 4804 ldr r0, [pc, #16] @ (8006ca4 ) 8006c92: f00c fbb9 bl 8013408 8006c96: f06f 000f mvn.w r0, #15 8006c9a: e7f4 b.n 8006c86 8006c9c: 08014664 .word 0x08014664 8006ca0: 080146c8 .word 0x080146c8 8006ca4: 080144e8 .word 0x080144e8 08006ca8 : /** Translate an error to a unique void* passed via an mbox */ static void * lwip_netconn_err_to_msg(err_t err) { switch (err) { 8006ca8: f110 0f0e cmn.w r0, #14 8006cac: d011 beq.n 8006cd2 8006cae: f110 0f0d cmn.w r0, #13 8006cb2: d010 beq.n 8006cd6 8006cb4: f110 0f0f cmn.w r0, #15 8006cb8: d00f beq.n 8006cda case ERR_RST: return LWIP_CONST_CAST(void *, &netconn_reset); case ERR_CLSD: return LWIP_CONST_CAST(void *, &netconn_closed); default: LWIP_ASSERT("unhandled error", err == ERR_OK); 8006cba: b908 cbnz r0, 8006cc0 return NULL; 8006cbc: 2000 movs r0, #0 } } 8006cbe: 4770 bx lr { 8006cc0: b508 push {r3, lr} LWIP_ASSERT("unhandled error", err == ERR_OK); 8006cc2: 4b07 ldr r3, [pc, #28] @ (8006ce0 ) 8006cc4: 227d movs r2, #125 @ 0x7d 8006cc6: 4907 ldr r1, [pc, #28] @ (8006ce4 ) 8006cc8: 4807 ldr r0, [pc, #28] @ (8006ce8 ) 8006cca: f00c fb9d bl 8013408 return NULL; 8006cce: 2000 movs r0, #0 } 8006cd0: bd08 pop {r3, pc} return LWIP_CONST_CAST(void *, &netconn_reset); 8006cd2: 4806 ldr r0, [pc, #24] @ (8006cec ) 8006cd4: 4770 bx lr switch (err) { 8006cd6: 4806 ldr r0, [pc, #24] @ (8006cf0 ) 8006cd8: 4770 bx lr return LWIP_CONST_CAST(void *, &netconn_closed); 8006cda: 4806 ldr r0, [pc, #24] @ (8006cf4 ) 8006cdc: 4770 bx lr 8006cde: bf00 nop 8006ce0: 0801491c .word 0x0801491c 8006ce4: 08014980 .word 0x08014980 8006ce8: 080144e8 .word 0x080144e8 8006cec: 08014e32 .word 0x08014e32 8006cf0: 08014e33 .word 0x08014e33 8006cf4: 08014e31 .word 0x08014e31 08006cf8 : * @see udp.h (struct udp_pcb.recv) for parameters */ static void recv_udp(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { 8006cf8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8006cfc: 4604 mov r4, r0 8006cfe: 4615 mov r5, r2 8006d00: 4698 mov r8, r3 #if LWIP_SO_RCVBUF int recv_avail; #endif /* LWIP_SO_RCVBUF */ LWIP_UNUSED_ARG(pcb); /* only used for asserts... */ LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL); 8006d02: 460e mov r6, r1 8006d04: b1f1 cbz r1, 8006d44 LWIP_ASSERT("recv_udp must have an argument", arg != NULL); 8006d06: b324 cbz r4, 8006d52 if (conn == NULL) { pbuf_free(p); return; } LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb); 8006d08: 6863 ldr r3, [r4, #4] 8006d0a: 42b3 cmp r3, r6 8006d0c: d005 beq.n 8006d1a 8006d0e: 4b2d ldr r3, [pc, #180] @ (8006dc4 ) 8006d10: 22ee movs r2, #238 @ 0xee 8006d12: 492d ldr r1, [pc, #180] @ (8006dc8 ) 8006d14: 482d ldr r0, [pc, #180] @ (8006dcc ) 8006d16: f00c fb77 bl 8013408 #if LWIP_SO_RCVBUF SYS_ARCH_GET(conn->recv_avail, recv_avail); 8006d1a: f006 f9a9 bl 800d070 8006d1e: 6a67 ldr r7, [r4, #36] @ 0x24 8006d20: f006 f9b2 bl 800d088 if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8006d24: f104 0610 add.w r6, r4, #16 8006d28: 4630 mov r0, r6 8006d2a: f006 f91a bl 800cf62 8006d2e: b120 cbz r0, 8006d3a ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { 8006d30: 892a ldrh r2, [r5, #8] 8006d32: 443a add r2, r7 8006d34: 6a23 ldr r3, [r4, #32] if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8006d36: 429a cmp r2, r3 8006d38: dd15 ble.n 8006d66 #else /* LWIP_SO_RCVBUF */ if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); 8006d3a: 4628 mov r0, r5 8006d3c: f005 f830 bl 800bda0 SYS_ARCH_INC(conn->recv_avail, len); #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); } } 8006d40: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ASSERT("recv_udp must have a pcb argument", pcb != NULL); 8006d44: 4b1f ldr r3, [pc, #124] @ (8006dc4 ) 8006d46: 22e5 movs r2, #229 @ 0xe5 8006d48: 4921 ldr r1, [pc, #132] @ (8006dd0 ) 8006d4a: 4820 ldr r0, [pc, #128] @ (8006dcc ) 8006d4c: f00c fb5c bl 8013408 8006d50: e7d9 b.n 8006d06 LWIP_ASSERT("recv_udp must have an argument", arg != NULL); 8006d52: 4b1c ldr r3, [pc, #112] @ (8006dc4 ) 8006d54: 22e6 movs r2, #230 @ 0xe6 8006d56: 491f ldr r1, [pc, #124] @ (8006dd4 ) 8006d58: 481c ldr r0, [pc, #112] @ (8006dcc ) 8006d5a: f00c fb55 bl 8013408 pbuf_free(p); 8006d5e: 4628 mov r0, r5 8006d60: f005 f81e bl 800bda0 return; 8006d64: e7ec b.n 8006d40 buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 8006d66: 2006 movs r0, #6 8006d68: f004 fc4c bl 800b604 if (buf == NULL) { 8006d6c: 4607 mov r7, r0 8006d6e: b1f8 cbz r0, 8006db0 buf->p = p; 8006d70: 6005 str r5, [r0, #0] buf->ptr = p; 8006d72: 6045 str r5, [r0, #4] ip_addr_set(&buf->addr, addr); 8006d74: f1b8 0f00 cmp.w r8, #0 8006d78: d01e beq.n 8006db8 8006d7a: f8d8 3000 ldr.w r3, [r8] 8006d7e: 60bb str r3, [r7, #8] buf->port = port; 8006d80: f8bd 3018 ldrh.w r3, [sp, #24] 8006d84: 81bb strh r3, [r7, #12] len = p->tot_len; 8006d86: 892d ldrh r5, [r5, #8] if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 8006d88: 4639 mov r1, r7 8006d8a: 4630 mov r0, r6 8006d8c: f006 f8ad bl 800ceea 8006d90: b9a0 cbnz r0, 8006dbc SYS_ARCH_INC(conn->recv_avail, len); 8006d92: f006 f96d bl 800d070 8006d96: 6a63 ldr r3, [r4, #36] @ 0x24 8006d98: 442b add r3, r5 8006d9a: 6263 str r3, [r4, #36] @ 0x24 8006d9c: f006 f974 bl 800d088 API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 8006da0: 6b23 ldr r3, [r4, #48] @ 0x30 8006da2: 2b00 cmp r3, #0 8006da4: d0cc beq.n 8006d40 8006da6: 462a mov r2, r5 8006da8: 2100 movs r1, #0 8006daa: 4620 mov r0, r4 8006dac: 4798 blx r3 8006dae: e7c7 b.n 8006d40 pbuf_free(p); 8006db0: 4628 mov r0, r5 8006db2: f004 fff5 bl 800bda0 return; 8006db6: e7c3 b.n 8006d40 ip_addr_set(&buf->addr, addr); 8006db8: 2300 movs r3, #0 8006dba: e7e0 b.n 8006d7e netbuf_delete(buf); 8006dbc: 4638 mov r0, r7 8006dbe: f004 fc71 bl 800b6a4 return; 8006dc2: e7bd b.n 8006d40 8006dc4: 0801491c .word 0x0801491c 8006dc8: 080149d4 .word 0x080149d4 8006dcc: 080144e8 .word 0x080144e8 8006dd0: 08014990 .word 0x08014990 8006dd4: 080149b4 .word 0x080149b4 08006dd8 : * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 8006dd8: b510 push {r4, lr} 8006dda: 4601 mov r1, r0 struct tcp_pcb *pcb; pcb = conn->pcb.tcp; 8006ddc: 6844 ldr r4, [r0, #4] tcp_arg(pcb, conn); 8006dde: 4620 mov r0, r4 8006de0: f006 fb22 bl 800d428 tcp_recv(pcb, recv_tcp); 8006de4: 4908 ldr r1, [pc, #32] @ (8006e08 ) 8006de6: 4620 mov r0, r4 8006de8: f006 fb26 bl 800d438 tcp_sent(pcb, sent_tcp); 8006dec: 4907 ldr r1, [pc, #28] @ (8006e0c ) 8006dee: 4620 mov r0, r4 8006df0: f006 fb3c bl 800d46c tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL); 8006df4: 2202 movs r2, #2 8006df6: 4906 ldr r1, [pc, #24] @ (8006e10 ) 8006df8: 4620 mov r0, r4 8006dfa: f006 fb77 bl 800d4ec tcp_err(pcb, err_tcp); 8006dfe: 4905 ldr r1, [pc, #20] @ (8006e14 ) 8006e00: 4620 mov r0, r4 8006e02: f006 fb4d bl 800d4a0 } 8006e06: bd10 pop {r4, pc} 8006e08: 08007661 .word 0x08007661 8006e0c: 080075ed .word 0x080075ed 8006e10: 08007565 .word 0x08007565 8006e14: 08006ea1 .word 0x08006ea1 08006e18 : * * @param msg the api_msg describing the connection type */ static void pcb_new(struct api_msg *msg) { 8006e18: b538 push {r3, r4, r5, lr} 8006e1a: 4604 mov r4, r0 enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4; LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); 8006e1c: 6803 ldr r3, [r0, #0] 8006e1e: 685b ldr r3, [r3, #4] 8006e20: b133 cbz r3, 8006e30 8006e22: 4b1b ldr r3, [pc, #108] @ (8006e90 ) 8006e24: f240 2265 movw r2, #613 @ 0x265 8006e28: 491a ldr r1, [pc, #104] @ (8006e94 ) 8006e2a: 481b ldr r0, [pc, #108] @ (8006e98 ) 8006e2c: f00c faec bl 8013408 iptype = IPADDR_TYPE_ANY; } #endif /* Allocate a PCB for this connection */ switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8006e30: 6825 ldr r5, [r4, #0] 8006e32: 782b ldrb r3, [r5, #0] 8006e34: f003 03f0 and.w r3, r3, #240 @ 0xf0 8006e38: 2b10 cmp r3, #16 8006e3a: d017 beq.n 8006e6c 8006e3c: 2b20 cmp r3, #32 8006e3e: d120 bne.n 8006e82 } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp = udp_new_ip_type(iptype); 8006e40: 2000 movs r0, #0 8006e42: f00b f861 bl 8011f08 8006e46: 6068 str r0, [r5, #4] if (msg->conn->pcb.udp != NULL) { 8006e48: 6823 ldr r3, [r4, #0] 8006e4a: 685a ldr r2, [r3, #4] 8006e4c: b13a cbz r2, 8006e5e #if LWIP_UDPLITE if (NETCONNTYPE_ISUDPLITE(msg->conn->type)) { udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_UDPLITE); } #endif /* LWIP_UDPLITE */ if (NETCONNTYPE_ISUDPNOCHKSUM(msg->conn->type)) { 8006e4e: 781b ldrb r3, [r3, #0] 8006e50: 2b22 cmp r3, #34 @ 0x22 8006e52: d008 beq.n 8006e66 udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); } udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); 8006e54: 6822 ldr r2, [r4, #0] 8006e56: 4911 ldr r1, [pc, #68] @ (8006e9c ) 8006e58: 6850 ldr r0, [r2, #4] 8006e5a: f00a ffff bl 8011e5c default: /* Unsupported netconn type, e.g. protocol disabled */ msg->err = ERR_VAL; return; } if (msg->conn->pcb.ip == NULL) { 8006e5e: 6823 ldr r3, [r4, #0] 8006e60: 685b ldr r3, [r3, #4] 8006e62: b18b cbz r3, 8006e88 msg->err = ERR_MEM; } } 8006e64: bd38 pop {r3, r4, r5, pc} udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); 8006e66: 2301 movs r3, #1 8006e68: 7413 strb r3, [r2, #16] 8006e6a: e7f3 b.n 8006e54 msg->conn->pcb.tcp = tcp_new_ip_type(iptype); 8006e6c: 2000 movs r0, #0 8006e6e: f006 fe9d bl 800dbac 8006e72: 6068 str r0, [r5, #4] if (msg->conn->pcb.tcp != NULL) { 8006e74: 6820 ldr r0, [r4, #0] 8006e76: 6843 ldr r3, [r0, #4] 8006e78: 2b00 cmp r3, #0 8006e7a: d0f0 beq.n 8006e5e setup_tcp(msg->conn); 8006e7c: f7ff ffac bl 8006dd8 8006e80: e7ed b.n 8006e5e msg->err = ERR_VAL; 8006e82: 23fa movs r3, #250 @ 0xfa 8006e84: 7123 strb r3, [r4, #4] return; 8006e86: e7ed b.n 8006e64 msg->err = ERR_MEM; 8006e88: 23ff movs r3, #255 @ 0xff 8006e8a: 7123 strb r3, [r4, #4] 8006e8c: e7ea b.n 8006e64 8006e8e: bf00 nop 8006e90: 0801491c .word 0x0801491c 8006e94: 080149f4 .word 0x080149f4 8006e98: 080144e8 .word 0x080144e8 8006e9c: 08006cf9 .word 0x08006cf9 08006ea0 : { 8006ea0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8006ea4: 460d mov r5, r1 LWIP_ASSERT("conn != NULL", (conn != NULL)); 8006ea6: 4604 mov r4, r0 8006ea8: 2800 cmp r0, #0 8006eaa: d040 beq.n 8006f2e SYS_ARCH_PROTECT(lev); 8006eac: f006 f8e0 bl 800d070 conn->pcb.tcp = NULL; 8006eb0: 2200 movs r2, #0 8006eb2: 6062 str r2, [r4, #4] conn->pending_err = err; 8006eb4: 7225 strb r5, [r4, #8] conn->flags |= NETCONN_FLAG_MBOXCLOSED; 8006eb6: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006eba: f043 0301 orr.w r3, r3, #1 8006ebe: f884 3028 strb.w r3, [r4, #40] @ 0x28 old_state = conn->state; 8006ec2: 7866 ldrb r6, [r4, #1] conn->state = NETCONN_NONE; 8006ec4: 7062 strb r2, [r4, #1] SYS_ARCH_UNPROTECT(lev); 8006ec6: f006 f8df bl 800d088 API_EVENT(conn, NETCONN_EVT_ERROR, 0); 8006eca: 6b23 ldr r3, [r4, #48] @ 0x30 8006ecc: b11b cbz r3, 8006ed6 8006ece: 2200 movs r2, #0 8006ed0: 2104 movs r1, #4 8006ed2: 4620 mov r0, r4 8006ed4: 4798 blx r3 API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 8006ed6: 6b23 ldr r3, [r4, #48] @ 0x30 8006ed8: b11b cbz r3, 8006ee2 8006eda: 2200 movs r2, #0 8006edc: 4611 mov r1, r2 8006ede: 4620 mov r0, r4 8006ee0: 4798 blx r3 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8006ee2: 6b23 ldr r3, [r4, #48] @ 0x30 8006ee4: b11b cbz r3, 8006eee 8006ee6: 2200 movs r2, #0 8006ee8: 2102 movs r1, #2 8006eea: 4620 mov r0, r4 8006eec: 4798 blx r3 mbox_msg = lwip_netconn_err_to_msg(err); 8006eee: 4628 mov r0, r5 8006ef0: f7ff feda bl 8006ca8 8006ef4: 4607 mov r7, r0 if (NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 8006ef6: f104 0810 add.w r8, r4, #16 8006efa: 4640 mov r0, r8 8006efc: f006 f831 bl 800cf62 8006f00: b9e8 cbnz r0, 8006f3e if (NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) { 8006f02: f104 0814 add.w r8, r4, #20 8006f06: 4640 mov r0, r8 8006f08: f006 f82b bl 800cf62 8006f0c: b9e0 cbnz r0, 8006f48 if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || 8006f0e: 2e04 cmp r6, #4 8006f10: bf18 it ne 8006f12: 2e01 cmpne r6, #1 8006f14: d01d beq.n 8006f52 8006f16: 2e03 cmp r6, #3 8006f18: d01b beq.n 8006f52 LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); 8006f1a: 6ae3 ldr r3, [r4, #44] @ 0x2c 8006f1c: b3a3 cbz r3, 8006f88 8006f1e: 4b25 ldr r3, [pc, #148] @ (8006fb4 ) 8006f20: f240 12f7 movw r2, #503 @ 0x1f7 8006f24: 4924 ldr r1, [pc, #144] @ (8006fb8 ) 8006f26: 4825 ldr r0, [pc, #148] @ (8006fbc ) 8006f28: f00c fa6e bl 8013408 } 8006f2c: e02c b.n 8006f88 LWIP_ASSERT("conn != NULL", (conn != NULL)); 8006f2e: 4b21 ldr r3, [pc, #132] @ (8006fb4 ) 8006f30: f44f 72dc mov.w r2, #440 @ 0x1b8 8006f34: 4922 ldr r1, [pc, #136] @ (8006fc0 ) 8006f36: 4821 ldr r0, [pc, #132] @ (8006fbc ) 8006f38: f00c fa66 bl 8013408 8006f3c: e7b6 b.n 8006eac sys_mbox_trypost(&conn->recvmbox, mbox_msg); 8006f3e: 4639 mov r1, r7 8006f40: 4640 mov r0, r8 8006f42: f005 ffd2 bl 800ceea 8006f46: e7dc b.n 8006f02 sys_mbox_trypost(&conn->acceptmbox, mbox_msg); 8006f48: 4639 mov r1, r7 8006f4a: 4640 mov r0, r8 8006f4c: f005 ffcd bl 800ceea 8006f50: e7dd b.n 8006f0e int was_nonblocking_connect = IN_NONBLOCKING_CONNECT(conn); 8006f52: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 SET_NONBLOCKING_CONNECT(conn, 0); 8006f56: f003 02fb and.w r2, r3, #251 @ 0xfb 8006f5a: f884 2028 strb.w r2, [r4, #40] @ 0x28 if (!was_nonblocking_connect) { 8006f5e: f013 0f04 tst.w r3, #4 8006f62: d111 bne.n 8006f88 LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8006f64: 6ae3 ldr r3, [r4, #44] @ 0x2c 8006f66: b18b cbz r3, 8006f8c if (old_state == NETCONN_CLOSE) { 8006f68: 2e04 cmp r6, #4 8006f6a: d017 beq.n 8006f9c conn->current_msg->err = err; 8006f6c: 6ae3 ldr r3, [r4, #44] @ 0x2c 8006f6e: 711d strb r5, [r3, #4] op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8006f70: 6ae3 ldr r3, [r4, #44] @ 0x2c 8006f72: 681d ldr r5, [r3, #0] 8006f74: 350c adds r5, #12 LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); 8006f76: 4628 mov r0, r5 8006f78: f006 f839 bl 800cfee 8006f7c: b190 cbz r0, 8006fa4 conn->current_msg = NULL; 8006f7e: 2300 movs r3, #0 8006f80: 62e3 str r3, [r4, #44] @ 0x2c sys_sem_signal(op_completed_sem); 8006f82: 4628 mov r0, r5 8006f84: f006 f829 bl 800cfda } 8006f88: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8006f8c: 4b09 ldr r3, [pc, #36] @ (8006fb4 ) 8006f8e: f44f 72f3 mov.w r2, #486 @ 0x1e6 8006f92: 490c ldr r1, [pc, #48] @ (8006fc4 ) 8006f94: 4809 ldr r0, [pc, #36] @ (8006fbc ) 8006f96: f00c fa37 bl 8013408 8006f9a: e7e5 b.n 8006f68 conn->current_msg->err = ERR_OK; 8006f9c: 6ae3 ldr r3, [r4, #44] @ 0x2c 8006f9e: 2200 movs r2, #0 8006fa0: 711a strb r2, [r3, #4] 8006fa2: e7e5 b.n 8006f70 LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); 8006fa4: 4b03 ldr r3, [pc, #12] @ (8006fb4 ) 8006fa6: f240 12ef movw r2, #495 @ 0x1ef 8006faa: 4907 ldr r1, [pc, #28] @ (8006fc8 ) 8006fac: 4803 ldr r0, [pc, #12] @ (8006fbc ) 8006fae: f00c fa2b bl 8013408 8006fb2: e7e4 b.n 8006f7e 8006fb4: 0801491c .word 0x0801491c 8006fb8: 08014a5c .word 0x08014a5c 8006fbc: 080144e8 .word 0x080144e8 8006fc0: 08014a14 .word 0x08014a14 8006fc4: 08014a24 .word 0x08014a24 8006fc8: 08014a40 .word 0x08014a40 08006fcc : LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; if (conn == NULL) { 8006fcc: 2800 cmp r0, #0 8006fce: d060 beq.n 8007092 { 8006fd0: b570 push {r4, r5, r6, lr} 8006fd2: 4616 mov r6, r2 8006fd4: 4604 mov r4, r0 return ERR_VAL; } LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); 8006fd6: 7843 ldrb r3, [r0, #1] 8006fd8: 2b03 cmp r3, #3 8006fda: d132 bne.n 8007042 LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", 8006fdc: 6ae3 ldr r3, [r4, #44] @ 0x2c 8006fde: 2b00 cmp r3, #0 8006fe0: d037 beq.n 8007052 (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); if (conn->current_msg != NULL) { 8006fe2: 6ae5 ldr r5, [r4, #44] @ 0x2c 8006fe4: b11d cbz r5, 8006fee conn->current_msg->err = err; 8006fe6: 712e strb r6, [r5, #4] op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8006fe8: 6ae3 ldr r3, [r4, #44] @ 0x2c 8006fea: 681d ldr r5, [r3, #0] 8006fec: 350c adds r5, #12 } if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) { 8006fee: 7823 ldrb r3, [r4, #0] 8006ff0: f003 03f0 and.w r3, r3, #240 @ 0xf0 8006ff4: 2b10 cmp r3, #16 8006ff6: d039 beq.n 800706c setup_tcp(conn); } was_blocking = !IN_NONBLOCKING_CONNECT(conn); 8006ff8: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8006ffc: f003 0604 and.w r6, r3, #4 8007000: 2e00 cmp r6, #0 8007002: bf0c ite eq 8007004: 2201 moveq r2, #1 8007006: 2200 movne r2, #0 SET_NONBLOCKING_CONNECT(conn, 0); 8007008: f003 03fb and.w r3, r3, #251 @ 0xfb 800700c: f884 3028 strb.w r3, [r4, #40] @ 0x28 LWIP_ASSERT("blocking connect state error", 8007010: bf14 ite ne 8007012: 2301 movne r3, #1 8007014: 2300 moveq r3, #0 8007016: 2d00 cmp r5, #0 8007018: bf08 it eq 800701a: f043 0301 orreq.w r3, r3, #1 800701e: b123 cbz r3, 800702a 8007020: 2d00 cmp r5, #0 8007022: bf18 it ne 8007024: f042 0201 orrne.w r2, r2, #1 8007028: bb32 cbnz r2, 8007078 (was_blocking && op_completed_sem != NULL) || (!was_blocking && op_completed_sem == NULL)); conn->current_msg = NULL; 800702a: 2300 movs r3, #0 800702c: 62e3 str r3, [r4, #44] @ 0x2c conn->state = NETCONN_NONE; 800702e: 7063 strb r3, [r4, #1] API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8007030: 6b23 ldr r3, [r4, #48] @ 0x30 8007032: b11b cbz r3, 800703c 8007034: 2200 movs r2, #0 8007036: 2102 movs r1, #2 8007038: 4620 mov r0, r4 800703a: 4798 blx r3 if (was_blocking) { 800703c: b326 cbz r6, 8007088 sys_sem_signal(op_completed_sem); } return ERR_OK; 800703e: 2000 movs r0, #0 } 8007040: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); 8007042: 4b15 ldr r3, [pc, #84] @ (8007098 ) 8007044: f240 5223 movw r2, #1315 @ 0x523 8007048: 4914 ldr r1, [pc, #80] @ (800709c ) 800704a: 4815 ldr r0, [pc, #84] @ (80070a0 ) 800704c: f00c f9dc bl 8013408 8007050: e7c4 b.n 8006fdc LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", 8007052: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8007056: f013 0f04 tst.w r3, #4 800705a: d1c2 bne.n 8006fe2 800705c: 4b0e ldr r3, [pc, #56] @ (8007098 ) 800705e: f240 5224 movw r2, #1316 @ 0x524 8007062: 4910 ldr r1, [pc, #64] @ (80070a4 ) 8007064: 480e ldr r0, [pc, #56] @ (80070a0 ) 8007066: f00c f9cf bl 8013408 800706a: e7ba b.n 8006fe2 if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) { 800706c: 2e00 cmp r6, #0 800706e: d1c3 bne.n 8006ff8 setup_tcp(conn); 8007070: 4620 mov r0, r4 8007072: f7ff feb1 bl 8006dd8 8007076: e7bf b.n 8006ff8 LWIP_ASSERT("blocking connect state error", 8007078: 4b07 ldr r3, [pc, #28] @ (8007098 ) 800707a: f44f 62a6 mov.w r2, #1328 @ 0x530 800707e: 490a ldr r1, [pc, #40] @ (80070a8 ) 8007080: 4807 ldr r0, [pc, #28] @ (80070a0 ) 8007082: f00c f9c1 bl 8013408 8007086: e7d0 b.n 800702a sys_sem_signal(op_completed_sem); 8007088: 4628 mov r0, r5 800708a: f005 ffa6 bl 800cfda return ERR_OK; 800708e: 2000 movs r0, #0 8007090: e7d6 b.n 8007040 return ERR_VAL; 8007092: f06f 0005 mvn.w r0, #5 } 8007096: 4770 bx lr 8007098: 0801491c .word 0x0801491c 800709c: 08014a78 .word 0x08014a78 80070a0: 080144e8 .word 0x080144e8 80070a4: 08014a98 .word 0x08014a98 80070a8: 08014ad8 .word 0x08014ad8 080070ac : * @return ERR_OK * ERR_MEM if LWIP_TCPIP_CORE_LOCKING=1 and sending hasn't yet finished */ static err_t lwip_netconn_do_writemore(struct netconn *conn WRITE_DELAYED_PARAM) { 80070ac: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80070b0: 468b mov fp, r1 size_t diff; u8_t dontblock; u8_t apiflags; u8_t write_more; LWIP_ASSERT("conn != NULL", conn != NULL); 80070b2: 4605 mov r5, r0 80070b4: b1e8 cbz r0, 80070f2 LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); 80070b6: 786b ldrb r3, [r5, #1] 80070b8: 2b01 cmp r3, #1 80070ba: d122 bne.n 8007102 LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 80070bc: 6aeb ldr r3, [r5, #44] @ 0x2c 80070be: b343 cbz r3, 8007112 LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); 80070c0: 686b ldr r3, [r5, #4] 80070c2: b373 cbz r3, 8007122 LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len", 80070c4: 6aeb ldr r3, [r5, #44] @ 0x2c 80070c6: 699a ldr r2, [r3, #24] 80070c8: 695b ldr r3, [r3, #20] 80070ca: 429a cmp r2, r3 80070cc: d231 bcs.n 8007132 conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len); LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0); 80070ce: 6aeb ldr r3, [r5, #44] @ 0x2c 80070d0: 899b ldrh r3, [r3, #12] 80070d2: 2b00 cmp r3, #0 80070d4: d035 beq.n 8007142 apiflags = conn->current_msg->msg.w.apiflags; 80070d6: 6aeb ldr r3, [r5, #44] @ 0x2c 80070d8: f893 801c ldrb.w r8, [r3, #28] dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 80070dc: f895 3028 ldrb.w r3, [r5, #40] @ 0x28 80070e0: f013 0f02 tst.w r3, #2 80070e4: d135 bne.n 8007152 80070e6: f018 0f04 tst.w r8, #4 80070ea: d037 beq.n 800715c 80070ec: f04f 0a01 mov.w sl, #1 80070f0: e031 b.n 8007156 LWIP_ASSERT("conn != NULL", conn != NULL); 80070f2: 4b8d ldr r3, [pc, #564] @ (8007328 ) 80070f4: f240 6273 movw r2, #1651 @ 0x673 80070f8: 498c ldr r1, [pc, #560] @ (800732c ) 80070fa: 488d ldr r0, [pc, #564] @ (8007330 ) 80070fc: f00c f984 bl 8013408 8007100: e7d9 b.n 80070b6 LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); 8007102: 4b89 ldr r3, [pc, #548] @ (8007328 ) 8007104: f240 6274 movw r2, #1652 @ 0x674 8007108: 498a ldr r1, [pc, #552] @ (8007334 ) 800710a: 4889 ldr r0, [pc, #548] @ (8007330 ) 800710c: f00c f97c bl 8013408 8007110: e7d4 b.n 80070bc LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8007112: 4b85 ldr r3, [pc, #532] @ (8007328 ) 8007114: f240 6275 movw r2, #1653 @ 0x675 8007118: 4987 ldr r1, [pc, #540] @ (8007338 ) 800711a: 4885 ldr r0, [pc, #532] @ (8007330 ) 800711c: f00c f974 bl 8013408 8007120: e7ce b.n 80070c0 LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); 8007122: 4b81 ldr r3, [pc, #516] @ (8007328 ) 8007124: f240 6276 movw r2, #1654 @ 0x676 8007128: 4984 ldr r1, [pc, #528] @ (800733c ) 800712a: 4881 ldr r0, [pc, #516] @ (8007330 ) 800712c: f00c f96c bl 8013408 8007130: e7c8 b.n 80070c4 LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len", 8007132: 4b7d ldr r3, [pc, #500] @ (8007328 ) 8007134: f240 6277 movw r2, #1655 @ 0x677 8007138: 4981 ldr r1, [pc, #516] @ (8007340 ) 800713a: 487d ldr r0, [pc, #500] @ (8007330 ) 800713c: f00c f964 bl 8013408 8007140: e7c5 b.n 80070ce LWIP_ASSERT("conn->current_msg->msg.w.vector_cnt > 0", conn->current_msg->msg.w.vector_cnt > 0); 8007142: 4b79 ldr r3, [pc, #484] @ (8007328 ) 8007144: f240 6279 movw r2, #1657 @ 0x679 8007148: 497e ldr r1, [pc, #504] @ (8007344 ) 800714a: 4879 ldr r0, [pc, #484] @ (8007330 ) 800714c: f00c f95c bl 8013408 8007150: e7c1 b.n 80070d6 dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8007152: f04f 0a01 mov.w sl, #1 8007156: fa5f fa8a uxtb.w sl, sl 800715a: e061 b.n 8007220 800715c: f04f 0a00 mov.w sl, #0 8007160: e7f9 b.n 8007156 diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off; if (diff > 0xffffUL) { /* max_u16_t */ len = 0xffff; apiflags |= TCP_WRITE_FLAG_MORE; } else { len = (u16_t)diff; 8007162: b2b4 uxth r4, r6 8007164: e06a b.n 800723c /* don't try to write more than sendbuf */ len = available; if (dontblock) { if (!len) { /* set error according to partial write or not */ err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 8007166: 6993 ldr r3, [r2, #24] 8007168: b9c3 cbnz r3, 800719c 800716a: f06f 0406 mvn.w r4, #6 } } while (write_more && err == ERR_OK); /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { err_mem: if (dontblock && (conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len)) { 800716e: f1ba 0f00 cmp.w sl, #0 8007172: f000 8094 beq.w 800729e 8007176: 6aeb ldr r3, [r5, #44] @ 0x2c 8007178: 699a ldr r2, [r3, #24] 800717a: 695b ldr r3, [r3, #20] 800717c: 429a cmp r2, r3 800717e: f080 808e bcs.w 800729e /* non-blocking write did not write everything: mark the pcb non-writable and let poll_tcp check writable space to mark the pcb writable again */ API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0); 8007182: 6b2b ldr r3, [r5, #48] @ 0x30 8007184: b11b cbz r3, 800718e 8007186: 2200 movs r2, #0 8007188: 2103 movs r1, #3 800718a: 4628 mov r0, r5 800718c: 4798 blx r3 conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; 800718e: f895 3028 ldrb.w r3, [r5, #40] @ 0x28 8007192: f043 0310 orr.w r3, r3, #16 8007196: f885 3028 strb.w r3, [r5, #40] @ 0x28 800719a: e091 b.n 80072c0 err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 800719c: 2400 movs r4, #0 goto err_mem; 800719e: e7e6 b.n 800716e apiflags |= TCP_WRITE_FLAG_MORE; 80071a0: f048 0802 orr.w r8, r8, #2 len = available; 80071a4: 4604 mov r4, r0 LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", 80071a6: 46a1 mov r9, r4 80071a8: 4423 add r3, r4 80071aa: 4299 cmp r1, r3 80071ac: d30e bcc.n 80071cc if ((len == 0xffff && diff > 0xffffUL) || 80071ae: f64f 73ff movw r3, #65535 @ 0xffff 80071b2: 429c cmp r4, r3 80071b4: bf14 ite ne 80071b6: 2200 movne r2, #0 80071b8: 2201 moveq r2, #1 80071ba: 429e cmp r6, r3 80071bc: bf98 it ls 80071be: 2200 movls r2, #0 80071c0: b982 cbnz r2, 80071e4 (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 80071c2: b2b6 uxth r6, r6 if ((len == 0xffff && diff > 0xffffUL) || 80071c4: 42a6 cmp r6, r4 80071c6: d009 beq.n 80071dc write_more = 0; 80071c8: 2600 movs r6, #0 80071ca: e00e b.n 80071ea LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", 80071cc: 4b56 ldr r3, [pc, #344] @ (8007328 ) 80071ce: f240 62a3 movw r2, #1699 @ 0x6a3 80071d2: 495d ldr r1, [pc, #372] @ (8007348 ) 80071d4: 4856 ldr r0, [pc, #344] @ (8007330 ) 80071d6: f00c f917 bl 8013408 80071da: e7e8 b.n 80071ae (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 80071dc: 6aeb ldr r3, [r5, #44] @ 0x2c 80071de: 899b ldrh r3, [r3, #12] 80071e0: 2b01 cmp r3, #1 80071e2: d937 bls.n 8007254 apiflags |= TCP_WRITE_FLAG_MORE; 80071e4: f048 0802 orr.w r8, r8, #2 write_more = 1; 80071e8: 2601 movs r6, #1 err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); 80071ea: 4643 mov r3, r8 80071ec: 4622 mov r2, r4 80071ee: 4639 mov r1, r7 80071f0: 6868 ldr r0, [r5, #4] 80071f2: f009 f84f bl 8010294 if (err == ERR_OK) { 80071f6: 4604 mov r4, r0 80071f8: b968 cbnz r0, 8007216 conn->current_msg->msg.w.offset += len; 80071fa: 6aea ldr r2, [r5, #44] @ 0x2c 80071fc: 6993 ldr r3, [r2, #24] 80071fe: 444b add r3, r9 8007200: 6193 str r3, [r2, #24] conn->current_msg->msg.w.vector_off += len; 8007202: 6aea ldr r2, [r5, #44] @ 0x2c 8007204: 6913 ldr r3, [r2, #16] 8007206: 444b add r3, r9 8007208: 6113 str r3, [r2, #16] if (conn->current_msg->msg.w.vector_off == conn->current_msg->msg.w.vector->len) { 800720a: 6aeb ldr r3, [r5, #44] @ 0x2c 800720c: 6919 ldr r1, [r3, #16] 800720e: 689a ldr r2, [r3, #8] 8007210: 6852 ldr r2, [r2, #4] 8007212: 4291 cmp r1, r2 8007214: d020 beq.n 8007258 } while (write_more && err == ERR_OK); 8007216: fab4 f384 clz r3, r4 800721a: 095b lsrs r3, r3, #5 800721c: b356 cbz r6, 8007274 800721e: b34b cbz r3, 8007274 dataptr = (const u8_t *)conn->current_msg->msg.w.vector->ptr + conn->current_msg->msg.w.vector_off; 8007220: 6aea ldr r2, [r5, #44] @ 0x2c 8007222: 6891 ldr r1, [r2, #8] 8007224: 680f ldr r7, [r1, #0] 8007226: 6913 ldr r3, [r2, #16] 8007228: 441f add r7, r3 diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off; 800722a: 6849 ldr r1, [r1, #4] 800722c: 1ace subs r6, r1, r3 if (diff > 0xffffUL) { /* max_u16_t */ 800722e: f5b6 3f80 cmp.w r6, #65536 @ 0x10000 8007232: d396 bcc.n 8007162 apiflags |= TCP_WRITE_FLAG_MORE; 8007234: f048 0802 orr.w r8, r8, #2 len = 0xffff; 8007238: f64f 74ff movw r4, #65535 @ 0xffff available = tcp_sndbuf(conn->pcb.tcp); 800723c: 6868 ldr r0, [r5, #4] 800723e: f8b0 0064 ldrh.w r0, [r0, #100] @ 0x64 if (available < len) { 8007242: 4284 cmp r4, r0 8007244: d9af bls.n 80071a6 if (dontblock) { 8007246: f1ba 0f00 cmp.w sl, #0 800724a: d0a9 beq.n 80071a0 if (!len) { 800724c: 2800 cmp r0, #0 800724e: d08a beq.n 8007166 len = available; 8007250: 4604 mov r4, r0 8007252: e7a8 b.n 80071a6 write_more = 0; 8007254: 2600 movs r6, #0 8007256: e7c8 b.n 80071ea conn->current_msg->msg.w.vector_cnt--; 8007258: 899a ldrh r2, [r3, #12] 800725a: 3a01 subs r2, #1 800725c: 819a strh r2, [r3, #12] if (conn->current_msg->msg.w.vector_cnt > 0) { 800725e: 6aeb ldr r3, [r5, #44] @ 0x2c 8007260: 899a ldrh r2, [r3, #12] 8007262: 2a00 cmp r2, #0 8007264: d0d7 beq.n 8007216 conn->current_msg->msg.w.vector++; 8007266: 689a ldr r2, [r3, #8] 8007268: 3208 adds r2, #8 800726a: 609a str r2, [r3, #8] conn->current_msg->msg.w.vector_off = 0; 800726c: 6aeb ldr r3, [r5, #44] @ 0x2c 800726e: 2200 movs r2, #0 8007270: 611a str r2, [r3, #16] 8007272: e7d0 b.n 8007216 if ((err == ERR_OK) || (err == ERR_MEM)) { 8007274: 1c63 adds r3, r4, #1 8007276: b2db uxtb r3, r3 8007278: 2b01 cmp r3, #1 800727a: f67f af78 bls.w 800716e don't try writing any more but return the error to the application thread. */ err = out_err; write_finished = 1; } } else if (err == ERR_MEM) { 800727e: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff 8007282: d038 beq.n 80072f6 } } if (write_finished) { /* everything was written: set back connection state and back to application task */ sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8007284: 6aeb ldr r3, [r5, #44] @ 0x2c 8007286: 6818 ldr r0, [r3, #0] 8007288: 300c adds r0, #12 conn->current_msg->err = err; 800728a: 711c strb r4, [r3, #4] conn->current_msg = NULL; 800728c: 2300 movs r3, #0 800728e: 62eb str r3, [r5, #44] @ 0x2c conn->state = NETCONN_NONE; 8007290: 706b strb r3, [r5, #1] #if LWIP_TCPIP_CORE_LOCKING if (delayed) 8007292: f1bb 0f00 cmp.w fp, #0 8007296: d142 bne.n 800731e #if LWIP_TCPIP_CORE_LOCKING else { return ERR_MEM; } #endif return ERR_OK; 8007298: 2000 movs r0, #0 } 800729a: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 800729e: 686b ldr r3, [r5, #4] 80072a0: f8b3 1064 ldrh.w r1, [r3, #100] @ 0x64 80072a4: f640 3269 movw r2, #2921 @ 0xb69 80072a8: 4291 cmp r1, r2 80072aa: d903 bls.n 80072b4 (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { 80072ac: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 80072b0: 2b07 cmp r3, #7 80072b2: d905 bls.n 80072c0 API_EVENT(conn, NETCONN_EVT_SENDMINUS, 0); 80072b4: 6b2b ldr r3, [r5, #48] @ 0x30 80072b6: b11b cbz r3, 80072c0 80072b8: 2200 movs r2, #0 80072ba: 2103 movs r1, #3 80072bc: 4628 mov r0, r5 80072be: 4798 blx r3 if (err == ERR_OK) { 80072c0: 2c00 cmp r4, #0 80072c2: d1dc bne.n 800727e if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) || dontblock) { 80072c4: 6aeb ldr r3, [r5, #44] @ 0x2c 80072c6: 699a ldr r2, [r3, #24] 80072c8: 695b ldr r3, [r3, #20] 80072ca: 429a cmp r2, r3 80072cc: d005 beq.n 80072da 80072ce: f1ba 0f00 cmp.w sl, #0 80072d2: d004 beq.n 80072de write_finished = 1; 80072d4: f04f 0a01 mov.w sl, #1 80072d8: e001 b.n 80072de 80072da: f04f 0a01 mov.w sl, #1 out_err = tcp_output(conn->pcb.tcp); 80072de: 6868 ldr r0, [r5, #4] 80072e0: f009 fdc0 bl 8010e64 if (out_err == ERR_RTE) { 80072e4: f110 0f04 cmn.w r0, #4 80072e8: d015 beq.n 8007316 if (write_finished) { 80072ea: f1ba 0f00 cmp.w sl, #0 80072ee: d1c9 bne.n 8007284 return ERR_MEM; 80072f0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80072f4: e7d1 b.n 800729a err_t out_err = tcp_output(conn->pcb.tcp); 80072f6: 6868 ldr r0, [r5, #4] 80072f8: f009 fdb4 bl 8010e64 80072fc: 4604 mov r4, r0 if (out_err == ERR_RTE) { 80072fe: f110 0f04 cmn.w r0, #4 8007302: d0bf beq.n 8007284 } else if (dontblock) { 8007304: f1ba 0f00 cmp.w sl, #0 8007308: d0f2 beq.n 80072f0 err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 800730a: 6aeb ldr r3, [r5, #44] @ 0x2c 800730c: 699b ldr r3, [r3, #24] 800730e: b923 cbnz r3, 800731a 8007310: f06f 0406 mvn.w r4, #6 8007314: e7b6 b.n 8007284 err = out_err; 8007316: 4604 mov r4, r0 8007318: e7b4 b.n 8007284 err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 800731a: 2400 movs r4, #0 800731c: e7b2 b.n 8007284 sys_sem_signal(op_completed_sem); 800731e: f005 fe5c bl 800cfda return ERR_OK; 8007322: 2000 movs r0, #0 8007324: e7b9 b.n 800729a 8007326: bf00 nop 8007328: 0801491c .word 0x0801491c 800732c: 08014a14 .word 0x08014a14 8007330: 080144e8 .word 0x080144e8 8007334: 08014af8 .word 0x08014af8 8007338: 08014a24 .word 0x08014a24 800733c: 08014b18 .word 0x08014b18 8007340: 08014b30 .word 0x08014b30 8007344: 08014b70 .word 0x08014b70 8007348: 08014b98 .word 0x08014b98 0800734c : { 800734c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8007350: 4688 mov r8, r1 LWIP_ASSERT("invalid conn", (conn != NULL)); 8007352: 4604 mov r4, r0 8007354: 2800 cmp r0, #0 8007356: d05b beq.n 8007410 LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)); 8007358: 7823 ldrb r3, [r4, #0] 800735a: f003 03f0 and.w r3, r3, #240 @ 0xf0 800735e: 2b10 cmp r3, #16 8007360: d15e bne.n 8007420 LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); 8007362: 7863 ldrb r3, [r4, #1] 8007364: 2b04 cmp r3, #4 8007366: d163 bne.n 8007430 LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); 8007368: 6863 ldr r3, [r4, #4] 800736a: 2b00 cmp r3, #0 800736c: d068 beq.n 8007440 LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 800736e: 6ae3 ldr r3, [r4, #44] @ 0x2c 8007370: 2b00 cmp r3, #0 8007372: d06d beq.n 8007450 tpcb = conn->pcb.tcp; 8007374: 6866 ldr r6, [r4, #4] shut = conn->current_msg->msg.sd.shut; 8007376: 6ae3 ldr r3, [r4, #44] @ 0x2c 8007378: 7a1b ldrb r3, [r3, #8] shut_rx = shut & NETCONN_SHUT_RD; 800737a: f003 0901 and.w r9, r3, #1 shut_tx = shut & NETCONN_SHUT_WR; 800737e: f003 0702 and.w r7, r3, #2 if (shut == NETCONN_SHUT_RDWR) { 8007382: 2b03 cmp r3, #3 8007384: d00f beq.n 80073a6 } else if (shut_rx && 8007386: f1b9 0f00 cmp.w r9, #0 800738a: d006 beq.n 800739a ((tpcb->state == FIN_WAIT_1) || 800738c: 7d32 ldrb r2, [r6, #20] (tpcb->state == FIN_WAIT_2) || 800738e: 1f53 subs r3, r2, #5 8007390: b2db uxtb r3, r3 } else if (shut_rx && 8007392: 2a08 cmp r2, #8 8007394: bf18 it ne 8007396: 2b01 cmpne r3, #1 8007398: d905 bls.n 80073a6 } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) { 800739a: 2f00 cmp r7, #0 800739c: d060 beq.n 8007460 800739e: 8b73 ldrh r3, [r6, #26] 80073a0: f013 0f10 tst.w r3, #16 80073a4: d05e beq.n 8007464 tcp_arg(tpcb, NULL); 80073a6: 2100 movs r1, #0 80073a8: 4630 mov r0, r6 80073aa: f006 f83d bl 800d428 80073ae: f04f 0a01 mov.w sl, #1 if (tpcb->state == LISTEN) { 80073b2: 7d33 ldrb r3, [r6, #20] 80073b4: 2b01 cmp r3, #1 80073b6: d058 beq.n 800746a if (shut_rx) { 80073b8: f1b9 0f00 cmp.w r9, #0 80073bc: d15a bne.n 8007474 if (shut_tx) { 80073be: 2f00 cmp r7, #0 80073c0: d161 bne.n 8007486 if (shut_close) { 80073c2: f1ba 0f00 cmp.w sl, #0 80073c6: d163 bne.n 8007490 err = tcp_shutdown(tpcb, shut_rx, shut_tx); 80073c8: 463a mov r2, r7 80073ca: 4649 mov r1, r9 80073cc: 4630 mov r0, r6 80073ce: f006 fd67 bl 800dea0 80073d2: 4605 mov r5, r0 if (err == ERR_OK) { 80073d4: 2d00 cmp r5, #0 80073d6: d06f beq.n 80074b8 if (err == ERR_MEM) { 80073d8: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff 80073dc: d16c bne.n 80074b8 if (conn->current_msg->msg.sd.polls_left == 0) { 80073de: 6ae3 ldr r3, [r4, #44] @ 0x2c 80073e0: 7a5b ldrb r3, [r3, #9] 80073e2: 2b00 cmp r3, #0 80073e4: d065 beq.n 80074b2 LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN)); 80073e6: 7d33 ldrb r3, [r6, #20] 80073e8: 2b01 cmp r3, #1 80073ea: f000 8097 beq.w 800751c if (shut_tx) { 80073ee: 2f00 cmp r7, #0 80073f0: f040 809c bne.w 800752c tcp_poll(tpcb, poll_tcp, 1); 80073f4: 2201 movs r2, #1 80073f6: 4950 ldr r1, [pc, #320] @ (8007538 ) 80073f8: 4630 mov r0, r6 80073fa: f006 f877 bl 800d4ec tcp_err(tpcb, err_tcp); 80073fe: 494f ldr r1, [pc, #316] @ (800753c ) 8007400: 4630 mov r0, r6 8007402: f006 f84d bl 800d4a0 tcp_arg(tpcb, conn); 8007406: 4621 mov r1, r4 8007408: 4630 mov r0, r6 800740a: f006 f80d bl 800d428 return err; 800740e: e079 b.n 8007504 LWIP_ASSERT("invalid conn", (conn != NULL)); 8007410: 4b4b ldr r3, [pc, #300] @ (8007540 ) 8007412: f240 32a2 movw r2, #930 @ 0x3a2 8007416: 494b ldr r1, [pc, #300] @ (8007544 ) 8007418: 484b ldr r0, [pc, #300] @ (8007548 ) 800741a: f00b fff5 bl 8013408 800741e: e79b b.n 8007358 LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)); 8007420: 4b47 ldr r3, [pc, #284] @ (8007540 ) 8007422: f240 32a3 movw r2, #931 @ 0x3a3 8007426: 4949 ldr r1, [pc, #292] @ (800754c ) 8007428: 4847 ldr r0, [pc, #284] @ (8007548 ) 800742a: f00b ffed bl 8013408 800742e: e798 b.n 8007362 LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); 8007430: 4b43 ldr r3, [pc, #268] @ (8007540 ) 8007432: f44f 7269 mov.w r2, #932 @ 0x3a4 8007436: 4946 ldr r1, [pc, #280] @ (8007550 ) 8007438: 4843 ldr r0, [pc, #268] @ (8007548 ) 800743a: f00b ffe5 bl 8013408 800743e: e793 b.n 8007368 LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); 8007440: 4b3f ldr r3, [pc, #252] @ (8007540 ) 8007442: f240 32a5 movw r2, #933 @ 0x3a5 8007446: 4943 ldr r1, [pc, #268] @ (8007554 ) 8007448: 483f ldr r0, [pc, #252] @ (8007548 ) 800744a: f00b ffdd bl 8013408 800744e: e78e b.n 800736e LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8007450: 4b3b ldr r3, [pc, #236] @ (8007540 ) 8007452: f240 32a6 movw r2, #934 @ 0x3a6 8007456: 4940 ldr r1, [pc, #256] @ (8007558 ) 8007458: 483b ldr r0, [pc, #236] @ (8007548 ) 800745a: f00b ffd5 bl 8013408 800745e: e789 b.n 8007374 shut_close = 0; 8007460: 46ba mov sl, r7 8007462: e7a6 b.n 80073b2 8007464: f04f 0a00 mov.w sl, #0 8007468: e7a3 b.n 80073b2 tcp_accept(tpcb, NULL); 800746a: 2100 movs r1, #0 800746c: 4630 mov r0, r6 800746e: f006 f831 bl 800d4d4 8007472: e016 b.n 80074a2 tcp_recv(tpcb, NULL); 8007474: 2100 movs r1, #0 8007476: 4630 mov r0, r6 8007478: f005 ffde bl 800d438 tcp_accept(tpcb, NULL); 800747c: 2100 movs r1, #0 800747e: 4630 mov r0, r6 8007480: f006 f828 bl 800d4d4 8007484: e79b b.n 80073be tcp_sent(tpcb, NULL); 8007486: 2100 movs r1, #0 8007488: 4630 mov r0, r6 800748a: f005 ffef bl 800d46c 800748e: e798 b.n 80073c2 tcp_poll(tpcb, NULL, 0); 8007490: 2200 movs r2, #0 8007492: 4611 mov r1, r2 8007494: 4630 mov r0, r6 8007496: f006 f829 bl 800d4ec tcp_err(tpcb, NULL); 800749a: 2100 movs r1, #0 800749c: 4630 mov r0, r6 800749e: f005 ffff bl 800d4a0 if (shut_close) { 80074a2: f1ba 0f00 cmp.w sl, #0 80074a6: d08f beq.n 80073c8 err = tcp_close(tpcb); 80074a8: 4630 mov r0, r6 80074aa: f006 fc2b bl 800dd04 80074ae: 4605 mov r5, r0 80074b0: e790 b.n 80073d4 if (shut_close) { 80074b2: f1ba 0f00 cmp.w sl, #0 80074b6: d128 bne.n 800750a sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 80074b8: 6ae3 ldr r3, [r4, #44] @ 0x2c 80074ba: 681e ldr r6, [r3, #0] 80074bc: 360c adds r6, #12 conn->current_msg->err = err; 80074be: 711d strb r5, [r3, #4] conn->current_msg = NULL; 80074c0: 2300 movs r3, #0 80074c2: 62e3 str r3, [r4, #44] @ 0x2c conn->state = NETCONN_NONE; 80074c4: 7063 strb r3, [r4, #1] if (err == ERR_OK) { 80074c6: b9cd cbnz r5, 80074fc if (shut_close) { 80074c8: f1ba 0f00 cmp.w sl, #0 80074cc: d006 beq.n 80074dc conn->pcb.tcp = NULL; 80074ce: 6063 str r3, [r4, #4] API_EVENT(conn, NETCONN_EVT_ERROR, 0); 80074d0: 6b23 ldr r3, [r4, #48] @ 0x30 80074d2: b11b cbz r3, 80074dc 80074d4: 2200 movs r2, #0 80074d6: 2104 movs r1, #4 80074d8: 4620 mov r0, r4 80074da: 4798 blx r3 if (shut_rx) { 80074dc: f1b9 0f00 cmp.w r9, #0 80074e0: d005 beq.n 80074ee API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 80074e2: 6b23 ldr r3, [r4, #48] @ 0x30 80074e4: b11b cbz r3, 80074ee 80074e6: 2200 movs r2, #0 80074e8: 4611 mov r1, r2 80074ea: 4620 mov r0, r4 80074ec: 4798 blx r3 if (shut_tx) { 80074ee: b12f cbz r7, 80074fc API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 80074f0: 6b23 ldr r3, [r4, #48] @ 0x30 80074f2: b11b cbz r3, 80074fc 80074f4: 2200 movs r2, #0 80074f6: 2102 movs r1, #2 80074f8: 4620 mov r0, r4 80074fa: 4798 blx r3 if (delayed) 80074fc: f1b8 0f00 cmp.w r8, #0 8007500: d108 bne.n 8007514 return ERR_OK; 8007502: 2500 movs r5, #0 } 8007504: 4628 mov r0, r5 8007506: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} tcp_abort(tpcb); 800750a: 4630 mov r0, r6 800750c: f006 fa24 bl 800d958 err = ERR_OK; 8007510: 2500 movs r5, #0 8007512: e7d1 b.n 80074b8 sys_sem_signal(op_completed_sem); 8007514: 4630 mov r0, r6 8007516: f005 fd60 bl 800cfda 800751a: e7f2 b.n 8007502 LWIP_ASSERT("Closing a listen pcb may not fail!", (tpcb->state != LISTEN)); 800751c: 4b08 ldr r3, [pc, #32] @ (8007540 ) 800751e: f240 4241 movw r2, #1089 @ 0x441 8007522: 490e ldr r1, [pc, #56] @ (800755c ) 8007524: 4808 ldr r0, [pc, #32] @ (8007548 ) 8007526: f00b ff6f bl 8013408 800752a: e760 b.n 80073ee tcp_sent(tpcb, sent_tcp); 800752c: 490c ldr r1, [pc, #48] @ (8007560 ) 800752e: 4630 mov r0, r6 8007530: f005 ff9c bl 800d46c 8007534: e75e b.n 80073f4 8007536: bf00 nop 8007538: 08007565 .word 0x08007565 800753c: 08006ea1 .word 0x08006ea1 8007540: 0801491c .word 0x0801491c 8007544: 08014818 .word 0x08014818 8007548: 080144e8 .word 0x080144e8 800754c: 08014bc4 .word 0x08014bc4 8007550: 08014be4 .word 0x08014be4 8007554: 08014c08 .word 0x08014c08 8007558: 08014a24 .word 0x08014a24 800755c: 08014c1c .word 0x08014c1c 8007560: 080075ed .word 0x080075ed 08007564 : { 8007564: b510 push {r4, lr} LWIP_ASSERT("conn != NULL", (conn != NULL)); 8007566: 4604 mov r4, r0 8007568: b308 cbz r0, 80075ae if (conn->state == NETCONN_WRITE) { 800756a: 7863 ldrb r3, [r4, #1] 800756c: 2b01 cmp r3, #1 800756e: d026 beq.n 80075be } else if (conn->state == NETCONN_CLOSE) { 8007570: 2b04 cmp r3, #4 8007572: d029 beq.n 80075c8 if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { 8007574: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 8007578: f013 0f10 tst.w r3, #16 800757c: d015 beq.n 80075aa if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 800757e: 6862 ldr r2, [r4, #4] 8007580: b19a cbz r2, 80075aa 8007582: f8b2 0064 ldrh.w r0, [r2, #100] @ 0x64 8007586: f640 3169 movw r1, #2921 @ 0xb69 800758a: 4288 cmp r0, r1 800758c: d90d bls.n 80075aa (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 800758e: f8b2 2066 ldrh.w r2, [r2, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8007592: 2a07 cmp r2, #7 8007594: d809 bhi.n 80075aa netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8007596: f003 03ef and.w r3, r3, #239 @ 0xef 800759a: f884 3028 strb.w r3, [r4, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 800759e: 6b23 ldr r3, [r4, #48] @ 0x30 80075a0: b11b cbz r3, 80075aa 80075a2: 2200 movs r2, #0 80075a4: 2102 movs r1, #2 80075a6: 4620 mov r0, r4 80075a8: 4798 blx r3 } 80075aa: 2000 movs r0, #0 80075ac: bd10 pop {r4, pc} LWIP_ASSERT("conn != NULL", (conn != NULL)); 80075ae: 4b0c ldr r3, [pc, #48] @ (80075e0 ) 80075b0: f44f 72b5 mov.w r2, #362 @ 0x16a 80075b4: 490b ldr r1, [pc, #44] @ (80075e4 ) 80075b6: 480c ldr r0, [pc, #48] @ (80075e8 ) 80075b8: f00b ff26 bl 8013408 80075bc: e7d5 b.n 800756a lwip_netconn_do_writemore(conn WRITE_DELAYED); 80075be: 2101 movs r1, #1 80075c0: 4620 mov r0, r4 80075c2: f7ff fd73 bl 80070ac 80075c6: e7d5 b.n 8007574 if (conn->current_msg && conn->current_msg->msg.sd.polls_left) { 80075c8: 6ae3 ldr r3, [r4, #44] @ 0x2c 80075ca: b11b cbz r3, 80075d4 80075cc: 7a5a ldrb r2, [r3, #9] 80075ce: b10a cbz r2, 80075d4 conn->current_msg->msg.sd.polls_left--; 80075d0: 3a01 subs r2, #1 80075d2: 725a strb r2, [r3, #9] lwip_netconn_do_close_internal(conn WRITE_DELAYED); 80075d4: 2101 movs r1, #1 80075d6: 4620 mov r0, r4 80075d8: f7ff feb8 bl 800734c 80075dc: e7ca b.n 8007574 80075de: bf00 nop 80075e0: 0801491c .word 0x0801491c 80075e4: 08014a14 .word 0x08014a14 80075e8: 080144e8 .word 0x080144e8 080075ec : { 80075ec: b538 push {r3, r4, r5, lr} LWIP_ASSERT("conn != NULL", (conn != NULL)); 80075ee: b1f8 cbz r0, 8007630 80075f0: 4615 mov r5, r2 80075f2: 4604 mov r4, r0 if (conn->state == NETCONN_WRITE) { 80075f4: 7843 ldrb r3, [r0, #1] 80075f6: 2b01 cmp r3, #1 80075f8: d023 beq.n 8007642 } else if (conn->state == NETCONN_CLOSE) { 80075fa: 2b04 cmp r3, #4 80075fc: d025 beq.n 800764a if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 80075fe: 6863 ldr r3, [r4, #4] 8007600: b1eb cbz r3, 800763e 8007602: f8b3 1064 ldrh.w r1, [r3, #100] @ 0x64 8007606: f640 3269 movw r2, #2921 @ 0xb69 800760a: 4291 cmp r1, r2 800760c: d917 bls.n 800763e (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 800760e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8007612: 2b07 cmp r3, #7 8007614: d813 bhi.n 800763e netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8007616: f894 3028 ldrb.w r3, [r4, #40] @ 0x28 800761a: f003 03ef and.w r3, r3, #239 @ 0xef 800761e: f884 3028 strb.w r3, [r4, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); 8007622: 6b23 ldr r3, [r4, #48] @ 0x30 8007624: b15b cbz r3, 800763e 8007626: 462a mov r2, r5 8007628: 2102 movs r1, #2 800762a: 4620 mov r0, r4 800762c: 4798 blx r3 800762e: e006 b.n 800763e LWIP_ASSERT("conn != NULL", (conn != NULL)); 8007630: 4b08 ldr r3, [pc, #32] @ (8007654 ) 8007632: f240 1293 movw r2, #403 @ 0x193 8007636: 4908 ldr r1, [pc, #32] @ (8007658 ) 8007638: 4808 ldr r0, [pc, #32] @ (800765c ) 800763a: f00b fee5 bl 8013408 } 800763e: 2000 movs r0, #0 8007640: bd38 pop {r3, r4, r5, pc} lwip_netconn_do_writemore(conn WRITE_DELAYED); 8007642: 2101 movs r1, #1 8007644: f7ff fd32 bl 80070ac 8007648: e7d9 b.n 80075fe lwip_netconn_do_close_internal(conn WRITE_DELAYED); 800764a: 2101 movs r1, #1 800764c: f7ff fe7e bl 800734c 8007650: e7d5 b.n 80075fe 8007652: bf00 nop 8007654: 0801491c .word 0x0801491c 8007658: 08014a14 .word 0x08014a14 800765c: 080144e8 .word 0x080144e8 08007660 : { 8007660: b5f8 push {r3, r4, r5, r6, r7, lr} 8007662: 4604 mov r4, r0 8007664: 4615 mov r5, r2 8007666: 461e mov r6, r3 LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); 8007668: 460f mov r7, r1 800766a: 2900 cmp r1, #0 800766c: d02f beq.n 80076ce LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); 800766e: 2c00 cmp r4, #0 8007670: d035 beq.n 80076de LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK); 8007672: 2e00 cmp r6, #0 8007674: d13b bne.n 80076ee if (conn == NULL) { 8007676: 2c00 cmp r4, #0 8007678: d04e beq.n 8007718 LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); 800767a: 6863 ldr r3, [r4, #4] 800767c: 42bb cmp r3, r7 800767e: d006 beq.n 800768e 8007680: 4b28 ldr r3, [pc, #160] @ (8007724 ) 8007682: f240 1235 movw r2, #309 @ 0x135 8007686: 4928 ldr r1, [pc, #160] @ (8007728 ) 8007688: 4828 ldr r0, [pc, #160] @ (800772c ) 800768a: f00b febd bl 8013408 if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 800768e: f104 0610 add.w r6, r4, #16 8007692: 4630 mov r0, r6 8007694: f005 fc65 bl 800cf62 8007698: 2800 cmp r0, #0 800769a: d030 beq.n 80076fe if (p != NULL) { 800769c: 2d00 cmp r5, #0 800769e: d038 beq.n 8007712 len = p->tot_len; 80076a0: 892f ldrh r7, [r5, #8] if (sys_mbox_trypost(&conn->recvmbox, msg) != ERR_OK) { 80076a2: 4629 mov r1, r5 80076a4: 4630 mov r0, r6 80076a6: f005 fc20 bl 800ceea 80076aa: 4605 mov r5, r0 80076ac: 2800 cmp r0, #0 80076ae: d136 bne.n 800771e SYS_ARCH_INC(conn->recv_avail, len); 80076b0: f005 fcde bl 800d070 80076b4: 6a63 ldr r3, [r4, #36] @ 0x24 80076b6: 443b add r3, r7 80076b8: 6263 str r3, [r4, #36] @ 0x24 80076ba: f005 fce5 bl 800d088 API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 80076be: 6b23 ldr r3, [r4, #48] @ 0x30 80076c0: b11b cbz r3, 80076ca 80076c2: 463a mov r2, r7 80076c4: 2100 movs r1, #0 80076c6: 4620 mov r0, r4 80076c8: 4798 blx r3 } 80076ca: 4628 mov r0, r5 80076cc: bdf8 pop {r3, r4, r5, r6, r7, pc} LWIP_ASSERT("recv_tcp must have a pcb argument", pcb != NULL); 80076ce: 4b15 ldr r3, [pc, #84] @ (8007724 ) 80076d0: f44f 7296 mov.w r2, #300 @ 0x12c 80076d4: 4916 ldr r1, [pc, #88] @ (8007730 ) 80076d6: 4815 ldr r0, [pc, #84] @ (800772c ) 80076d8: f00b fe96 bl 8013408 80076dc: e7c7 b.n 800766e LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); 80076de: 4b11 ldr r3, [pc, #68] @ (8007724 ) 80076e0: f240 122d movw r2, #301 @ 0x12d 80076e4: 4913 ldr r1, [pc, #76] @ (8007734 ) 80076e6: 4811 ldr r0, [pc, #68] @ (800772c ) 80076e8: f00b fe8e bl 8013408 80076ec: e7c1 b.n 8007672 LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK); 80076ee: 4b0d ldr r3, [pc, #52] @ (8007724 ) 80076f0: f44f 7297 mov.w r2, #302 @ 0x12e 80076f4: 4910 ldr r1, [pc, #64] @ (8007738 ) 80076f6: 480d ldr r0, [pc, #52] @ (800772c ) 80076f8: f00b fe86 bl 8013408 80076fc: e7bb b.n 8007676 if (p != NULL) { 80076fe: b135 cbz r5, 800770e tcp_recved(pcb, p->tot_len); 8007700: 8929 ldrh r1, [r5, #8] 8007702: 4638 mov r0, r7 8007704: f005 fe12 bl 800d32c pbuf_free(p); 8007708: 4628 mov r0, r5 800770a: f004 fb49 bl 800bda0 return ERR_OK; 800770e: 2500 movs r5, #0 8007710: e7db b.n 80076ca msg = LWIP_CONST_CAST(void *, &netconn_closed); 8007712: 4d0a ldr r5, [pc, #40] @ (800773c ) len = 0; 8007714: 2700 movs r7, #0 8007716: e7c4 b.n 80076a2 return ERR_VAL; 8007718: f06f 0505 mvn.w r5, #5 800771c: e7d5 b.n 80076ca return ERR_MEM; 800771e: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 8007722: e7d2 b.n 80076ca 8007724: 0801491c .word 0x0801491c 8007728: 08014c9c .word 0x08014c9c 800772c: 080144e8 .word 0x080144e8 8007730: 08014c40 .word 0x08014c40 8007734: 08014c64 .word 0x08014c64 8007738: 08014c84 .word 0x08014c84 800773c: 08014e31 .word 0x08014e31 08007740 : { 8007740: b538 push {r3, r4, r5, lr} 8007742: 4604 mov r4, r0 LWIP_ASSERT("err != NULL", err != NULL); 8007744: 460d mov r5, r1 8007746: b151 cbz r1, 800775e if (msg == &netconn_aborted) { 8007748: 4b0e ldr r3, [pc, #56] @ (8007784 ) 800774a: 429c cmp r4, r3 800774c: d00e beq.n 800776c } else if (msg == &netconn_reset) { 800774e: 4b0e ldr r3, [pc, #56] @ (8007788 ) 8007750: 429c cmp r4, r3 8007752: d00f beq.n 8007774 } else if (msg == &netconn_closed) { 8007754: 4b0d ldr r3, [pc, #52] @ (800778c ) 8007756: 429c cmp r4, r3 8007758: d010 beq.n 800777c return 0; 800775a: 2000 movs r0, #0 } 800775c: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("err != NULL", err != NULL); 800775e: 4b0c ldr r3, [pc, #48] @ (8007790 ) 8007760: 2285 movs r2, #133 @ 0x85 8007762: 490c ldr r1, [pc, #48] @ (8007794 ) 8007764: 480c ldr r0, [pc, #48] @ (8007798 ) 8007766: f00b fe4f bl 8013408 800776a: e7ed b.n 8007748 *err = ERR_ABRT; 800776c: 23f3 movs r3, #243 @ 0xf3 800776e: 702b strb r3, [r5, #0] return 1; 8007770: 2001 movs r0, #1 8007772: e7f3 b.n 800775c *err = ERR_RST; 8007774: 23f2 movs r3, #242 @ 0xf2 8007776: 702b strb r3, [r5, #0] return 1; 8007778: 2001 movs r0, #1 800777a: e7ef b.n 800775c *err = ERR_CLSD; 800777c: 23f1 movs r3, #241 @ 0xf1 800777e: 702b strb r3, [r5, #0] return 1; 8007780: 2001 movs r0, #1 8007782: e7eb b.n 800775c 8007784: 08014e33 .word 0x08014e33 8007788: 08014e32 .word 0x08014e32 800778c: 08014e31 .word 0x08014e31 8007790: 0801491c .word 0x0801491c 8007794: 08014cbc .word 0x08014cbc 8007798: 080144e8 .word 0x080144e8 0800779c : { 800779c: b508 push {r3, lr} msg->err = ERR_OK; 800779e: 2300 movs r3, #0 80077a0: 7103 strb r3, [r0, #4] if (msg->conn->pcb.tcp == NULL) { 80077a2: 6803 ldr r3, [r0, #0] 80077a4: 685b ldr r3, [r3, #4] 80077a6: b103 cbz r3, 80077aa } 80077a8: bd08 pop {r3, pc} pcb_new(msg); 80077aa: f7ff fb35 bl 8006e18 } 80077ae: e7fb b.n 80077a8 080077b0 : { 80077b0: b570 push {r4, r5, r6, lr} 80077b2: 4605 mov r5, r0 80077b4: 460e mov r6, r1 conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 80077b6: 2007 movs r0, #7 80077b8: f003 ff24 bl 800b604 if (conn == NULL) { 80077bc: 4604 mov r4, r0 80077be: b3a0 cbz r0, 800782a conn->pending_err = ERR_OK; 80077c0: 2300 movs r3, #0 80077c2: 7203 strb r3, [r0, #8] conn->type = t; 80077c4: 7005 strb r5, [r0, #0] conn->pcb.tcp = NULL; 80077c6: 6043 str r3, [r0, #4] switch (NETCONNTYPE_GROUP(t)) { 80077c8: f005 05f0 and.w r5, r5, #240 @ 0xf0 80077cc: 2d10 cmp r5, #16 80077ce: d001 beq.n 80077d4 80077d0: 2d20 cmp r5, #32 80077d2: d11e bne.n 8007812 if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { 80077d4: f104 0510 add.w r5, r4, #16 80077d8: 2106 movs r1, #6 80077da: 4628 mov r0, r5 80077dc: f005 fb6e bl 800cebc 80077e0: b9f0 cbnz r0, 8007820 if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) { 80077e2: 2100 movs r1, #0 80077e4: f104 000c add.w r0, r4, #12 80077e8: f005 fbc4 bl 800cf74 80077ec: b9f8 cbnz r0, 800782e sys_mbox_set_invalid(&conn->acceptmbox); 80077ee: f104 0014 add.w r0, r4, #20 80077f2: f005 fbbc bl 800cf6e conn->state = NETCONN_NONE; 80077f6: 2300 movs r3, #0 80077f8: 7063 strb r3, [r4, #1] conn->socket = -1; 80077fa: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80077fe: 61a2 str r2, [r4, #24] conn->callback = callback; 8007800: 6326 str r6, [r4, #48] @ 0x30 conn->current_msg = NULL; 8007802: 62e3 str r3, [r4, #44] @ 0x2c conn->recv_timeout = 0; 8007804: 61e3 str r3, [r4, #28] conn->recv_bufsize = RECV_BUFSIZE_DEFAULT; 8007806: 4a0c ldr r2, [pc, #48] @ (8007838 ) 8007808: 6222 str r2, [r4, #32] conn->recv_avail = 0; 800780a: 6263 str r3, [r4, #36] @ 0x24 conn->flags = init_flags; 800780c: f884 3028 strb.w r3, [r4, #40] @ 0x28 return conn; 8007810: e00b b.n 800782a LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); 8007812: 4b0a ldr r3, [pc, #40] @ (800783c ) 8007814: f240 22e5 movw r2, #741 @ 0x2e5 8007818: 4909 ldr r1, [pc, #36] @ (8007840 ) 800781a: 480a ldr r0, [pc, #40] @ (8007844 ) 800781c: f00b fdf4 bl 8013408 memp_free(MEMP_NETCONN, conn); 8007820: 4621 mov r1, r4 8007822: 2007 movs r0, #7 8007824: f003 ff24 bl 800b670 return NULL; 8007828: 2400 movs r4, #0 } 800782a: 4620 mov r0, r4 800782c: bd70 pop {r4, r5, r6, pc} sys_mbox_free(&conn->recvmbox); 800782e: 4628 mov r0, r5 8007830: f005 fb52 bl 800ced8 goto free_and_return; 8007834: e7f4 b.n 8007820 8007836: bf00 nop 8007838: 77359400 .word 0x77359400 800783c: 0801491c .word 0x0801491c 8007840: 08014cc8 .word 0x08014cc8 8007844: 080144e8 .word 0x080144e8 08007848 : { 8007848: b538 push {r3, r4, r5, lr} 800784a: 4604 mov r4, r0 LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL); 800784c: 6843 ldr r3, [r0, #4] 800784e: b133 cbz r3, 800785e 8007850: 4b16 ldr r3, [pc, #88] @ (80078ac ) 8007852: f44f 7247 mov.w r2, #796 @ 0x31c 8007856: 4916 ldr r1, [pc, #88] @ (80078b0 ) 8007858: 4816 ldr r0, [pc, #88] @ (80078b4 ) 800785a: f00b fdd5 bl 8013408 LWIP_ASSERT("recvmbox must be deallocated before calling this function", 800785e: f104 0010 add.w r0, r4, #16 8007862: f005 fb7e bl 800cf62 8007866: b988 cbnz r0, 800788c LWIP_ASSERT("acceptmbox must be deallocated before calling this function", 8007868: f104 0014 add.w r0, r4, #20 800786c: f005 fb79 bl 800cf62 8007870: b9a0 cbnz r0, 800789c sys_sem_free(&conn->op_completed); 8007872: f104 050c add.w r5, r4, #12 8007876: 4628 mov r0, r5 8007878: f005 fbb4 bl 800cfe4 sys_sem_set_invalid(&conn->op_completed); 800787c: 4628 mov r0, r5 800787e: f005 fbbc bl 800cffa memp_free(MEMP_NETCONN, conn); 8007882: 4621 mov r1, r4 8007884: 2007 movs r0, #7 8007886: f003 fef3 bl 800b670 } 800788a: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("recvmbox must be deallocated before calling this function", 800788c: 4b07 ldr r3, [pc, #28] @ (80078ac ) 800788e: f240 3223 movw r2, #803 @ 0x323 8007892: 4909 ldr r1, [pc, #36] @ (80078b8 ) 8007894: 4807 ldr r0, [pc, #28] @ (80078b4 ) 8007896: f00b fdb7 bl 8013408 800789a: e7e5 b.n 8007868 LWIP_ASSERT("acceptmbox must be deallocated before calling this function", 800789c: 4b03 ldr r3, [pc, #12] @ (80078ac ) 800789e: f240 3226 movw r2, #806 @ 0x326 80078a2: 4906 ldr r1, [pc, #24] @ (80078bc ) 80078a4: 4803 ldr r0, [pc, #12] @ (80078b4 ) 80078a6: f00b fdaf bl 8013408 80078aa: e7e2 b.n 8007872 80078ac: 0801491c .word 0x0801491c 80078b0: 08014cf0 .word 0x08014cf0 80078b4: 080144e8 .word 0x080144e8 80078b8: 08014d20 .word 0x08014d20 80078bc: 08014d5c .word 0x08014d5c 080078c0 : { 80078c0: b530 push {r4, r5, lr} 80078c2: b083 sub sp, #12 80078c4: 4604 mov r4, r0 if (sys_mbox_valid(&conn->recvmbox)) { 80078c6: f100 0510 add.w r5, r0, #16 80078ca: 4628 mov r0, r5 80078cc: f005 fb49 bl 800cf62 80078d0: b958 cbnz r0, 80078ea if (sys_mbox_valid(&conn->acceptmbox)) { 80078d2: 3414 adds r4, #20 80078d4: 4620 mov r0, r4 80078d6: f005 fb44 bl 800cf62 80078da: bb20 cbnz r0, 8007926 80078dc: e043 b.n 8007966 if (!lwip_netconn_is_err_msg(mem, &err)) { 80078de: f10d 0103 add.w r1, sp, #3 80078e2: 9801 ldr r0, [sp, #4] 80078e4: f7ff ff2c bl 8007740 80078e8: b178 cbz r0, 800790a while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 80078ea: a901 add r1, sp, #4 80078ec: 4628 mov r0, r5 80078ee: f005 fb2d bl 800cf4c 80078f2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 80078f6: d00c beq.n 8007912 if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) { 80078f8: 7823 ldrb r3, [r4, #0] 80078fa: f003 03f0 and.w r3, r3, #240 @ 0xf0 80078fe: 2b10 cmp r3, #16 8007900: d0ed beq.n 80078de netbuf_delete((struct netbuf *)mem); 8007902: 9801 ldr r0, [sp, #4] 8007904: f003 fece bl 800b6a4 8007908: e7ef b.n 80078ea pbuf_free((struct pbuf *)mem); 800790a: 9801 ldr r0, [sp, #4] 800790c: f004 fa48 bl 800bda0 8007910: e7eb b.n 80078ea sys_mbox_free(&conn->recvmbox); 8007912: 4628 mov r0, r5 8007914: f005 fae0 bl 800ced8 sys_mbox_set_invalid(&conn->recvmbox); 8007918: 4628 mov r0, r5 800791a: f005 fb28 bl 800cf6e 800791e: e7d8 b.n 80078d2 netconn_free(newconn); 8007920: 4628 mov r0, r5 8007922: f7ff ff91 bl 8007848 while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 8007926: a901 add r1, sp, #4 8007928: 4620 mov r0, r4 800792a: f005 fb0f bl 800cf4c 800792e: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 8007932: d012 beq.n 800795a if (!lwip_netconn_is_err_msg(mem, &err)) { 8007934: f10d 0103 add.w r1, sp, #3 8007938: 9801 ldr r0, [sp, #4] 800793a: f7ff ff01 bl 8007740 800793e: 2800 cmp r0, #0 8007940: d1f1 bne.n 8007926 struct netconn *newconn = (struct netconn *)mem; 8007942: 9d01 ldr r5, [sp, #4] netconn_drain(newconn); 8007944: 4628 mov r0, r5 8007946: f7ff ffbb bl 80078c0 if (newconn->pcb.tcp != NULL) { 800794a: 6868 ldr r0, [r5, #4] 800794c: 2800 cmp r0, #0 800794e: d0e7 beq.n 8007920 tcp_abort(newconn->pcb.tcp); 8007950: f006 f802 bl 800d958 newconn->pcb.tcp = NULL; 8007954: 2300 movs r3, #0 8007956: 606b str r3, [r5, #4] 8007958: e7e2 b.n 8007920 sys_mbox_free(&conn->acceptmbox); 800795a: 4620 mov r0, r4 800795c: f005 fabc bl 800ced8 sys_mbox_set_invalid(&conn->acceptmbox); 8007960: 4620 mov r0, r4 8007962: f005 fb04 bl 800cf6e } 8007966: b003 add sp, #12 8007968: bd30 pop {r4, r5, pc} ... 0800796c : { 800796c: b538 push {r3, r4, r5, lr} 800796e: 4604 mov r4, r0 enum netconn_state state = msg->conn->state; 8007970: 6803 ldr r3, [r0, #0] 8007972: 785d ldrb r5, [r3, #1] LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ 8007974: b125 cbz r5, 8007980 8007976: 781b ldrb r3, [r3, #0] 8007978: f003 03f0 and.w r3, r3, #240 @ 0xf0 800797c: 2b10 cmp r3, #16 800797e: d10c bne.n 800799a if (((state != NETCONN_NONE) && 8007980: 2d00 cmp r5, #0 8007982: bf18 it ne 8007984: 2d02 cmpne r5, #2 8007986: d016 beq.n 80079b6 (state != NETCONN_LISTEN) && 8007988: 2d03 cmp r5, #3 800798a: d00e beq.n 80079aa msg->err = ERR_INPROGRESS; 800798c: 23fb movs r3, #251 @ 0xfb 800798e: 7123 strb r3, [r4, #4] if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) { 8007990: 6820 ldr r0, [r4, #0] 8007992: 300c adds r0, #12 8007994: f005 fb2b bl 800cfee } 8007998: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ 800799a: 4b3d ldr r3, [pc, #244] @ (8007a90 ) 800799c: f240 425e movw r2, #1118 @ 0x45e 80079a0: 493c ldr r1, [pc, #240] @ (8007a94 ) 80079a2: 483d ldr r0, [pc, #244] @ (8007a98 ) 80079a4: f00b fd30 bl 8013408 80079a8: e7ea b.n 8007980 ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { 80079aa: 6823 ldr r3, [r4, #0] 80079ac: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80079b0: f013 0f04 tst.w r3, #4 80079b4: d0ea beq.n 800798c LWIP_ASSERT("blocking connect in progress", 80079b6: 2d03 cmp r5, #3 80079b8: d025 beq.n 8007a06 msg->err = ERR_OK; 80079ba: 2300 movs r3, #0 80079bc: 7123 strb r3, [r4, #4] netconn_drain(msg->conn); 80079be: 6820 ldr r0, [r4, #0] 80079c0: f7ff ff7e bl 80078c0 if (msg->conn->pcb.tcp != NULL) { 80079c4: 6822 ldr r2, [r4, #0] 80079c6: 6851 ldr r1, [r2, #4] 80079c8: b179 cbz r1, 80079ea switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80079ca: 7813 ldrb r3, [r2, #0] 80079cc: f003 03f0 and.w r3, r3, #240 @ 0xf0 80079d0: 2b10 cmp r3, #16 80079d2: d026 beq.n 8007a22 80079d4: 2b20 cmp r3, #32 80079d6: d105 bne.n 80079e4 msg->conn->pcb.udp->recv_arg = NULL; 80079d8: 2300 movs r3, #0 80079da: 61cb str r3, [r1, #28] udp_remove(msg->conn->pcb.udp); 80079dc: 6823 ldr r3, [r4, #0] 80079de: 6858 ldr r0, [r3, #4] 80079e0: f00a fa54 bl 8011e8c msg->conn->pcb.tcp = NULL; 80079e4: 6823 ldr r3, [r4, #0] 80079e6: 2200 movs r2, #0 80079e8: 605a str r2, [r3, #4] API_EVENT(msg->conn, NETCONN_EVT_RCVPLUS, 0); 80079ea: 6820 ldr r0, [r4, #0] 80079ec: 6b03 ldr r3, [r0, #48] @ 0x30 80079ee: b113 cbz r3, 80079f6 80079f0: 2200 movs r2, #0 80079f2: 4611 mov r1, r2 80079f4: 4798 blx r3 API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); 80079f6: 6820 ldr r0, [r4, #0] 80079f8: 6b03 ldr r3, [r0, #48] @ 0x30 80079fa: 2b00 cmp r3, #0 80079fc: d0c8 beq.n 8007990 80079fe: 2200 movs r2, #0 8007a00: 2102 movs r1, #2 8007a02: 4798 blx r3 8007a04: e7c4 b.n 8007990 LWIP_ASSERT("blocking connect in progress", 8007a06: 6823 ldr r3, [r4, #0] 8007a08: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8007a0c: f013 0f04 tst.w r3, #4 8007a10: d1d3 bne.n 80079ba 8007a12: 4b1f ldr r3, [pc, #124] @ (8007a90 ) 8007a14: f240 427a movw r2, #1146 @ 0x47a 8007a18: 4920 ldr r1, [pc, #128] @ (8007a9c ) 8007a1a: 481f ldr r0, [pc, #124] @ (8007a98 ) 8007a1c: f00b fcf4 bl 8013408 8007a20: e7cb b.n 80079ba LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 8007a22: 6ad3 ldr r3, [r2, #44] @ 0x2c 8007a24: b133 cbz r3, 8007a34 8007a26: 4b1a ldr r3, [pc, #104] @ (8007a90 ) 8007a28: f240 4294 movw r2, #1172 @ 0x494 8007a2c: 491c ldr r1, [pc, #112] @ (8007aa0 ) 8007a2e: 481a ldr r0, [pc, #104] @ (8007a98 ) 8007a30: f00b fcea bl 8013408 msg->conn->state = NETCONN_CLOSE; 8007a34: 6823 ldr r3, [r4, #0] 8007a36: 2204 movs r2, #4 8007a38: 705a strb r2, [r3, #1] msg->msg.sd.shut = NETCONN_SHUT_RDWR; 8007a3a: 2303 movs r3, #3 8007a3c: 7223 strb r3, [r4, #8] msg->conn->current_msg = msg; 8007a3e: 6823 ldr r3, [r4, #0] 8007a40: 62dc str r4, [r3, #44] @ 0x2c if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 8007a42: 2100 movs r1, #0 8007a44: 6820 ldr r0, [r4, #0] 8007a46: f7ff fc81 bl 800734c 8007a4a: 2800 cmp r0, #0 8007a4c: d0a4 beq.n 8007998 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8007a4e: 6823 ldr r3, [r4, #0] 8007a50: 785b ldrb r3, [r3, #1] 8007a52: 2b04 cmp r3, #4 8007a54: d114 bne.n 8007a80 UNLOCK_TCPIP_CORE(); 8007a56: f7fc f84d bl 8003af4 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8007a5a: 6820 ldr r0, [r4, #0] 8007a5c: 2100 movs r1, #0 8007a5e: 300c adds r0, #12 8007a60: f005 fa9d bl 800cf9e LOCK_TCPIP_CORE(); 8007a64: f7fc f838 bl 8003ad8 LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8007a68: 6823 ldr r3, [r4, #0] 8007a6a: 785b ldrb r3, [r3, #1] 8007a6c: 2b00 cmp r3, #0 8007a6e: d093 beq.n 8007998 8007a70: 4b07 ldr r3, [pc, #28] @ (8007a90 ) 8007a72: f240 429e movw r2, #1182 @ 0x49e 8007a76: 490b ldr r1, [pc, #44] @ (8007aa4 ) 8007a78: 4807 ldr r0, [pc, #28] @ (8007a98 ) 8007a7a: f00b fcc5 bl 8013408 return; 8007a7e: e78b b.n 8007998 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8007a80: 4b03 ldr r3, [pc, #12] @ (8007a90 ) 8007a82: f240 429a movw r2, #1178 @ 0x49a 8007a86: 4907 ldr r1, [pc, #28] @ (8007aa4 ) 8007a88: 4803 ldr r0, [pc, #12] @ (8007a98 ) 8007a8a: f00b fcbd bl 8013408 8007a8e: e7e2 b.n 8007a56 8007a90: 0801491c .word 0x0801491c 8007a94: 08014d98 .word 0x08014d98 8007a98: 080144e8 .word 0x080144e8 8007a9c: 08014dac .word 0x08014dac 8007aa0: 08014dcc .word 0x08014dcc 8007aa4: 08014de8 .word 0x08014de8 08007aa8 : { 8007aa8: b510 push {r4, lr} 8007aaa: 4604 mov r4, r0 if (msg->conn->pcb.tcp == NULL) { 8007aac: 6802 ldr r2, [r0, #0] 8007aae: 6850 ldr r0, [r2, #4] 8007ab0: 2800 cmp r0, #0 8007ab2: d066 beq.n 8007b82 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8007ab4: 7813 ldrb r3, [r2, #0] 8007ab6: f003 03f0 and.w r3, r3, #240 @ 0xf0 8007aba: 2b10 cmp r3, #16 8007abc: d006 beq.n 8007acc 8007abe: 2b20 cmp r3, #32 8007ac0: d155 bne.n 8007b6e err = udp_connect(msg->conn->pcb.udp, API_EXPR_REF(msg->msg.bc.ipaddr), msg->msg.bc.port); 8007ac2: 89a2 ldrh r2, [r4, #12] 8007ac4: 68a1 ldr r1, [r4, #8] 8007ac6: f00a f967 bl 8011d98 break; 8007aca: e05c b.n 8007b86 if (msg->conn->state == NETCONN_CONNECT) { 8007acc: 7853 ldrb r3, [r2, #1] 8007ace: 2b03 cmp r3, #3 8007ad0: d05b beq.n 8007b8a } else if (msg->conn->state != NETCONN_NONE) { 8007ad2: b113 cbz r3, 8007ada err = ERR_ISCONN; 8007ad4: f06f 0009 mvn.w r0, #9 8007ad8: e055 b.n 8007b86 setup_tcp(msg->conn); 8007ada: 4610 mov r0, r2 8007adc: f7ff f97c bl 8006dd8 err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), 8007ae0: 6820 ldr r0, [r4, #0] 8007ae2: 4b2b ldr r3, [pc, #172] @ (8007b90 ) 8007ae4: 89a2 ldrh r2, [r4, #12] 8007ae6: 68a1 ldr r1, [r4, #8] 8007ae8: 6840 ldr r0, [r0, #4] 8007aea: f005 fd61 bl 800d5b0 if (err == ERR_OK) { 8007aee: 2800 cmp r0, #0 8007af0: d149 bne.n 8007b86 u8_t non_blocking = netconn_is_nonblocking(msg->conn); 8007af2: 6822 ldr r2, [r4, #0] 8007af4: f892 3028 ldrb.w r3, [r2, #40] @ 0x28 msg->conn->state = NETCONN_CONNECT; 8007af8: 2103 movs r1, #3 8007afa: 7051 strb r1, [r2, #1] SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 8007afc: f013 0302 ands.w r3, r3, #2 8007b00: d00a beq.n 8007b18 8007b02: 6821 ldr r1, [r4, #0] 8007b04: f891 2028 ldrb.w r2, [r1, #40] @ 0x28 8007b08: f042 0204 orr.w r2, r2, #4 8007b0c: f881 2028 strb.w r2, [r1, #40] @ 0x28 if (non_blocking) { 8007b10: b153 cbz r3, 8007b28 err = ERR_INPROGRESS; 8007b12: f06f 0004 mvn.w r0, #4 8007b16: e036 b.n 8007b86 SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 8007b18: 6821 ldr r1, [r4, #0] 8007b1a: f891 2028 ldrb.w r2, [r1, #40] @ 0x28 8007b1e: f002 02fb and.w r2, r2, #251 @ 0xfb 8007b22: f881 2028 strb.w r2, [r1, #40] @ 0x28 8007b26: e7f3 b.n 8007b10 msg->conn->current_msg = msg; 8007b28: 6823 ldr r3, [r4, #0] 8007b2a: 62dc str r4, [r3, #44] @ 0x2c LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); 8007b2c: 6823 ldr r3, [r4, #0] 8007b2e: 785b ldrb r3, [r3, #1] 8007b30: 2b03 cmp r3, #3 8007b32: d114 bne.n 8007b5e UNLOCK_TCPIP_CORE(); 8007b34: f7fb ffde bl 8003af4 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8007b38: 6820 ldr r0, [r4, #0] 8007b3a: 2100 movs r1, #0 8007b3c: 300c adds r0, #12 8007b3e: f005 fa2e bl 800cf9e LOCK_TCPIP_CORE(); 8007b42: f7fb ffc9 bl 8003ad8 LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); 8007b46: 6823 ldr r3, [r4, #0] 8007b48: 785b ldrb r3, [r3, #1] 8007b4a: 2b03 cmp r3, #3 8007b4c: d11c bne.n 8007b88 8007b4e: 4b11 ldr r3, [pc, #68] @ (8007b94 ) 8007b50: f240 5274 movw r2, #1396 @ 0x574 8007b54: 4910 ldr r1, [pc, #64] @ (8007b98 ) 8007b56: 4811 ldr r0, [pc, #68] @ (8007b9c ) 8007b58: f00b fc56 bl 8013408 return; 8007b5c: e014 b.n 8007b88 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); 8007b5e: 4b0d ldr r3, [pc, #52] @ (8007b94 ) 8007b60: f44f 62ae mov.w r2, #1392 @ 0x570 8007b64: 490c ldr r1, [pc, #48] @ (8007b98 ) 8007b66: 480d ldr r0, [pc, #52] @ (8007b9c ) 8007b68: f00b fc4e bl 8013408 8007b6c: e7e2 b.n 8007b34 LWIP_ERROR("Invalid netconn type", 0, do { 8007b6e: 4b09 ldr r3, [pc, #36] @ (8007b94 ) 8007b70: f240 527d movw r2, #1405 @ 0x57d 8007b74: 490a ldr r1, [pc, #40] @ (8007ba0 ) 8007b76: 4809 ldr r0, [pc, #36] @ (8007b9c ) 8007b78: f00b fc46 bl 8013408 8007b7c: f06f 0005 mvn.w r0, #5 break; 8007b80: e001 b.n 8007b86 err = ERR_CLSD; 8007b82: f06f 000e mvn.w r0, #14 msg->err = err; 8007b86: 7120 strb r0, [r4, #4] } 8007b88: bd10 pop {r4, pc} err = ERR_ALREADY; 8007b8a: f06f 0008 mvn.w r0, #8 8007b8e: e7fa b.n 8007b86 8007b90: 08006fcd .word 0x08006fcd 8007b94: 0801491c .word 0x0801491c 8007b98: 08014de8 .word 0x08014de8 8007b9c: 080144e8 .word 0x080144e8 8007ba0: 08014df0 .word 0x08014df0 08007ba4 : { 8007ba4: b510 push {r4, lr} 8007ba6: 4604 mov r4, r0 if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 8007ba8: 6802 ldr r2, [r0, #0] 8007baa: 7813 ldrb r3, [r2, #0] 8007bac: f003 03f0 and.w r3, r3, #240 @ 0xf0 8007bb0: 2b20 cmp r3, #32 8007bb2: d002 beq.n 8007bba msg->err = ERR_VAL; 8007bb4: 23fa movs r3, #250 @ 0xfa 8007bb6: 7103 strb r3, [r0, #4] } 8007bb8: bd10 pop {r4, pc} udp_disconnect(msg->conn->pcb.udp); 8007bba: 6850 ldr r0, [r2, #4] 8007bbc: f00a f932 bl 8011e24 msg->err = ERR_OK; 8007bc0: 2300 movs r3, #0 8007bc2: 7123 strb r3, [r4, #4] 8007bc4: e7f8 b.n 8007bb8 08007bc6 : { 8007bc6: b510 push {r4, lr} 8007bc8: 4604 mov r4, r0 err_t err = netconn_err(msg->conn); 8007bca: 6800 ldr r0, [r0, #0] 8007bcc: f7fe ff33 bl 8006a36 if (err == ERR_OK) { 8007bd0: 4603 mov r3, r0 8007bd2: b948 cbnz r0, 8007be8 if (msg->conn->pcb.tcp != NULL) { 8007bd4: 6823 ldr r3, [r4, #0] 8007bd6: 6858 ldr r0, [r3, #4] 8007bd8: b1c0 cbz r0, 8007c0c switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8007bda: 781b ldrb r3, [r3, #0] 8007bdc: f003 03f0 and.w r3, r3, #240 @ 0xf0 8007be0: 2b20 cmp r3, #32 8007be2: d003 beq.n 8007bec err = ERR_CONN; 8007be4: f06f 030a mvn.w r3, #10 msg->err = err; 8007be8: 7123 strb r3, [r4, #4] } 8007bea: bd10 pop {r4, pc} if (ip_addr_isany_val(msg->msg.b->addr) || IP_IS_ANY_TYPE_VAL(msg->msg.b->addr)) { 8007bec: 68a1 ldr r1, [r4, #8] 8007bee: 688b ldr r3, [r1, #8] 8007bf0: b923 cbnz r3, 8007bfc err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); 8007bf2: 6809 ldr r1, [r1, #0] 8007bf4: f00a f8ac bl 8011d50 8007bf8: 4603 mov r3, r0 8007bfa: e7f5 b.n 8007be8 err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); 8007bfc: 898b ldrh r3, [r1, #12] 8007bfe: f101 0208 add.w r2, r1, #8 8007c02: 6809 ldr r1, [r1, #0] 8007c04: f00a f85e bl 8011cc4 8007c08: 4603 mov r3, r0 8007c0a: e7ed b.n 8007be8 err = ERR_CONN; 8007c0c: f06f 030a mvn.w r3, #10 8007c10: e7ea b.n 8007be8 08007c12 : msg->err = ERR_OK; 8007c12: 2300 movs r3, #0 8007c14: 7103 strb r3, [r0, #4] if (msg->conn->pcb.tcp != NULL) { 8007c16: 6803 ldr r3, [r0, #0] 8007c18: 685a ldr r2, [r3, #4] 8007c1a: b1ba cbz r2, 8007c4c { 8007c1c: b570 push {r4, r5, r6, lr} 8007c1e: 4606 mov r6, r0 if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 8007c20: 781b ldrb r3, [r3, #0] 8007c22: f003 03f0 and.w r3, r3, #240 @ 0xf0 8007c26: 2b10 cmp r3, #16 8007c28: d000 beq.n 8007c2c } 8007c2a: bd70 pop {r4, r5, r6, pc} size_t remaining = msg->msg.r.len; 8007c2c: 6884 ldr r4, [r0, #8] 8007c2e: e008 b.n 8007c42 u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining); 8007c30: f64f 75ff movw r5, #65535 @ 0xffff tcp_recved(msg->conn->pcb.tcp, recved); 8007c34: 6833 ldr r3, [r6, #0] 8007c36: 4629 mov r1, r5 8007c38: 6858 ldr r0, [r3, #4] 8007c3a: f005 fb77 bl 800d32c } while (remaining != 0); 8007c3e: 1b64 subs r4, r4, r5 8007c40: d0f3 beq.n 8007c2a u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining); 8007c42: f5b4 3f80 cmp.w r4, #65536 @ 0x10000 8007c46: d2f3 bcs.n 8007c30 8007c48: b2a5 uxth r5, r4 8007c4a: e7f3 b.n 8007c34 8007c4c: 4770 bx lr ... 08007c50 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_write(void *m) { 8007c50: b510 push {r4, lr} 8007c52: 4604 mov r4, r0 struct api_msg *msg = (struct api_msg *)m; err_t err = netconn_err(msg->conn); 8007c54: 6800 ldr r0, [r0, #0] 8007c56: f7fe feee bl 8006a36 if (err == ERR_OK) { 8007c5a: 4603 mov r3, r0 8007c5c: b938 cbnz r0, 8007c6e if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 8007c5e: 6822 ldr r2, [r4, #0] 8007c60: 7813 ldrb r3, [r2, #0] 8007c62: f003 03f0 and.w r3, r3, #240 @ 0xf0 8007c66: 2b10 cmp r3, #16 8007c68: d003 beq.n 8007c72 #else /* LWIP_TCP */ err = ERR_VAL; #endif /* LWIP_TCP */ #if (LWIP_UDP || LWIP_RAW) } else { err = ERR_VAL; 8007c6a: f06f 0305 mvn.w r3, #5 #endif /* (LWIP_UDP || LWIP_RAW) */ } } msg->err = err; 8007c6e: 7123 strb r3, [r4, #4] TCPIP_APIMSG_ACK(msg); } 8007c70: bd10 pop {r4, pc} if (msg->conn->state != NETCONN_NONE) { 8007c72: 7853 ldrb r3, [r2, #1] 8007c74: 2b00 cmp r3, #0 8007c76: d141 bne.n 8007cfc } else if (msg->conn->pcb.tcp != NULL) { 8007c78: 6853 ldr r3, [r2, #4] 8007c7a: 2b00 cmp r3, #0 8007c7c: d041 beq.n 8007d02 msg->conn->state = NETCONN_WRITE; 8007c7e: 2301 movs r3, #1 8007c80: 7053 strb r3, [r2, #1] LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 8007c82: 6823 ldr r3, [r4, #0] 8007c84: 6adb ldr r3, [r3, #44] @ 0x2c 8007c86: b133 cbz r3, 8007c96 8007c88: 4b1f ldr r3, [pc, #124] @ (8007d08 ) 8007c8a: f240 7223 movw r2, #1827 @ 0x723 8007c8e: 491f ldr r1, [pc, #124] @ (8007d0c ) 8007c90: 481f ldr r0, [pc, #124] @ (8007d10 ) 8007c92: f00b fbb9 bl 8013408 LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); 8007c96: 6963 ldr r3, [r4, #20] 8007c98: b303 cbz r3, 8007cdc msg->conn->current_msg = msg; 8007c9a: 6823 ldr r3, [r4, #0] 8007c9c: 62dc str r4, [r3, #44] @ 0x2c if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) { 8007c9e: 2100 movs r1, #0 8007ca0: 6820 ldr r0, [r4, #0] 8007ca2: f7ff fa03 bl 80070ac 8007ca6: 2800 cmp r0, #0 8007ca8: d0e2 beq.n 8007c70 LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); 8007caa: 6823 ldr r3, [r4, #0] 8007cac: 785b ldrb r3, [r3, #1] 8007cae: 2b01 cmp r3, #1 8007cb0: d11c bne.n 8007cec UNLOCK_TCPIP_CORE(); 8007cb2: f7fb ff1f bl 8003af4 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8007cb6: 6820 ldr r0, [r4, #0] 8007cb8: 2100 movs r1, #0 8007cba: 300c adds r0, #12 8007cbc: f005 f96f bl 800cf9e LOCK_TCPIP_CORE(); 8007cc0: f7fb ff0a bl 8003ad8 LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE); 8007cc4: 6823 ldr r3, [r4, #0] 8007cc6: 785b ldrb r3, [r3, #1] 8007cc8: 2b01 cmp r3, #1 8007cca: d1d1 bne.n 8007c70 8007ccc: 4b0e ldr r3, [pc, #56] @ (8007d08 ) 8007cce: f240 722c movw r2, #1836 @ 0x72c 8007cd2: 4910 ldr r1, [pc, #64] @ (8007d14 ) 8007cd4: 480e ldr r0, [pc, #56] @ (8007d10 ) 8007cd6: f00b fb97 bl 8013408 return; 8007cda: e7c9 b.n 8007c70 LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); 8007cdc: 4b0a ldr r3, [pc, #40] @ (8007d08 ) 8007cde: f240 7224 movw r2, #1828 @ 0x724 8007ce2: 490d ldr r1, [pc, #52] @ (8007d18 ) 8007ce4: 480a ldr r0, [pc, #40] @ (8007d10 ) 8007ce6: f00b fb8f bl 8013408 8007cea: e7d6 b.n 8007c9a LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); 8007cec: 4b06 ldr r3, [pc, #24] @ (8007d08 ) 8007cee: f44f 62e5 mov.w r2, #1832 @ 0x728 8007cf2: 4908 ldr r1, [pc, #32] @ (8007d14 ) 8007cf4: 4806 ldr r0, [pc, #24] @ (8007d10 ) 8007cf6: f00b fb87 bl 8013408 8007cfa: e7da b.n 8007cb2 err = ERR_INPROGRESS; 8007cfc: f06f 0304 mvn.w r3, #4 8007d00: e7b5 b.n 8007c6e err = ERR_CONN; 8007d02: f06f 030a mvn.w r3, #10 8007d06: e7b2 b.n 8007c6e 8007d08: 0801491c .word 0x0801491c 8007d0c: 08014dcc .word 0x08014dcc 8007d10: 080144e8 .word 0x080144e8 8007d14: 08014de8 .word 0x08014de8 8007d18: 08014e08 .word 0x08014e08 08007d1c : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_getaddr(void *m) { 8007d1c: b508 push {r3, lr} struct api_msg *msg = (struct api_msg *)m; if (msg->conn->pcb.ip != NULL) { 8007d1e: 6803 ldr r3, [r0, #0] 8007d20: 685b ldr r3, [r3, #4] 8007d22: 2b00 cmp r3, #0 8007d24: d03f beq.n 8007da6 if (msg->msg.ad.local) { 8007d26: 7c02 ldrb r2, [r0, #16] 8007d28: b19a cbz r2, 8007d52 ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 8007d2a: 6882 ldr r2, [r0, #8] 8007d2c: 681b ldr r3, [r3, #0] 8007d2e: 6013 str r3, [r2, #0] } else { ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), msg->conn->pcb.ip->remote_ip); } msg->err = ERR_OK; 8007d30: 2300 movs r3, #0 8007d32: 7103 strb r3, [r0, #4] switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8007d34: 6802 ldr r2, [r0, #0] 8007d36: 7813 ldrb r3, [r2, #0] 8007d38: f003 03f0 and.w r3, r3, #240 @ 0xf0 8007d3c: 2b10 cmp r3, #16 8007d3e: d018 beq.n 8007d72 8007d40: 2b20 cmp r3, #32 8007d42: d128 bne.n 8007d96 } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: if (msg->msg.ad.local) { 8007d44: 7c03 ldrb r3, [r0, #16] 8007d46: b143 cbz r3, 8007d5a API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; 8007d48: 6852 ldr r2, [r2, #4] 8007d4a: 68c3 ldr r3, [r0, #12] 8007d4c: 8a52 ldrh r2, [r2, #18] 8007d4e: 801a strh r2, [r3, #0] 8007d50: e02b b.n 8007daa ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 8007d52: 6882 ldr r2, [r0, #8] 8007d54: 685b ldr r3, [r3, #4] 8007d56: 6013 str r3, [r2, #0] 8007d58: e7ea b.n 8007d30 } else { if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { 8007d5a: 6853 ldr r3, [r2, #4] 8007d5c: 7c1a ldrb r2, [r3, #16] 8007d5e: f012 0f04 tst.w r2, #4 8007d62: d102 bne.n 8007d6a msg->err = ERR_CONN; 8007d64: 23f5 movs r3, #245 @ 0xf5 8007d66: 7103 strb r3, [r0, #4] 8007d68: e01f b.n 8007daa } else { API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; 8007d6a: 68c2 ldr r2, [r0, #12] 8007d6c: 8a9b ldrh r3, [r3, #20] 8007d6e: 8013 strh r3, [r2, #0] 8007d70: e01b b.n 8007daa } break; #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: if ((msg->msg.ad.local == 0) && 8007d72: 7c03 ldrb r3, [r0, #16] 8007d74: b91b cbnz r3, 8007d7e ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { 8007d76: 6851 ldr r1, [r2, #4] 8007d78: 7d09 ldrb r1, [r1, #20] if ((msg->msg.ad.local == 0) && 8007d7a: 2901 cmp r1, #1 8007d7c: d905 bls.n 8007d8a /* pcb is not connected and remote name is requested */ msg->err = ERR_CONN; } else { API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); 8007d7e: b13b cbz r3, 8007d90 8007d80: 6853 ldr r3, [r2, #4] 8007d82: 8ada ldrh r2, [r3, #22] 8007d84: 68c3 ldr r3, [r0, #12] 8007d86: 801a strh r2, [r3, #0] 8007d88: e00f b.n 8007daa msg->err = ERR_CONN; 8007d8a: 23f5 movs r3, #245 @ 0xf5 8007d8c: 7103 strb r3, [r0, #4] 8007d8e: e00c b.n 8007daa API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); 8007d90: 6853 ldr r3, [r2, #4] 8007d92: 8b1a ldrh r2, [r3, #24] 8007d94: e7f6 b.n 8007d84 } break; #endif /* LWIP_TCP */ default: LWIP_ASSERT("invalid netconn_type", 0); 8007d96: 4b05 ldr r3, [pc, #20] @ (8007dac ) 8007d98: f240 727d movw r2, #1917 @ 0x77d 8007d9c: 4904 ldr r1, [pc, #16] @ (8007db0 ) 8007d9e: 4805 ldr r0, [pc, #20] @ (8007db4 ) 8007da0: f00b fb32 bl 8013408 break; 8007da4: e001 b.n 8007daa } } else { msg->err = ERR_CONN; 8007da6: 23f5 movs r3, #245 @ 0xf5 8007da8: 7103 strb r3, [r0, #4] } TCPIP_APIMSG_ACK(msg); } 8007daa: bd08 pop {r3, pc} 8007dac: 0801491c .word 0x0801491c 8007db0: 08014e1c .word 0x08014e1c 8007db4: 080144e8 .word 0x080144e8 08007db8 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_close(void *m) { 8007db8: b510 push {r4, lr} 8007dba: 4604 mov r4, r0 struct api_msg *msg = (struct api_msg *)m; #if LWIP_TCP enum netconn_state state = msg->conn->state; 8007dbc: 6800 ldr r0, [r0, #0] 8007dbe: 7842 ldrb r2, [r0, #1] /* First check if this is a TCP netconn and if it is in a correct state (LISTEN doesn't support half shutdown) */ if ((msg->conn->pcb.tcp != NULL) && 8007dc0: 6843 ldr r3, [r0, #4] 8007dc2: b123 cbz r3, 8007dce (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 8007dc4: 7803 ldrb r3, [r0, #0] if ((msg->conn->pcb.tcp != NULL) && 8007dc6: f003 03f0 and.w r3, r3, #240 @ 0xf0 8007dca: 2b10 cmp r3, #16 8007dcc: d002 beq.n 8007dd4 return; } } else #endif /* LWIP_TCP */ { msg->err = ERR_CONN; 8007dce: 23f5 movs r3, #245 @ 0xf5 8007dd0: 7123 strb r3, [r4, #4] } TCPIP_APIMSG_ACK(msg); } 8007dd2: bd10 pop {r4, pc} ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 8007dd4: 7a23 ldrb r3, [r4, #8] (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 8007dd6: 2b03 cmp r3, #3 8007dd8: d001 beq.n 8007dde ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 8007dda: 2a02 cmp r2, #2 8007ddc: d0f7 beq.n 8007dce if (state == NETCONN_CONNECT) { 8007dde: 2a03 cmp r2, #3 8007de0: d004 beq.n 8007dec } else if (state == NETCONN_WRITE) { 8007de2: 2a01 cmp r2, #1 8007de4: d105 bne.n 8007df2 msg->err = ERR_INPROGRESS; 8007de6: 23fb movs r3, #251 @ 0xfb 8007de8: 7123 strb r3, [r4, #4] 8007dea: e7f2 b.n 8007dd2 msg->err = ERR_CONN; 8007dec: 23f5 movs r3, #245 @ 0xf5 8007dee: 7123 strb r3, [r4, #4] 8007df0: e7ef b.n 8007dd2 if (msg->msg.sd.shut & NETCONN_SHUT_RD) { 8007df2: f013 0f01 tst.w r3, #1 8007df6: d12d bne.n 8007e54 LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 8007df8: 6823 ldr r3, [r4, #0] 8007dfa: 6adb ldr r3, [r3, #44] @ 0x2c 8007dfc: b133 cbz r3, 8007e0c 8007dfe: 4b1b ldr r3, [pc, #108] @ (8007e6c ) 8007e00: f240 72bd movw r2, #1981 @ 0x7bd 8007e04: 491a ldr r1, [pc, #104] @ (8007e70 ) 8007e06: 481b ldr r0, [pc, #108] @ (8007e74 ) 8007e08: f00b fafe bl 8013408 msg->conn->state = NETCONN_CLOSE; 8007e0c: 6823 ldr r3, [r4, #0] 8007e0e: 2204 movs r2, #4 8007e10: 705a strb r2, [r3, #1] msg->conn->current_msg = msg; 8007e12: 6823 ldr r3, [r4, #0] 8007e14: 62dc str r4, [r3, #44] @ 0x2c if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 8007e16: 2100 movs r1, #0 8007e18: 6820 ldr r0, [r4, #0] 8007e1a: f7ff fa97 bl 800734c 8007e1e: 2800 cmp r0, #0 8007e20: d0d7 beq.n 8007dd2 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8007e22: 6823 ldr r3, [r4, #0] 8007e24: 785b ldrb r3, [r3, #1] 8007e26: 2b04 cmp r3, #4 8007e28: d117 bne.n 8007e5a UNLOCK_TCPIP_CORE(); 8007e2a: f7fb fe63 bl 8003af4 sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8007e2e: 6820 ldr r0, [r4, #0] 8007e30: 2100 movs r1, #0 8007e32: 300c adds r0, #12 8007e34: f005 f8b3 bl 800cf9e LOCK_TCPIP_CORE(); 8007e38: f7fb fe4e bl 8003ad8 LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8007e3c: 6823 ldr r3, [r4, #0] 8007e3e: 785b ldrb r3, [r3, #1] 8007e40: 2b00 cmp r3, #0 8007e42: d0c6 beq.n 8007dd2 8007e44: 4b09 ldr r3, [pc, #36] @ (8007e6c ) 8007e46: f240 72c6 movw r2, #1990 @ 0x7c6 8007e4a: 490b ldr r1, [pc, #44] @ (8007e78 ) 8007e4c: 4809 ldr r0, [pc, #36] @ (8007e74 ) 8007e4e: f00b fadb bl 8013408 return; 8007e52: e7be b.n 8007dd2 netconn_drain(msg->conn); 8007e54: f7ff fd34 bl 80078c0 8007e58: e7ce b.n 8007df8 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8007e5a: 4b04 ldr r3, [pc, #16] @ (8007e6c ) 8007e5c: f240 72c2 movw r2, #1986 @ 0x7c2 8007e60: 4905 ldr r1, [pc, #20] @ (8007e78 ) 8007e62: 4804 ldr r0, [pc, #16] @ (8007e74 ) 8007e64: f00b fad0 bl 8013408 8007e68: e7df b.n 8007e2a 8007e6a: bf00 nop 8007e6c: 0801491c .word 0x0801491c 8007e70: 08014dcc .word 0x08014dcc 8007e74: 080144e8 .word 0x080144e8 8007e78: 08014de8 .word 0x08014de8 08007e7c : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return PP_HTONS(n); 8007e7c: 0a03 lsrs r3, r0, #8 8007e7e: ea43 2000 orr.w r0, r3, r0, lsl #8 } 8007e82: b280 uxth r0, r0 8007e84: 4770 bx lr 08007e86 : * @return n in network byte order */ u32_t lwip_htonl(u32_t n) { return PP_HTONL(n); 8007e86: 0203 lsls r3, r0, #8 8007e88: f403 037f and.w r3, r3, #16711680 @ 0xff0000 8007e8c: ea43 6300 orr.w r3, r3, r0, lsl #24 8007e90: 0a02 lsrs r2, r0, #8 8007e92: f402 427f and.w r2, r2, #65280 @ 0xff00 8007e96: 4313 orrs r3, r2 } 8007e98: ea43 6010 orr.w r0, r3, r0, lsr #24 8007e9c: 4770 bx lr 08007e9e : * If the state changed, reset the number of tries. */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { if (new_state != dhcp->state) { 8007e9e: 7943 ldrb r3, [r0, #5] 8007ea0: 428b cmp r3, r1 8007ea2: d003 beq.n 8007eac dhcp->state = new_state; 8007ea4: 7141 strb r1, [r0, #5] dhcp->tries = 0; 8007ea6: 2300 movs r3, #0 8007ea8: 7183 strb r3, [r0, #6] dhcp->request_timeout = 0; 8007eaa: 8103 strh r3, [r0, #8] } } 8007eac: 4770 bx lr ... 08007eb0 : return options_out_len; } static u16_t dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value) { 8007eb0: b570 push {r4, r5, r6, lr} 8007eb2: 4604 mov r4, r0 8007eb4: 460d mov r5, r1 8007eb6: 4616 mov r6, r2 LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN); 8007eb8: 1c83 adds r3, r0, #2 8007eba: 2b44 cmp r3, #68 @ 0x44 8007ebc: d807 bhi.n 8007ece options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 8007ebe: 1c63 adds r3, r4, #1 8007ec0: b29b uxth r3, r3 8007ec2: 0a32 lsrs r2, r6, #8 8007ec4: 552a strb r2, [r5, r4] options[options_out_len++] = (u8_t) (value & 0x00ffU); 8007ec6: 1ca0 adds r0, r4, #2 8007ec8: 54ee strb r6, [r5, r3] return options_out_len; } 8007eca: b280 uxth r0, r0 8007ecc: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN); 8007ece: 4b04 ldr r3, [pc, #16] @ (8007ee0 ) 8007ed0: f240 52ae movw r2, #1454 @ 0x5ae 8007ed4: 4903 ldr r1, [pc, #12] @ (8007ee4 ) 8007ed6: 4804 ldr r0, [pc, #16] @ (8007ee8 ) 8007ed8: f00b fa96 bl 8013408 8007edc: e7ef b.n 8007ebe 8007ede: bf00 nop 8007ee0: 08014e34 .word 0x08014e34 8007ee4: 08014e98 .word 0x08014e98 8007ee8: 080144e8 .word 0x080144e8 08007eec : { 8007eec: b5f8 push {r3, r4, r5, r6, r7, lr} 8007eee: 4604 mov r4, r0 8007ef0: 460d mov r5, r1 8007ef2: 4617 mov r7, r2 8007ef4: 461e mov r6, r3 LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); 8007ef6: 4403 add r3, r0 8007ef8: 3302 adds r3, #2 8007efa: 2b44 cmp r3, #68 @ 0x44 8007efc: d806 bhi.n 8007f0c options[options_out_len++] = option_type; 8007efe: 1c63 adds r3, r4, #1 8007f00: b29b uxth r3, r3 8007f02: 552f strb r7, [r5, r4] options[options_out_len++] = option_len; 8007f04: 1ca0 adds r0, r4, #2 8007f06: 54ee strb r6, [r5, r3] } 8007f08: b280 uxth r0, r0 8007f0a: bdf8 pop {r3, r4, r5, r6, r7, pc} LWIP_ASSERT("dhcp_option: options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); 8007f0c: 4b03 ldr r3, [pc, #12] @ (8007f1c ) 8007f0e: f240 529a movw r2, #1434 @ 0x59a 8007f12: 4903 ldr r1, [pc, #12] @ (8007f20 ) 8007f14: 4803 ldr r0, [pc, #12] @ (8007f24 ) 8007f16: f00b fa77 bl 8013408 8007f1a: e7f0 b.n 8007efe 8007f1c: 08014e34 .word 0x08014e34 8007f20: 08014ed4 .word 0x08014ed4 8007f24: 080144e8 .word 0x080144e8 08007f28 : { 8007f28: b570 push {r4, r5, r6, lr} 8007f2a: 4604 mov r4, r0 8007f2c: 460d mov r5, r1 8007f2e: 4616 mov r6, r2 LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN); 8007f30: 2843 cmp r0, #67 @ 0x43 8007f32: d803 bhi.n 8007f3c options[options_out_len++] = value; 8007f34: 1c60 adds r0, r4, #1 8007f36: 552e strb r6, [r5, r4] } 8007f38: b280 uxth r0, r0 8007f3a: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN); 8007f3c: 4b03 ldr r3, [pc, #12] @ (8007f4c ) 8007f3e: f240 52a6 movw r2, #1446 @ 0x5a6 8007f42: 4903 ldr r1, [pc, #12] @ (8007f50 ) 8007f44: 4803 ldr r0, [pc, #12] @ (8007f54 ) 8007f46: f00b fa5f bl 8013408 8007f4a: e7f3 b.n 8007f34 8007f4c: 08014e34 .word 0x08014e34 8007f50: 08014f18 .word 0x08014f18 8007f54: 080144e8 .word 0x080144e8 08007f58 : static u16_t dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value) { 8007f58: b570 push {r4, r5, r6, lr} 8007f5a: 4604 mov r4, r0 8007f5c: 460d mov r5, r1 8007f5e: 4616 mov r6, r2 LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN); 8007f60: 1d03 adds r3, r0, #4 8007f62: 2b44 cmp r3, #68 @ 0x44 8007f64: d811 bhi.n 8007f8a options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 8007f66: 1c63 adds r3, r4, #1 8007f68: b29b uxth r3, r3 8007f6a: 0e32 lsrs r2, r6, #24 8007f6c: 552a strb r2, [r5, r4] options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 8007f6e: 1ca2 adds r2, r4, #2 8007f70: b292 uxth r2, r2 8007f72: f3c6 4107 ubfx r1, r6, #16, #8 8007f76: 54e9 strb r1, [r5, r3] options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 8007f78: 1ce3 adds r3, r4, #3 8007f7a: b29b uxth r3, r3 8007f7c: f3c6 2107 ubfx r1, r6, #8, #8 8007f80: 54a9 strb r1, [r5, r2] options[options_out_len++] = (u8_t)((value & 0x000000ffUL)); 8007f82: 1d20 adds r0, r4, #4 8007f84: 54ee strb r6, [r5, r3] return options_out_len; } 8007f86: b280 uxth r0, r0 8007f88: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN); 8007f8a: 4b04 ldr r3, [pc, #16] @ (8007f9c ) 8007f8c: f240 52b7 movw r2, #1463 @ 0x5b7 8007f90: 4903 ldr r1, [pc, #12] @ (8007fa0 ) 8007f92: 4804 ldr r0, [pc, #16] @ (8007fa4 ) 8007f94: f00b fa38 bl 8013408 8007f98: e7e5 b.n 8007f66 8007f9a: bf00 nop 8007f9c: 08014e34 .word 0x08014e34 8007fa0: 08014f50 .word 0x08014f50 8007fa4: 080144e8 .word 0x080144e8 08007fa8 : * @param dhcp dhcp control struct * @param message_type message type of the request */ static struct pbuf * dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type, u16_t *options_out_len) { 8007fa8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;); 8007fac: 4680 mov r8, r0 8007fae: 2800 cmp r0, #0 8007fb0: d041 beq.n 8008036 8007fb2: 4689 mov r9, r1 8007fb4: 4615 mov r5, r2 8007fb6: 461e mov r6, r3 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;); 8007fb8: 2900 cmp r1, #0 8007fba: d045 beq.n 8008048 p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); 8007fbc: f44f 7220 mov.w r2, #640 @ 0x280 8007fc0: f44f 719a mov.w r1, #308 @ 0x134 8007fc4: 2036 movs r0, #54 @ 0x36 8007fc6: f003 ff53 bl 800be70 if (p_out == NULL) { 8007fca: 4607 mov r7, r0 8007fcc: 2800 cmp r0, #0 8007fce: d079 beq.n 80080c4 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_create_msg(): could not allocate pbuf\n")); return NULL; } LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", 8007fd0: 8943 ldrh r3, [r0, #10] 8007fd2: f5b3 7f9a cmp.w r3, #308 @ 0x134 8007fd6: d340 bcc.n 800805a (p_out->len >= sizeof(struct dhcp_msg))); /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { 8007fd8: 2d03 cmp r5, #3 8007fda: d046 beq.n 800806a /* reuse transaction identifier in retransmissions */ if (dhcp->tries == 0) { 8007fdc: f899 3006 ldrb.w r3, [r9, #6] 8007fe0: 2b00 cmp r3, #0 8007fe2: d047 beq.n 8008074 xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 8007fe4: 4b39 ldr r3, [pc, #228] @ (80080cc ) 8007fe6: 681b ldr r3, [r3, #0] 8007fe8: f8c9 3000 str.w r3, [r9] } LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); msg_out = (struct dhcp_msg *)p_out->payload; 8007fec: 687c ldr r4, [r7, #4] memset(msg_out, 0, sizeof(struct dhcp_msg)); 8007fee: f44f 729a mov.w r2, #308 @ 0x134 8007ff2: 2100 movs r1, #0 8007ff4: 4620 mov r0, r4 8007ff6: f00b fb5f bl 80136b8 msg_out->op = DHCP_BOOTREQUEST; 8007ffa: 2301 movs r3, #1 8007ffc: 7023 strb r3, [r4, #0] /* @todo: make link layer independent */ msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET; 8007ffe: 7063 strb r3, [r4, #1] msg_out->hlen = netif->hwaddr_len; 8008000: f898 3030 ldrb.w r3, [r8, #48] @ 0x30 8008004: 70a3 strb r3, [r4, #2] msg_out->xid = lwip_htonl(dhcp->xid); 8008006: f8d9 0000 ldr.w r0, [r9] 800800a: f7ff ff3c bl 8007e86 800800e: 6060 str r0, [r4, #4] /* we don't need the broadcast flag since we can receive unicast traffic before being fully configured! */ /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || (message_type == DHCP_RELEASE) || 8008010: 2d04 cmp r5, #4 8008012: bf18 it ne 8008014: 2d08 cmpne r5, #8 8008016: d009 beq.n 800802c 8008018: 2d07 cmp r5, #7 800801a: d007 beq.n 800802c 800801c: 2d03 cmp r5, #3 800801e: d108 bne.n 8008032 ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { 8008020: f899 3005 ldrb.w r3, [r9, #5] 8008024: 3b04 subs r3, #4 8008026: b2db uxtb r3, r3 ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ 8008028: 2b01 cmp r3, #1 800802a: d802 bhi.n 8008032 ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif)); 800802c: f8d8 3004 ldr.w r3, [r8, #4] 8008030: 60e3 str r3, [r4, #12] { 8008032: 2000 movs r0, #0 8008034: e02b b.n 800808e LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return NULL;); 8008036: 4b26 ldr r3, [pc, #152] @ (80080d0 ) 8008038: f240 7269 movw r2, #1897 @ 0x769 800803c: 4925 ldr r1, [pc, #148] @ (80080d4 ) 800803e: 4826 ldr r0, [pc, #152] @ (80080d8 ) 8008040: f00b f9e2 bl 8013408 8008044: 4647 mov r7, r8 8008046: e03d b.n 80080c4 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;); 8008048: 4b21 ldr r3, [pc, #132] @ (80080d0 ) 800804a: f240 726a movw r2, #1898 @ 0x76a 800804e: 4923 ldr r1, [pc, #140] @ (80080dc ) 8008050: 4821 ldr r0, [pc, #132] @ (80080d8 ) 8008052: f00b f9d9 bl 8013408 8008056: 464f mov r7, r9 8008058: e034 b.n 80080c4 LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", 800805a: 4b1d ldr r3, [pc, #116] @ (80080d0 ) 800805c: f240 7271 movw r2, #1905 @ 0x771 8008060: 491f ldr r1, [pc, #124] @ (80080e0 ) 8008062: 481d ldr r0, [pc, #116] @ (80080d8 ) 8008064: f00b f9d0 bl 8013408 8008068: e7b6 b.n 8007fd8 if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { 800806a: f899 3005 ldrb.w r3, [r9, #5] 800806e: 2b03 cmp r3, #3 8008070: d1bc bne.n 8007fec 8008072: e7b3 b.n 8007fdc xid = LWIP_RAND(); 8008074: f00b f81c bl 80130b0 8008078: 4b14 ldr r3, [pc, #80] @ (80080cc ) 800807a: 6018 str r0, [r3, #0] 800807c: e7b2 b.n 8007fe4 } for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { /* copy netif hardware address (padded with zeroes through memset already) */ msg_out->chaddr[i] = netif->hwaddr[i]; 800807e: eb08 0300 add.w r3, r8, r0 8008082: f893 302a ldrb.w r3, [r3, #42] @ 0x2a 8008086: 1821 adds r1, r4, r0 8008088: 770b strb r3, [r1, #28] for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 800808a: 3001 adds r0, #1 800808c: b280 uxth r0, r0 800808e: 2805 cmp r0, #5 8008090: d9f5 bls.n 800807e } msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 8008092: 2363 movs r3, #99 @ 0x63 8008094: f884 30ec strb.w r3, [r4, #236] @ 0xec 8008098: f06f 027d mvn.w r2, #125 @ 0x7d 800809c: f884 20ed strb.w r2, [r4, #237] @ 0xed 80080a0: 2253 movs r2, #83 @ 0x53 80080a2: f884 20ee strb.w r2, [r4, #238] @ 0xee 80080a6: f884 30ef strb.w r3, [r4, #239] @ 0xef /* Add option MESSAGE_TYPE */ options_out_len_loc = dhcp_option(0, msg_out->options, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); 80080aa: 34f0 adds r4, #240 @ 0xf0 80080ac: 2301 movs r3, #1 80080ae: 2235 movs r2, #53 @ 0x35 80080b0: 4621 mov r1, r4 80080b2: 2000 movs r0, #0 80080b4: f7ff ff1a bl 8007eec options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type); 80080b8: 462a mov r2, r5 80080ba: 4621 mov r1, r4 80080bc: f7ff ff34 bl 8007f28 if (options_out_len) { 80080c0: b106 cbz r6, 80080c4 *options_out_len = options_out_len_loc; 80080c2: 8030 strh r0, [r6, #0] } return p_out; } 80080c4: 4638 mov r0, r7 80080c6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80080ca: bf00 nop 80080cc: 24012ef4 .word 0x24012ef4 80080d0: 08014e34 .word 0x08014e34 80080d4: 08014f8c .word 0x08014f8c 80080d8: 080144e8 .word 0x080144e8 80080dc: 08014fac .word 0x08014fac 80080e0: 08014fcc .word 0x08014fcc 080080e4 : { 80080e4: b510 push {r4, lr} struct dhcp *dhcp = netif_dhcp_data(netif); 80080e6: 6a44 ldr r4, [r0, #36] @ 0x24 ip4_addr_set_zero(&dhcp->offered_sn_mask); 80080e8: 2300 movs r3, #0 80080ea: 6223 str r3, [r4, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 80080ec: 6263 str r3, [r4, #36] @ 0x24 if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { 80080ee: 4b1a ldr r3, [pc, #104] @ (8008158 ) 80080f0: 78db ldrb r3, [r3, #3] 80080f2: b113 cbz r3, 80080fa dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 80080f4: 4b19 ldr r3, [pc, #100] @ (800815c ) 80080f6: 68db ldr r3, [r3, #12] 80080f8: 62a3 str r3, [r4, #40] @ 0x28 if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 80080fa: 4b17 ldr r3, [pc, #92] @ (8008158 ) 80080fc: 791b ldrb r3, [r3, #4] 80080fe: b19b cbz r3, 8008128 dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 8008100: 4b16 ldr r3, [pc, #88] @ (800815c ) 8008102: 691b ldr r3, [r3, #16] 8008104: 62e3 str r3, [r4, #44] @ 0x2c if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 8008106: 4b14 ldr r3, [pc, #80] @ (8008158 ) 8008108: 795b ldrb r3, [r3, #5] 800810a: b18b cbz r3, 8008130 dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 800810c: 4b13 ldr r3, [pc, #76] @ (800815c ) 800810e: 695b ldr r3, [r3, #20] 8008110: 6323 str r3, [r4, #48] @ 0x30 ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr); 8008112: 690b ldr r3, [r1, #16] 8008114: 61e3 str r3, [r4, #28] if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { 8008116: 4b10 ldr r3, [pc, #64] @ (8008158 ) 8008118: 799b ldrb r3, [r3, #6] 800811a: b97b cbnz r3, 800813c dhcp->subnet_mask_given = 0; 800811c: 2300 movs r3, #0 800811e: 71e3 strb r3, [r4, #7] if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 8008120: 4b0d ldr r3, [pc, #52] @ (8008158 ) 8008122: 79db ldrb r3, [r3, #7] 8008124: b993 cbnz r3, 800814c } 8008126: bd10 pop {r4, pc} dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 8008128: 6aa3 ldr r3, [r4, #40] @ 0x28 800812a: 085b lsrs r3, r3, #1 800812c: 62e3 str r3, [r4, #44] @ 0x2c 800812e: e7ea b.n 8008106 dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; 8008130: 6aa3 ldr r3, [r4, #40] @ 0x28 8008132: ebc3 03c3 rsb r3, r3, r3, lsl #3 8008136: 08db lsrs r3, r3, #3 8008138: 6323 str r3, [r4, #48] @ 0x30 800813a: e7ea b.n 8008112 ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 800813c: 4b07 ldr r3, [pc, #28] @ (800815c ) 800813e: 6998 ldr r0, [r3, #24] 8008140: f7ff fea1 bl 8007e86 8008144: 6220 str r0, [r4, #32] dhcp->subnet_mask_given = 1; 8008146: 2301 movs r3, #1 8008148: 71e3 strb r3, [r4, #7] 800814a: e7e9 b.n 8008120 ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 800814c: 4b03 ldr r3, [pc, #12] @ (800815c ) 800814e: 69d8 ldr r0, [r3, #28] 8008150: f7ff fe99 bl 8007e86 8008154: 6260 str r0, [r4, #36] @ 0x24 } 8008156: e7e6 b.n 8008126 8008158: 24012f00 .word 0x24012f00 800815c: 24012f08 .word 0x24012f08 08008160 : * Adds the END option to the DHCP message, and if * necessary, up to three padding bytes. */ static void dhcp_option_trailer(u16_t options_out_len, u8_t *options, struct pbuf *p_out) { 8008160: b508 push {r3, lr} 8008162: 4684 mov ip, r0 8008164: 4610 mov r0, r2 options[options_out_len++] = DHCP_OPTION_END; 8008166: f10c 0301 add.w r3, ip, #1 800816a: b29b uxth r3, r3 800816c: 22ff movs r2, #255 @ 0xff 800816e: f801 200c strb.w r2, [r1, ip] /* packet is too small, or not 4 byte aligned? */ while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) && 8008172: e007 b.n 8008184 (options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ options[options_out_len++] = 0; 8008174: f103 0c01 add.w ip, r3, #1 8008178: f04f 0e00 mov.w lr, #0 800817c: f801 e003 strb.w lr, [r1, r3] 8008180: fa1f f38c uxth.w r3, ip while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) && 8008184: 2b43 cmp r3, #67 @ 0x43 8008186: d9f5 bls.n 8008174 } /* shrink the pbuf to the actual content length */ pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len)); 8008188: f103 01f0 add.w r1, r3, #240 @ 0xf0 800818c: b289 uxth r1, r1 800818e: f003 ff1d bl 800bfcc } 8008192: bd08 pop {r3, pc} 08008194 : { 8008194: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8008198: b084 sub sp, #16 800819a: 4607 mov r7, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 800819c: 6a45 ldr r5, [r0, #36] @ 0x24 dhcp_set_state(dhcp, DHCP_STATE_REBINDING); 800819e: 2104 movs r1, #4 80081a0: 4628 mov r0, r5 80081a2: f7ff fe7c bl 8007e9e p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80081a6: f10d 030e add.w r3, sp, #14 80081aa: 2203 movs r2, #3 80081ac: 4629 mov r1, r5 80081ae: 4638 mov r0, r7 80081b0: f7ff fefa bl 8007fa8 if (p_out != NULL) { 80081b4: 2800 cmp r0, #0 80081b6: d048 beq.n 800824a 80081b8: 4680 mov r8, r0 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80081ba: 6846 ldr r6, [r0, #4] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 80081bc: 36f0 adds r6, #240 @ 0xf0 80081be: 2302 movs r3, #2 80081c0: 2239 movs r2, #57 @ 0x39 80081c2: 4631 mov r1, r6 80081c4: f8bd 000e ldrh.w r0, [sp, #14] 80081c8: f7ff fe90 bl 8007eec 80081cc: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80081d0: 8d3a ldrh r2, [r7, #40] @ 0x28 80081d2: 4631 mov r1, r6 80081d4: f7ff fe6c bl 8007eb0 80081d8: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); 80081dc: 2303 movs r3, #3 80081de: 2237 movs r2, #55 @ 0x37 80081e0: 4631 mov r1, r6 80081e2: f7ff fe83 bl 8007eec 80081e6: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80081ea: 2400 movs r4, #0 80081ec: e00a b.n 8008204 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80081ee: 4b20 ldr r3, [pc, #128] @ (8008270 ) 80081f0: 5d1a ldrb r2, [r3, r4] 80081f2: 4631 mov r1, r6 80081f4: f8bd 000e ldrh.w r0, [sp, #14] 80081f8: f7ff fe96 bl 8007f28 80081fc: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8008200: 3401 adds r4, #1 8008202: b2e4 uxtb r4, r4 8008204: 2c02 cmp r4, #2 8008206: d9f2 bls.n 80081ee dhcp_option_trailer(options_out_len, msg_out->options, p_out); 8008208: 4642 mov r2, r8 800820a: 4631 mov r1, r6 800820c: f8bd 000e ldrh.w r0, [sp, #14] 8008210: f7ff ffa6 bl 8008160 result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 8008214: 9700 str r7, [sp, #0] 8008216: 2343 movs r3, #67 @ 0x43 8008218: 4a16 ldr r2, [pc, #88] @ (8008274 ) 800821a: 4641 mov r1, r8 800821c: 4816 ldr r0, [pc, #88] @ (8008278 ) 800821e: 6800 ldr r0, [r0, #0] 8008220: f009 fcfc bl 8011c1c 8008224: 4604 mov r4, r0 pbuf_free(p_out); 8008226: 4640 mov r0, r8 8008228: f003 fdba bl 800bda0 if (dhcp->tries < 255) { 800822c: 79ab ldrb r3, [r5, #6] 800822e: 2bff cmp r3, #255 @ 0xff 8008230: d001 beq.n 8008236 dhcp->tries++; 8008232: 3301 adds r3, #1 8008234: 71ab strb r3, [r5, #6] msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 8008236: 79ab ldrb r3, [r5, #6] 8008238: 2b09 cmp r3, #9 800823a: d809 bhi.n 8008250 800823c: ebc3 1243 rsb r2, r3, r3, lsl #5 8008240: eb03 0382 add.w r3, r3, r2, lsl #2 8008244: 00db lsls r3, r3, #3 8008246: b29b uxth r3, r3 8008248: e004 b.n 8008254 result = ERR_MEM; 800824a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 800824e: e7ed b.n 800822c msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 8008250: f242 7310 movw r3, #10000 @ 0x2710 dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8008254: f203 13f3 addw r3, r3, #499 @ 0x1f3 8008258: 4a08 ldr r2, [pc, #32] @ (800827c ) 800825a: fb82 1203 smull r1, r2, r2, r3 800825e: 17db asrs r3, r3, #31 8008260: ebc3 1362 rsb r3, r3, r2, asr #5 8008264: 812b strh r3, [r5, #8] } 8008266: 4620 mov r0, r4 8008268: b004 add sp, #16 800826a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 800826e: bf00 nop 8008270: 080151c8 .word 0x080151c8 8008274: 080156d4 .word 0x080156d4 8008278: 24012efc .word 0x24012efc 800827c: 10624dd3 .word 0x10624dd3 08008280 : { 8008280: b510 push {r4, lr} struct dhcp *dhcp = netif_dhcp_data(netif); 8008282: 6a44 ldr r4, [r0, #36] @ 0x24 if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 8008284: 7963 ldrb r3, [r4, #5] 8008286: 2b0a cmp r3, #10 8008288: bf18 it ne 800828a: 2b01 cmpne r3, #1 800828c: d003 beq.n 8008296 800828e: 2b05 cmp r3, #5 8008290: d001 beq.n 8008296 (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { 8008292: 2b04 cmp r3, #4 8008294: d10c bne.n 80082b0 dhcp_rebind(netif); 8008296: f7ff ff7d bl 8008194 if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 800829a: 8aa3 ldrh r3, [r4, #20] 800829c: 8a62 ldrh r2, [r4, #18] 800829e: 1a9b subs r3, r3, r2 80082a0: 2b01 cmp r3, #1 80082a2: dd05 ble.n 80082b0 dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2); 80082a4: 461a mov r2, r3 80082a6: 2b00 cmp r3, #0 80082a8: db03 blt.n 80082b2 80082aa: f3c2 024f ubfx r2, r2, #1, #16 80082ae: 8222 strh r2, [r4, #16] } 80082b0: bd10 pop {r4, pc} dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2); 80082b2: 1c5a adds r2, r3, #1 80082b4: e7f9 b.n 80082aa ... 080082b8 : { 80082b8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80082bc: b084 sub sp, #16 80082be: 4607 mov r7, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 80082c0: 6a45 ldr r5, [r0, #36] @ 0x24 dhcp_set_state(dhcp, DHCP_STATE_REBOOTING); 80082c2: 2103 movs r1, #3 80082c4: 4628 mov r0, r5 80082c6: f7ff fdea bl 8007e9e p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80082ca: f10d 030e add.w r3, sp, #14 80082ce: 2203 movs r2, #3 80082d0: 4629 mov r1, r5 80082d2: 4638 mov r0, r7 80082d4: f7ff fe68 bl 8007fa8 if (p_out != NULL) { 80082d8: 2800 cmp r0, #0 80082da: d05b beq.n 8008394 80082dc: 4680 mov r8, r0 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80082de: 6846 ldr r6, [r0, #4] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 80082e0: 36f0 adds r6, #240 @ 0xf0 80082e2: 2302 movs r3, #2 80082e4: 2239 movs r2, #57 @ 0x39 80082e6: 4631 mov r1, r6 80082e8: f8bd 000e ldrh.w r0, [sp, #14] 80082ec: f7ff fdfe bl 8007eec 80082f0: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED); 80082f4: f44f 7210 mov.w r2, #576 @ 0x240 80082f8: 4631 mov r1, r6 80082fa: f7ff fdd9 bl 8007eb0 80082fe: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 8008302: 2304 movs r3, #4 8008304: 2232 movs r2, #50 @ 0x32 8008306: 4631 mov r1, r6 8008308: f7ff fdf0 bl 8007eec 800830c: 4604 mov r4, r0 800830e: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 8008312: 69e8 ldr r0, [r5, #28] 8008314: f7ff fdb7 bl 8007e86 8008318: 4602 mov r2, r0 800831a: 4631 mov r1, r6 800831c: 4620 mov r0, r4 800831e: f7ff fe1b bl 8007f58 8008322: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); 8008326: 2303 movs r3, #3 8008328: 2237 movs r2, #55 @ 0x37 800832a: 4631 mov r1, r6 800832c: f7ff fdde bl 8007eec 8008330: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8008334: 2400 movs r4, #0 8008336: e00a b.n 800834e options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 8008338: 4b1f ldr r3, [pc, #124] @ (80083b8 ) 800833a: 5d1a ldrb r2, [r3, r4] 800833c: 4631 mov r1, r6 800833e: f8bd 000e ldrh.w r0, [sp, #14] 8008342: f7ff fdf1 bl 8007f28 8008346: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 800834a: 3401 adds r4, #1 800834c: b2e4 uxtb r4, r4 800834e: 2c02 cmp r4, #2 8008350: d9f2 bls.n 8008338 dhcp_option_trailer(options_out_len, msg_out->options, p_out); 8008352: 4642 mov r2, r8 8008354: 4631 mov r1, r6 8008356: f8bd 000e ldrh.w r0, [sp, #14] 800835a: f7ff ff01 bl 8008160 result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 800835e: 9700 str r7, [sp, #0] 8008360: 2343 movs r3, #67 @ 0x43 8008362: 4a16 ldr r2, [pc, #88] @ (80083bc ) 8008364: 4641 mov r1, r8 8008366: 4816 ldr r0, [pc, #88] @ (80083c0 ) 8008368: 6800 ldr r0, [r0, #0] 800836a: f009 fc57 bl 8011c1c 800836e: 4604 mov r4, r0 pbuf_free(p_out); 8008370: 4640 mov r0, r8 8008372: f003 fd15 bl 800bda0 if (dhcp->tries < 255) { 8008376: 79ab ldrb r3, [r5, #6] 8008378: 2bff cmp r3, #255 @ 0xff 800837a: d001 beq.n 8008380 dhcp->tries++; 800837c: 3301 adds r3, #1 800837e: 71ab strb r3, [r5, #6] msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 8008380: 79ab ldrb r3, [r5, #6] 8008382: 2b09 cmp r3, #9 8008384: d809 bhi.n 800839a 8008386: ebc3 1243 rsb r2, r3, r3, lsl #5 800838a: eb03 0382 add.w r3, r3, r2, lsl #2 800838e: 00db lsls r3, r3, #3 8008390: b29b uxth r3, r3 8008392: e004 b.n 800839e result = ERR_MEM; 8008394: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 8008398: e7ed b.n 8008376 msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 800839a: f242 7310 movw r3, #10000 @ 0x2710 dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 800839e: f203 13f3 addw r3, r3, #499 @ 0x1f3 80083a2: 4a08 ldr r2, [pc, #32] @ (80083c4 ) 80083a4: fb82 1203 smull r1, r2, r2, r3 80083a8: 17db asrs r3, r3, #31 80083aa: ebc3 1362 rsb r3, r3, r2, asr #5 80083ae: 812b strh r3, [r5, #8] } 80083b0: 4620 mov r0, r4 80083b2: b004 add sp, #16 80083b4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80083b8: 080151c8 .word 0x080151c8 80083bc: 080156d4 .word 0x080156d4 80083c0: 24012efc .word 0x24012efc 80083c4: 10624dd3 .word 0x10624dd3 080083c8 : { 80083c8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80083cc: b084 sub sp, #16 LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;); 80083ce: 2800 cmp r0, #0 80083d0: d050 beq.n 8008474 80083d2: 4607 mov r7, r0 dhcp = netif_dhcp_data(netif); 80083d4: 6a44 ldr r4, [r0, #36] @ 0x24 LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 80083d6: 2c00 cmp r4, #0 80083d8: d056 beq.n 8008488 dhcp_set_state(dhcp, DHCP_STATE_REQUESTING); 80083da: 2101 movs r1, #1 80083dc: 4620 mov r0, r4 80083de: f7ff fd5e bl 8007e9e p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80083e2: f10d 030e add.w r3, sp, #14 80083e6: 2203 movs r2, #3 80083e8: 4621 mov r1, r4 80083ea: 4638 mov r0, r7 80083ec: f7ff fddc bl 8007fa8 if (p_out != NULL) { 80083f0: 4680 mov r8, r0 80083f2: 2800 cmp r0, #0 80083f4: f000 8090 beq.w 8008518 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80083f8: 6846 ldr r6, [r0, #4] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 80083fa: 36f0 adds r6, #240 @ 0xf0 80083fc: 2302 movs r3, #2 80083fe: 2239 movs r2, #57 @ 0x39 8008400: 4631 mov r1, r6 8008402: f8bd 000e ldrh.w r0, [sp, #14] 8008406: f7ff fd71 bl 8007eec 800840a: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 800840e: 8d3a ldrh r2, [r7, #40] @ 0x28 8008410: 4631 mov r1, r6 8008412: f7ff fd4d bl 8007eb0 8008416: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 800841a: 2304 movs r3, #4 800841c: 2232 movs r2, #50 @ 0x32 800841e: 4631 mov r1, r6 8008420: f7ff fd64 bl 8007eec 8008424: 4605 mov r5, r0 8008426: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 800842a: 69e0 ldr r0, [r4, #28] 800842c: f7ff fd2b bl 8007e86 8008430: 4602 mov r2, r0 8008432: 4631 mov r1, r6 8008434: 4628 mov r0, r5 8008436: f7ff fd8f bl 8007f58 800843a: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 800843e: 2304 movs r3, #4 8008440: 2236 movs r2, #54 @ 0x36 8008442: 4631 mov r1, r6 8008444: f7ff fd52 bl 8007eec 8008448: 4605 mov r5, r0 800844a: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); 800844e: 69a0 ldr r0, [r4, #24] 8008450: f7ff fd19 bl 8007e86 8008454: 4602 mov r2, r0 8008456: 4631 mov r1, r6 8008458: 4628 mov r0, r5 800845a: f7ff fd7d bl 8007f58 800845e: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); 8008462: 2303 movs r3, #3 8008464: 2237 movs r2, #55 @ 0x37 8008466: 4631 mov r1, r6 8008468: f7ff fd40 bl 8007eec 800846c: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8008470: 2500 movs r5, #0 8008472: e01e b.n 80084b2 LWIP_ERROR("dhcp_select: netif != NULL", (netif != NULL), return ERR_ARG;); 8008474: 4b2b ldr r3, [pc, #172] @ (8008524 ) 8008476: f240 1277 movw r2, #375 @ 0x177 800847a: 492b ldr r1, [pc, #172] @ (8008528 ) 800847c: 482b ldr r0, [pc, #172] @ (800852c ) 800847e: f00a ffc3 bl 8013408 8008482: f06f 050f mvn.w r5, #15 8008486: e043 b.n 8008510 LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 8008488: 4b26 ldr r3, [pc, #152] @ (8008524 ) 800848a: f240 1279 movw r2, #377 @ 0x179 800848e: 4928 ldr r1, [pc, #160] @ (8008530 ) 8008490: 4826 ldr r0, [pc, #152] @ (800852c ) 8008492: f00a ffb9 bl 8013408 8008496: f06f 0505 mvn.w r5, #5 800849a: e039 b.n 8008510 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 800849c: 4b25 ldr r3, [pc, #148] @ (8008534 ) 800849e: 5d5a ldrb r2, [r3, r5] 80084a0: 4631 mov r1, r6 80084a2: f8bd 000e ldrh.w r0, [sp, #14] 80084a6: f7ff fd3f bl 8007f28 80084aa: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80084ae: 3501 adds r5, #1 80084b0: b2ed uxtb r5, r5 80084b2: 2d02 cmp r5, #2 80084b4: d9f2 bls.n 800849c dhcp_option_trailer(options_out_len, msg_out->options, p_out); 80084b6: 4642 mov r2, r8 80084b8: 4631 mov r1, r6 80084ba: f8bd 000e ldrh.w r0, [sp, #14] 80084be: f7ff fe4f bl 8008160 result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY); 80084c2: 4b1d ldr r3, [pc, #116] @ (8008538 ) 80084c4: 9301 str r3, [sp, #4] 80084c6: 9700 str r7, [sp, #0] 80084c8: 2343 movs r3, #67 @ 0x43 80084ca: 4a1c ldr r2, [pc, #112] @ (800853c ) 80084cc: 4641 mov r1, r8 80084ce: 481c ldr r0, [pc, #112] @ (8008540 ) 80084d0: 6800 ldr r0, [r0, #0] 80084d2: f009 fae9 bl 8011aa8 80084d6: 4605 mov r5, r0 pbuf_free(p_out); 80084d8: 4640 mov r0, r8 80084da: f003 fc61 bl 800bda0 if (dhcp->tries < 255) { 80084de: 79a3 ldrb r3, [r4, #6] 80084e0: 2bff cmp r3, #255 @ 0xff 80084e2: d001 beq.n 80084e8 dhcp->tries++; 80084e4: 3301 adds r3, #1 80084e6: 71a3 strb r3, [r4, #6] msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); 80084e8: 79a2 ldrb r2, [r4, #6] 80084ea: 2a05 cmp r2, #5 80084ec: d817 bhi.n 800851e 80084ee: 2301 movs r3, #1 80084f0: 4093 lsls r3, r2 80084f2: ebc3 1243 rsb r2, r3, r3, lsl #5 80084f6: eb03 0382 add.w r3, r3, r2, lsl #2 80084fa: 00db lsls r3, r3, #3 80084fc: b29b uxth r3, r3 dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 80084fe: f203 13f3 addw r3, r3, #499 @ 0x1f3 8008502: 4a10 ldr r2, [pc, #64] @ (8008544 ) 8008504: fb82 1203 smull r1, r2, r2, r3 8008508: 17db asrs r3, r3, #31 800850a: ebc3 1362 rsb r3, r3, r2, asr #5 800850e: 8123 strh r3, [r4, #8] } 8008510: 4628 mov r0, r5 8008512: b004 add sp, #16 8008514: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} result = ERR_MEM; 8008518: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 800851c: e7df b.n 80084de msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); 800851e: f64e 2360 movw r3, #60000 @ 0xea60 8008522: e7ec b.n 80084fe 8008524: 08014e34 .word 0x08014e34 8008528: 0801500c .word 0x0801500c 800852c: 080144e8 .word 0x080144e8 8008530: 08015028 .word 0x08015028 8008534: 080151c8 .word 0x080151c8 8008538: 080156d8 .word 0x080156d8 800853c: 080156d4 .word 0x080156d4 8008540: 24012efc .word 0x24012efc 8008544: 10624dd3 .word 0x10624dd3 08008548 : { 8008548: b570 push {r4, r5, r6, lr} struct dhcp *dhcp = netif_dhcp_data(netif); 800854a: 6a46 ldr r6, [r0, #36] @ 0x24 if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { 800854c: 4b09 ldr r3, [pc, #36] @ (8008574 ) 800854e: 789b ldrb r3, [r3, #2] 8008550: b903 cbnz r3, 8008554 } 8008552: bd70 pop {r4, r5, r6, pc} 8008554: 4604 mov r4, r0 8008556: 460d mov r5, r1 dhcp->request_timeout = 0; /* stop timer */ 8008558: 2300 movs r3, #0 800855a: 8133 strh r3, [r6, #8] ip_addr_set_ip4_u32(&dhcp->server_ip_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 800855c: 4b06 ldr r3, [pc, #24] @ (8008578 ) 800855e: 6898 ldr r0, [r3, #8] 8008560: f7ff fc91 bl 8007e86 8008564: 61b0 str r0, [r6, #24] ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr); 8008566: 692b ldr r3, [r5, #16] 8008568: 61f3 str r3, [r6, #28] dhcp_select(netif); 800856a: 4620 mov r0, r4 800856c: f7ff ff2c bl 80083c8 } 8008570: e7ef b.n 8008552 8008572: bf00 nop 8008574: 24012f00 .word 0x24012f00 8008578: 24012f08 .word 0x24012f08 0800857c : { 800857c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8008580: b084 sub sp, #16 8008582: 4606 mov r6, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 8008584: 6a44 ldr r4, [r0, #36] @ 0x24 ip4_addr_set_any(&dhcp->offered_ip_addr); 8008586: 2300 movs r3, #0 8008588: 61e3 str r3, [r4, #28] dhcp_set_state(dhcp, DHCP_STATE_SELECTING); 800858a: 2106 movs r1, #6 800858c: 4620 mov r0, r4 800858e: f7ff fc86 bl 8007e9e p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len); 8008592: f10d 030e add.w r3, sp, #14 8008596: 2201 movs r2, #1 8008598: 4621 mov r1, r4 800859a: 4630 mov r0, r6 800859c: f7ff fd04 bl 8007fa8 if (p_out != NULL) { 80085a0: 2800 cmp r0, #0 80085a2: d03a beq.n 800861a 80085a4: 4680 mov r8, r0 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80085a6: 6847 ldr r7, [r0, #4] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 80085a8: 37f0 adds r7, #240 @ 0xf0 80085aa: 2302 movs r3, #2 80085ac: 2239 movs r2, #57 @ 0x39 80085ae: 4639 mov r1, r7 80085b0: f8bd 000e ldrh.w r0, [sp, #14] 80085b4: f7ff fc9a bl 8007eec 80085b8: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80085bc: 8d32 ldrh r2, [r6, #40] @ 0x28 80085be: 4639 mov r1, r7 80085c0: f7ff fc76 bl 8007eb0 80085c4: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); 80085c8: 2303 movs r3, #3 80085ca: 2237 movs r2, #55 @ 0x37 80085cc: 4639 mov r1, r7 80085ce: f7ff fc8d bl 8007eec 80085d2: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80085d6: 2500 movs r5, #0 80085d8: e00a b.n 80085f0 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80085da: 4b20 ldr r3, [pc, #128] @ (800865c ) 80085dc: 5d5a ldrb r2, [r3, r5] 80085de: 4639 mov r1, r7 80085e0: f8bd 000e ldrh.w r0, [sp, #14] 80085e4: f7ff fca0 bl 8007f28 80085e8: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80085ec: 3501 adds r5, #1 80085ee: b2ed uxtb r5, r5 80085f0: 2d02 cmp r5, #2 80085f2: d9f2 bls.n 80085da dhcp_option_trailer(options_out_len, msg_out->options, p_out); 80085f4: 4642 mov r2, r8 80085f6: 4639 mov r1, r7 80085f8: f8bd 000e ldrh.w r0, [sp, #14] 80085fc: f7ff fdb0 bl 8008160 udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY); 8008600: 4b17 ldr r3, [pc, #92] @ (8008660 ) 8008602: 9301 str r3, [sp, #4] 8008604: 9600 str r6, [sp, #0] 8008606: 2343 movs r3, #67 @ 0x43 8008608: 4a16 ldr r2, [pc, #88] @ (8008664 ) 800860a: 4641 mov r1, r8 800860c: 4816 ldr r0, [pc, #88] @ (8008668 ) 800860e: 6800 ldr r0, [r0, #0] 8008610: f009 fa4a bl 8011aa8 pbuf_free(p_out); 8008614: 4640 mov r0, r8 8008616: f003 fbc3 bl 800bda0 if (dhcp->tries < 255) { 800861a: 79a3 ldrb r3, [r4, #6] 800861c: 2bff cmp r3, #255 @ 0xff 800861e: d001 beq.n 8008624 dhcp->tries++; 8008620: 3301 adds r3, #1 8008622: 71a3 strb r3, [r4, #6] msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); 8008624: 79a2 ldrb r2, [r4, #6] 8008626: 2a05 cmp r2, #5 8008628: d814 bhi.n 8008654 800862a: 2301 movs r3, #1 800862c: 4093 lsls r3, r2 800862e: ebc3 1243 rsb r2, r3, r3, lsl #5 8008632: eb03 0382 add.w r3, r3, r2, lsl #2 8008636: 00db lsls r3, r3, #3 8008638: b29b uxth r3, r3 dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 800863a: f203 13f3 addw r3, r3, #499 @ 0x1f3 800863e: 4a0b ldr r2, [pc, #44] @ (800866c ) 8008640: fb82 1203 smull r1, r2, r2, r3 8008644: 17db asrs r3, r3, #31 8008646: ebc3 1362 rsb r3, r3, r2, asr #5 800864a: 8123 strh r3, [r4, #8] } 800864c: 2000 movs r0, #0 800864e: b004 add sp, #16 8008650: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); 8008654: f64e 2360 movw r3, #60000 @ 0xea60 8008658: e7ef b.n 800863a 800865a: bf00 nop 800865c: 080151c8 .word 0x080151c8 8008660: 080156d8 .word 0x080156d8 8008664: 080156d4 .word 0x080156d4 8008668: 24012efc .word 0x24012efc 800866c: 10624dd3 .word 0x10624dd3 08008670 : { 8008670: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8008674: b084 sub sp, #16 8008676: 4605 mov r5, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 8008678: 6a44 ldr r4, [r0, #36] @ 0x24 dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); 800867a: 210c movs r1, #12 800867c: 4620 mov r0, r4 800867e: f7ff fc0e bl 8007e9e p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len); 8008682: f10d 030e add.w r3, sp, #14 8008686: 2204 movs r2, #4 8008688: 4621 mov r1, r4 800868a: 4628 mov r0, r5 800868c: f7ff fc8c bl 8007fa8 if (p_out != NULL) { 8008690: b398 cbz r0, 80086fa 8008692: 4607 mov r7, r0 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8008694: 6846 ldr r6, [r0, #4] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 8008696: 36f0 adds r6, #240 @ 0xf0 8008698: 2304 movs r3, #4 800869a: 2232 movs r2, #50 @ 0x32 800869c: 4631 mov r1, r6 800869e: f8bd 000e ldrh.w r0, [sp, #14] 80086a2: f7ff fc23 bl 8007eec 80086a6: 4680 mov r8, r0 80086a8: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 80086ac: 69e0 ldr r0, [r4, #28] 80086ae: f7ff fbea bl 8007e86 80086b2: 4602 mov r2, r0 80086b4: 4631 mov r1, r6 80086b6: 4640 mov r0, r8 80086b8: f7ff fc4e bl 8007f58 80086bc: f8ad 000e strh.w r0, [sp, #14] dhcp_option_trailer(options_out_len, msg_out->options, p_out); 80086c0: 463a mov r2, r7 80086c2: 4631 mov r1, r6 80086c4: f7ff fd4c bl 8008160 result = udp_sendto_if_src(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif, IP4_ADDR_ANY); 80086c8: 4b0d ldr r3, [pc, #52] @ (8008700 ) 80086ca: 9301 str r3, [sp, #4] 80086cc: 9500 str r5, [sp, #0] 80086ce: 2343 movs r3, #67 @ 0x43 80086d0: 4a0c ldr r2, [pc, #48] @ (8008704 ) 80086d2: 4639 mov r1, r7 80086d4: 480c ldr r0, [pc, #48] @ (8008708 ) 80086d6: 6800 ldr r0, [r0, #0] 80086d8: f009 f9e6 bl 8011aa8 80086dc: 4605 mov r5, r0 pbuf_free(p_out); 80086de: 4638 mov r0, r7 80086e0: f003 fb5e bl 800bda0 if (dhcp->tries < 255) { 80086e4: 79a3 ldrb r3, [r4, #6] 80086e6: 2bff cmp r3, #255 @ 0xff 80086e8: d001 beq.n 80086ee dhcp->tries++; 80086ea: 3301 adds r3, #1 80086ec: 71a3 strb r3, [r4, #6] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 80086ee: 2314 movs r3, #20 80086f0: 8123 strh r3, [r4, #8] } 80086f2: 4628 mov r0, r5 80086f4: b004 add sp, #16 80086f6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} result = ERR_MEM; 80086fa: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 80086fe: e7f1 b.n 80086e4 8008700: 080156d8 .word 0x080156d8 8008704: 080156d4 .word 0x080156d4 8008708: 24012efc .word 0x24012efc 0800870c : { 800870c: b538 push {r3, r4, r5, lr} 800870e: 4605 mov r5, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 8008710: 6a44 ldr r4, [r0, #36] @ 0x24 dhcp_set_state(dhcp, DHCP_STATE_CHECKING); 8008712: 2108 movs r1, #8 8008714: 4620 mov r0, r4 8008716: f7ff fbc2 bl 8007e9e result = etharp_query(netif, &dhcp->offered_ip_addr, NULL); 800871a: 2200 movs r2, #0 800871c: f104 011c add.w r1, r4, #28 8008720: 4628 mov r0, r5 8008722: f001 f935 bl 8009990 if (dhcp->tries < 255) { 8008726: 79a3 ldrb r3, [r4, #6] 8008728: 2bff cmp r3, #255 @ 0xff 800872a: d001 beq.n 8008730 dhcp->tries++; 800872c: 3301 adds r3, #1 800872e: 71a3 strb r3, [r4, #6] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8008730: 2301 movs r3, #1 8008732: 8123 strh r3, [r4, #8] } 8008734: bd38 pop {r3, r4, r5, pc} ... 08008738 : { 8008738: b530 push {r4, r5, lr} 800873a: b083 sub sp, #12 LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); 800873c: 2800 cmp r0, #0 800873e: d065 beq.n 800880c 8008740: 4605 mov r5, r0 dhcp = netif_dhcp_data(netif); 8008742: 6a44 ldr r4, [r0, #36] @ 0x24 LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 8008744: 2c00 cmp r4, #0 8008746: d069 beq.n 800881c dhcp->lease_used = 0; 8008748: 2300 movs r3, #0 800874a: 8263 strh r3, [r4, #18] if (dhcp->offered_t0_lease != 0xffffffffUL) { 800874c: 6aa2 ldr r2, [r4, #40] @ 0x28 800874e: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 8008752: d00f beq.n 8008774 timeout = (dhcp->offered_t0_lease + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; 8008754: 321e adds r2, #30 8008756: f1a3 3377 sub.w r3, r3, #2004318071 @ 0x77777777 800875a: fba3 1302 umull r1, r3, r3, r2 800875e: 095b lsrs r3, r3, #5 if (timeout > 0xffff) { 8008760: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000 8008764: d301 bcc.n 800876a timeout = 0xffff; 8008766: f64f 73ff movw r3, #65535 @ 0xffff dhcp->t0_timeout = (u16_t)timeout; 800876a: b29b uxth r3, r3 800876c: 82a3 strh r3, [r4, #20] if (dhcp->t0_timeout == 0) { 800876e: b90b cbnz r3, 8008774 dhcp->t0_timeout = 1; 8008770: 2301 movs r3, #1 8008772: 82a3 strh r3, [r4, #20] if (dhcp->offered_t1_renew != 0xffffffffUL) { 8008774: 6ae2 ldr r2, [r4, #44] @ 0x2c 8008776: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 800877a: d010 beq.n 800879e timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; 800877c: 321e adds r2, #30 800877e: 4b34 ldr r3, [pc, #208] @ (8008850 ) 8008780: fba3 1302 umull r1, r3, r3, r2 8008784: 095b lsrs r3, r3, #5 if (timeout > 0xffff) { 8008786: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000 800878a: d301 bcc.n 8008790 timeout = 0xffff; 800878c: f64f 73ff movw r3, #65535 @ 0xffff dhcp->t1_timeout = (u16_t)timeout; 8008790: b29b uxth r3, r3 8008792: 8163 strh r3, [r4, #10] if (dhcp->t1_timeout == 0) { 8008794: b90b cbnz r3, 800879a dhcp->t1_timeout = 1; 8008796: 2301 movs r3, #1 8008798: 8163 strh r3, [r4, #10] dhcp->t1_renew_time = dhcp->t1_timeout; 800879a: 8963 ldrh r3, [r4, #10] 800879c: 81e3 strh r3, [r4, #14] if (dhcp->offered_t2_rebind != 0xffffffffUL) { 800879e: 6b22 ldr r2, [r4, #48] @ 0x30 80087a0: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 80087a4: d010 beq.n 80087c8 timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; 80087a6: 321e adds r2, #30 80087a8: 4b29 ldr r3, [pc, #164] @ (8008850 ) 80087aa: fba3 1302 umull r1, r3, r3, r2 80087ae: 095b lsrs r3, r3, #5 if (timeout > 0xffff) { 80087b0: f5b2 1f70 cmp.w r2, #3932160 @ 0x3c0000 80087b4: d301 bcc.n 80087ba timeout = 0xffff; 80087b6: f64f 73ff movw r3, #65535 @ 0xffff dhcp->t2_timeout = (u16_t)timeout; 80087ba: b29b uxth r3, r3 80087bc: 81a3 strh r3, [r4, #12] if (dhcp->t2_timeout == 0) { 80087be: b90b cbnz r3, 80087c4 dhcp->t2_timeout = 1; 80087c0: 2301 movs r3, #1 80087c2: 81a3 strh r3, [r4, #12] dhcp->t2_rebind_time = dhcp->t2_timeout; 80087c4: 89a3 ldrh r3, [r4, #12] 80087c6: 8223 strh r3, [r4, #16] if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) { 80087c8: 8962 ldrh r2, [r4, #10] 80087ca: 89a3 ldrh r3, [r4, #12] 80087cc: 429a cmp r2, r3 80087ce: d302 bcc.n 80087d6 80087d0: b10b cbz r3, 80087d6 dhcp->t1_timeout = 0; 80087d2: 2300 movs r3, #0 80087d4: 8163 strh r3, [r4, #10] if (dhcp->subnet_mask_given) { 80087d6: 79e3 ldrb r3, [r4, #7] 80087d8: b343 cbz r3, 800882c ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); 80087da: 6a23 ldr r3, [r4, #32] 80087dc: 9301 str r3, [sp, #4] ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); 80087de: 6a63 ldr r3, [r4, #36] @ 0x24 80087e0: 9300 str r3, [sp, #0] if (ip4_addr_isany_val(gw_addr)) { 80087e2: b933 cbnz r3, 80087f2 ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 80087e4: 69e3 ldr r3, [r4, #28] 80087e6: 9a01 ldr r2, [sp, #4] 80087e8: 4013 ands r3, r2 80087ea: 9300 str r3, [sp, #0] ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL)); 80087ec: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 80087f0: 9300 str r3, [sp, #0] dhcp_set_state(dhcp, DHCP_STATE_BOUND); 80087f2: 210a movs r1, #10 80087f4: 4620 mov r0, r4 80087f6: f7ff fb52 bl 8007e9e netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); 80087fa: 466b mov r3, sp 80087fc: aa01 add r2, sp, #4 80087fe: f104 011c add.w r1, r4, #28 8008802: 4628 mov r0, r5 8008804: f003 f822 bl 800b84c } 8008808: b003 add sp, #12 800880a: bd30 pop {r4, r5, pc} LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); 800880c: 4b11 ldr r3, [pc, #68] @ (8008854 ) 800880e: f240 4215 movw r2, #1045 @ 0x415 8008812: 4911 ldr r1, [pc, #68] @ (8008858 ) 8008814: 4811 ldr r0, [pc, #68] @ (800885c ) 8008816: f00a fdf7 bl 8013408 800881a: e7f5 b.n 8008808 LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 800881c: 4b0d ldr r3, [pc, #52] @ (8008854 ) 800881e: f240 4217 movw r2, #1047 @ 0x417 8008822: 490f ldr r1, [pc, #60] @ (8008860 ) 8008824: 480d ldr r0, [pc, #52] @ (800885c ) 8008826: f00a fdef bl 8013408 800882a: e7ed b.n 8008808 u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 800882c: 7f22 ldrb r2, [r4, #28] if (first_octet <= 127) { 800882e: f994 301c ldrsb.w r3, [r4, #28] 8008832: 2b00 cmp r3, #0 8008834: db02 blt.n 800883c ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 8008836: 23ff movs r3, #255 @ 0xff 8008838: 9301 str r3, [sp, #4] 800883a: e7d0 b.n 80087de } else if (first_octet >= 192) { 800883c: 2abf cmp r2, #191 @ 0xbf 800883e: d903 bls.n 8008848 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 8008840: f06f 437f mvn.w r3, #4278190080 @ 0xff000000 8008844: 9301 str r3, [sp, #4] 8008846: e7ca b.n 80087de ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 8008848: f64f 73ff movw r3, #65535 @ 0xffff 800884c: 9301 str r3, [sp, #4] 800884e: e7c6 b.n 80087de 8008850: 88888889 .word 0x88888889 8008854: 08014e34 .word 0x08014e34 8008858: 08015044 .word 0x08015044 800885c: 080144e8 .word 0x080144e8 8008860: 08015060 .word 0x08015060 08008864 : { 8008864: b510 push {r4, lr} 8008866: 4604 mov r4, r0 dhcp_set_state(dhcp, DHCP_STATE_BACKING_OFF); 8008868: 210c movs r1, #12 800886a: 6a40 ldr r0, [r0, #36] @ 0x24 800886c: f7ff fb17 bl 8007e9e netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); 8008870: 4904 ldr r1, [pc, #16] @ (8008884 ) 8008872: 460b mov r3, r1 8008874: 460a mov r2, r1 8008876: 4620 mov r0, r4 8008878: f002 ffe8 bl 800b84c dhcp_discover(netif); 800887c: 4620 mov r0, r4 800887e: f7ff fe7d bl 800857c } 8008882: bd10 pop {r4, pc} 8008884: 080156d8 .word 0x080156d8 08008888 : { 8008888: b510 push {r4, lr} LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); 800888a: 4b0c ldr r3, [pc, #48] @ (80088bc ) 800888c: 781b ldrb r3, [r3, #0] 800888e: b133 cbz r3, 800889e dhcp_pcb_refcount--; 8008890: 4a0a ldr r2, [pc, #40] @ (80088bc ) 8008892: 7813 ldrb r3, [r2, #0] 8008894: 3b01 subs r3, #1 8008896: b2db uxtb r3, r3 8008898: 7013 strb r3, [r2, #0] if (dhcp_pcb_refcount == 0) { 800889a: b13b cbz r3, 80088ac } 800889c: bd10 pop {r4, pc} LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); 800889e: 4b08 ldr r3, [pc, #32] @ (80088c0 ) 80088a0: 22ff movs r2, #255 @ 0xff 80088a2: 4908 ldr r1, [pc, #32] @ (80088c4 ) 80088a4: 4808 ldr r0, [pc, #32] @ (80088c8 ) 80088a6: f00a fdaf bl 8013408 80088aa: e7f1 b.n 8008890 udp_remove(dhcp_pcb); 80088ac: 4c07 ldr r4, [pc, #28] @ (80088cc ) 80088ae: 6820 ldr r0, [r4, #0] 80088b0: f009 faec bl 8011e8c dhcp_pcb = NULL; 80088b4: 2300 movs r3, #0 80088b6: 6023 str r3, [r4, #0] } 80088b8: e7f0 b.n 800889c 80088ba: bf00 nop 80088bc: 24012ef8 .word 0x24012ef8 80088c0: 08014e34 .word 0x08014e34 80088c4: 08015078 .word 0x08015078 80088c8: 080144e8 .word 0x080144e8 80088cc: 24012efc .word 0x24012efc 080088d0 : { 80088d0: b538 push {r3, r4, r5, lr} if (dhcp_pcb_refcount == 0) { 80088d2: 4b17 ldr r3, [pc, #92] @ (8008930 ) 80088d4: 781b ldrb r3, [r3, #0] 80088d6: bb0b cbnz r3, 800891c LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); 80088d8: 4b16 ldr r3, [pc, #88] @ (8008934 ) 80088da: 681b ldr r3, [r3, #0] 80088dc: b12b cbz r3, 80088ea 80088de: 4b16 ldr r3, [pc, #88] @ (8008938 ) 80088e0: 22e5 movs r2, #229 @ 0xe5 80088e2: 4916 ldr r1, [pc, #88] @ (800893c ) 80088e4: 4816 ldr r0, [pc, #88] @ (8008940 ) 80088e6: f00a fd8f bl 8013408 dhcp_pcb = udp_new(); 80088ea: f009 fafd bl 8011ee8 80088ee: 4b11 ldr r3, [pc, #68] @ (8008934 ) 80088f0: 6018 str r0, [r3, #0] if (dhcp_pcb == NULL) { 80088f2: b1c8 cbz r0, 8008928 ip_set_option(dhcp_pcb, SOF_BROADCAST); 80088f4: 7a43 ldrb r3, [r0, #9] 80088f6: f043 0320 orr.w r3, r3, #32 80088fa: 7243 strb r3, [r0, #9] udp_bind(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_CLIENT); 80088fc: 4d11 ldr r5, [pc, #68] @ (8008944 ) 80088fe: 2244 movs r2, #68 @ 0x44 8008900: 4629 mov r1, r5 8008902: f009 f877 bl 80119f4 udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER); 8008906: 4c0b ldr r4, [pc, #44] @ (8008934 ) 8008908: 2243 movs r2, #67 @ 0x43 800890a: 4629 mov r1, r5 800890c: 6820 ldr r0, [r4, #0] 800890e: f009 fa43 bl 8011d98 udp_recv(dhcp_pcb, dhcp_recv, NULL); 8008912: 2200 movs r2, #0 8008914: 490c ldr r1, [pc, #48] @ (8008948 ) 8008916: 6820 ldr r0, [r4, #0] 8008918: f009 faa0 bl 8011e5c dhcp_pcb_refcount++; 800891c: 4a04 ldr r2, [pc, #16] @ (8008930 ) 800891e: 7813 ldrb r3, [r2, #0] 8008920: 3301 adds r3, #1 8008922: 7013 strb r3, [r2, #0] return ERR_OK; 8008924: 2000 movs r0, #0 } 8008926: bd38 pop {r3, r4, r5, pc} return ERR_MEM; 8008928: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800892c: e7fb b.n 8008926 800892e: bf00 nop 8008930: 24012ef8 .word 0x24012ef8 8008934: 24012efc .word 0x24012efc 8008938: 08014e34 .word 0x08014e34 800893c: 0801509c .word 0x0801509c 8008940: 080144e8 .word 0x080144e8 8008944: 080156d8 .word 0x080156d8 8008948: 08008ddd .word 0x08008ddd 0800894c : dhcp_clear_all_options(dhcp); 800894c: 4bbf ldr r3, [pc, #764] @ (8008c4c ) 800894e: 2200 movs r2, #0 8008950: 601a str r2, [r3, #0] 8008952: 605a str r2, [r3, #4] if (p->len < DHCP_SNAME_OFS) { 8008954: 8943 ldrh r3, [r0, #10] 8008956: 2b2b cmp r3, #43 @ 0x2b 8008958: f240 821e bls.w 8008d98 { 800895c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8008960: b087 sub sp, #28 options_idx_max = p->tot_len; 8008962: 8904 ldrh r4, [r0, #8] int parse_sname_as_options = 0; 8008964: 4690 mov r8, r2 options_idx = DHCP_OPTIONS_OFS; 8008966: 27f0 movs r7, #240 @ 0xf0 8008968: 9002 str r0, [sp, #8] q = p; 800896a: 9d02 ldr r5, [sp, #8] while ((q != NULL) && (options_idx >= q->len)) { 800896c: e004 b.n 8008978 options_idx = (u16_t)(options_idx - q->len); 800896e: 1aff subs r7, r7, r3 8008970: b2bf uxth r7, r7 options_idx_max = (u16_t)(options_idx_max - q->len); 8008972: 1ae4 subs r4, r4, r3 8008974: b2a4 uxth r4, r4 q = q->next; 8008976: 682d ldr r5, [r5, #0] while ((q != NULL) && (options_idx >= q->len)) { 8008978: 2d00 cmp r5, #0 800897a: f000 8210 beq.w 8008d9e 800897e: 896b ldrh r3, [r5, #10] 8008980: 42bb cmp r3, r7 8008982: d9f4 bls.n 800896e options = (u8_t *)q->payload; 8008984: 686b ldr r3, [r5, #4] 8008986: 9301 str r3, [sp, #4] offset = options_idx; 8008988: 463e mov r6, r7 800898a: 46c3 mov fp, r8 while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { 800898c: e0b1 b.n 8008af2 len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0); 800898e: 682a ldr r2, [r5, #0] 8008990: b112 cbz r2, 8008998 8008992: 6852 ldr r2, [r2, #4] 8008994: 7812 ldrb r2, [r2, #0] 8008996: e0c9 b.n 8008b2c 8008998: 2200 movs r2, #0 800899a: e0c7 b.n 8008b2c switch (op) { 800899c: 4688 mov r8, r1 800899e: 460a mov r2, r1 80089a0: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff 80089a4: e090 b.n 8008ac8 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80089a6: 2a04 cmp r2, #4 80089a8: d103 bne.n 80089b2 decode_len = len; 80089aa: 4690 mov r8, r2 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 80089ac: f04f 0906 mov.w r9, #6 80089b0: e08a b.n 8008ac8 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80089b2: 4ba7 ldr r3, [pc, #668] @ (8008c50 ) 80089b4: f240 622e movw r2, #1582 @ 0x62e 80089b8: 49a6 ldr r1, [pc, #664] @ (8008c54 ) 80089ba: 48a7 ldr r0, [pc, #668] @ (8008c58 ) 80089bc: f00a fd24 bl 8013408 80089c0: f06f 0005 mvn.w r0, #5 80089c4: e1ed b.n 8008da2 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 80089c6: 2a03 cmp r2, #3 80089c8: d904 bls.n 80089d4 decode_idx = DHCP_OPTION_IDX_ROUTER; 80089ca: f04f 0907 mov.w r9, #7 decode_len = 4; /* only copy the first given router */ 80089ce: f04f 0804 mov.w r8, #4 80089d2: e079 b.n 8008ac8 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 80089d4: 4b9e ldr r3, [pc, #632] @ (8008c50 ) 80089d6: f240 6233 movw r2, #1587 @ 0x633 80089da: 49a0 ldr r1, [pc, #640] @ (8008c5c ) 80089dc: 489e ldr r0, [pc, #632] @ (8008c58 ) 80089de: f00a fd13 bl 8013408 80089e2: f06f 0005 mvn.w r0, #5 80089e6: e1dc b.n 8008da2 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80089e8: 2a04 cmp r2, #4 80089ea: d103 bne.n 80089f4 decode_len = len; 80089ec: 4690 mov r8, r2 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 80089ee: f04f 0903 mov.w r9, #3 80089f2: e069 b.n 8008ac8 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80089f4: 4b96 ldr r3, [pc, #600] @ (8008c50 ) 80089f6: f240 6241 movw r2, #1601 @ 0x641 80089fa: 4996 ldr r1, [pc, #600] @ (8008c54 ) 80089fc: 4896 ldr r0, [pc, #600] @ (8008c58 ) 80089fe: f00a fd03 bl 8013408 8008a02: f06f 0005 mvn.w r0, #5 8008a06: e1cc b.n 8008da2 LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8008a08: 2a01 cmp r2, #1 8008a0a: d105 bne.n 8008a18 LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;); 8008a0c: 2ff0 cmp r7, #240 @ 0xf0 8008a0e: d10d bne.n 8008a2c decode_len = len; 8008a10: 4690 mov r8, r2 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 8008a12: f04f 0900 mov.w r9, #0 8008a16: e057 b.n 8008ac8 LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8008a18: 4b8d ldr r3, [pc, #564] @ (8008c50 ) 8008a1a: f240 624f movw r2, #1615 @ 0x64f 8008a1e: 4990 ldr r1, [pc, #576] @ (8008c60 ) 8008a20: 488d ldr r0, [pc, #564] @ (8008c58 ) 8008a22: f00a fcf1 bl 8013408 8008a26: f06f 0005 mvn.w r0, #5 8008a2a: e1ba b.n 8008da2 LWIP_ERROR("overload in file/sname", options_idx == DHCP_OPTIONS_OFS, return ERR_VAL;); 8008a2c: 4b88 ldr r3, [pc, #544] @ (8008c50 ) 8008a2e: f240 6251 movw r2, #1617 @ 0x651 8008a32: 498c ldr r1, [pc, #560] @ (8008c64 ) 8008a34: 4888 ldr r0, [pc, #544] @ (8008c58 ) 8008a36: f00a fce7 bl 8013408 8008a3a: f06f 0005 mvn.w r0, #5 8008a3e: e1b0 b.n 8008da2 LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8008a40: 2a01 cmp r2, #1 8008a42: d103 bne.n 8008a4c decode_len = len; 8008a44: 4690 mov r8, r2 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; 8008a46: f04f 0901 mov.w r9, #1 8008a4a: e03d b.n 8008ac8 LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8008a4c: 4b80 ldr r3, [pc, #512] @ (8008c50 ) 8008a4e: f240 6255 movw r2, #1621 @ 0x655 8008a52: 4983 ldr r1, [pc, #524] @ (8008c60 ) 8008a54: 4880 ldr r0, [pc, #512] @ (8008c58 ) 8008a56: f00a fcd7 bl 8013408 8008a5a: f06f 0005 mvn.w r0, #5 8008a5e: e1a0 b.n 8008da2 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8008a60: 2a04 cmp r2, #4 8008a62: d103 bne.n 8008a6c decode_len = len; 8008a64: 4690 mov r8, r2 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 8008a66: f04f 0902 mov.w r9, #2 8008a6a: e02d b.n 8008ac8 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8008a6c: 4b78 ldr r3, [pc, #480] @ (8008c50 ) 8008a6e: f240 6259 movw r2, #1625 @ 0x659 8008a72: 4978 ldr r1, [pc, #480] @ (8008c54 ) 8008a74: 4878 ldr r0, [pc, #480] @ (8008c58 ) 8008a76: f00a fcc7 bl 8013408 8008a7a: f06f 0005 mvn.w r0, #5 8008a7e: e190 b.n 8008da2 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8008a80: 2a04 cmp r2, #4 8008a82: d103 bne.n 8008a8c decode_len = len; 8008a84: 4690 mov r8, r2 decode_idx = DHCP_OPTION_IDX_T1; 8008a86: f04f 0904 mov.w r9, #4 8008a8a: e01d b.n 8008ac8 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8008a8c: 4b70 ldr r3, [pc, #448] @ (8008c50 ) 8008a8e: f240 625d movw r2, #1629 @ 0x65d 8008a92: 4970 ldr r1, [pc, #448] @ (8008c54 ) 8008a94: 4870 ldr r0, [pc, #448] @ (8008c58 ) 8008a96: f00a fcb7 bl 8013408 8008a9a: f06f 0005 mvn.w r0, #5 8008a9e: e180 b.n 8008da2 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8008aa0: 2a04 cmp r2, #4 8008aa2: d103 bne.n 8008aac decode_len = len; 8008aa4: 4690 mov r8, r2 decode_idx = DHCP_OPTION_IDX_T2; 8008aa6: f04f 0905 mov.w r9, #5 8008aaa: e00d b.n 8008ac8 LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8008aac: 4b68 ldr r3, [pc, #416] @ (8008c50 ) 8008aae: f240 6261 movw r2, #1633 @ 0x661 8008ab2: 4968 ldr r1, [pc, #416] @ (8008c54 ) 8008ab4: 4868 ldr r0, [pc, #416] @ (8008c58 ) 8008ab6: f00a fca7 bl 8013408 8008aba: f06f 0005 mvn.w r0, #5 8008abe: e170 b.n 8008da2 int decode_idx = -1; 8008ac0: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff decode_len = 0; 8008ac4: f04f 0800 mov.w r8, #0 if (op == DHCP_OPTION_PAD) { 8008ac8: 2900 cmp r1, #0 8008aca: f040 80ad bne.w 8008c28 offset++; 8008ace: 3601 adds r6, #1 8008ad0: b2b6 uxth r6, r6 if (offset >= q->len) { 8008ad2: 896b ldrh r3, [r5, #10] 8008ad4: 429e cmp r6, r3 8008ad6: d30c bcc.n 8008af2 offset = (u16_t)(offset - q->len); 8008ad8: 1af6 subs r6, r6, r3 8008ada: b2b6 uxth r6, r6 offset_max = (u16_t)(offset_max - q->len); 8008adc: 1ae3 subs r3, r4, r3 8008ade: b29c uxth r4, r3 if (offset < offset_max) { 8008ae0: 42a6 cmp r6, r4 8008ae2: f080 8167 bcs.w 8008db4 q = q->next; 8008ae6: 682d ldr r5, [r5, #0] LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); 8008ae8: 2d00 cmp r5, #0 8008aea: f000 812a beq.w 8008d42 options = (u8_t *)q->payload; 8008aee: 686b ldr r3, [r5, #4] 8008af0: 9301 str r3, [sp, #4] while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { 8008af2: 2d00 cmp r5, #0 8008af4: bf18 it ne 8008af6: 42a6 cmpne r6, r4 8008af8: f080 812d bcs.w 8008d56 8008afc: 46b4 mov ip, r6 8008afe: 9b01 ldr r3, [sp, #4] 8008b00: 5d99 ldrb r1, [r3, r6] 8008b02: 29ff cmp r1, #255 @ 0xff 8008b04: f000 8127 beq.w 8008d56 u16_t val_offset = (u16_t)(offset + 2); 8008b08: 1cb3 adds r3, r6, #2 8008b0a: fa1f fa83 uxth.w sl, r3 if (val_offset < offset) { 8008b0e: 4556 cmp r6, sl 8008b10: f200 814a bhi.w 8008da8 if ((offset + 1) < q->len) { 8008b14: 4630 mov r0, r6 8008b16: 1c72 adds r2, r6, #1 8008b18: f8b5 e00a ldrh.w lr, [r5, #10] 8008b1c: 4572 cmp r2, lr 8008b1e: f6bf af36 bge.w 800898e len = options[offset + 1]; 8008b22: f10c 0c01 add.w ip, ip, #1 8008b26: 9b01 ldr r3, [sp, #4] 8008b28: f813 200c ldrb.w r2, [r3, ip] switch (op) { 8008b2c: 293b cmp r1, #59 @ 0x3b 8008b2e: d8c7 bhi.n 8008ac0 8008b30: f20f 0c04 addw ip, pc, #4 8008b34: f85c f021 ldr.w pc, [ip, r1, lsl #2] 8008b38: 0800899d .word 0x0800899d 8008b3c: 080089a7 .word 0x080089a7 8008b40: 08008ac1 .word 0x08008ac1 8008b44: 080089c7 .word 0x080089c7 8008b48: 08008ac1 .word 0x08008ac1 8008b4c: 08008ac1 .word 0x08008ac1 8008b50: 08008ac1 .word 0x08008ac1 8008b54: 08008ac1 .word 0x08008ac1 8008b58: 08008ac1 .word 0x08008ac1 8008b5c: 08008ac1 .word 0x08008ac1 8008b60: 08008ac1 .word 0x08008ac1 8008b64: 08008ac1 .word 0x08008ac1 8008b68: 08008ac1 .word 0x08008ac1 8008b6c: 08008ac1 .word 0x08008ac1 8008b70: 08008ac1 .word 0x08008ac1 8008b74: 08008ac1 .word 0x08008ac1 8008b78: 08008ac1 .word 0x08008ac1 8008b7c: 08008ac1 .word 0x08008ac1 8008b80: 08008ac1 .word 0x08008ac1 8008b84: 08008ac1 .word 0x08008ac1 8008b88: 08008ac1 .word 0x08008ac1 8008b8c: 08008ac1 .word 0x08008ac1 8008b90: 08008ac1 .word 0x08008ac1 8008b94: 08008ac1 .word 0x08008ac1 8008b98: 08008ac1 .word 0x08008ac1 8008b9c: 08008ac1 .word 0x08008ac1 8008ba0: 08008ac1 .word 0x08008ac1 8008ba4: 08008ac1 .word 0x08008ac1 8008ba8: 08008ac1 .word 0x08008ac1 8008bac: 08008ac1 .word 0x08008ac1 8008bb0: 08008ac1 .word 0x08008ac1 8008bb4: 08008ac1 .word 0x08008ac1 8008bb8: 08008ac1 .word 0x08008ac1 8008bbc: 08008ac1 .word 0x08008ac1 8008bc0: 08008ac1 .word 0x08008ac1 8008bc4: 08008ac1 .word 0x08008ac1 8008bc8: 08008ac1 .word 0x08008ac1 8008bcc: 08008ac1 .word 0x08008ac1 8008bd0: 08008ac1 .word 0x08008ac1 8008bd4: 08008ac1 .word 0x08008ac1 8008bd8: 08008ac1 .word 0x08008ac1 8008bdc: 08008ac1 .word 0x08008ac1 8008be0: 08008ac1 .word 0x08008ac1 8008be4: 08008ac1 .word 0x08008ac1 8008be8: 08008ac1 .word 0x08008ac1 8008bec: 08008ac1 .word 0x08008ac1 8008bf0: 08008ac1 .word 0x08008ac1 8008bf4: 08008ac1 .word 0x08008ac1 8008bf8: 08008ac1 .word 0x08008ac1 8008bfc: 08008ac1 .word 0x08008ac1 8008c00: 08008ac1 .word 0x08008ac1 8008c04: 080089e9 .word 0x080089e9 8008c08: 08008a09 .word 0x08008a09 8008c0c: 08008a41 .word 0x08008a41 8008c10: 08008a61 .word 0x08008a61 8008c14: 08008ac1 .word 0x08008ac1 8008c18: 08008ac1 .word 0x08008ac1 8008c1c: 08008ac1 .word 0x08008ac1 8008c20: 08008a81 .word 0x08008a81 8008c24: 08008aa1 .word 0x08008aa1 if (offset + len + 2 > 0xFFFF) { 8008c28: 4410 add r0, r2 8008c2a: f64f 71fd movw r1, #65533 @ 0xfffd 8008c2e: 4288 cmp r0, r1 8008c30: f300 80bd bgt.w 8008dae offset = (u16_t)(offset + len + 2); 8008c34: 4432 add r2, r6 8008c36: b292 uxth r2, r2 8008c38: 3202 adds r2, #2 8008c3a: b296 uxth r6, r2 if (decode_len > 0) { 8008c3c: f1b8 0f00 cmp.w r8, #0 8008c40: f43f af47 beq.w 8008ad2 u32_t value = 0; 8008c44: 2200 movs r2, #0 8008c46: 9205 str r2, [sp, #20] 8008c48: 9603 str r6, [sp, #12] 8008c4a: e03b b.n 8008cc4 8008c4c: 24012f00 .word 0x24012f00 8008c50: 08014e34 .word 0x08014e34 8008c54: 080150c4 .word 0x080150c4 8008c58: 080144e8 .word 0x080144e8 8008c5c: 080150d0 .word 0x080150d0 8008c60: 080150e4 .word 0x080150e4 8008c64: 080150f0 .word 0x080150f0 if (!dhcp_option_given(dhcp, decode_idx)) { 8008c68: 4b54 ldr r3, [pc, #336] @ (8008dbc ) 8008c6a: f813 3009 ldrb.w r3, [r3, r9] 8008c6e: 2b00 cmp r3, #0 8008c70: d165 bne.n 8008d3e copy_len = LWIP_MIN(decode_len, 4); 8008c72: 4646 mov r6, r8 8008c74: 2e04 cmp r6, #4 8008c76: bf28 it cs 8008c78: 2604 movcs r6, #4 8008c7a: b2f6 uxtb r6, r6 if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { 8008c7c: 4653 mov r3, sl 8008c7e: 4632 mov r2, r6 8008c80: a905 add r1, sp, #20 8008c82: 4628 mov r0, r5 8008c84: f003 fb0e bl 800c2a4 8008c88: 42b0 cmp r0, r6 8008c8a: d152 bne.n 8008d32 if (decode_len > 4) { 8008c8c: f1b8 0f04 cmp.w r8, #4 8008c90: d92d bls.n 8008cee LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 8008c92: f018 0f03 tst.w r8, #3 8008c96: d120 bne.n 8008cda dhcp_got_option(dhcp, decode_idx); 8008c98: 4b48 ldr r3, [pc, #288] @ (8008dbc ) 8008c9a: 2201 movs r2, #1 8008c9c: f803 2009 strb.w r2, [r3, r9] dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); 8008ca0: 9805 ldr r0, [sp, #20] 8008ca2: f7ff f8f0 bl 8007e86 8008ca6: 4b46 ldr r3, [pc, #280] @ (8008dc0 ) 8008ca8: f843 0029 str.w r0, [r3, r9, lsl #2] decode_len = (u8_t)(decode_len - 4); 8008cac: f1a8 0804 sub.w r8, r8, #4 8008cb0: fa5f f888 uxtb.w r8, r8 next_val_offset = (u16_t)(val_offset + 4); 8008cb4: f10a 0304 add.w r3, sl, #4 8008cb8: b29b uxth r3, r3 if (next_val_offset < val_offset) { 8008cba: 459a cmp sl, r3 8008cbc: d83c bhi.n 8008d38 decode_idx++; 8008cbe: f109 0901 add.w r9, r9, #1 val_offset = next_val_offset; 8008cc2: 469a mov sl, r3 LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); 8008cc4: f1b9 0f07 cmp.w r9, #7 8008cc8: d9ce bls.n 8008c68 8008cca: 4b3e ldr r3, [pc, #248] @ (8008dc4 ) 8008ccc: f44f 62cf mov.w r2, #1656 @ 0x678 8008cd0: 493d ldr r1, [pc, #244] @ (8008dc8 ) 8008cd2: 483e ldr r0, [pc, #248] @ (8008dcc ) 8008cd4: f00a fb98 bl 8013408 8008cd8: e7c6 b.n 8008c68 LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 8008cda: 4b3a ldr r3, [pc, #232] @ (8008dc4 ) 8008cdc: f240 6281 movw r2, #1665 @ 0x681 8008ce0: 493b ldr r1, [pc, #236] @ (8008dd0 ) 8008ce2: 483a ldr r0, [pc, #232] @ (8008dcc ) 8008ce4: f00a fb90 bl 8013408 8008ce8: f06f 0005 mvn.w r0, #5 8008cec: e059 b.n 8008da2 } else if (decode_len == 4) { 8008cee: 9e03 ldr r6, [sp, #12] 8008cf0: f1b8 0f04 cmp.w r8, #4 8008cf4: d00e beq.n 8008d14 LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 8008cf6: f1b8 0f01 cmp.w r8, #1 8008cfa: d110 bne.n 8008d1e value = ((u8_t *)&value)[0]; 8008cfc: f89d 3014 ldrb.w r3, [sp, #20] 8008d00: 9305 str r3, [sp, #20] dhcp_got_option(dhcp, decode_idx); 8008d02: 4b2e ldr r3, [pc, #184] @ (8008dbc ) 8008d04: 2201 movs r2, #1 8008d06: f803 2009 strb.w r2, [r3, r9] dhcp_set_option_value(dhcp, decode_idx, value); 8008d0a: 4b2d ldr r3, [pc, #180] @ (8008dc0 ) 8008d0c: 9a05 ldr r2, [sp, #20] 8008d0e: f843 2029 str.w r2, [r3, r9, lsl #2] 8008d12: e6de b.n 8008ad2 value = lwip_ntohl(value); 8008d14: 9805 ldr r0, [sp, #20] 8008d16: f7ff f8b6 bl 8007e86 8008d1a: 9005 str r0, [sp, #20] 8008d1c: e7f1 b.n 8008d02 LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 8008d1e: 4b29 ldr r3, [pc, #164] @ (8008dc4 ) 8008d20: f44f 62d2 mov.w r2, #1680 @ 0x690 8008d24: 492b ldr r1, [pc, #172] @ (8008dd4 ) 8008d26: 4829 ldr r0, [pc, #164] @ (8008dcc ) 8008d28: f00a fb6e bl 8013408 8008d2c: f06f 0005 mvn.w r0, #5 8008d30: e037 b.n 8008da2 return ERR_BUF; 8008d32: f06f 0001 mvn.w r0, #1 8008d36: e034 b.n 8008da2 return ERR_BUF; 8008d38: f06f 0001 mvn.w r0, #1 8008d3c: e031 b.n 8008da2 8008d3e: 9e03 ldr r6, [sp, #12] 8008d40: e6c7 b.n 8008ad2 LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); 8008d42: 4b20 ldr r3, [pc, #128] @ (8008dc4 ) 8008d44: f240 629d movw r2, #1693 @ 0x69d 8008d48: 4923 ldr r1, [pc, #140] @ (8008dd8 ) 8008d4a: 4820 ldr r0, [pc, #128] @ (8008dcc ) 8008d4c: f00a fb5c bl 8013408 8008d50: f06f 0005 mvn.w r0, #5 8008d54: e025 b.n 8008da2 if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 8008d56: 46d8 mov r8, fp 8008d58: 4b18 ldr r3, [pc, #96] @ (8008dbc ) 8008d5a: 781b ldrb r3, [r3, #0] 8008d5c: b153 cbz r3, 8008d74 u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 8008d5e: 4b18 ldr r3, [pc, #96] @ (8008dc0 ) 8008d60: 681b ldr r3, [r3, #0] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 8008d62: 4a16 ldr r2, [pc, #88] @ (8008dbc ) 8008d64: 2100 movs r1, #0 8008d66: 7011 strb r1, [r2, #0] if (overload == DHCP_OVERLOAD_FILE) { 8008d68: 2b01 cmp r3, #1 8008d6a: d012 beq.n 8008d92 } else if (overload == DHCP_OVERLOAD_SNAME) { 8008d6c: 2b02 cmp r3, #2 8008d6e: d009 beq.n 8008d84 } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 8008d70: 2b03 cmp r3, #3 8008d72: d00c beq.n 8008d8e } else if (parse_sname_as_options) { 8008d74: f1b8 0f00 cmp.w r8, #0 8008d78: d007 beq.n 8008d8a parse_sname_as_options = 0; 8008d7a: f04f 0800 mov.w r8, #0 options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 8008d7e: 246c movs r4, #108 @ 0x6c options_idx = DHCP_SNAME_OFS; 8008d80: 272c movs r7, #44 @ 0x2c 8008d82: e5f2 b.n 800896a parse_sname_as_options = 1; 8008d84: f04f 0801 mov.w r8, #1 8008d88: e7f4 b.n 8008d74 return ERR_OK; 8008d8a: 2000 movs r0, #0 8008d8c: e009 b.n 8008da2 parse_sname_as_options = 1; 8008d8e: f04f 0801 mov.w r8, #1 options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; 8008d92: 24ec movs r4, #236 @ 0xec options_idx = DHCP_FILE_OFS; 8008d94: 276c movs r7, #108 @ 0x6c goto again; 8008d96: e5e8 b.n 800896a return ERR_BUF; 8008d98: f06f 0001 mvn.w r0, #1 } 8008d9c: 4770 bx lr return ERR_BUF; 8008d9e: f06f 0001 mvn.w r0, #1 } 8008da2: b007 add sp, #28 8008da4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} return ERR_BUF; 8008da8: f06f 0001 mvn.w r0, #1 8008dac: e7f9 b.n 8008da2 return ERR_BUF; 8008dae: f06f 0001 mvn.w r0, #1 8008db2: e7f6 b.n 8008da2 return ERR_BUF; 8008db4: f06f 0001 mvn.w r0, #1 8008db8: e7f3 b.n 8008da2 8008dba: bf00 nop 8008dbc: 24012f00 .word 0x24012f00 8008dc0: 24012f08 .word 0x24012f08 8008dc4: 08014e34 .word 0x08014e34 8008dc8: 08015108 .word 0x08015108 8008dcc: 080144e8 .word 0x080144e8 8008dd0: 0801511c .word 0x0801511c 8008dd4: 08015134 .word 0x08015134 8008dd8: 08015148 .word 0x08015148 08008ddc : { 8008ddc: b570 push {r4, r5, r6, lr} 8008dde: 4614 mov r4, r2 struct netif *netif = ip_current_input_netif(); 8008de0: 4b36 ldr r3, [pc, #216] @ (8008ebc ) 8008de2: 685d ldr r5, [r3, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8008de4: 6a6e ldr r6, [r5, #36] @ 0x24 struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 8008de6: 6852 ldr r2, [r2, #4] if ((dhcp == NULL) || (dhcp->pcb_allocated == 0)) { 8008de8: b1f6 cbz r6, 8008e28 8008dea: 7933 ldrb r3, [r6, #4] 8008dec: b1e3 cbz r3, 8008e28 if (p->len < DHCP_MIN_REPLY_LEN) { 8008dee: 8963 ldrh r3, [r4, #10] 8008df0: 2b2b cmp r3, #43 @ 0x2b 8008df2: d919 bls.n 8008e28 if (reply_msg->op != DHCP_BOOTREPLY) { 8008df4: 7813 ldrb r3, [r2, #0] 8008df6: 2b02 cmp r3, #2 8008df8: d116 bne.n 8008e28 for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 8008dfa: 2300 movs r3, #0 8008dfc: f895 1030 ldrb.w r1, [r5, #48] @ 0x30 8008e00: 4299 cmp r1, r3 8008e02: d90b bls.n 8008e1c 8008e04: 2b05 cmp r3, #5 8008e06: d809 bhi.n 8008e1c if (netif->hwaddr[i] != reply_msg->chaddr[i]) { 8008e08: 18e9 adds r1, r5, r3 8008e0a: f891 002a ldrb.w r0, [r1, #42] @ 0x2a 8008e0e: 18d1 adds r1, r2, r3 8008e10: 7f09 ldrb r1, [r1, #28] 8008e12: 4288 cmp r0, r1 8008e14: d108 bne.n 8008e28 for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 8008e16: 3301 adds r3, #1 8008e18: b2db uxtb r3, r3 8008e1a: e7ef b.n 8008dfc if (lwip_ntohl(reply_msg->xid) != dhcp->xid) { 8008e1c: 6850 ldr r0, [r2, #4] 8008e1e: f7ff f832 bl 8007e86 8008e22: 6833 ldr r3, [r6, #0] 8008e24: 4298 cmp r0, r3 8008e26: d003 beq.n 8008e30 pbuf_free(p); 8008e28: 4620 mov r0, r4 8008e2a: f002 ffb9 bl 800bda0 } 8008e2e: bd70 pop {r4, r5, r6, pc} if (dhcp_parse_reply(p, dhcp) != ERR_OK) { 8008e30: 4631 mov r1, r6 8008e32: 4620 mov r0, r4 8008e34: f7ff fd8a bl 800894c 8008e38: 2800 cmp r0, #0 8008e3a: d1f5 bne.n 8008e28 if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) { 8008e3c: 4b20 ldr r3, [pc, #128] @ (8008ec0 ) 8008e3e: 785b ldrb r3, [r3, #1] 8008e40: 2b00 cmp r3, #0 8008e42: d0f1 beq.n 8008e28 msg_in = (struct dhcp_msg *)p->payload; 8008e44: 6861 ldr r1, [r4, #4] msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); 8008e46: 4b1f ldr r3, [pc, #124] @ (8008ec4 ) 8008e48: 791b ldrb r3, [r3, #4] if (msg_type == DHCP_ACK) { 8008e4a: 2b05 cmp r3, #5 8008e4c: d00a beq.n 8008e64 else if ((msg_type == DHCP_NAK) && 8008e4e: 2b06 cmp r3, #6 8008e50: d026 beq.n 8008ea0 else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { 8008e52: 2b02 cmp r3, #2 8008e54: d1e8 bne.n 8008e28 8008e56: 7973 ldrb r3, [r6, #5] 8008e58: 2b06 cmp r3, #6 8008e5a: d1e5 bne.n 8008e28 dhcp_handle_offer(netif, msg_in); 8008e5c: 4628 mov r0, r5 8008e5e: f7ff fb73 bl 8008548 8008e62: e7e1 b.n 8008e28 if (dhcp->state == DHCP_STATE_REQUESTING) { 8008e64: 7973 ldrb r3, [r6, #5] 8008e66: 2b01 cmp r3, #1 8008e68: d00a beq.n 8008e80 else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || 8008e6a: 3b03 subs r3, #3 8008e6c: b2db uxtb r3, r3 8008e6e: 2b02 cmp r3, #2 8008e70: d8da bhi.n 8008e28 dhcp_handle_ack(netif, msg_in); 8008e72: 4628 mov r0, r5 8008e74: f7ff f936 bl 80080e4 dhcp_bind(netif); 8008e78: 4628 mov r0, r5 8008e7a: f7ff fc5d bl 8008738 8008e7e: e7d3 b.n 8008e28 dhcp_handle_ack(netif, msg_in); 8008e80: 4628 mov r0, r5 8008e82: f7ff f92f bl 80080e4 if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { 8008e86: f895 3031 ldrb.w r3, [r5, #49] @ 0x31 8008e8a: f013 0f08 tst.w r3, #8 8008e8e: d003 beq.n 8008e98 dhcp_check(netif); 8008e90: 4628 mov r0, r5 8008e92: f7ff fc3b bl 800870c 8008e96: e7c7 b.n 8008e28 dhcp_bind(netif); 8008e98: 4628 mov r0, r5 8008e9a: f7ff fc4d bl 8008738 8008e9e: e7c3 b.n 8008e28 ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8008ea0: 7972 ldrb r2, [r6, #5] else if ((msg_type == DHCP_NAK) && 8008ea2: 2a01 cmp r2, #1 8008ea4: bf18 it ne 8008ea6: 2a03 cmpne r2, #3 8008ea8: d003 beq.n 8008eb2 ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8008eaa: 2a04 cmp r2, #4 8008eac: d001 beq.n 8008eb2 (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { 8008eae: 2a05 cmp r2, #5 8008eb0: d1cf bne.n 8008e52 dhcp_handle_nak(netif); 8008eb2: 4628 mov r0, r5 8008eb4: f7ff fcd6 bl 8008864 8008eb8: e7b6 b.n 8008e28 8008eba: bf00 nop 8008ebc: 2401301c .word 0x2401301c 8008ec0: 24012f00 .word 0x24012f00 8008ec4: 24012f08 .word 0x24012f08 08008ec8 : { 8008ec8: b538 push {r3, r4, r5, lr} struct dhcp *dhcp = netif_dhcp_data(netif); 8008eca: 6a45 ldr r5, [r0, #36] @ 0x24 if (!dhcp) { 8008ecc: b135 cbz r5, 8008edc 8008ece: 4604 mov r4, r0 switch (dhcp->state) { 8008ed0: 796b ldrb r3, [r5, #5] 8008ed2: 2b05 cmp r3, #5 8008ed4: d803 bhi.n 8008ede 8008ed6: 2b03 cmp r3, #3 8008ed8: d203 bcs.n 8008ee2 8008eda: b943 cbnz r3, 8008eee } 8008edc: bd38 pop {r3, r4, r5, pc} switch (dhcp->state) { 8008ede: 2b0a cmp r3, #10 8008ee0: d105 bne.n 8008eee dhcp->tries = 0; 8008ee2: 2300 movs r3, #0 8008ee4: 71ab strb r3, [r5, #6] dhcp_reboot(netif); 8008ee6: 4620 mov r0, r4 8008ee8: f7ff f9e6 bl 80082b8 break; 8008eec: e7f6 b.n 8008edc LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF); 8008eee: 2b0c cmp r3, #12 8008ef0: d805 bhi.n 8008efe dhcp->tries = 0; 8008ef2: 2300 movs r3, #0 8008ef4: 71ab strb r3, [r5, #6] dhcp_discover(netif); 8008ef6: 4620 mov r0, r4 8008ef8: f7ff fb40 bl 800857c break; 8008efc: e7ee b.n 8008edc LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF); 8008efe: 4b04 ldr r3, [pc, #16] @ (8008f10 ) 8008f00: f240 326d movw r2, #877 @ 0x36d 8008f04: 4903 ldr r1, [pc, #12] @ (8008f14 ) 8008f06: 4804 ldr r0, [pc, #16] @ (8008f18 ) 8008f08: f00a fa7e bl 8013408 8008f0c: e7f1 b.n 8008ef2 8008f0e: bf00 nop 8008f10: 08014e34 .word 0x08014e34 8008f14: 08015190 .word 0x08015190 8008f18: 080144e8 .word 0x080144e8 08008f1c : { 8008f1c: b508 push {r3, lr} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8008f1e: b130 cbz r0, 8008f2e 8008f20: 4602 mov r2, r0 dhcp = netif_dhcp_data(netif); 8008f22: 6a43 ldr r3, [r0, #36] @ 0x24 if ((dhcp != NULL) && (dhcp->state == DHCP_STATE_CHECKING)) { 8008f24: b113 cbz r3, 8008f2c 8008f26: 7958 ldrb r0, [r3, #5] 8008f28: 2808 cmp r0, #8 8008f2a: d008 beq.n 8008f3e } 8008f2c: bd08 pop {r3, pc} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8008f2e: 4b08 ldr r3, [pc, #32] @ (8008f50 ) 8008f30: f240 328b movw r2, #907 @ 0x38b 8008f34: 4907 ldr r1, [pc, #28] @ (8008f54 ) 8008f36: 4808 ldr r0, [pc, #32] @ (8008f58 ) 8008f38: f00a fa66 bl 8013408 8008f3c: e7f6 b.n 8008f2c if (ip4_addr_cmp(addr, &dhcp->offered_ip_addr)) { 8008f3e: 6809 ldr r1, [r1, #0] 8008f40: 69db ldr r3, [r3, #28] 8008f42: 4299 cmp r1, r3 8008f44: d1f2 bne.n 8008f2c dhcp_decline(netif); 8008f46: 4610 mov r0, r2 8008f48: f7ff fb92 bl 8008670 8008f4c: e7ee b.n 8008f2c 8008f4e: bf00 nop 8008f50: 08014e34 .word 0x08014e34 8008f54: 080144d8 .word 0x080144d8 8008f58: 080144e8 .word 0x080144e8 08008f5c : { 8008f5c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8008f60: b084 sub sp, #16 8008f62: 4607 mov r7, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 8008f64: 6a45 ldr r5, [r0, #36] @ 0x24 LWIP_ASSERT_CORE_LOCKED(); 8008f66: f7fa fdd1 bl 8003b0c dhcp_set_state(dhcp, DHCP_STATE_RENEWING); 8008f6a: 2105 movs r1, #5 8008f6c: 4628 mov r0, r5 8008f6e: f7fe ff96 bl 8007e9e p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 8008f72: f10d 030e add.w r3, sp, #14 8008f76: 2203 movs r2, #3 8008f78: 4629 mov r1, r5 8008f7a: 4638 mov r0, r7 8008f7c: f7ff f814 bl 8007fa8 if (p_out != NULL) { 8008f80: 2800 cmp r0, #0 8008f82: d049 beq.n 8009018 8008f84: 4680 mov r8, r0 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8008f86: 6846 ldr r6, [r0, #4] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 8008f88: 36f0 adds r6, #240 @ 0xf0 8008f8a: 2302 movs r3, #2 8008f8c: 2239 movs r2, #57 @ 0x39 8008f8e: 4631 mov r1, r6 8008f90: f8bd 000e ldrh.w r0, [sp, #14] 8008f94: f7fe ffaa bl 8007eec 8008f98: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 8008f9c: 8d3a ldrh r2, [r7, #40] @ 0x28 8008f9e: 4631 mov r1, r6 8008fa0: f7fe ff86 bl 8007eb0 8008fa4: f8ad 000e strh.w r0, [sp, #14] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); 8008fa8: 2303 movs r3, #3 8008faa: 2237 movs r2, #55 @ 0x37 8008fac: 4631 mov r1, r6 8008fae: f7fe ff9d bl 8007eec 8008fb2: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8008fb6: 2400 movs r4, #0 8008fb8: e00a b.n 8008fd0 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 8008fba: 4b20 ldr r3, [pc, #128] @ (800903c ) 8008fbc: 5d1a ldrb r2, [r3, r4] 8008fbe: 4631 mov r1, r6 8008fc0: f8bd 000e ldrh.w r0, [sp, #14] 8008fc4: f7fe ffb0 bl 8007f28 8008fc8: f8ad 000e strh.w r0, [sp, #14] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8008fcc: 3401 adds r4, #1 8008fce: b2e4 uxtb r4, r4 8008fd0: 2c02 cmp r4, #2 8008fd2: d9f2 bls.n 8008fba dhcp_option_trailer(options_out_len, msg_out->options, p_out); 8008fd4: 4642 mov r2, r8 8008fd6: 4631 mov r1, r6 8008fd8: f8bd 000e ldrh.w r0, [sp, #14] 8008fdc: f7ff f8c0 bl 8008160 result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 8008fe0: 9700 str r7, [sp, #0] 8008fe2: 2343 movs r3, #67 @ 0x43 8008fe4: f105 0218 add.w r2, r5, #24 8008fe8: 4641 mov r1, r8 8008fea: 4815 ldr r0, [pc, #84] @ (8009040 ) 8008fec: 6800 ldr r0, [r0, #0] 8008fee: f008 fe15 bl 8011c1c 8008ff2: 4604 mov r4, r0 pbuf_free(p_out); 8008ff4: 4640 mov r0, r8 8008ff6: f002 fed3 bl 800bda0 if (dhcp->tries < 255) { 8008ffa: 79ab ldrb r3, [r5, #6] 8008ffc: 2bff cmp r3, #255 @ 0xff 8008ffe: d001 beq.n 8009004 dhcp->tries++; 8009000: 3301 adds r3, #1 8009002: 71ab strb r3, [r5, #6] msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000); 8009004: 79ab ldrb r3, [r5, #6] 8009006: 2b09 cmp r3, #9 8009008: d809 bhi.n 800901e 800900a: ebc3 1243 rsb r2, r3, r3, lsl #5 800900e: eb03 0382 add.w r3, r3, r2, lsl #2 8009012: 011b lsls r3, r3, #4 8009014: b29b uxth r3, r3 8009016: e004 b.n 8009022 result = ERR_MEM; 8009018: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 800901c: e7ed b.n 8008ffa msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000); 800901e: f644 6320 movw r3, #20000 @ 0x4e20 dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8009022: f203 13f3 addw r3, r3, #499 @ 0x1f3 8009026: 4a07 ldr r2, [pc, #28] @ (8009044 ) 8009028: fb82 1203 smull r1, r2, r2, r3 800902c: 17db asrs r3, r3, #31 800902e: ebc3 1362 rsb r3, r3, r2, asr #5 8009032: 812b strh r3, [r5, #8] } 8009034: 4620 mov r0, r4 8009036: b004 add sp, #16 8009038: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 800903c: 080151c8 .word 0x080151c8 8009040: 24012efc .word 0x24012efc 8009044: 10624dd3 .word 0x10624dd3 08009048 : { 8009048: b510 push {r4, lr} struct dhcp *dhcp = netif_dhcp_data(netif); 800904a: 6a44 ldr r4, [r0, #36] @ 0x24 if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 800904c: 7963 ldrb r3, [r4, #5] 800904e: 2b0a cmp r3, #10 8009050: bf18 it ne 8009052: 2b01 cmpne r3, #1 8009054: d002 beq.n 800905c 8009056: 2b05 cmp r3, #5 8009058: d000 beq.n 800905c } 800905a: bd10 pop {r4, pc} dhcp_renew(netif); 800905c: f7ff ff7e bl 8008f5c if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 8009060: 89a3 ldrh r3, [r4, #12] 8009062: 8a62 ldrh r2, [r4, #18] 8009064: 1a9b subs r3, r3, r2 8009066: 2b01 cmp r3, #1 8009068: ddf7 ble.n 800905a dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2); 800906a: 461a mov r2, r3 800906c: 2b00 cmp r3, #0 800906e: db03 blt.n 8009078 8009070: f3c2 024f ubfx r2, r2, #1, #16 8009074: 81e2 strh r2, [r4, #14] } 8009076: e7f0 b.n 800905a dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2); 8009078: 1c5a adds r2, r3, #1 800907a: e7f9 b.n 8009070 0800907c : * 0 otherwise */ u8_t dhcp_supplied_address(const struct netif *netif) { if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { 800907c: b178 cbz r0, 800909e 800907e: 6a43 ldr r3, [r0, #36] @ 0x24 8009080: b17b cbz r3, 80090a2 struct dhcp *dhcp = netif_dhcp_data(netif); return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || 8009082: 795b ldrb r3, [r3, #5] 8009084: 2b05 cmp r3, #5 8009086: bf18 it ne 8009088: 2b0a cmpne r3, #10 800908a: d005 beq.n 8009098 800908c: 2b04 cmp r3, #4 800908e: d001 beq.n 8009094 8009090: 2000 movs r0, #0 8009092: e002 b.n 800909a 8009094: 2001 movs r0, #1 8009096: e000 b.n 800909a 8009098: 2001 movs r0, #1 800909a: b2c0 uxtb r0, r0 800909c: 4770 bx lr (dhcp->state == DHCP_STATE_REBINDING); } return 0; 800909e: 2000 movs r0, #0 80090a0: 4770 bx lr 80090a2: 2000 movs r0, #0 } 80090a4: 4770 bx lr ... 080090a8 : { 80090a8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80090ac: b084 sub sp, #16 80090ae: 4605 mov r5, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 80090b0: 6a44 ldr r4, [r0, #36] @ 0x24 LWIP_ASSERT_CORE_LOCKED(); 80090b2: f7fa fd2b bl 8003b0c if (dhcp == NULL) { 80090b6: b1fc cbz r4, 80090f8 if (dhcp->state == DHCP_STATE_OFF) { 80090b8: 7963 ldrb r3, [r4, #5] 80090ba: b1eb cbz r3, 80090f8 ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); 80090bc: 69a3 ldr r3, [r4, #24] 80090be: 9303 str r3, [sp, #12] ip_addr_set_zero_ip4(&dhcp->server_ip_addr); 80090c0: 2300 movs r3, #0 80090c2: 61a3 str r3, [r4, #24] ip4_addr_set_zero(&dhcp->offered_ip_addr); 80090c4: 61e3 str r3, [r4, #28] ip4_addr_set_zero(&dhcp->offered_sn_mask); 80090c6: 6223 str r3, [r4, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 80090c8: 6263 str r3, [r4, #36] @ 0x24 dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; 80090ca: 6323 str r3, [r4, #48] @ 0x30 80090cc: 62e3 str r3, [r4, #44] @ 0x2c 80090ce: 62a3 str r3, [r4, #40] @ 0x28 dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; 80090d0: 82a3 strh r3, [r4, #20] 80090d2: 8263 strh r3, [r4, #18] 80090d4: 8223 strh r3, [r4, #16] 80090d6: 81e3 strh r3, [r4, #14] if (dhcp_supplied_address(netif)) { 80090d8: 4628 mov r0, r5 80090da: f7ff ffcf bl 800907c 80090de: b970 cbnz r0, 80090fe netif_set_addr(netif, IP4_ADDR_ANY4, IP4_ADDR_ANY4, IP4_ADDR_ANY4); 80090e0: 4921 ldr r1, [pc, #132] @ (8009168 ) 80090e2: 460b mov r3, r1 80090e4: 460a mov r2, r1 80090e6: 4628 mov r0, r5 80090e8: f002 fbb0 bl 800b84c dhcp_set_state(dhcp, DHCP_STATE_OFF); 80090ec: 2100 movs r1, #0 80090ee: 4620 mov r0, r4 80090f0: f7fe fed5 bl 8007e9e if (dhcp->pcb_allocated != 0) { 80090f4: 7923 ldrb r3, [r4, #4] 80090f6: bb93 cbnz r3, 800915e } 80090f8: b004 add sp, #16 80090fa: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} p_out = dhcp_create_msg(netif, dhcp, DHCP_RELEASE, &options_out_len); 80090fe: f10d 030a add.w r3, sp, #10 8009102: 2207 movs r2, #7 8009104: 4621 mov r1, r4 8009106: 4628 mov r0, r5 8009108: f7fe ff4e bl 8007fa8 if (p_out != NULL) { 800910c: 4607 mov r7, r0 800910e: 2800 cmp r0, #0 8009110: d0e6 beq.n 80090e0 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8009112: 6846 ldr r6, [r0, #4] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 8009114: 36f0 adds r6, #240 @ 0xf0 8009116: 2304 movs r3, #4 8009118: 2236 movs r2, #54 @ 0x36 800911a: 4631 mov r1, r6 800911c: f8bd 000a ldrh.w r0, [sp, #10] 8009120: f7fe fee4 bl 8007eec 8009124: 4680 mov r8, r0 8009126: f8ad 000a strh.w r0, [sp, #10] options_out_len = dhcp_option_long(options_out_len, msg_out->options, lwip_ntohl(ip4_addr_get_u32(ip_2_ip4(&server_ip_addr)))); 800912a: 9803 ldr r0, [sp, #12] 800912c: f7fe feab bl 8007e86 8009130: 4602 mov r2, r0 8009132: 4631 mov r1, r6 8009134: 4640 mov r0, r8 8009136: f7fe ff0f bl 8007f58 800913a: f8ad 000a strh.w r0, [sp, #10] dhcp_option_trailer(options_out_len, msg_out->options, p_out); 800913e: 463a mov r2, r7 8009140: 4631 mov r1, r6 8009142: f7ff f80d bl 8008160 udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 8009146: 9500 str r5, [sp, #0] 8009148: 2343 movs r3, #67 @ 0x43 800914a: aa03 add r2, sp, #12 800914c: 4639 mov r1, r7 800914e: 4807 ldr r0, [pc, #28] @ (800916c ) 8009150: 6800 ldr r0, [r0, #0] 8009152: f008 fd63 bl 8011c1c pbuf_free(p_out); 8009156: 4638 mov r0, r7 8009158: f002 fe22 bl 800bda0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); 800915c: e7c0 b.n 80090e0 dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 800915e: f7ff fb93 bl 8008888 dhcp->pcb_allocated = 0; 8009162: 2300 movs r3, #0 8009164: 7123 strb r3, [r4, #4] 8009166: e7c7 b.n 80090f8 8009168: 080156d8 .word 0x080156d8 800916c: 24012efc .word 0x24012efc 08009170 : { 8009170: b570 push {r4, r5, r6, lr} 8009172: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 8009174: f7fa fcca bl 8003b0c LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 8009178: b324 cbz r4, 80091c4 LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); 800917a: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 800917e: f013 0f01 tst.w r3, #1 8009182: d029 beq.n 80091d8 dhcp = netif_dhcp_data(netif); 8009184: 6a65 ldr r5, [r4, #36] @ 0x24 if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { 8009186: 8d23 ldrh r3, [r4, #40] @ 0x28 8009188: f5b3 7f10 cmp.w r3, #576 @ 0x240 800918c: d343 bcc.n 8009216 if (dhcp == NULL) { 800918e: b36d cbz r5, 80091ec if (dhcp->pcb_allocated != 0) { 8009190: 792b ldrb r3, [r5, #4] 8009192: bb93 cbnz r3, 80091fa memset(dhcp, 0, sizeof(struct dhcp)); 8009194: 2234 movs r2, #52 @ 0x34 8009196: 2100 movs r1, #0 8009198: 4628 mov r0, r5 800919a: f00a fa8d bl 80136b8 if (dhcp_inc_pcb_refcount() != ERR_OK) { /* ensure DHCP PCB is allocated */ 800919e: f7ff fb97 bl 80088d0 80091a2: 4606 mov r6, r0 80091a4: 2800 cmp r0, #0 80091a6: d13c bne.n 8009222 dhcp->pcb_allocated = 1; 80091a8: 2301 movs r3, #1 80091aa: 712b strb r3, [r5, #4] if (!netif_is_link_up(netif)) { 80091ac: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 80091b0: f013 0f04 tst.w r3, #4 80091b4: d024 beq.n 8009200 result = dhcp_discover(netif); 80091b6: 4620 mov r0, r4 80091b8: f7ff f9e0 bl 800857c if (result != ERR_OK) { 80091bc: 4606 mov r6, r0 80091be: bb20 cbnz r0, 800920a } 80091c0: 4630 mov r0, r6 80091c2: bd70 pop {r4, r5, r6, pc} LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 80091c4: 4b18 ldr r3, [pc, #96] @ (8009228 ) 80091c6: f240 22e7 movw r2, #743 @ 0x2e7 80091ca: 4918 ldr r1, [pc, #96] @ (800922c ) 80091cc: 4818 ldr r0, [pc, #96] @ (8009230 ) 80091ce: f00a f91b bl 8013408 80091d2: f06f 060f mvn.w r6, #15 80091d6: e7f3 b.n 80091c0 LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); 80091d8: 4b13 ldr r3, [pc, #76] @ (8009228 ) 80091da: f44f 723a mov.w r2, #744 @ 0x2e8 80091de: 4915 ldr r1, [pc, #84] @ (8009234 ) 80091e0: 4813 ldr r0, [pc, #76] @ (8009230 ) 80091e2: f00a f911 bl 8013408 80091e6: f06f 060f mvn.w r6, #15 80091ea: e7e9 b.n 80091c0 dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 80091ec: 2034 movs r0, #52 @ 0x34 80091ee: f002 f8d1 bl 800b394 if (dhcp == NULL) { 80091f2: 4605 mov r5, r0 80091f4: b190 cbz r0, 800921c netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); 80091f6: 6260 str r0, [r4, #36] @ 0x24 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); 80091f8: e7cc b.n 8009194 dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 80091fa: f7ff fb45 bl 8008888 80091fe: e7c9 b.n 8009194 dhcp_set_state(dhcp, DHCP_STATE_INIT); 8009200: 2102 movs r1, #2 8009202: 4628 mov r0, r5 8009204: f7fe fe4b bl 8007e9e return ERR_OK; 8009208: e7da b.n 80091c0 dhcp_release_and_stop(netif); 800920a: 4620 mov r0, r4 800920c: f7ff ff4c bl 80090a8 return ERR_MEM; 8009210: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 8009214: e7d4 b.n 80091c0 return ERR_MEM; 8009216: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 800921a: e7d1 b.n 80091c0 return ERR_MEM; 800921c: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 8009220: e7ce b.n 80091c0 return ERR_MEM; 8009222: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 8009226: e7cb b.n 80091c0 8009228: 08014e34 .word 0x08014e34 800922c: 080144d8 .word 0x080144d8 8009230: 080144e8 .word 0x080144e8 8009234: 080151a4 .word 0x080151a4 08009238 : { 8009238: b510 push {r4, lr} NETIF_FOREACH(netif) { 800923a: 4b17 ldr r3, [pc, #92] @ (8009298 ) 800923c: 681c ldr r4, [r3, #0] 800923e: e006 b.n 800924e dhcp_release_and_stop(netif); 8009240: 4620 mov r0, r4 8009242: f7ff ff31 bl 80090a8 dhcp_start(netif); 8009246: 4620 mov r0, r4 8009248: f7ff ff92 bl 8009170 NETIF_FOREACH(netif) { 800924c: 6824 ldr r4, [r4, #0] 800924e: b314 cbz r4, 8009296 struct dhcp *dhcp = netif_dhcp_data(netif); 8009250: 6a63 ldr r3, [r4, #36] @ 0x24 if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { 8009252: 2b00 cmp r3, #0 8009254: d0fa beq.n 800924c 8009256: 795a ldrb r2, [r3, #5] 8009258: 2a00 cmp r2, #0 800925a: d0f7 beq.n 800924c if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { 800925c: 8a99 ldrh r1, [r3, #20] 800925e: b129 cbz r1, 800926c 8009260: 8a5a ldrh r2, [r3, #18] 8009262: 3201 adds r2, #1 8009264: b292 uxth r2, r2 8009266: 825a strh r2, [r3, #18] 8009268: 4291 cmp r1, r2 800926a: d0e9 beq.n 8009240 } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { 800926c: 8a1a ldrh r2, [r3, #16] 800926e: b11a cbz r2, 8009278 8009270: 1e51 subs r1, r2, #1 8009272: 8219 strh r1, [r3, #16] 8009274: 2a01 cmp r2, #1 8009276: d00a beq.n 800928e } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { 8009278: 89da ldrh r2, [r3, #14] 800927a: 2a00 cmp r2, #0 800927c: d0e6 beq.n 800924c 800927e: 1e51 subs r1, r2, #1 8009280: 81d9 strh r1, [r3, #14] 8009282: 2a01 cmp r2, #1 8009284: d1e2 bne.n 800924c dhcp_t1_timeout(netif); 8009286: 4620 mov r0, r4 8009288: f7ff fede bl 8009048 800928c: e7de b.n 800924c dhcp_t2_timeout(netif); 800928e: 4620 mov r0, r4 8009290: f7fe fff6 bl 8008280 8009294: e7da b.n 800924c } 8009296: bd10 pop {r4, pc} 8009298: 24019b80 .word 0x24019b80 0800929c : { 800929c: b510 push {r4, lr} 800929e: 4604 mov r4, r0 struct dhcp *dhcp = netif_dhcp_data(netif); 80092a0: 6a42 ldr r2, [r0, #36] @ 0x24 if ((dhcp->state == DHCP_STATE_BACKING_OFF) || (dhcp->state == DHCP_STATE_SELECTING)) { 80092a2: 7953 ldrb r3, [r2, #5] 80092a4: 2b06 cmp r3, #6 80092a6: bf18 it ne 80092a8: 2b0c cmpne r3, #12 80092aa: d00b beq.n 80092c4 } else if (dhcp->state == DHCP_STATE_REQUESTING) { 80092ac: 2b01 cmp r3, #1 80092ae: d00c beq.n 80092ca } else if (dhcp->state == DHCP_STATE_CHECKING) { 80092b0: 2b08 cmp r3, #8 80092b2: d016 beq.n 80092e2 } else if (dhcp->state == DHCP_STATE_REBOOTING) { 80092b4: 2b03 cmp r3, #3 80092b6: d107 bne.n 80092c8 if (dhcp->tries < REBOOT_TRIES) { 80092b8: 7993 ldrb r3, [r2, #6] 80092ba: 2b01 cmp r3, #1 80092bc: d91a bls.n 80092f4 dhcp_discover(netif); 80092be: f7ff f95d bl 800857c } 80092c2: e001 b.n 80092c8 dhcp_discover(netif); 80092c4: f7ff f95a bl 800857c } 80092c8: bd10 pop {r4, pc} if (dhcp->tries <= 5) { 80092ca: 7993 ldrb r3, [r2, #6] 80092cc: 2b05 cmp r3, #5 80092ce: d802 bhi.n 80092d6 dhcp_select(netif); 80092d0: f7ff f87a bl 80083c8 80092d4: e7f8 b.n 80092c8 dhcp_release_and_stop(netif); 80092d6: f7ff fee7 bl 80090a8 dhcp_start(netif); 80092da: 4620 mov r0, r4 80092dc: f7ff ff48 bl 8009170 80092e0: e7f2 b.n 80092c8 if (dhcp->tries <= 1) { 80092e2: 7993 ldrb r3, [r2, #6] 80092e4: 2b01 cmp r3, #1 80092e6: d902 bls.n 80092ee dhcp_bind(netif); 80092e8: f7ff fa26 bl 8008738 80092ec: e7ec b.n 80092c8 dhcp_check(netif); 80092ee: f7ff fa0d bl 800870c 80092f2: e7e9 b.n 80092c8 dhcp_reboot(netif); 80092f4: f7fe ffe0 bl 80082b8 80092f8: e7e6 b.n 80092c8 ... 080092fc : { 80092fc: b510 push {r4, lr} NETIF_FOREACH(netif) { 80092fe: 4b0b ldr r3, [pc, #44] @ (800932c ) 8009300: 681c ldr r4, [r3, #0] 8009302: e002 b.n 800930a } else if (dhcp->request_timeout == 1) { 8009304: 2a01 cmp r2, #1 8009306: d00a beq.n 800931e NETIF_FOREACH(netif) { 8009308: 6824 ldr r4, [r4, #0] 800930a: b174 cbz r4, 800932a struct dhcp *dhcp = netif_dhcp_data(netif); 800930c: 6a63 ldr r3, [r4, #36] @ 0x24 if (dhcp != NULL) { 800930e: 2b00 cmp r3, #0 8009310: d0fa beq.n 8009308 if (dhcp->request_timeout > 1) { 8009312: 891a ldrh r2, [r3, #8] 8009314: 2a01 cmp r2, #1 8009316: d9f5 bls.n 8009304 dhcp->request_timeout--; 8009318: 3a01 subs r2, #1 800931a: 811a strh r2, [r3, #8] 800931c: e7f4 b.n 8009308 dhcp->request_timeout--; 800931e: 3a01 subs r2, #1 8009320: 811a strh r2, [r3, #8] dhcp_timeout(netif); 8009322: 4620 mov r0, r4 8009324: f7ff ffba bl 800929c 8009328: e7ee b.n 8009308 } 800932a: bd10 pop {r4, pc} 800932c: 24019b80 .word 0x24019b80 08009330 : { 8009330: b508 push {r3, lr} dhcp_release_and_stop(netif); 8009332: f7ff feb9 bl 80090a8 } 8009336: bd08 pop {r3, pc} 08009338 : }; int err_to_errno(err_t err) { if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) { 8009338: f100 0310 add.w r3, r0, #16 800933c: b2db uxtb r3, r3 800933e: 2b10 cmp r3, #16 8009340: d804 bhi.n 800934c return EIO; } return err_to_errno_table[-err]; 8009342: 4240 negs r0, r0 8009344: 4b02 ldr r3, [pc, #8] @ (8009350 ) 8009346: f853 0020 ldr.w r0, [r3, r0, lsl #2] 800934a: 4770 bx lr return EIO; 800934c: 2005 movs r0, #5 } 800934e: 4770 bx lr 8009350: 080151cc .word 0x080151cc 08009354 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 8009354: b510 push {r4, lr} 8009356: 4604 mov r4, r0 /* remove from SNMP ARP index tree */ mib2_remove_arp_entry(arp_table[i].netif, &arp_table[i].ipaddr); /* and empty packet queue */ if (arp_table[i].q != NULL) { 8009358: eb00 0240 add.w r2, r0, r0, lsl #1 800935c: 4b0d ldr r3, [pc, #52] @ (8009394 ) 800935e: f853 0032 ldr.w r0, [r3, r2, lsl #3] 8009362: b138 cbz r0, 8009374 /* remove all queued packets */ LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_free_entry: freeing entry %"U16_F", packet queue %p.\n", (u16_t)i, (void *)(arp_table[i].q))); free_etharp_q(arp_table[i].q); 8009364: f002 fd1c bl 800bda0 arp_table[i].q = NULL; 8009368: eb04 0344 add.w r3, r4, r4, lsl #1 800936c: 00db lsls r3, r3, #3 800936e: 4a09 ldr r2, [pc, #36] @ (8009394 ) 8009370: 2100 movs r1, #0 8009372: 50d1 str r1, [r2, r3] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8009374: 4a07 ldr r2, [pc, #28] @ (8009394 ) 8009376: eb04 0344 add.w r3, r4, r4, lsl #1 800937a: eb02 03c3 add.w r3, r2, r3, lsl #3 800937e: 2100 movs r1, #0 8009380: 7519 strb r1, [r3, #20] #ifdef LWIP_DEBUG /* for debugging, clean out the complete entry */ arp_table[i].ctime = 0; 8009382: 8259 strh r1, [r3, #18] arp_table[i].netif = NULL; 8009384: 6099 str r1, [r3, #8] ip4_addr_set_zero(&arp_table[i].ipaddr); 8009386: 6059 str r1, [r3, #4] arp_table[i].ethaddr = ethzero; 8009388: 4a03 ldr r2, [pc, #12] @ (8009398 ) 800938a: 6810 ldr r0, [r2, #0] 800938c: 60d8 str r0, [r3, #12] 800938e: 8892 ldrh r2, [r2, #4] 8009390: 821a strh r2, [r3, #16] #endif /* LWIP_DEBUG */ } 8009392: bd10 pop {r4, pc} 8009394: 24012f2c .word 0x24012f2c 8009398: 080154b4 .word 0x080154b4 0800939c : * @return The ARP entry index that matched or is created, ERR_MEM if no * entry is found or could be recycled. */ static s16_t etharp_find_entry(const ip4_addr_t *ipaddr, u8_t flags, struct netif *netif) { 800939c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80093a0: b085 sub sp, #20 80093a2: 4606 mov r6, r0 80093a4: 4617 mov r7, r2 s16_t empty = ARP_TABLE_SIZE; s16_t i = 0; /* oldest entry with packets on queue */ s16_t old_queue = ARP_TABLE_SIZE; /* its age */ u16_t age_queue = 0, age_pending = 0, age_stable = 0; 80093a6: f04f 0900 mov.w r9, #0 80093aa: f8cd 900c str.w r9, [sp, #12] 80093ae: 46cb mov fp, r9 s16_t old_queue = ARP_TABLE_SIZE; 80093b0: f04f 0a0a mov.w sl, #10 * 4) remember the oldest pending entry with queued packets (if any) * 5) search for a matching IP entry, either pending or stable * until 5 matches, or all entries are searched for. */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { 80093b4: 464b mov r3, r9 s16_t empty = ARP_TABLE_SIZE; 80093b6: 4655 mov r5, sl s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; 80093b8: 46d0 mov r8, sl 80093ba: f8cd a008 str.w sl, [sp, #8] 80093be: 9101 str r1, [sp, #4] for (i = 0; i < ARP_TABLE_SIZE; ++i) { 80093c0: e029 b.n 8009416 LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE); /* if given, does IP address match IP address in ARP entry? */ if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr) #if ETHARP_TABLE_MATCH_NETIF && ((netif == NULL) || (netif == arp_table[i].netif)) 80093c2: 2f00 cmp r7, #0 80093c4: f000 80ad beq.w 8009522 80093c8: 4a5a ldr r2, [pc, #360] @ (8009534 ) 80093ca: eb02 02ce add.w r2, r2, lr, lsl #3 80093ce: 6892 ldr r2, [r2, #8] 80093d0: 42ba cmp r2, r7 80093d2: d13a bne.n 800944a #endif /* ETHARP_TABLE_MATCH_NETIF */ ) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %d\n", (int)i)); /* found exact IP address match, simply bail out */ return i; 80093d4: 461d mov r5, r3 80093d6: e07e b.n 80094d6 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { /* pending with queued packets? */ if (arp_table[i].q != NULL) { 80093d8: eb04 0244 add.w r2, r4, r4, lsl #1 80093dc: 4855 ldr r0, [pc, #340] @ (8009534 ) 80093de: f850 2032 ldr.w r2, [r0, r2, lsl #3] 80093e2: b14a cbz r2, 80093f8 if (arp_table[i].ctime >= age_queue) { 80093e4: eb04 0444 add.w r4, r4, r4, lsl #1 80093e8: eb00 02c4 add.w r2, r0, r4, lsl #3 80093ec: 8a52 ldrh r2, [r2, #18] 80093ee: 455a cmp r2, fp 80093f0: d30f bcc.n 8009412 old_queue = i; age_queue = arp_table[i].ctime; 80093f2: 4693 mov fp, r2 old_queue = i; 80093f4: 469a mov sl, r3 80093f6: e00c b.n 8009412 } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 80093f8: eb04 0444 add.w r4, r4, r4, lsl #1 80093fc: 4a4d ldr r2, [pc, #308] @ (8009534 ) 80093fe: eb02 02c4 add.w r2, r2, r4, lsl #3 8009402: 8a52 ldrh r2, [r2, #18] 8009404: 9903 ldr r1, [sp, #12] 8009406: 428a cmp r2, r1 8009408: d303 bcc.n 8009412 old_pending = i; age_pending = arp_table[i].ctime; 800940a: 9203 str r2, [sp, #12] old_pending = i; 800940c: 9302 str r3, [sp, #8] 800940e: e000 b.n 8009412 empty = i; 8009410: 461d mov r5, r3 for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8009412: 3301 adds r3, #1 8009414: b21b sxth r3, r3 8009416: 2b09 cmp r3, #9 8009418: dc26 bgt.n 8009468 u8_t state = arp_table[i].state; 800941a: 461c mov r4, r3 800941c: eb03 0043 add.w r0, r3, r3, lsl #1 8009420: 4a44 ldr r2, [pc, #272] @ (8009534 ) 8009422: eb02 02c0 add.w r2, r2, r0, lsl #3 8009426: 7d10 ldrb r0, [r2, #20] if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { 8009428: 2d0a cmp r5, #10 800942a: bf08 it eq 800942c: 2800 cmpeq r0, #0 800942e: d0ef beq.n 8009410 } else if (state != ETHARP_STATE_EMPTY) { 8009430: 2800 cmp r0, #0 8009432: d0ee beq.n 8009412 if (ipaddr && ip4_addr_cmp(ipaddr, &arp_table[i].ipaddr) 8009434: b14e cbz r6, 800944a 8009436: eb03 0e43 add.w lr, r3, r3, lsl #1 800943a: 4a3e ldr r2, [pc, #248] @ (8009534 ) 800943c: eb02 0cce add.w ip, r2, lr, lsl #3 8009440: f8dc 2004 ldr.w r2, [ip, #4] 8009444: 6831 ldr r1, [r6, #0] 8009446: 4291 cmp r1, r2 8009448: d0bb beq.n 80093c2 if (state == ETHARP_STATE_PENDING) { 800944a: 2801 cmp r0, #1 800944c: d0c4 beq.n 80093d8 } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 800944e: 2801 cmp r0, #1 8009450: d9df bls.n 8009412 /* don't record old_stable for static entries since they never expire */ if (state < ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* remember entry with oldest stable entry in oldest, its age in maxtime */ if (arp_table[i].ctime >= age_stable) { 8009452: eb04 0444 add.w r4, r4, r4, lsl #1 8009456: 4a37 ldr r2, [pc, #220] @ (8009534 ) 8009458: eb02 02c4 add.w r2, r2, r4, lsl #3 800945c: 8a52 ldrh r2, [r2, #18] 800945e: 454a cmp r2, r9 8009460: d3d7 bcc.n 8009412 old_stable = i; age_stable = arp_table[i].ctime; 8009462: 4691 mov r9, r2 old_stable = i; 8009464: 4698 mov r8, r3 8009466: e7d4 b.n 8009412 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 8009468: 9901 ldr r1, [sp, #4] 800946a: f011 0f02 tst.w r1, #2 800946e: d15a bne.n 8009526 8009470: 2d0a cmp r5, #10 8009472: d034 beq.n 80094de * * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { 8009474: 2d09 cmp r5, #9 8009476: dd16 ble.n 80094a6 i = empty; LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %d\n", (int)i)); } else { /* 2) found recyclable stable entry? */ if (old_stable < ARP_TABLE_SIZE) { 8009478: f1b8 0f09 cmp.w r8, #9 800947c: dc35 bgt.n 80094ea /* recycle oldest stable*/ i = old_stable; LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %d\n", (int)i)); /* no queued packets should exist on stable entries */ LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); 800947e: eb08 0348 add.w r3, r8, r8, lsl #1 8009482: 4a2c ldr r2, [pc, #176] @ (8009534 ) 8009484: f852 3033 ldr.w r3, [r2, r3, lsl #3] 8009488: 2b00 cmp r3, #0 800948a: d036 beq.n 80094fa 800948c: 4b2a ldr r3, [pc, #168] @ (8009538 ) 800948e: f240 126d movw r2, #365 @ 0x16d 8009492: 492a ldr r1, [pc, #168] @ (800953c ) 8009494: 482a ldr r0, [pc, #168] @ (8009540 ) 8009496: f009 ffb7 bl 8013408 800949a: 4645 mov r5, r8 return (s16_t)ERR_MEM; } /* { empty or recyclable entry found } */ LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); etharp_free_entry(i); 800949c: 4628 mov r0, r5 800949e: f7ff ff59 bl 8009354 } LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 80094a2: 2d09 cmp r5, #9 80094a4: dc2d bgt.n 8009502 LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", 80094a6: 462c mov r4, r5 80094a8: eb05 0245 add.w r2, r5, r5, lsl #1 80094ac: 4b21 ldr r3, [pc, #132] @ (8009534 ) 80094ae: eb03 03c2 add.w r3, r3, r2, lsl #3 80094b2: 7d1b ldrb r3, [r3, #20] 80094b4: bb6b cbnz r3, 8009512 arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { 80094b6: b136 cbz r6, 80094c6 /* set IP address */ ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); 80094b8: 6831 ldr r1, [r6, #0] 80094ba: eb04 0244 add.w r2, r4, r4, lsl #1 80094be: 4b1d ldr r3, [pc, #116] @ (8009534 ) 80094c0: eb03 03c2 add.w r3, r3, r2, lsl #3 80094c4: 6059 str r1, [r3, #4] } arp_table[i].ctime = 0; 80094c6: 4b1b ldr r3, [pc, #108] @ (8009534 ) 80094c8: eb04 0244 add.w r2, r4, r4, lsl #1 80094cc: eb03 02c2 add.w r2, r3, r2, lsl #3 80094d0: 2100 movs r1, #0 80094d2: 8251 strh r1, [r2, #18] #if ETHARP_TABLE_MATCH_NETIF arp_table[i].netif = netif; 80094d4: 6097 str r7, [r2, #8] #endif /* ETHARP_TABLE_MATCH_NETIF */ return (s16_t)i; } 80094d6: 4628 mov r0, r5 80094d8: b005 add sp, #20 80094da: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 80094de: f011 0f01 tst.w r1, #1 80094e2: d1c7 bne.n 8009474 return (s16_t)ERR_MEM; 80094e4: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 80094e8: e7f5 b.n 80094d6 } else if (old_pending < ARP_TABLE_SIZE) { 80094ea: 9b02 ldr r3, [sp, #8] 80094ec: 2b09 cmp r3, #9 80094ee: dd06 ble.n 80094fe } else if (old_queue < ARP_TABLE_SIZE) { 80094f0: f1ba 0f09 cmp.w sl, #9 80094f4: dc1a bgt.n 800952c i = old_queue; 80094f6: 4655 mov r5, sl 80094f8: e7d0 b.n 800949c 80094fa: 4645 mov r5, r8 80094fc: e7ce b.n 800949c i = old_pending; 80094fe: 9d02 ldr r5, [sp, #8] 8009500: e7cc b.n 800949c LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 8009502: 4b0d ldr r3, [pc, #52] @ (8009538 ) 8009504: f240 1283 movw r2, #387 @ 0x183 8009508: 490e ldr r1, [pc, #56] @ (8009544 ) 800950a: 480d ldr r0, [pc, #52] @ (8009540 ) 800950c: f009 ff7c bl 8013408 8009510: e7c9 b.n 80094a6 LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", 8009512: 4b09 ldr r3, [pc, #36] @ (8009538 ) 8009514: f44f 72c2 mov.w r2, #388 @ 0x184 8009518: 490b ldr r1, [pc, #44] @ (8009548 ) 800951a: 4809 ldr r0, [pc, #36] @ (8009540 ) 800951c: f009 ff74 bl 8013408 8009520: e7c9 b.n 80094b6 return i; 8009522: 461d mov r5, r3 8009524: e7d7 b.n 80094d6 return (s16_t)ERR_MEM; 8009526: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 800952a: e7d4 b.n 80094d6 return (s16_t)ERR_MEM; 800952c: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 8009530: e7d1 b.n 80094d6 8009532: bf00 nop 8009534: 24012f2c .word 0x24012f2c 8009538: 08015210 .word 0x08015210 800953c: 08015278 .word 0x08015278 8009540: 080144e8 .word 0x080144e8 8009544: 08015290 .word 0x08015290 8009548: 080152a4 .word 0x080152a4 0800954c : * * @see pbuf_free() */ static err_t etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct eth_addr *ethaddr, u8_t flags) { 800954c: b5f0 push {r4, r5, r6, r7, lr} 800954e: b083 sub sp, #12 8009550: 4605 mov r5, r0 8009552: 460c mov r4, r1 8009554: 4616 mov r6, r2 8009556: 461f mov r7, r3 s16_t i; LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); 8009558: f890 2030 ldrb.w r2, [r0, #48] @ 0x30 800955c: 2a06 cmp r2, #6 800955e: d13d bne.n 80095dc LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), (u16_t)ethaddr->addr[0], (u16_t)ethaddr->addr[1], (u16_t)ethaddr->addr[2], (u16_t)ethaddr->addr[3], (u16_t)ethaddr->addr[4], (u16_t)ethaddr->addr[5])); /* non-unicast address? */ if (ip4_addr_isany(ipaddr) || 8009560: 2c00 cmp r4, #0 8009562: d043 beq.n 80095ec 8009564: 6820 ldr r0, [r4, #0] 8009566: 2800 cmp r0, #0 8009568: d040 beq.n 80095ec ip4_addr_isbroadcast(ipaddr, netif) || 800956a: 4629 mov r1, r5 800956c: f000 ff71 bl 800a452 if (ip4_addr_isany(ipaddr) || 8009570: 2800 cmp r0, #0 8009572: d13b bne.n 80095ec ip4_addr_ismulticast(ipaddr)) { 8009574: 6822 ldr r2, [r4, #0] 8009576: f002 02f0 and.w r2, r2, #240 @ 0xf0 ip4_addr_isbroadcast(ipaddr, netif) || 800957a: 2ae0 cmp r2, #224 @ 0xe0 800957c: d036 beq.n 80095ec LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; } /* find or create ARP entry */ i = etharp_find_entry(ipaddr, flags, netif); 800957e: 462a mov r2, r5 8009580: 4639 mov r1, r7 8009582: 4620 mov r0, r4 8009584: f7ff ff0a bl 800939c /* bail out if no entry could be found */ if (i < 0) { 8009588: f1b0 0c00 subs.w ip, r0, #0 800958c: db31 blt.n 80095f2 return ERR_VAL; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 800958e: 4b1c ldr r3, [pc, #112] @ (8009600 ) 8009590: eb0c 004c add.w r0, ip, ip, lsl #1 8009594: eb03 02c0 add.w r2, r3, r0, lsl #3 8009598: 2102 movs r1, #2 800959a: 7511 strb r1, [r2, #20] } /* record network interface */ arp_table[i].netif = netif; 800959c: 6095 str r5, [r2, #8] /* insert in SNMP ARP index tree */ mib2_add_arp_entry(netif, &arp_table[i].ipaddr); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", i)); /* update address */ SMEMCPY(&arp_table[i].ethaddr, ethaddr, ETH_HWADDR_LEN); 800959e: 00c1 lsls r1, r0, #3 80095a0: 3108 adds r1, #8 80095a2: 4419 add r1, r3 80095a4: 6834 ldr r4, [r6, #0] 80095a6: 604c str r4, [r1, #4] 80095a8: 88b4 ldrh r4, [r6, #4] 80095aa: 810c strh r4, [r1, #8] /* reset time stamp */ arp_table[i].ctime = 0; 80095ac: 2100 movs r1, #0 80095ae: 8251 strh r1, [r2, #18] /* get the packet pointer */ p = q->p; /* now queue entry can be freed */ memp_free(MEMP_ARP_QUEUE, q); #else /* ARP_QUEUEING */ if (arp_table[i].q != NULL) { 80095b0: f853 7030 ldr.w r7, [r3, r0, lsl #3] 80095b4: b30f cbz r7, 80095fa struct pbuf *p = arp_table[i].q; arp_table[i].q = NULL; 80095b6: 00c3 lsls r3, r0, #3 80095b8: 460c mov r4, r1 80095ba: 4a11 ldr r2, [pc, #68] @ (8009600 ) 80095bc: 50d1 str r1, [r2, r3] #endif /* ARP_QUEUEING */ /* send the queued IP packet */ ethernet_output(netif, p, (struct eth_addr *)(netif->hwaddr), ethaddr, ETHTYPE_IP); 80095be: f44f 6300 mov.w r3, #2048 @ 0x800 80095c2: 9300 str r3, [sp, #0] 80095c4: 4633 mov r3, r6 80095c6: f105 022a add.w r2, r5, #42 @ 0x2a 80095ca: 4639 mov r1, r7 80095cc: 4628 mov r0, r5 80095ce: f000 fbb9 bl 8009d44 /* free the queued IP packet */ pbuf_free(p); 80095d2: 4638 mov r0, r7 80095d4: f002 fbe4 bl 800bda0 } return ERR_OK; 80095d8: 4620 mov r0, r4 80095da: e00c b.n 80095f6 LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); 80095dc: 4b09 ldr r3, [pc, #36] @ (8009604 ) 80095de: f240 12a9 movw r2, #425 @ 0x1a9 80095e2: 4909 ldr r1, [pc, #36] @ (8009608 ) 80095e4: 4809 ldr r0, [pc, #36] @ (800960c ) 80095e6: f009 ff0f bl 8013408 80095ea: e7b9 b.n 8009560 return ERR_ARG; 80095ec: f06f 000f mvn.w r0, #15 80095f0: e001 b.n 80095f6 return (err_t)i; 80095f2: fa4f f08c sxtb.w r0, ip } 80095f6: b003 add sp, #12 80095f8: bdf0 pop {r4, r5, r6, r7, pc} return ERR_OK; 80095fa: 2000 movs r0, #0 80095fc: e7fb b.n 80095f6 80095fe: bf00 nop 8009600: 24012f2c .word 0x24012f2c 8009604: 08015210 .word 0x08015210 8009608: 080152d0 .word 0x080152d0 800960c: 080144e8 .word 0x080144e8 08009610 : etharp_raw(struct netif *netif, const struct eth_addr *ethsrc_addr, const struct eth_addr *ethdst_addr, const struct eth_addr *hwsrc_addr, const ip4_addr_t *ipsrc_addr, const struct eth_addr *hwdst_addr, const ip4_addr_t *ipdst_addr, const u16_t opcode) { 8009610: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8009614: b082 sub sp, #8 8009616: 460f mov r7, r1 8009618: 4690 mov r8, r2 800961a: 461d mov r5, r3 800961c: f8dd a02c ldr.w sl, [sp, #44] @ 0x2c struct pbuf *p; err_t result = ERR_OK; struct etharp_hdr *hdr; LWIP_ASSERT("netif != NULL", netif != NULL); 8009620: 4681 mov r9, r0 8009622: 2800 cmp r0, #0 8009624: d042 beq.n 80096ac /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); 8009626: f44f 7220 mov.w r2, #640 @ 0x280 800962a: 211c movs r1, #28 800962c: 200e movs r0, #14 800962e: f002 fc1f bl 800be70 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 8009632: 4606 mov r6, r0 8009634: 2800 cmp r0, #0 8009636: d051 beq.n 80096dc LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("etharp_raw: could not allocate pbuf for ARP request.\n")); ETHARP_STATS_INC(etharp.memerr); return ERR_MEM; } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", 8009638: 8943 ldrh r3, [r0, #10] 800963a: 2b1b cmp r3, #27 800963c: d93e bls.n 80096bc (p->len >= SIZEOF_ETHARP_HDR)); hdr = (struct etharp_hdr *)p->payload; 800963e: 6874 ldr r4, [r6, #4] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = lwip_htons(opcode); 8009640: f8bd 0034 ldrh.w r0, [sp, #52] @ 0x34 8009644: f7fe fc1a bl 8007e7c 8009648: 80e0 strh r0, [r4, #6] LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", 800964a: f899 3030 ldrb.w r3, [r9, #48] @ 0x30 800964e: 2b06 cmp r3, #6 8009650: d13c bne.n 80096cc (netif->hwaddr_len == ETH_HWADDR_LEN)); /* Write the ARP MAC-Addresses */ SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN); 8009652: 682b ldr r3, [r5, #0] 8009654: 60a3 str r3, [r4, #8] 8009656: 88ab ldrh r3, [r5, #4] 8009658: 81a3 strh r3, [r4, #12] SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN); 800965a: f8da 3000 ldr.w r3, [sl] 800965e: f8c4 3012 str.w r3, [r4, #18] 8009662: f8ba 3004 ldrh.w r3, [sl, #4] 8009666: 82e3 strh r3, [r4, #22] /* Copy struct ip4_addr_wordaligned to aligned ip4_addr, to support compilers without * structure packing. */ IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->sipaddr, ipsrc_addr); 8009668: 9b0a ldr r3, [sp, #40] @ 0x28 800966a: 681b ldr r3, [r3, #0] 800966c: f8c4 300e str.w r3, [r4, #14] IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr); 8009670: 9b0c ldr r3, [sp, #48] @ 0x30 8009672: 681b ldr r3, [r3, #0] 8009674: 61a3 str r3, [r4, #24] hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET); 8009676: 2500 movs r5, #0 8009678: 7025 strb r5, [r4, #0] 800967a: 2301 movs r3, #1 800967c: 7063 strb r3, [r4, #1] hdr->proto = PP_HTONS(ETHTYPE_IP); 800967e: 2308 movs r3, #8 8009680: 70a3 strb r3, [r4, #2] 8009682: 70e5 strb r5, [r4, #3] /* set hwlen and protolen */ hdr->hwlen = ETH_HWADDR_LEN; 8009684: 2306 movs r3, #6 8009686: 7123 strb r3, [r4, #4] hdr->protolen = sizeof(ip4_addr_t); 8009688: 2304 movs r3, #4 800968a: 7163 strb r3, [r4, #5] if (ip4_addr_islinklocal(ipsrc_addr)) { ethernet_output(netif, p, ethsrc_addr, ðbroadcast, ETHTYPE_ARP); } else #endif /* LWIP_AUTOIP */ { ethernet_output(netif, p, ethsrc_addr, ethdst_addr, ETHTYPE_ARP); 800968c: f640 0306 movw r3, #2054 @ 0x806 8009690: 9300 str r3, [sp, #0] 8009692: 4643 mov r3, r8 8009694: 463a mov r2, r7 8009696: 4631 mov r1, r6 8009698: 4648 mov r0, r9 800969a: f000 fb53 bl 8009d44 } ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 800969e: 4630 mov r0, r6 80096a0: f002 fb7e bl 800bda0 p = NULL; /* could not allocate pbuf for ARP request */ return result; 80096a4: 4628 mov r0, r5 } 80096a6: b002 add sp, #8 80096a8: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} LWIP_ASSERT("netif != NULL", netif != NULL); 80096ac: 4b0d ldr r3, [pc, #52] @ (80096e4 ) 80096ae: f240 4257 movw r2, #1111 @ 0x457 80096b2: 490d ldr r1, [pc, #52] @ (80096e8 ) 80096b4: 480d ldr r0, [pc, #52] @ (80096ec ) 80096b6: f009 fea7 bl 8013408 80096ba: e7b4 b.n 8009626 LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", 80096bc: 4b09 ldr r3, [pc, #36] @ (80096e4 ) 80096be: f240 4262 movw r2, #1122 @ 0x462 80096c2: 490b ldr r1, [pc, #44] @ (80096f0 ) 80096c4: 4809 ldr r0, [pc, #36] @ (80096ec ) 80096c6: f009 fe9f bl 8013408 80096ca: e7b8 b.n 800963e LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", 80096cc: 4b05 ldr r3, [pc, #20] @ (80096e4 ) 80096ce: f240 4269 movw r2, #1129 @ 0x469 80096d2: 4908 ldr r1, [pc, #32] @ (80096f4 ) 80096d4: 4805 ldr r0, [pc, #20] @ (80096ec ) 80096d6: f009 fe97 bl 8013408 80096da: e7ba b.n 8009652 return ERR_MEM; 80096dc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80096e0: e7e1 b.n 80096a6 80096e2: bf00 nop 80096e4: 08015210 .word 0x08015210 80096e8: 080144d8 .word 0x080144d8 80096ec: 080144e8 .word 0x080144e8 80096f0: 080152f4 .word 0x080152f4 80096f4: 08015328 .word 0x08015328 080096f8 : * ERR_MEM if the ARP packet couldn't be allocated * any other err_t on failure */ static err_t etharp_request_dst(struct netif *netif, const ip4_addr_t *ipaddr, const struct eth_addr *hw_dst_addr) { 80096f8: b530 push {r4, r5, lr} 80096fa: b085 sub sp, #20 return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 80096fc: f100 032a add.w r3, r0, #42 @ 0x2a (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, 8009700: 1d04 adds r4, r0, #4 return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 8009702: 2501 movs r5, #1 8009704: 9503 str r5, [sp, #12] 8009706: 9102 str r1, [sp, #8] 8009708: 4903 ldr r1, [pc, #12] @ (8009718 ) 800970a: 9101 str r1, [sp, #4] 800970c: 9400 str r4, [sp, #0] 800970e: 4619 mov r1, r3 8009710: f7ff ff7e bl 8009610 ipaddr, ARP_REQUEST); } 8009714: b005 add sp, #20 8009716: bd30 pop {r4, r5, pc} 8009718: 080154b4 .word 0x080154b4 0800971c : { 800971c: b538 push {r3, r4, r5, lr} 800971e: 4605 mov r5, r0 for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8009720: 2400 movs r4, #0 8009722: e000 b.n 8009726 8009724: 3401 adds r4, #1 8009726: 2c09 cmp r4, #9 8009728: dc11 bgt.n 800974e u8_t state = arp_table[i].state; 800972a: eb04 0244 add.w r2, r4, r4, lsl #1 800972e: 4b08 ldr r3, [pc, #32] @ (8009750 ) 8009730: eb03 03c2 add.w r3, r3, r2, lsl #3 8009734: 7d1b ldrb r3, [r3, #20] if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { 8009736: 2b00 cmp r3, #0 8009738: d0f4 beq.n 8009724 800973a: 4b05 ldr r3, [pc, #20] @ (8009750 ) 800973c: eb03 03c2 add.w r3, r3, r2, lsl #3 8009740: 689b ldr r3, [r3, #8] 8009742: 42ab cmp r3, r5 8009744: d1ee bne.n 8009724 etharp_free_entry(i); 8009746: 4620 mov r0, r4 8009748: f7ff fe04 bl 8009354 800974c: e7ea b.n 8009724 } 800974e: bd38 pop {r3, r4, r5, pc} 8009750: 24012f2c .word 0x24012f2c 08009754 : { 8009754: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8009758: b086 sub sp, #24 800975a: 4604 mov r4, r0 800975c: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800975e: f7fa f9d5 bl 8003b0c LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8009762: b19d cbz r5, 800978c hdr = (struct etharp_hdr *)p->payload; 8009764: 6866 ldr r6, [r4, #4] if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8009766: 8833 ldrh r3, [r6, #0] 8009768: f5b3 7f80 cmp.w r3, #256 @ 0x100 800976c: d108 bne.n 8009780 (hdr->hwlen != ETH_HWADDR_LEN) || 800976e: 7933 ldrb r3, [r6, #4] if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8009770: 2b06 cmp r3, #6 8009772: d105 bne.n 8009780 (hdr->protolen != sizeof(ip4_addr_t)) || 8009774: 7973 ldrb r3, [r6, #5] (hdr->hwlen != ETH_HWADDR_LEN) || 8009776: 2b04 cmp r3, #4 8009778: d102 bne.n 8009780 (hdr->proto != PP_HTONS(ETHTYPE_IP))) { 800977a: 8873 ldrh r3, [r6, #2] (hdr->protolen != sizeof(ip4_addr_t)) || 800977c: 2b08 cmp r3, #8 800977e: d00d beq.n 800979c pbuf_free(p); 8009780: 4620 mov r0, r4 8009782: f002 fb0d bl 800bda0 } 8009786: b006 add sp, #24 8009788: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 800978c: 4b21 ldr r3, [pc, #132] @ (8009814 ) 800978e: f240 228a movw r2, #650 @ 0x28a 8009792: 4921 ldr r1, [pc, #132] @ (8009818 ) 8009794: 4821 ldr r0, [pc, #132] @ (800981c ) 8009796: f009 fe37 bl 8013408 800979a: e7f4 b.n 8009786 IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&sipaddr, &hdr->sipaddr); 800979c: f8d6 300e ldr.w r3, [r6, #14] 80097a0: 9305 str r3, [sp, #20] IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr); 80097a2: 69b2 ldr r2, [r6, #24] if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { 80097a4: 686f ldr r7, [r5, #4] 80097a6: b997 cbnz r7, 80097ce etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), 80097a8: f106 0808 add.w r8, r6, #8 80097ac: 2302 movs r3, #2 80097ae: 4642 mov r2, r8 80097b0: a905 add r1, sp, #20 80097b2: 4628 mov r0, r5 80097b4: f7ff feca bl 800954c switch (hdr->opcode) { 80097b8: 88f3 ldrh r3, [r6, #6] 80097ba: f5b3 7f80 cmp.w r3, #256 @ 0x100 80097be: d011 beq.n 80097e4 80097c0: f5b3 7f00 cmp.w r3, #512 @ 0x200 80097c4: d020 beq.n 8009808 pbuf_free(p); 80097c6: 4620 mov r0, r4 80097c8: f002 faea bl 800bda0 80097cc: e7db b.n 8009786 for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); 80097ce: 4297 cmp r7, r2 80097d0: bf14 ite ne 80097d2: 2700 movne r7, #0 80097d4: 2701 moveq r7, #1 etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), 80097d6: f106 0808 add.w r8, r6, #8 80097da: b10f cbz r7, 80097e0 80097dc: 2301 movs r3, #1 80097de: e7e6 b.n 80097ae 80097e0: 2302 movs r3, #2 80097e2: e7e4 b.n 80097ae if (for_us) { 80097e4: 2f00 cmp r7, #0 80097e6: d0ee beq.n 80097c6 (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, 80097e8: f105 012a add.w r1, r5, #42 @ 0x2a (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), 80097ec: 1d2b adds r3, r5, #4 etharp_raw(netif, 80097ee: 2202 movs r2, #2 80097f0: 9203 str r2, [sp, #12] 80097f2: aa05 add r2, sp, #20 80097f4: 9202 str r2, [sp, #8] 80097f6: f8cd 8004 str.w r8, [sp, #4] 80097fa: 9300 str r3, [sp, #0] 80097fc: 460b mov r3, r1 80097fe: 4642 mov r2, r8 8009800: 4628 mov r0, r5 8009802: f7ff ff05 bl 8009610 8009806: e7de b.n 80097c6 dhcp_arp_reply(netif, &sipaddr); 8009808: a905 add r1, sp, #20 800980a: 4628 mov r0, r5 800980c: f7ff fb86 bl 8008f1c break; 8009810: e7d9 b.n 80097c6 8009812: bf00 nop 8009814: 08015210 .word 0x08015210 8009818: 080144d8 .word 0x080144d8 800981c: 080144e8 .word 0x080144e8 08009820 : * ERR_MEM if the ARP packet couldn't be allocated * any other err_t on failure */ err_t etharp_request(struct netif *netif, const ip4_addr_t *ipaddr) { 8009820: b508 push {r3, lr} LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); return etharp_request_dst(netif, ipaddr, ðbroadcast); 8009822: 4a02 ldr r2, [pc, #8] @ (800982c ) 8009824: f7ff ff68 bl 80096f8 } 8009828: bd08 pop {r3, pc} 800982a: bf00 nop 800982c: 080154bc .word 0x080154bc 08009830 : { 8009830: b510 push {r4, lr} for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8009832: 2400 movs r4, #0 8009834: e005 b.n 8009842 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8009836: 2b04 cmp r3, #4 8009838: d91b bls.n 8009872 etharp_free_entry(i); 800983a: 4620 mov r0, r4 800983c: f7ff fd8a bl 8009354 for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8009840: 3401 adds r4, #1 8009842: 2c09 cmp r4, #9 8009844: dc35 bgt.n 80098b2 u8_t state = arp_table[i].state; 8009846: eb04 0344 add.w r3, r4, r4, lsl #1 800984a: 00da lsls r2, r3, #3 800984c: 4b19 ldr r3, [pc, #100] @ (80098b4 ) 800984e: 4413 add r3, r2 8009850: 7d1a ldrb r2, [r3, #20] if (state != ETHARP_STATE_EMPTY 8009852: 2a00 cmp r2, #0 8009854: d0f4 beq.n 8009840 arp_table[i].ctime++; 8009856: eb04 0144 add.w r1, r4, r4, lsl #1 800985a: 00cb lsls r3, r1, #3 800985c: 4915 ldr r1, [pc, #84] @ (80098b4 ) 800985e: 4419 add r1, r3 8009860: 8a4b ldrh r3, [r1, #18] 8009862: 3301 adds r3, #1 8009864: b29b uxth r3, r3 8009866: 824b strh r3, [r1, #18] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8009868: f5b3 7f96 cmp.w r3, #300 @ 0x12c 800986c: d2e5 bcs.n 800983a 800986e: 2a01 cmp r2, #1 8009870: d0e1 beq.n 8009836 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { 8009872: 2a03 cmp r2, #3 8009874: d00d beq.n 8009892 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { 8009876: 2a04 cmp r2, #4 8009878: d013 beq.n 80098a2 } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 800987a: 2a01 cmp r2, #1 800987c: d1e0 bne.n 8009840 etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); 800987e: eb04 0244 add.w r2, r4, r4, lsl #1 8009882: 00d3 lsls r3, r2, #3 8009884: 4a0b ldr r2, [pc, #44] @ (80098b4 ) 8009886: 4413 add r3, r2 8009888: 1d19 adds r1, r3, #4 800988a: 6898 ldr r0, [r3, #8] 800988c: f7ff ffc8 bl 8009820 8009890: e7d6 b.n 8009840 arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; 8009892: eb04 0344 add.w r3, r4, r4, lsl #1 8009896: 00da lsls r2, r3, #3 8009898: 4b06 ldr r3, [pc, #24] @ (80098b4 ) 800989a: 4413 add r3, r2 800989c: 2204 movs r2, #4 800989e: 751a strb r2, [r3, #20] 80098a0: e7ce b.n 8009840 arp_table[i].state = ETHARP_STATE_STABLE; 80098a2: eb04 0344 add.w r3, r4, r4, lsl #1 80098a6: 00da lsls r2, r3, #3 80098a8: 4b02 ldr r3, [pc, #8] @ (80098b4 ) 80098aa: 4413 add r3, r2 80098ac: 2202 movs r2, #2 80098ae: 751a strb r2, [r3, #20] 80098b0: e7c6 b.n 8009840 } 80098b2: bd10 pop {r4, pc} 80098b4: 24012f2c .word 0x24012f2c 080098b8 : { 80098b8: b570 push {r4, r5, r6, lr} 80098ba: b082 sub sp, #8 80098bc: 4605 mov r5, r0 80098be: 460e mov r6, r1 80098c0: 4614 mov r4, r2 LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", 80098c2: eb02 0242 add.w r2, r2, r2, lsl #1 80098c6: 4b2e ldr r3, [pc, #184] @ (8009980 ) 80098c8: eb03 03c2 add.w r3, r3, r2, lsl #3 80098cc: 7d1b ldrb r3, [r3, #20] 80098ce: 2b01 cmp r3, #1 80098d0: d919 bls.n 8009906 if (arp_table[arp_idx].state == ETHARP_STATE_STABLE) { 80098d2: eb04 0244 add.w r2, r4, r4, lsl #1 80098d6: 4b2a ldr r3, [pc, #168] @ (8009980 ) 80098d8: eb03 03c2 add.w r3, r3, r2, lsl #3 80098dc: 7d1b ldrb r3, [r3, #20] 80098de: 2b02 cmp r3, #2 80098e0: d019 beq.n 8009916 return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); 80098e2: eb04 0344 add.w r3, r4, r4, lsl #1 80098e6: 00db lsls r3, r3, #3 80098e8: 3308 adds r3, #8 80098ea: 4a25 ldr r2, [pc, #148] @ (8009980 ) 80098ec: 4413 add r3, r2 80098ee: f44f 6200 mov.w r2, #2048 @ 0x800 80098f2: 9200 str r2, [sp, #0] 80098f4: 3304 adds r3, #4 80098f6: f105 022a add.w r2, r5, #42 @ 0x2a 80098fa: 4631 mov r1, r6 80098fc: 4628 mov r0, r5 80098fe: f000 fa21 bl 8009d44 } 8009902: b002 add sp, #8 8009904: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", 8009906: 4b1f ldr r3, [pc, #124] @ (8009984 ) 8009908: f240 22ee movw r2, #750 @ 0x2ee 800990c: 491e ldr r1, [pc, #120] @ (8009988 ) 800990e: 481f ldr r0, [pc, #124] @ (800998c ) 8009910: f009 fd7a bl 8013408 8009914: e7dd b.n 80098d2 if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { 8009916: 4b1a ldr r3, [pc, #104] @ (8009980 ) 8009918: eb03 03c2 add.w r3, r3, r2, lsl #3 800991c: 8a5b ldrh r3, [r3, #18] 800991e: f5b3 7f8e cmp.w r3, #284 @ 0x11c 8009922: d81b bhi.n 800995c } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { 8009924: f5b3 7f87 cmp.w r3, #270 @ 0x10e 8009928: d3db bcc.n 80098e2 if (etharp_request_dst(netif, &arp_table[arp_idx].ipaddr, &arp_table[arp_idx].ethaddr) == ERR_OK) { 800992a: eb04 0144 add.w r1, r4, r4, lsl #1 800992e: 4b14 ldr r3, [pc, #80] @ (8009980 ) 8009930: eb03 01c1 add.w r1, r3, r1, lsl #3 8009934: eb04 0244 add.w r2, r4, r4, lsl #1 8009938: 00d2 lsls r2, r2, #3 800993a: 3208 adds r2, #8 800993c: 441a add r2, r3 800993e: 3204 adds r2, #4 8009940: 3104 adds r1, #4 8009942: 4628 mov r0, r5 8009944: f7ff fed8 bl 80096f8 8009948: 2800 cmp r0, #0 800994a: d1ca bne.n 80098e2 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 800994c: eb04 0244 add.w r2, r4, r4, lsl #1 8009950: 4b0b ldr r3, [pc, #44] @ (8009980 ) 8009952: eb03 03c2 add.w r3, r3, r2, lsl #3 8009956: 2203 movs r2, #3 8009958: 751a strb r2, [r3, #20] 800995a: e7c2 b.n 80098e2 if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 800995c: 4908 ldr r1, [pc, #32] @ (8009980 ) 800995e: eb01 01c2 add.w r1, r1, r2, lsl #3 8009962: 3104 adds r1, #4 8009964: 4628 mov r0, r5 8009966: f7ff ff5b bl 8009820 800996a: 2800 cmp r0, #0 800996c: d1b9 bne.n 80098e2 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 800996e: eb04 0244 add.w r2, r4, r4, lsl #1 8009972: 4b03 ldr r3, [pc, #12] @ (8009980 ) 8009974: eb03 03c2 add.w r3, r3, r2, lsl #3 8009978: 2203 movs r2, #3 800997a: 751a strb r2, [r3, #20] 800997c: e7b1 b.n 80098e2 800997e: bf00 nop 8009980: 24012f2c .word 0x24012f2c 8009984: 08015210 .word 0x08015210 8009988: 0801538c .word 0x0801538c 800998c: 080144e8 .word 0x080144e8 08009990 : { 8009990: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8009994: b083 sub sp, #12 8009996: 4605 mov r5, r0 8009998: 4688 mov r8, r1 800999a: 4616 mov r6, r2 struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr; 800999c: f100 072a add.w r7, r0, #42 @ 0x2a if (ip4_addr_isbroadcast(ipaddr, netif) || 80099a0: 4601 mov r1, r0 80099a2: f8d8 0000 ldr.w r0, [r8] 80099a6: f000 fd54 bl 800a452 80099aa: 2800 cmp r0, #0 80099ac: f040 80a1 bne.w 8009af2 ip4_addr_ismulticast(ipaddr) || 80099b0: f8d8 3000 ldr.w r3, [r8] 80099b4: f003 02f0 and.w r2, r3, #240 @ 0xf0 if (ip4_addr_isbroadcast(ipaddr, netif) || 80099b8: 2ae0 cmp r2, #224 @ 0xe0 80099ba: f000 809d beq.w 8009af8 ip4_addr_isany(ipaddr)) { 80099be: 2b00 cmp r3, #0 80099c0: f000 809d beq.w 8009afe i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); 80099c4: 462a mov r2, r5 80099c6: 2101 movs r1, #1 80099c8: 4640 mov r0, r8 80099ca: f7ff fce7 bl 800939c if (i_err < 0) { 80099ce: 1e04 subs r4, r0, #0 80099d0: db13 blt.n 80099fa LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX); 80099d2: b2a3 uxth r3, r4 80099d4: 2b7e cmp r3, #126 @ 0x7e 80099d6: d812 bhi.n 80099fe i = (netif_addr_idx_t)i_err; 80099d8: b2e4 uxtb r4, r4 if (arp_table[i].state == ETHARP_STATE_EMPTY) { 80099da: eb04 0244 add.w r2, r4, r4, lsl #1 80099de: 4b4b ldr r3, [pc, #300] @ (8009b0c ) 80099e0: eb03 03c2 add.w r3, r3, r2, lsl #3 80099e4: 7d1b ldrb r3, [r3, #20] 80099e6: b993 cbnz r3, 8009a0e arp_table[i].state = ETHARP_STATE_PENDING; 80099e8: 4b48 ldr r3, [pc, #288] @ (8009b0c ) 80099ea: eb03 03c2 add.w r3, r3, r2, lsl #3 80099ee: f04f 0901 mov.w r9, #1 80099f2: f883 9014 strb.w r9, [r3, #20] arp_table[i].netif = netif; 80099f6: 609d str r5, [r3, #8] 80099f8: e00b b.n 8009a12 return (err_t)i_err; 80099fa: b260 sxtb r0, r4 80099fc: e042 b.n 8009a84 LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX); 80099fe: 4b44 ldr r3, [pc, #272] @ (8009b10 ) 8009a00: f240 32c1 movw r2, #961 @ 0x3c1 8009a04: 4943 ldr r1, [pc, #268] @ (8009b14 ) 8009a06: 4844 ldr r0, [pc, #272] @ (8009b18 ) 8009a08: f009 fcfe bl 8013408 8009a0c: e7e4 b.n 80099d8 int is_new_entry = 0; 8009a0e: f04f 0900 mov.w r9, #0 LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", 8009a12: eb04 0244 add.w r2, r4, r4, lsl #1 8009a16: 4b3d ldr r3, [pc, #244] @ (8009b0c ) 8009a18: eb03 03c2 add.w r3, r3, r2, lsl #3 8009a1c: 7d1b ldrb r3, [r3, #20] 8009a1e: b19b cbz r3, 8009a48 if (is_new_entry || (q == NULL)) { 8009a20: 2e00 cmp r6, #0 8009a22: bf14 ite ne 8009a24: 464b movne r3, r9 8009a26: f049 0301 orreq.w r3, r9, #1 8009a2a: b9ab cbnz r3, 8009a58 err_t result = ERR_MEM; 8009a2c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff if (arp_table[i].state >= ETHARP_STATE_STABLE) { 8009a30: eb04 0244 add.w r2, r4, r4, lsl #1 8009a34: 4b35 ldr r3, [pc, #212] @ (8009b0c ) 8009a36: eb03 03c2 add.w r3, r3, r2, lsl #3 8009a3a: 7d1b ldrb r3, [r3, #20] 8009a3c: 2b01 cmp r3, #1 8009a3e: d812 bhi.n 8009a66 } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8009a40: 2b01 cmp r3, #1 8009a42: d11f bne.n 8009a84 p = q; 8009a44: 4635 mov r5, r6 8009a46: e025 b.n 8009a94 LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", 8009a48: 4b31 ldr r3, [pc, #196] @ (8009b10 ) 8009a4a: f240 32cd movw r2, #973 @ 0x3cd 8009a4e: 4933 ldr r1, [pc, #204] @ (8009b1c ) 8009a50: 4831 ldr r0, [pc, #196] @ (8009b18 ) 8009a52: f009 fcd9 bl 8013408 8009a56: e7e3 b.n 8009a20 result = etharp_request(netif, ipaddr); 8009a58: 4641 mov r1, r8 8009a5a: 4628 mov r0, r5 8009a5c: f7ff fee0 bl 8009820 if (q == NULL) { 8009a60: 2e00 cmp r6, #0 8009a62: d1e5 bne.n 8009a30 8009a64: e00e b.n 8009a84 ETHARP_SET_ADDRHINT(netif, i); 8009a66: 4b2e ldr r3, [pc, #184] @ (8009b20 ) 8009a68: 701c strb r4, [r3, #0] result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); 8009a6a: 00d3 lsls r3, r2, #3 8009a6c: 3308 adds r3, #8 8009a6e: 4a27 ldr r2, [pc, #156] @ (8009b0c ) 8009a70: 4413 add r3, r2 8009a72: f44f 6200 mov.w r2, #2048 @ 0x800 8009a76: 9200 str r2, [sp, #0] 8009a78: 3304 adds r3, #4 8009a7a: 463a mov r2, r7 8009a7c: 4631 mov r1, r6 8009a7e: 4628 mov r0, r5 8009a80: f000 f960 bl 8009d44 } 8009a84: b003 add sp, #12 8009a86: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} if (PBUF_NEEDS_COPY(p)) { 8009a8a: 7b2b ldrb r3, [r5, #12] 8009a8c: f013 0f40 tst.w r3, #64 @ 0x40 8009a90: d129 bne.n 8009ae6 p = p->next; 8009a92: 682d ldr r5, [r5, #0] while (p) { 8009a94: b175 cbz r5, 8009ab4 LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); 8009a96: 896a ldrh r2, [r5, #10] 8009a98: 892b ldrh r3, [r5, #8] 8009a9a: 429a cmp r2, r3 8009a9c: d1f5 bne.n 8009a8a 8009a9e: 682b ldr r3, [r5, #0] 8009aa0: 2b00 cmp r3, #0 8009aa2: d0f2 beq.n 8009a8a 8009aa4: 4b1a ldr r3, [pc, #104] @ (8009b10 ) 8009aa6: f240 32f1 movw r2, #1009 @ 0x3f1 8009aaa: 491e ldr r1, [pc, #120] @ (8009b24 ) 8009aac: 481a ldr r0, [pc, #104] @ (8009b18 ) 8009aae: f009 fcab bl 8013408 8009ab2: e7ea b.n 8009a8a int copy_needed = 0; 8009ab4: 2300 movs r3, #0 if (copy_needed) { 8009ab6: b1c3 cbz r3, 8009aea p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); 8009ab8: 4632 mov r2, r6 8009aba: f44f 7120 mov.w r1, #640 @ 0x280 8009abe: 200e movs r0, #14 8009ac0: f002 fc3e bl 800c340 8009ac4: 4606 mov r6, r0 if (p != NULL) { 8009ac6: b1ee cbz r6, 8009b04 if (arp_table[i].q != NULL) { 8009ac8: eb04 0344 add.w r3, r4, r4, lsl #1 8009acc: 4a0f ldr r2, [pc, #60] @ (8009b0c ) 8009ace: f852 0033 ldr.w r0, [r2, r3, lsl #3] 8009ad2: b108 cbz r0, 8009ad8 pbuf_free(arp_table[i].q); 8009ad4: f002 f964 bl 800bda0 arp_table[i].q = p; 8009ad8: eb04 0444 add.w r4, r4, r4, lsl #1 8009adc: 4b0b ldr r3, [pc, #44] @ (8009b0c ) 8009ade: f843 6034 str.w r6, [r3, r4, lsl #3] result = ERR_OK; 8009ae2: 2000 movs r0, #0 8009ae4: e7ce b.n 8009a84 copy_needed = 1; 8009ae6: 2301 movs r3, #1 8009ae8: e7e5 b.n 8009ab6 pbuf_ref(p); 8009aea: 4630 mov r0, r6 8009aec: f002 fae6 bl 800c0bc 8009af0: e7e9 b.n 8009ac6 return ERR_ARG; 8009af2: f06f 000f mvn.w r0, #15 8009af6: e7c5 b.n 8009a84 8009af8: f06f 000f mvn.w r0, #15 8009afc: e7c2 b.n 8009a84 8009afe: f06f 000f mvn.w r0, #15 8009b02: e7bf b.n 8009a84 result = ERR_MEM; 8009b04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8009b08: e7bc b.n 8009a84 8009b0a: bf00 nop 8009b0c: 24012f2c .word 0x24012f2c 8009b10: 08015210 .word 0x08015210 8009b14: 080153bc .word 0x080153bc 8009b18: 080144e8 .word 0x080144e8 8009b1c: 080153cc .word 0x080153cc 8009b20: 24012f28 .word 0x24012f28 8009b24: 080153f4 .word 0x080153f4 08009b28 : { 8009b28: b5f0 push {r4, r5, r6, r7, lr} 8009b2a: b085 sub sp, #20 8009b2c: 4605 mov r5, r0 8009b2e: 460f mov r7, r1 8009b30: 4616 mov r6, r2 LWIP_ASSERT_CORE_LOCKED(); 8009b32: f7f9 ffeb bl 8003b0c LWIP_ASSERT("netif != NULL", netif != NULL); 8009b36: 2d00 cmp r5, #0 8009b38: d03d beq.n 8009bb6 LWIP_ASSERT("q != NULL", q != NULL); 8009b3a: 2f00 cmp r7, #0 8009b3c: d043 beq.n 8009bc6 LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); 8009b3e: 2e00 cmp r6, #0 8009b40: d049 beq.n 8009bd6 if (ip4_addr_isbroadcast(ipaddr, netif)) { 8009b42: 4629 mov r1, r5 8009b44: 6830 ldr r0, [r6, #0] 8009b46: f000 fc84 bl 800a452 8009b4a: 4603 mov r3, r0 8009b4c: 2800 cmp r0, #0 8009b4e: f040 8084 bne.w 8009c5a } else if (ip4_addr_ismulticast(ipaddr)) { 8009b52: 6832 ldr r2, [r6, #0] 8009b54: f002 01f0 and.w r1, r2, #240 @ 0xf0 8009b58: 29e0 cmp r1, #224 @ 0xe0 8009b5a: d044 beq.n 8009be6 if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && 8009b5c: 6869 ldr r1, [r5, #4] 8009b5e: 68a8 ldr r0, [r5, #8] 8009b60: 4051 eors r1, r2 8009b62: 4201 tst r1, r0 8009b64: d009 beq.n 8009b7a !ip4_addr_islinklocal(ipaddr)) { 8009b66: b292 uxth r2, r2 if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && 8009b68: f64f 61a9 movw r1, #65193 @ 0xfea9 8009b6c: 428a cmp r2, r1 8009b6e: d004 beq.n 8009b7a if (!ip4_addr_isany_val(*netif_ip4_gw(netif))) { 8009b70: 68ea ldr r2, [r5, #12] 8009b72: 2a00 cmp r2, #0 8009b74: d07d beq.n 8009c72 dst_addr = netif_ip4_gw(netif); 8009b76: f105 060c add.w r6, r5, #12 if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 8009b7a: 4a3f ldr r2, [pc, #252] @ (8009c78 ) 8009b7c: 7812 ldrb r2, [r2, #0] 8009b7e: eb02 0042 add.w r0, r2, r2, lsl #1 8009b82: 493e ldr r1, [pc, #248] @ (8009c7c ) 8009b84: eb01 01c0 add.w r1, r1, r0, lsl #3 8009b88: 7d09 ldrb r1, [r1, #20] 8009b8a: 2901 cmp r1, #1 8009b8c: d943 bls.n 8009c16 (arp_table[etharp_cached_entry].netif == netif) && 8009b8e: 493b ldr r1, [pc, #236] @ (8009c7c ) 8009b90: eb01 01c0 add.w r1, r1, r0, lsl #3 8009b94: 6889 ldr r1, [r1, #8] if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 8009b96: 42a9 cmp r1, r5 8009b98: d13d bne.n 8009c16 (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { 8009b9a: 6830 ldr r0, [r6, #0] 8009b9c: eb02 0442 add.w r4, r2, r2, lsl #1 8009ba0: 4936 ldr r1, [pc, #216] @ (8009c7c ) 8009ba2: eb01 01c4 add.w r1, r1, r4, lsl #3 8009ba6: 6849 ldr r1, [r1, #4] (arp_table[etharp_cached_entry].netif == netif) && 8009ba8: 4288 cmp r0, r1 8009baa: d134 bne.n 8009c16 return etharp_output_to_arp_index(netif, q, etharp_cached_entry); 8009bac: 4639 mov r1, r7 8009bae: 4628 mov r0, r5 8009bb0: f7ff fe82 bl 80098b8 8009bb4: e05b b.n 8009c6e LWIP_ASSERT("netif != NULL", netif != NULL); 8009bb6: 4b32 ldr r3, [pc, #200] @ (8009c80 ) 8009bb8: f240 321e movw r2, #798 @ 0x31e 8009bbc: 4931 ldr r1, [pc, #196] @ (8009c84 ) 8009bbe: 4832 ldr r0, [pc, #200] @ (8009c88 ) 8009bc0: f009 fc22 bl 8013408 8009bc4: e7b9 b.n 8009b3a LWIP_ASSERT("q != NULL", q != NULL); 8009bc6: 4b2e ldr r3, [pc, #184] @ (8009c80 ) 8009bc8: f240 321f movw r2, #799 @ 0x31f 8009bcc: 492f ldr r1, [pc, #188] @ (8009c8c ) 8009bce: 482e ldr r0, [pc, #184] @ (8009c88 ) 8009bd0: f009 fc1a bl 8013408 8009bd4: e7b3 b.n 8009b3e LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); 8009bd6: 4b2a ldr r3, [pc, #168] @ (8009c80 ) 8009bd8: f44f 7248 mov.w r2, #800 @ 0x320 8009bdc: 492c ldr r1, [pc, #176] @ (8009c90 ) 8009bde: 482a ldr r0, [pc, #168] @ (8009c88 ) 8009be0: f009 fc12 bl 8013408 8009be4: e7ad b.n 8009b42 mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; 8009be6: 2301 movs r3, #1 8009be8: f88d 3008 strb.w r3, [sp, #8] mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; 8009bec: 2300 movs r3, #0 8009bee: f88d 3009 strb.w r3, [sp, #9] mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; 8009bf2: 235e movs r3, #94 @ 0x5e 8009bf4: f88d 300a strb.w r3, [sp, #10] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8009bf8: 7873 ldrb r3, [r6, #1] 8009bfa: f003 037f and.w r3, r3, #127 @ 0x7f 8009bfe: f88d 300b strb.w r3, [sp, #11] mcastaddr.addr[4] = ip4_addr3(ipaddr); 8009c02: 78b3 ldrb r3, [r6, #2] 8009c04: f88d 300c strb.w r3, [sp, #12] mcastaddr.addr[5] = ip4_addr4(ipaddr); 8009c08: 78f3 ldrb r3, [r6, #3] 8009c0a: f88d 300d strb.w r3, [sp, #13] dest = &mcastaddr; 8009c0e: ab02 add r3, sp, #8 8009c10: e024 b.n 8009c5c for (i = 0; i < ARP_TABLE_SIZE; i++) { 8009c12: 3301 adds r3, #1 8009c14: b2db uxtb r3, r3 8009c16: 2b09 cmp r3, #9 8009c18: d819 bhi.n 8009c4e if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 8009c1a: eb03 0c43 add.w ip, r3, r3, lsl #1 8009c1e: 4c17 ldr r4, [pc, #92] @ (8009c7c ) 8009c20: eb04 0ccc add.w ip, r4, ip, lsl #3 8009c24: f89c 2014 ldrb.w r2, [ip, #20] 8009c28: 2a01 cmp r2, #1 8009c2a: d9f2 bls.n 8009c12 (arp_table[i].netif == netif) && 8009c2c: f8dc 2008 ldr.w r2, [ip, #8] if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 8009c30: 42aa cmp r2, r5 8009c32: d1ee bne.n 8009c12 (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { 8009c34: 6831 ldr r1, [r6, #0] 8009c36: f8dc 2004 ldr.w r2, [ip, #4] (arp_table[i].netif == netif) && 8009c3a: 4291 cmp r1, r2 8009c3c: d1e9 bne.n 8009c12 ETHARP_SET_ADDRHINT(netif, i); 8009c3e: 4a0e ldr r2, [pc, #56] @ (8009c78 ) 8009c40: 7013 strb r3, [r2, #0] return etharp_output_to_arp_index(netif, q, i); 8009c42: 461a mov r2, r3 8009c44: 4639 mov r1, r7 8009c46: 4628 mov r0, r5 8009c48: f7ff fe36 bl 80098b8 8009c4c: e00f b.n 8009c6e return etharp_query(netif, dst_addr, q); 8009c4e: 463a mov r2, r7 8009c50: 4631 mov r1, r6 8009c52: 4628 mov r0, r5 8009c54: f7ff fe9c bl 8009990 8009c58: e009 b.n 8009c6e dest = (const struct eth_addr *)ðbroadcast; 8009c5a: 4b0e ldr r3, [pc, #56] @ (8009c94 ) return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), dest, ETHTYPE_IP); 8009c5c: f44f 6200 mov.w r2, #2048 @ 0x800 8009c60: 9200 str r2, [sp, #0] 8009c62: f105 022a add.w r2, r5, #42 @ 0x2a 8009c66: 4639 mov r1, r7 8009c68: 4628 mov r0, r5 8009c6a: f000 f86b bl 8009d44 } 8009c6e: b005 add sp, #20 8009c70: bdf0 pop {r4, r5, r6, r7, pc} return ERR_RTE; 8009c72: f06f 0003 mvn.w r0, #3 8009c76: e7fa b.n 8009c6e 8009c78: 24012f28 .word 0x24012f28 8009c7c: 24012f2c .word 0x24012f2c 8009c80: 08015210 .word 0x08015210 8009c84: 080144d8 .word 0x080144d8 8009c88: 080144e8 .word 0x080144e8 8009c8c: 08015410 .word 0x08015410 8009c90: 0801536c .word 0x0801536c 8009c94: 080154bc .word 0x080154bc 08009c98 : * @see ETHARP_SUPPORT_VLAN * @see LWIP_HOOK_VLAN_CHECK */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 8009c98: b570 push {r4, r5, r6, lr} 8009c9a: 4604 mov r4, r0 8009c9c: 460d mov r5, r1 u16_t type; #if LWIP_ARP || ETHARP_SUPPORT_VLAN || LWIP_IPV6 u16_t next_hdr_offset = SIZEOF_ETH_HDR; #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ LWIP_ASSERT_CORE_LOCKED(); 8009c9e: f7f9 ff35 bl 8003b0c if (p->len <= SIZEOF_ETH_HDR) { 8009ca2: 8963 ldrh r3, [r4, #10] 8009ca4: 2b0e cmp r3, #14 8009ca6: d91b bls.n 8009ce0 ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinerrors); goto free_and_return; } if (p->if_idx == NETIF_NO_INDEX) { 8009ca8: 7be3 ldrb r3, [r4, #15] 8009caa: b91b cbnz r3, 8009cb4 p->if_idx = netif_get_index(netif); 8009cac: f895 3034 ldrb.w r3, [r5, #52] @ 0x34 8009cb0: 3301 adds r3, #1 8009cb2: 73e3 strb r3, [r4, #15] } /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; 8009cb4: 6860 ldr r0, [r4, #4] (unsigned char)ethhdr->dest.addr[3], (unsigned char)ethhdr->dest.addr[4], (unsigned char)ethhdr->dest.addr[5], (unsigned char)ethhdr->src.addr[0], (unsigned char)ethhdr->src.addr[1], (unsigned char)ethhdr->src.addr[2], (unsigned char)ethhdr->src.addr[3], (unsigned char)ethhdr->src.addr[4], (unsigned char)ethhdr->src.addr[5], lwip_htons(ethhdr->type))); type = ethhdr->type; 8009cb6: 8986 ldrh r6, [r0, #12] #if LWIP_ARP_FILTER_NETIF netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, lwip_htons(type)); #endif /* LWIP_ARP_FILTER_NETIF*/ if (ethhdr->dest.addr[0] & 1) { 8009cb8: 7803 ldrb r3, [r0, #0] 8009cba: f013 0f01 tst.w r3, #1 8009cbe: d00a beq.n 8009cd6 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { 8009cc0: 2b01 cmp r3, #1 8009cc2: d012 beq.n 8009cea (ethhdr->dest.addr[1] == LL_IP6_MULTICAST_ADDR_1)) { /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; } #endif /* LWIP_IPV6 */ else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { 8009cc4: 2206 movs r2, #6 8009cc6: 491e ldr r1, [pc, #120] @ (8009d40 ) 8009cc8: f009 fce6 bl 8013698 8009ccc: b918 cbnz r0, 8009cd6 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 8009cce: 7b63 ldrb r3, [r4, #13] 8009cd0: f043 0308 orr.w r3, r3, #8 8009cd4: 7363 strb r3, [r4, #13] } } switch (type) { 8009cd6: 2e08 cmp r6, #8 8009cd8: d012 beq.n 8009d00 8009cda: f5b6 6fc1 cmp.w r6, #1544 @ 0x608 8009cde: d01f beq.n 8009d20 /* This means the pbuf is freed or consumed, so the caller doesn't have to free it again */ return ERR_OK; free_and_return: pbuf_free(p); 8009ce0: 4620 mov r0, r4 8009ce2: f002 f85d bl 800bda0 return ERR_OK; } 8009ce6: 2000 movs r0, #0 8009ce8: bd70 pop {r4, r5, r6, pc} if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8009cea: 7843 ldrb r3, [r0, #1] 8009cec: 2b00 cmp r3, #0 8009cee: d1f2 bne.n 8009cd6 (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { 8009cf0: 7883 ldrb r3, [r0, #2] if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8009cf2: 2b5e cmp r3, #94 @ 0x5e 8009cf4: d1ef bne.n 8009cd6 p->flags |= PBUF_FLAG_LLMCAST; 8009cf6: 7b63 ldrb r3, [r4, #13] 8009cf8: f043 0310 orr.w r3, r3, #16 8009cfc: 7363 strb r3, [r4, #13] 8009cfe: e7ea b.n 8009cd6 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8009d00: f895 3031 ldrb.w r3, [r5, #49] @ 0x31 8009d04: f013 0f08 tst.w r3, #8 8009d08: d0ea beq.n 8009ce0 if (pbuf_remove_header(p, next_hdr_offset)) { 8009d0a: 210e movs r1, #14 8009d0c: 4620 mov r0, r4 8009d0e: f002 f801 bl 800bd14 8009d12: 2800 cmp r0, #0 8009d14: d1e4 bne.n 8009ce0 ip4_input(p, netif); 8009d16: 4629 mov r1, r5 8009d18: 4620 mov r0, r4 8009d1a: f000 fa25 bl 800a168 break; 8009d1e: e7e2 b.n 8009ce6 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8009d20: f895 3031 ldrb.w r3, [r5, #49] @ 0x31 8009d24: f013 0f08 tst.w r3, #8 8009d28: d0da beq.n 8009ce0 if (pbuf_remove_header(p, next_hdr_offset)) { 8009d2a: 210e movs r1, #14 8009d2c: 4620 mov r0, r4 8009d2e: f001 fff1 bl 800bd14 8009d32: 2800 cmp r0, #0 8009d34: d1d4 bne.n 8009ce0 etharp_input(p, netif); 8009d36: 4629 mov r1, r5 8009d38: 4620 mov r0, r4 8009d3a: f7ff fd0b bl 8009754 break; 8009d3e: e7d2 b.n 8009ce6 8009d40: 080154bc .word 0x080154bc 08009d44 : * @return ERR_OK if the packet was sent, any other err_t on failure */ err_t ethernet_output(struct netif * netif, struct pbuf * p, const struct eth_addr * src, const struct eth_addr * dst, u16_t eth_type) { 8009d44: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8009d48: 4605 mov r5, r0 8009d4a: 460c mov r4, r1 8009d4c: 4616 mov r6, r2 8009d4e: 461f mov r7, r3 struct eth_hdr *ethhdr; u16_t eth_type_be = lwip_htons(eth_type); 8009d50: f8bd 0018 ldrh.w r0, [sp, #24] 8009d54: f7fe f892 bl 8007e7c 8009d58: 4680 mov r8, r0 eth_type_be = PP_HTONS(ETHTYPE_VLAN); } else #endif /* ETHARP_SUPPORT_VLAN && defined(LWIP_HOOK_VLAN_SET) */ { if (pbuf_add_header(p, SIZEOF_ETH_HDR) != 0) { 8009d5a: 210e movs r1, #14 8009d5c: 4620 mov r0, r4 8009d5e: f001 ffd4 bl 800bd0a 8009d62: b9f8 cbnz r0, 8009da4 goto pbuf_header_failed; } } LWIP_ASSERT_CORE_LOCKED(); 8009d64: f7f9 fed2 bl 8003b0c ethhdr = (struct eth_hdr *)p->payload; 8009d68: 6861 ldr r1, [r4, #4] ethhdr->type = eth_type_be; 8009d6a: f8a1 800c strh.w r8, [r1, #12] SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN); 8009d6e: 683b ldr r3, [r7, #0] 8009d70: 600b str r3, [r1, #0] 8009d72: 88bb ldrh r3, [r7, #4] 8009d74: 808b strh r3, [r1, #4] SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN); 8009d76: 6833 ldr r3, [r6, #0] 8009d78: f8c1 3006 str.w r3, [r1, #6] 8009d7c: 88b3 ldrh r3, [r6, #4] 8009d7e: 814b strh r3, [r1, #10] LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", 8009d80: f895 3030 ldrb.w r3, [r5, #48] @ 0x30 8009d84: 2b06 cmp r3, #6 8009d86: d105 bne.n 8009d94 (netif->hwaddr_len == ETH_HWADDR_LEN)); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("ethernet_output: sending packet %p\n", (void *)p)); /* send the packet */ return netif->linkoutput(netif, p); 8009d88: 69ab ldr r3, [r5, #24] 8009d8a: 4621 mov r1, r4 8009d8c: 4628 mov r0, r5 8009d8e: 4798 blx r3 pbuf_header_failed: LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("ethernet_output: could not allocate room for header.\n")); LINK_STATS_INC(link.lenerr); return ERR_BUF; } 8009d90: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", 8009d94: 4b05 ldr r3, [pc, #20] @ (8009dac ) 8009d96: f44f 7299 mov.w r2, #306 @ 0x132 8009d9a: 4905 ldr r1, [pc, #20] @ (8009db0 ) 8009d9c: 4805 ldr r0, [pc, #20] @ (8009db4 ) 8009d9e: f009 fb33 bl 8013408 8009da2: e7f1 b.n 8009d88 return ERR_BUF; 8009da4: f06f 0001 mvn.w r0, #1 8009da8: e7f2 b.n 8009d90 8009daa: bf00 nop 8009dac: 0801541c .word 0x0801541c 8009db0: 08015480 .word 0x08015480 8009db4: 080144e8 .word 0x080144e8 08009db8 : * @param type Type of the ICMP header * @param code Code of the ICMP header */ static void icmp_send_response(struct pbuf *p, u8_t type, u8_t code) { 8009db8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8009dbc: b086 sub sp, #24 8009dbe: 4606 mov r6, r0 8009dc0: 4688 mov r8, r1 8009dc2: 4617 mov r7, r2 /* increase number of messages attempted to send */ MIB2_STATS_INC(mib2.icmpoutmsgs); /* ICMP header + IP header + 8 bytes of data */ q = pbuf_alloc(PBUF_IP, sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE, 8009dc4: f44f 7220 mov.w r2, #640 @ 0x280 8009dc8: 2124 movs r1, #36 @ 0x24 8009dca: 2022 movs r0, #34 @ 0x22 8009dcc: f002 f850 bl 800be70 PBUF_RAM); if (q == NULL) { 8009dd0: 2800 cmp r0, #0 8009dd2: d03b beq.n 8009e4c 8009dd4: 4605 mov r5, r0 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_time_exceeded: failed to allocate pbuf for ICMP packet.\n")); MIB2_STATS_INC(mib2.icmpouterrors); return; } LWIP_ASSERT("check that first pbuf can hold icmp message", 8009dd6: 8943 ldrh r3, [r0, #10] 8009dd8: 2b23 cmp r3, #35 @ 0x23 8009dda: d93a bls.n 8009e52 (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; 8009ddc: f8d6 c004 ldr.w ip, [r6, #4] ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->src); LWIP_DEBUGF(ICMP_DEBUG, (" to ")); ip4_addr_debug_print_val(ICMP_DEBUG, iphdr->dest); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; 8009de0: 686c ldr r4, [r5, #4] icmphdr->type = type; 8009de2: f884 8000 strb.w r8, [r4] icmphdr->code = code; 8009de6: 7067 strb r7, [r4, #1] icmphdr->id = 0; 8009de8: 2300 movs r3, #0 8009dea: 7123 strb r3, [r4, #4] 8009dec: 7163 strb r3, [r4, #5] icmphdr->seqno = 0; 8009dee: 71a3 strb r3, [r4, #6] 8009df0: 71e3 strb r3, [r4, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 8009df2: 686b ldr r3, [r5, #4] 8009df4: 6872 ldr r2, [r6, #4] 8009df6: 6816 ldr r6, [r2, #0] 8009df8: 6850 ldr r0, [r2, #4] 8009dfa: 6891 ldr r1, [r2, #8] 8009dfc: 68d7 ldr r7, [r2, #12] 8009dfe: 609e str r6, [r3, #8] 8009e00: 60d8 str r0, [r3, #12] 8009e02: 6119 str r1, [r3, #16] 8009e04: 615f str r7, [r3, #20] 8009e06: 6916 ldr r6, [r2, #16] 8009e08: 6950 ldr r0, [r2, #20] 8009e0a: 6991 ldr r1, [r2, #24] 8009e0c: 619e str r6, [r3, #24] 8009e0e: 61d8 str r0, [r3, #28] 8009e10: 6219 str r1, [r3, #32] IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); ip4_addr_copy(iphdr_src, iphdr->src); 8009e12: f8dc 300c ldr.w r3, [ip, #12] 8009e16: 9305 str r3, [sp, #20] ip4_addr_t iphdr_dst; ip4_addr_copy(iphdr_dst, iphdr->dest); netif = ip4_route_src(&iphdr_dst, &iphdr_src); } #else netif = ip4_route(&iphdr_src); 8009e18: a805 add r0, sp, #20 8009e1a: f000 f971 bl 800a100 #endif if (netif != NULL) { 8009e1e: 4607 mov r7, r0 8009e20: b188 cbz r0, 8009e46 /* calculate checksum */ icmphdr->chksum = 0; 8009e22: 2600 movs r6, #0 8009e24: 70a6 strb r6, [r4, #2] 8009e26: 70e6 strb r6, [r4, #3] #if CHECKSUM_GEN_ICMP IF__NETIF_CHECKSUM_ENABLED(netif, NETIF_CHECKSUM_GEN_ICMP) { icmphdr->chksum = inet_chksum(icmphdr, q->len); 8009e28: 8969 ldrh r1, [r5, #10] 8009e2a: 4620 mov r0, r4 8009e2c: f000 f914 bl 800a058 8009e30: 8060 strh r0, [r4, #2] } #endif ICMP_STATS_INC(icmp.xmit); ip4_output_if(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP, netif); 8009e32: 9702 str r7, [sp, #8] 8009e34: 2301 movs r3, #1 8009e36: 9301 str r3, [sp, #4] 8009e38: 9600 str r6, [sp, #0] 8009e3a: 23ff movs r3, #255 @ 0xff 8009e3c: aa05 add r2, sp, #20 8009e3e: 4631 mov r1, r6 8009e40: 4628 mov r0, r5 8009e42: f000 faf1 bl 800a428 } pbuf_free(q); 8009e46: 4628 mov r0, r5 8009e48: f001 ffaa bl 800bda0 } 8009e4c: b006 add sp, #24 8009e4e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ASSERT("check that first pbuf can hold icmp message", 8009e52: 4b04 ldr r3, [pc, #16] @ (8009e64 ) 8009e54: f44f 72b4 mov.w r2, #360 @ 0x168 8009e58: 4903 ldr r1, [pc, #12] @ (8009e68 ) 8009e5a: 4804 ldr r0, [pc, #16] @ (8009e6c ) 8009e5c: f009 fad4 bl 8013408 8009e60: e7bc b.n 8009ddc 8009e62: bf00 nop 8009e64: 080154c4 .word 0x080154c4 8009e68: 08015528 .word 0x08015528 8009e6c: 080144e8 .word 0x080144e8 08009e70 : { 8009e70: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8009e74: b084 sub sp, #16 8009e76: 4605 mov r5, r0 iphdr_in = ip4_current_header(); 8009e78: 4b52 ldr r3, [pc, #328] @ (8009fc4 ) 8009e7a: 689e ldr r6, [r3, #8] hlen = IPH_HL_BYTES(iphdr_in); 8009e7c: 7834 ldrb r4, [r6, #0] 8009e7e: f004 040f and.w r4, r4, #15 8009e82: 00a4 lsls r4, r4, #2 if (hlen < IP_HLEN) { 8009e84: 2c13 cmp r4, #19 8009e86: d916 bls.n 8009eb6 8009e88: 460f mov r7, r1 if (p->len < sizeof(u16_t) * 2) { 8009e8a: 8943 ldrh r3, [r0, #10] 8009e8c: 2b03 cmp r3, #3 8009e8e: d912 bls.n 8009eb6 type = *((u8_t *)p->payload); 8009e90: 6843 ldr r3, [r0, #4] 8009e92: 781b ldrb r3, [r3, #0] switch (type) { 8009e94: 2b08 cmp r3, #8 8009e96: f040 8086 bne.w 8009fa6 if (ip4_addr_ismulticast(ip4_current_dest_addr())) { 8009e9a: 4b4a ldr r3, [pc, #296] @ (8009fc4 ) 8009e9c: 6958 ldr r0, [r3, #20] 8009e9e: f000 03f0 and.w r3, r0, #240 @ 0xf0 8009ea2: 2be0 cmp r3, #224 @ 0xe0 8009ea4: d01e beq.n 8009ee4 if (ip4_addr_isbroadcast(ip4_current_dest_addr(), ip_current_netif())) { 8009ea6: 4b47 ldr r3, [pc, #284] @ (8009fc4 ) 8009ea8: 6819 ldr r1, [r3, #0] 8009eaa: f000 fad2 bl 800a452 8009eae: b9c8 cbnz r0, 8009ee4 if (p->tot_len < sizeof(struct icmp_echo_hdr)) { 8009eb0: 892b ldrh r3, [r5, #8] 8009eb2: 2b07 cmp r3, #7 8009eb4: d805 bhi.n 8009ec2 pbuf_free(p); 8009eb6: 4628 mov r0, r5 8009eb8: f001 ff72 bl 800bda0 } 8009ebc: b004 add sp, #16 8009ebe: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} if (inet_chksum_pbuf(p) != 0) { 8009ec2: 4628 mov r0, r5 8009ec4: f000 f8ce bl 800a064 8009ec8: b980 cbnz r0, 8009eec if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 8009eca: f104 080e add.w r8, r4, #14 8009ece: 4641 mov r1, r8 8009ed0: 4628 mov r0, r5 8009ed2: f001 ff1a bl 800bd0a 8009ed6: 2800 cmp r0, #0 8009ed8: d03e beq.n 8009f58 u16_t alloc_len = (u16_t)(p->tot_len + hlen); 8009eda: 892b ldrh r3, [r5, #8] 8009edc: 1919 adds r1, r3, r4 8009ede: b289 uxth r1, r1 if (alloc_len < p->tot_len) { 8009ee0: 428b cmp r3, r1 8009ee2: d907 bls.n 8009ef4 pbuf_free(p); 8009ee4: 4628 mov r0, r5 8009ee6: f001 ff5b bl 800bda0 return; 8009eea: e7e7 b.n 8009ebc pbuf_free(p); 8009eec: 4628 mov r0, r5 8009eee: f001 ff57 bl 800bda0 return; 8009ef2: e7e3 b.n 8009ebc r = pbuf_alloc(PBUF_LINK, alloc_len, PBUF_RAM); 8009ef4: f44f 7220 mov.w r2, #640 @ 0x280 8009ef8: 200e movs r0, #14 8009efa: f001 ffb9 bl 800be70 if (r == NULL) { 8009efe: 4680 mov r8, r0 8009f00: 2800 cmp r0, #0 8009f02: d0ef beq.n 8009ee4 if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { 8009f04: 8942 ldrh r2, [r0, #10] 8009f06: f104 0308 add.w r3, r4, #8 8009f0a: 429a cmp r2, r3 8009f0c: d313 bcc.n 8009f36 MEMCPY(r->payload, iphdr_in, hlen); 8009f0e: 4622 mov r2, r4 8009f10: 4631 mov r1, r6 8009f12: 6840 ldr r0, [r0, #4] 8009f14: f009 fcb5 bl 8013882 if (pbuf_remove_header(r, hlen)) { 8009f18: 4621 mov r1, r4 8009f1a: 4640 mov r0, r8 8009f1c: f001 fefa bl 800bd14 8009f20: b960 cbnz r0, 8009f3c if (pbuf_copy(r, p) != ERR_OK) { 8009f22: 4629 mov r1, r5 8009f24: 4640 mov r0, r8 8009f26: f002 f929 bl 800c17c 8009f2a: b988 cbnz r0, 8009f50 pbuf_free(p); 8009f2c: 4628 mov r0, r5 8009f2e: f001 ff37 bl 800bda0 p = r; 8009f32: 4645 mov r5, r8 8009f34: e015 b.n 8009f62 pbuf_free(r); 8009f36: f001 ff33 bl 800bda0 goto icmperr; 8009f3a: e7d3 b.n 8009ee4 LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); 8009f3c: 4b22 ldr r3, [pc, #136] @ (8009fc8 ) 8009f3e: 22b6 movs r2, #182 @ 0xb6 8009f40: 4922 ldr r1, [pc, #136] @ (8009fcc ) 8009f42: 4823 ldr r0, [pc, #140] @ (8009fd0 ) 8009f44: f009 fa60 bl 8013408 pbuf_free(r); 8009f48: 4640 mov r0, r8 8009f4a: f001 ff29 bl 800bda0 goto icmperr; 8009f4e: e7c9 b.n 8009ee4 pbuf_free(r); 8009f50: 4640 mov r0, r8 8009f52: f001 ff25 bl 800bda0 goto icmperr; 8009f56: e7c5 b.n 8009ee4 if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 8009f58: 4641 mov r1, r8 8009f5a: 4628 mov r0, r5 8009f5c: f001 feda bl 800bd14 8009f60: bb28 cbnz r0, 8009fae iecho = (struct icmp_echo_hdr *)p->payload; 8009f62: 686e ldr r6, [r5, #4] if (pbuf_add_header(p, hlen)) { 8009f64: 4621 mov r1, r4 8009f66: 4628 mov r0, r5 8009f68: f001 fecf bl 800bd0a 8009f6c: b9d8 cbnz r0, 8009fa6 struct ip_hdr *iphdr = (struct ip_hdr *)p->payload; 8009f6e: 6869 ldr r1, [r5, #4] ip4_addr_copy(iphdr->src, *src); 8009f70: 4b14 ldr r3, [pc, #80] @ (8009fc4 ) 8009f72: 695a ldr r2, [r3, #20] 8009f74: 60ca str r2, [r1, #12] ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); 8009f76: 691b ldr r3, [r3, #16] 8009f78: 610b str r3, [r1, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 8009f7a: 2300 movs r3, #0 8009f7c: 7033 strb r3, [r6, #0] if (iecho->chksum > PP_HTONS(0xffffU - (ICMP_ECHO << 8))) { 8009f7e: 8873 ldrh r3, [r6, #2] 8009f80: f64f 72f7 movw r2, #65527 @ 0xfff7 8009f84: 4293 cmp r3, r2 8009f86: d919 bls.n 8009fbc iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1); 8009f88: 3309 adds r3, #9 8009f8a: 8073 strh r3, [r6, #2] IPH_TTL_SET(iphdr, ICMP_TTL); 8009f8c: 23ff movs r3, #255 @ 0xff 8009f8e: 720b strb r3, [r1, #8] IPH_CHKSUM_SET(iphdr, 0); 8009f90: 2200 movs r2, #0 8009f92: 728a strb r2, [r1, #10] 8009f94: 72ca strb r2, [r1, #11] ret = ip4_output_if(p, src, LWIP_IP_HDRINCL, 8009f96: 9702 str r7, [sp, #8] 8009f98: 2101 movs r1, #1 8009f9a: 9101 str r1, [sp, #4] 8009f9c: 9200 str r2, [sp, #0] 8009f9e: 490d ldr r1, [pc, #52] @ (8009fd4 ) 8009fa0: 4628 mov r0, r5 8009fa2: f000 fa41 bl 800a428 pbuf_free(p); 8009fa6: 4628 mov r0, r5 8009fa8: f001 fefa bl 800bda0 return; 8009fac: e786 b.n 8009ebc LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); 8009fae: 4b06 ldr r3, [pc, #24] @ (8009fc8 ) 8009fb0: 22c7 movs r2, #199 @ 0xc7 8009fb2: 4909 ldr r1, [pc, #36] @ (8009fd8 ) 8009fb4: 4806 ldr r0, [pc, #24] @ (8009fd0 ) 8009fb6: f009 fa27 bl 8013408 goto icmperr; 8009fba: e793 b.n 8009ee4 iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8)); 8009fbc: 3308 adds r3, #8 8009fbe: 8073 strh r3, [r6, #2] 8009fc0: e7e4 b.n 8009f8c 8009fc2: bf00 nop 8009fc4: 2401301c .word 0x2401301c 8009fc8: 080154c4 .word 0x080154c4 8009fcc: 08015554 .word 0x08015554 8009fd0: 080144e8 .word 0x080144e8 8009fd4: 24013030 .word 0x24013030 8009fd8: 0801558c .word 0x0801558c 08009fdc : { 8009fdc: b508 push {r3, lr} 8009fde: 460a mov r2, r1 icmp_send_response(p, ICMP_DUR, t); 8009fe0: 2103 movs r1, #3 8009fe2: f7ff fee9 bl 8009db8 } 8009fe6: bd08 pop {r3, pc} 08009fe8 : { 8009fe8: b508 push {r3, lr} 8009fea: 460a mov r2, r1 icmp_send_response(p, ICMP_TE, t); 8009fec: 210b movs r1, #11 8009fee: f7ff fee3 bl 8009db8 } 8009ff2: bd08 pop {r3, pc} 08009ff4 : * @param len length of data to be summed * @return host order (!) lwip checksum (non-inverted Internet sum) */ u16_t lwip_standard_chksum(const void *dataptr, int len) { 8009ff4: b410 push {r4} const u8_t *pb = (const u8_t *)dataptr; const u16_t *ps; u16_t t = 0; 8009ff6: f04f 0c00 mov.w ip, #0 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); 8009ffa: f000 0401 and.w r4, r0, #1 /* Get aligned to u16_t */ if (odd && len > 0) { 8009ffe: 460b mov r3, r1 800a000: 4561 cmp r1, ip 800a002: bfd4 ite le 800a004: 2200 movle r2, #0 800a006: f000 0201 andgt.w r2, r0, #1 800a00a: b122 cbz r2, 800a016 ((u8_t *)&t)[1] = *pb++; 800a00c: f810 2b01 ldrb.w r2, [r0], #1 800a010: f362 2c1f bfi ip, r2, #8, #24 len--; 800a014: 1e4b subs r3, r1, #1 u32_t sum = 0; 800a016: 2200 movs r2, #0 } /* Add the bulk of the data */ ps = (const u16_t *)(const void *)pb; while (len > 1) { 800a018: e003 b.n 800a022 sum += *ps++; 800a01a: f830 1b02 ldrh.w r1, [r0], #2 800a01e: 440a add r2, r1 len -= 2; 800a020: 3b02 subs r3, #2 while (len > 1) { 800a022: 2b01 cmp r3, #1 800a024: dcf9 bgt.n 800a01a } /* Consume left-over byte, if any */ if (len > 0) { 800a026: 2b00 cmp r3, #0 800a028: dd04 ble.n 800a034 ((u8_t *)&t)[0] = *(const u8_t *)ps; 800a02a: 7803 ldrb r3, [r0, #0] 800a02c: f363 0c07 bfi ip, r3, #0, #8 800a030: fa1f fc8c uxth.w ip, ip } /* Add end bytes */ sum += t; 800a034: 4494 add ip, r2 /* Fold 32-bit sum to 16 bits calling this twice is probably faster than if statements... */ sum = FOLD_U32T(sum); 800a036: fa1f f38c uxth.w r3, ip 800a03a: eb03 431c add.w r3, r3, ip, lsr #16 sum = FOLD_U32T(sum); 800a03e: b298 uxth r0, r3 800a040: eb00 4013 add.w r0, r0, r3, lsr #16 /* Swap if alignment was odd */ if (odd) { 800a044: b124 cbz r4, 800a050 sum = SWAP_BYTES_IN_WORD(sum); 800a046: 0203 lsls r3, r0, #8 800a048: b29b uxth r3, r3 800a04a: f3c0 2007 ubfx r0, r0, #8, #8 800a04e: 4318 orrs r0, r3 } return (u16_t)sum; } 800a050: b280 uxth r0, r0 800a052: f85d 4b04 ldr.w r4, [sp], #4 800a056: 4770 bx lr 0800a058 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(const void *dataptr, u16_t len) { 800a058: b508 push {r3, lr} return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len); 800a05a: f7ff ffcb bl 8009ff4 800a05e: 43c0 mvns r0, r0 } 800a060: b280 uxth r0, r0 800a062: bd08 pop {r3, pc} 0800a064 : * @param p pbuf chain over that the checksum should be calculated * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum_pbuf(struct pbuf *p) { 800a064: b5f8 push {r3, r4, r5, r6, r7, lr} 800a066: 4605 mov r5, r0 u32_t acc; struct pbuf *q; int swapped = 0; 800a068: 2700 movs r7, #0 acc = 0; 800a06a: 463c mov r4, r7 for (q = p; q != NULL; q = q->next) { 800a06c: e000 b.n 800a070 800a06e: 682d ldr r5, [r5, #0] 800a070: b19d cbz r5, 800a09a acc += LWIP_CHKSUM(q->payload, q->len); 800a072: 896e ldrh r6, [r5, #10] 800a074: 4631 mov r1, r6 800a076: 6868 ldr r0, [r5, #4] 800a078: f7ff ffbc bl 8009ff4 800a07c: 1903 adds r3, r0, r4 acc = FOLD_U32T(acc); 800a07e: b29c uxth r4, r3 800a080: eb04 4413 add.w r4, r4, r3, lsr #16 if (q->len % 2 != 0) { 800a084: f016 0f01 tst.w r6, #1 800a088: d0f1 beq.n 800a06e swapped = !swapped; 800a08a: f087 0701 eor.w r7, r7, #1 acc = SWAP_BYTES_IN_WORD(acc); 800a08e: 0223 lsls r3, r4, #8 800a090: b29b uxth r3, r3 800a092: f3c4 2407 ubfx r4, r4, #8, #8 800a096: 431c orrs r4, r3 800a098: e7e9 b.n 800a06e } } if (swapped) { 800a09a: b127 cbz r7, 800a0a6 acc = SWAP_BYTES_IN_WORD(acc); 800a09c: 0223 lsls r3, r4, #8 800a09e: b29b uxth r3, r3 800a0a0: f3c4 2407 ubfx r4, r4, #8, #8 800a0a4: 431c orrs r4, r3 } return (u16_t)~(acc & 0xffffUL); 800a0a6: 43e0 mvns r0, r4 } 800a0a8: b280 uxth r0, r0 800a0aa: bdf8 pop {r3, r4, r5, r6, r7, pc} 0800a0ac : * Initialize all modules. * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ void lwip_init(void) { 800a0ac: b508 push {r3, lr} #endif /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 800a0ae: f002 ffa7 bl 800d000 #endif /* !NO_SYS */ mem_init(); 800a0b2: f000 fffb bl 800b0ac memp_init(); 800a0b6: f001 fa7f bl 800b5b8 pbuf_init(); netif_init(); 800a0ba: f001 fbc5 bl 800b848 #endif /* LWIP_IPV4 */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 800a0be: f007 fbc5 bl 801184c #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 800a0c2: f003 f8d3 bl 800d26c #if PPP_SUPPORT ppp_init(); #endif #if LWIP_TIMERS sys_timeouts_init(); 800a0c6: f007 faef bl 80116a8 #endif /* LWIP_TIMERS */ } 800a0ca: bd08 pop {r3, pc} 0800a0cc : #endif /* IP_FORWARD */ /** Return true if the current input packet should be accepted on this netif */ static int ip4_input_accept(struct netif *netif) { 800a0cc: b508 push {r3, lr} ip4_addr_get_u32(ip4_current_dest_addr()) & ip4_addr_get_u32(netif_ip4_netmask(netif)), ip4_addr_get_u32(netif_ip4_addr(netif)) & ip4_addr_get_u32(netif_ip4_netmask(netif)), ip4_addr_get_u32(ip4_current_dest_addr()) & ~ip4_addr_get_u32(netif_ip4_netmask(netif)))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip4_addr_isany_val(*netif_ip4_addr(netif)))) { 800a0ce: f890 3031 ldrb.w r3, [r0, #49] @ 0x31 800a0d2: f013 0f01 tst.w r3, #1 800a0d6: d00d beq.n 800a0f4 800a0d8: 4601 mov r1, r0 800a0da: 6843 ldr r3, [r0, #4] 800a0dc: b163 cbz r3, 800a0f8 /* unicast to this interface address? */ if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 800a0de: 4a07 ldr r2, [pc, #28] @ (800a0fc ) 800a0e0: 6950 ldr r0, [r2, #20] 800a0e2: 4283 cmp r3, r0 800a0e4: d004 beq.n 800a0f0 /* or broadcast on this interface network address? */ ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) 800a0e6: f000 f9b4 bl 800a452 if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 800a0ea: b908 cbnz r0, 800a0f0 /* accept on this netif */ return 1; } #endif /* LWIP_AUTOIP */ } return 0; 800a0ec: 2000 movs r0, #0 800a0ee: e002 b.n 800a0f6 return 1; 800a0f0: 2001 movs r0, #1 800a0f2: e000 b.n 800a0f6 return 0; 800a0f4: 2000 movs r0, #0 } 800a0f6: bd08 pop {r3, pc} return 0; 800a0f8: 2000 movs r0, #0 800a0fa: e7fc b.n 800a0f6 800a0fc: 2401301c .word 0x2401301c 0800a100 : { 800a100: b538 push {r3, r4, r5, lr} 800a102: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 800a104: f7f9 fd02 bl 8003b0c NETIF_FOREACH(netif) { 800a108: 4b15 ldr r3, [pc, #84] @ (800a160 ) 800a10a: 6818 ldr r0, [r3, #0] 800a10c: e000 b.n 800a110 800a10e: 6800 ldr r0, [r0, #0] 800a110: b1b0 cbz r0, 800a140 if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif))) { 800a112: f890 3031 ldrb.w r3, [r0, #49] @ 0x31 800a116: f013 0f01 tst.w r3, #1 800a11a: d0f8 beq.n 800a10e 800a11c: f013 0f04 tst.w r3, #4 800a120: d0f5 beq.n 800a10e 800a122: 6842 ldr r2, [r0, #4] 800a124: 2a00 cmp r2, #0 800a126: d0f2 beq.n 800a10e if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { 800a128: 6821 ldr r1, [r4, #0] 800a12a: 404a eors r2, r1 800a12c: 6885 ldr r5, [r0, #8] 800a12e: 422a tst r2, r5 800a130: d015 beq.n 800a15e if (((netif->flags & NETIF_FLAG_BROADCAST) == 0) && ip4_addr_cmp(dest, netif_ip4_gw(netif))) { 800a132: f013 0f02 tst.w r3, #2 800a136: d1ea bne.n 800a10e 800a138: 68c3 ldr r3, [r0, #12] 800a13a: 4299 cmp r1, r3 800a13c: d1e7 bne.n 800a10e 800a13e: e00e b.n 800a15e if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 800a140: 4b08 ldr r3, [pc, #32] @ (800a164 ) 800a142: 681b ldr r3, [r3, #0] 800a144: b15b cbz r3, 800a15e 800a146: f893 2031 ldrb.w r2, [r3, #49] @ 0x31 800a14a: f002 0205 and.w r2, r2, #5 800a14e: 2a05 cmp r2, #5 800a150: d105 bne.n 800a15e ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 800a152: 685a ldr r2, [r3, #4] if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 800a154: b11a cbz r2, 800a15e ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 800a156: 7822 ldrb r2, [r4, #0] 800a158: 2a7f cmp r2, #127 @ 0x7f 800a15a: d000 beq.n 800a15e return netif_default; 800a15c: 4618 mov r0, r3 } 800a15e: bd38 pop {r3, r4, r5, pc} 800a160: 24019b80 .word 0x24019b80 800a164: 24019b7c .word 0x24019b7c 0800a168 : * @return ERR_OK if the packet was processed (could return ERR_* if it wasn't * processed, but currently always returns ERR_OK) */ err_t ip4_input(struct pbuf *p, struct netif *inp) { 800a168: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800a16c: 4604 mov r4, r0 800a16e: 460e mov r6, r1 #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING || LWIP_IGMP */ #if LWIP_RAW raw_input_state_t raw_status; #endif /* LWIP_RAW */ LWIP_ASSERT_CORE_LOCKED(); 800a170: f7f9 fccc bl 8003b0c IP_STATS_INC(ip.recv); MIB2_STATS_INC(mib2.ipinreceives); /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 800a174: 6867 ldr r7, [r4, #4] if (IPH_V(iphdr) != 4) { 800a176: 783b ldrb r3, [r7, #0] 800a178: 091a lsrs r2, r3, #4 800a17a: 2a04 cmp r2, #4 800a17c: d005 beq.n 800a18a LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IP packet dropped due to bad version number %"U16_F"\n", (u16_t)IPH_V(iphdr))); ip4_debug_print(p); pbuf_free(p); 800a17e: 4620 mov r0, r4 800a180: f001 fe0e bl 800bda0 ip_data.current_ip_header_tot_len = 0; ip4_addr_set_any(ip4_current_src_addr()); ip4_addr_set_any(ip4_current_dest_addr()); return ERR_OK; } 800a184: 2000 movs r0, #0 800a186: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} iphdr_hlen = IPH_HL_BYTES(iphdr); 800a18a: f003 030f and.w r3, r3, #15 800a18e: 009d lsls r5, r3, #2 iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); 800a190: 8878 ldrh r0, [r7, #2] 800a192: f7fd fe73 bl 8007e7c 800a196: 4680 mov r8, r0 if (iphdr_len < p->tot_len) { 800a198: 8923 ldrh r3, [r4, #8] 800a19a: 4283 cmp r3, r0 800a19c: d81b bhi.n 800a1d6 if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len) || (iphdr_hlen < IP_HLEN)) { 800a19e: 8963 ldrh r3, [r4, #10] 800a1a0: 42ab cmp r3, r5 800a1a2: d31d bcc.n 800a1e0 800a1a4: 8923 ldrh r3, [r4, #8] 800a1a6: 4543 cmp r3, r8 800a1a8: d31a bcc.n 800a1e0 800a1aa: 2d13 cmp r5, #19 800a1ac: d918 bls.n 800a1e0 ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); 800a1ae: 693b ldr r3, [r7, #16] 800a1b0: 4a5a ldr r2, [pc, #360] @ (800a31c ) 800a1b2: 6153 str r3, [r2, #20] ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); 800a1b4: 68f9 ldr r1, [r7, #12] 800a1b6: 6111 str r1, [r2, #16] if (ip4_addr_ismulticast(ip4_current_dest_addr())) { 800a1b8: f003 03f0 and.w r3, r3, #240 @ 0xf0 800a1bc: 2be0 cmp r3, #224 @ 0xe0 800a1be: d113 bne.n 800a1e8 if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { 800a1c0: f896 3031 ldrb.w r3, [r6, #49] @ 0x31 800a1c4: f013 0f01 tst.w r3, #1 800a1c8: d02c beq.n 800a224 800a1ca: 6873 ldr r3, [r6, #4] 800a1cc: 2b00 cmp r3, #0 800a1ce: d170 bne.n 800a2b2 netif = NULL; 800a1d0: f04f 0800 mov.w r8, #0 800a1d4: e028 b.n 800a228 pbuf_realloc(p, iphdr_len); 800a1d6: 4601 mov r1, r0 800a1d8: 4620 mov r0, r4 800a1da: f001 fef7 bl 800bfcc 800a1de: e7de b.n 800a19e pbuf_free(p); 800a1e0: 4620 mov r0, r4 800a1e2: f001 fddd bl 800bda0 return ERR_OK; 800a1e6: e7cd b.n 800a184 if (ip4_input_accept(inp)) { 800a1e8: 4630 mov r0, r6 800a1ea: f7ff ff6f bl 800a0cc 800a1ee: b9a0 cbnz r0, 800a21a if (!ip4_addr_isloopback(ip4_current_dest_addr())) 800a1f0: 4b4a ldr r3, [pc, #296] @ (800a31c ) 800a1f2: 7d1b ldrb r3, [r3, #20] 800a1f4: 2b7f cmp r3, #127 @ 0x7f 800a1f6: d052 beq.n 800a29e NETIF_FOREACH(netif) { 800a1f8: 4b49 ldr r3, [pc, #292] @ (800a320 ) 800a1fa: f8d3 8000 ldr.w r8, [r3] 800a1fe: e001 b.n 800a204 800a200: f8d8 8000 ldr.w r8, [r8] 800a204: f1b8 0f00 cmp.w r8, #0 800a208: d008 beq.n 800a21c if (netif == inp) { 800a20a: 4546 cmp r6, r8 800a20c: d0f8 beq.n 800a200 if (ip4_input_accept(netif)) { 800a20e: 4640 mov r0, r8 800a210: f7ff ff5c bl 800a0cc 800a214: 2800 cmp r0, #0 800a216: d0f3 beq.n 800a200 800a218: e000 b.n 800a21c netif = inp; 800a21a: 46b0 mov r8, r6 if (netif == NULL) { 800a21c: f1b8 0f00 cmp.w r8, #0 800a220: d105 bne.n 800a22e 800a222: e001 b.n 800a228 netif = NULL; 800a224: f04f 0800 mov.w r8, #0 if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { 800a228: 7a7b ldrb r3, [r7, #9] 800a22a: 2b11 cmp r3, #17 800a22c: d03a beq.n 800a2a4 && !ip4_addr_isany_val(*ip4_current_src_addr()) 800a22e: 4b3b ldr r3, [pc, #236] @ (800a31c ) 800a230: 6918 ldr r0, [r3, #16] 800a232: 2800 cmp r0, #0 800a234: d13f bne.n 800a2b6 if (netif == NULL) { 800a236: f1b8 0f00 cmp.w r8, #0 800a23a: d04a beq.n 800a2d2 if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 800a23c: 88fb ldrh r3, [r7, #6] 800a23e: f023 03c0 bic.w r3, r3, #192 @ 0xc0 800a242: b29b uxth r3, r3 800a244: b133 cbz r3, 800a254 p = ip4_reass(p); 800a246: 4620 mov r0, r4 800a248: f000 fc6a bl 800ab20 if (p == NULL) { 800a24c: 4604 mov r4, r0 800a24e: 2800 cmp r0, #0 800a250: d098 beq.n 800a184 iphdr = (const struct ip_hdr *)p->payload; 800a252: 6847 ldr r7, [r0, #4] ip_data.current_netif = netif; 800a254: 4a31 ldr r2, [pc, #196] @ (800a31c ) 800a256: f8c2 8000 str.w r8, [r2] ip_data.current_input_netif = inp; 800a25a: 6056 str r6, [r2, #4] ip_data.current_ip4_header = iphdr; 800a25c: 6097 str r7, [r2, #8] ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr); 800a25e: 783b ldrb r3, [r7, #0] 800a260: f003 030f and.w r3, r3, #15 800a264: 009b lsls r3, r3, #2 800a266: 8193 strh r3, [r2, #12] pbuf_remove_header(p, iphdr_hlen); /* Move to payload, no check necessary. */ 800a268: 4629 mov r1, r5 800a26a: 4620 mov r0, r4 800a26c: f001 fd52 bl 800bd14 switch (IPH_PROTO(iphdr)) { 800a270: 7a7b ldrb r3, [r7, #9] 800a272: 2b06 cmp r3, #6 800a274: d03e beq.n 800a2f4 800a276: 2b11 cmp r3, #17 800a278: d02f beq.n 800a2da 800a27a: 2b01 cmp r3, #1 800a27c: d03f beq.n 800a2fe if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && 800a27e: 4641 mov r1, r8 800a280: 4b26 ldr r3, [pc, #152] @ (800a31c ) 800a282: 6958 ldr r0, [r3, #20] 800a284: f000 f8e5 bl 800a452 800a288: b928 cbnz r0, 800a296 !ip4_addr_ismulticast(ip4_current_dest_addr())) { 800a28a: 4b24 ldr r3, [pc, #144] @ (800a31c ) 800a28c: 695b ldr r3, [r3, #20] 800a28e: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && 800a292: 2be0 cmp r3, #224 @ 0xe0 800a294: d138 bne.n 800a308 pbuf_free(p); 800a296: 4620 mov r0, r4 800a298: f001 fd82 bl 800bda0 break; 800a29c: e021 b.n 800a2e2 netif = NULL; 800a29e: f04f 0800 mov.w r8, #0 800a2a2: e7c1 b.n 800a228 const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen); 800a2a4: 197b adds r3, r7, r5 if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { 800a2a6: 885b ldrh r3, [r3, #2] 800a2a8: f5b3 4f88 cmp.w r3, #17408 @ 0x4400 800a2ac: d1bf bne.n 800a22e netif = inp; 800a2ae: 46b0 mov r8, r6 800a2b0: e7c1 b.n 800a236 netif = inp; 800a2b2: 46b0 mov r8, r6 800a2b4: e7bb b.n 800a22e if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 800a2b6: 4631 mov r1, r6 800a2b8: f000 f8cb bl 800a452 800a2bc: b928 cbnz r0, 800a2ca (ip4_addr_ismulticast(ip4_current_src_addr()))) { 800a2be: 4b17 ldr r3, [pc, #92] @ (800a31c ) 800a2c0: 691b ldr r3, [r3, #16] 800a2c2: f003 03f0 and.w r3, r3, #240 @ 0xf0 if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 800a2c6: 2be0 cmp r3, #224 @ 0xe0 800a2c8: d1b5 bne.n 800a236 pbuf_free(p); 800a2ca: 4620 mov r0, r4 800a2cc: f001 fd68 bl 800bda0 return ERR_OK; 800a2d0: e758 b.n 800a184 pbuf_free(p); 800a2d2: 4620 mov r0, r4 800a2d4: f001 fd64 bl 800bda0 return ERR_OK; 800a2d8: e754 b.n 800a184 udp_input(p, inp); 800a2da: 4631 mov r1, r6 800a2dc: 4620 mov r0, r4 800a2de: f007 fac1 bl 8011864 ip_data.current_netif = NULL; 800a2e2: 4b0e ldr r3, [pc, #56] @ (800a31c ) 800a2e4: 2200 movs r2, #0 800a2e6: 601a str r2, [r3, #0] ip_data.current_input_netif = NULL; 800a2e8: 605a str r2, [r3, #4] ip_data.current_ip4_header = NULL; 800a2ea: 609a str r2, [r3, #8] ip_data.current_ip_header_tot_len = 0; 800a2ec: 819a strh r2, [r3, #12] ip4_addr_set_any(ip4_current_src_addr()); 800a2ee: 611a str r2, [r3, #16] ip4_addr_set_any(ip4_current_dest_addr()); 800a2f0: 615a str r2, [r3, #20] return ERR_OK; 800a2f2: e747 b.n 800a184 tcp_input(p, inp); 800a2f4: 4631 mov r1, r6 800a2f6: 4620 mov r0, r4 800a2f8: f005 fa36 bl 800f768 break; 800a2fc: e7f1 b.n 800a2e2 icmp_input(p, inp); 800a2fe: 4631 mov r1, r6 800a300: 4620 mov r0, r4 800a302: f7ff fdb5 bl 8009e70 break; 800a306: e7ec b.n 800a2e2 pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */ 800a308: 4629 mov r1, r5 800a30a: 4620 mov r0, r4 800a30c: f001 fd42 bl 800bd94 icmp_dest_unreach(p, ICMP_DUR_PROTO); 800a310: 2102 movs r1, #2 800a312: 4620 mov r0, r4 800a314: f7ff fe62 bl 8009fdc 800a318: e7bd b.n 800a296 800a31a: bf00 nop 800a31c: 2401301c .word 0x2401301c 800a320: 24019b80 .word 0x24019b80 0800a324 : */ err_t ip4_output_if_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif) { 800a324: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 800a328: b083 sub sp, #12 800a32a: 4604 mov r4, r0 800a32c: 460f mov r7, r1 800a32e: 4616 mov r6, r2 800a330: 4699 mov r9, r3 800a332: f8dd 8030 ldr.w r8, [sp, #48] @ 0x30 ip4_addr_t dest_addr; #if CHECKSUM_GEN_IP_INLINE u32_t chk_sum = 0; #endif /* CHECKSUM_GEN_IP_INLINE */ LWIP_ASSERT_CORE_LOCKED(); 800a336: f7f9 fbe9 bl 8003b0c LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); 800a33a: 7ba2 ldrb r2, [r4, #14] 800a33c: 2a01 cmp r2, #1 800a33e: d13f bne.n 800a3c0 MIB2_STATS_INC(mib2.ipoutrequests); /* Should the IP header be generated or is it already included in p? */ if (dest != LWIP_IP_HDRINCL) { 800a340: 2e00 cmp r6, #0 800a342: d051 beq.n 800a3e8 } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_add_header(p, IP_HLEN)) { 800a344: 2114 movs r1, #20 800a346: 4620 mov r0, r4 800a348: f001 fcdf bl 800bd0a 800a34c: 2800 cmp r0, #0 800a34e: d159 bne.n 800a404 IP_STATS_INC(ip.err); MIB2_STATS_INC(mib2.ipoutdiscards); return ERR_BUF; } iphdr = (struct ip_hdr *)p->payload; 800a350: 6865 ldr r5, [r4, #4] LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", 800a352: 8963 ldrh r3, [r4, #10] 800a354: 2b13 cmp r3, #19 800a356: d93b bls.n 800a3d0 (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); 800a358: f885 9008 strb.w r9, [r5, #8] IPH_PROTO_SET(iphdr, proto); 800a35c: f89d 302c ldrb.w r3, [sp, #44] @ 0x2c 800a360: 726b strb r3, [r5, #9] #if CHECKSUM_GEN_IP_INLINE chk_sum += PP_NTOHS(proto | (ttl << 8)); #endif /* CHECKSUM_GEN_IP_INLINE */ /* dest cannot be NULL here */ ip4_addr_copy(iphdr->dest, *dest); 800a362: 6833 ldr r3, [r6, #0] 800a364: 612b str r3, [r5, #16] #if CHECKSUM_GEN_IP_INLINE chk_sum += ip4_addr_get_u32(&iphdr->dest) & 0xFFFF; chk_sum += ip4_addr_get_u32(&iphdr->dest) >> 16; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_VHL_SET(iphdr, 4, ip_hlen / 4); 800a366: 2345 movs r3, #69 @ 0x45 800a368: 702b strb r3, [r5, #0] IPH_TOS_SET(iphdr, tos); 800a36a: f89d 3028 ldrb.w r3, [sp, #40] @ 0x28 800a36e: 706b strb r3, [r5, #1] #if CHECKSUM_GEN_IP_INLINE chk_sum += PP_NTOHS(tos | (iphdr->_v_hl << 8)); #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_LEN_SET(iphdr, lwip_htons(p->tot_len)); 800a370: 8920 ldrh r0, [r4, #8] 800a372: f7fd fd83 bl 8007e7c 800a376: 8068 strh r0, [r5, #2] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 800a378: 2300 movs r3, #0 800a37a: 71ab strb r3, [r5, #6] 800a37c: 71eb strb r3, [r5, #7] IPH_ID_SET(iphdr, lwip_htons(ip_id)); 800a37e: f8df 90a4 ldr.w r9, [pc, #164] @ 800a424 800a382: f8b9 0000 ldrh.w r0, [r9] 800a386: f7fd fd79 bl 8007e7c 800a38a: 80a8 strh r0, [r5, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 800a38c: f8b9 3000 ldrh.w r3, [r9] 800a390: 3301 adds r3, #1 800a392: f8a9 3000 strh.w r3, [r9] if (src == NULL) { 800a396: b31f cbz r7, 800a3e0 ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); } else { /* src cannot be NULL here */ ip4_addr_copy(iphdr->src, *src); 800a398: 683b ldr r3, [r7, #0] 800a39a: 60eb str r3, [r5, #12] else { IPH_CHKSUM_SET(iphdr, 0); } #endif /* LWIP_CHECKSUM_CTRL_PER_NETIF*/ #else /* CHECKSUM_GEN_IP_INLINE */ IPH_CHKSUM_SET(iphdr, 0); 800a39c: 2300 movs r3, #0 800a39e: 72ab strb r3, [r5, #10] 800a3a0: 72eb strb r3, [r5, #11] } #endif /* LWIP_MULTICAST_TX_OPTIONS */ #endif /* ENABLE_LOOPBACK */ #if IP_FRAG /* don't fragment if interface has mtu set to 0 [loopif] */ if (netif->mtu && (p->tot_len > netif->mtu)) { 800a3a2: f8b8 3028 ldrh.w r3, [r8, #40] @ 0x28 800a3a6: b113 cbz r3, 800a3ae 800a3a8: 8922 ldrh r2, [r4, #8] 800a3aa: 4293 cmp r3, r2 800a3ac: d324 bcc.n 800a3f8 return ip4_frag(p, netif, dest); } #endif /* IP_FRAG */ LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n")); return netif->output(netif, p, dest); 800a3ae: f8d8 3014 ldr.w r3, [r8, #20] 800a3b2: 4632 mov r2, r6 800a3b4: 4621 mov r1, r4 800a3b6: 4640 mov r0, r8 800a3b8: 4798 blx r3 } 800a3ba: b003 add sp, #12 800a3bc: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); 800a3c0: 4b13 ldr r3, [pc, #76] @ (800a410 ) 800a3c2: f44f 7255 mov.w r2, #852 @ 0x354 800a3c6: 4913 ldr r1, [pc, #76] @ (800a414 ) 800a3c8: 4813 ldr r0, [pc, #76] @ (800a418 ) 800a3ca: f009 f81d bl 8013408 800a3ce: e7b7 b.n 800a340 LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", 800a3d0: 4b0f ldr r3, [pc, #60] @ (800a410 ) 800a3d2: f44f 7262 mov.w r2, #904 @ 0x388 800a3d6: 4911 ldr r1, [pc, #68] @ (800a41c ) 800a3d8: 480f ldr r0, [pc, #60] @ (800a418 ) 800a3da: f009 f815 bl 8013408 800a3de: e7bb b.n 800a358 ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); 800a3e0: 4b0f ldr r3, [pc, #60] @ (800a420 ) 800a3e2: 681b ldr r3, [r3, #0] 800a3e4: 60eb str r3, [r5, #12] 800a3e6: e7d9 b.n 800a39c if (p->len < IP_HLEN) { 800a3e8: 8963 ldrh r3, [r4, #10] 800a3ea: 2b13 cmp r3, #19 800a3ec: d90d bls.n 800a40a iphdr = (struct ip_hdr *)p->payload; 800a3ee: 6863 ldr r3, [r4, #4] ip4_addr_copy(dest_addr, iphdr->dest); 800a3f0: 691b ldr r3, [r3, #16] 800a3f2: 9301 str r3, [sp, #4] dest = &dest_addr; 800a3f4: ae01 add r6, sp, #4 800a3f6: e7d4 b.n 800a3a2 return ip4_frag(p, netif, dest); 800a3f8: 4632 mov r2, r6 800a3fa: 4641 mov r1, r8 800a3fc: 4620 mov r0, r4 800a3fe: f000 fc97 bl 800ad30 800a402: e7da b.n 800a3ba return ERR_BUF; 800a404: f06f 0001 mvn.w r0, #1 800a408: e7d7 b.n 800a3ba return ERR_BUF; 800a40a: f06f 0001 mvn.w r0, #1 800a40e: e7d4 b.n 800a3ba 800a410: 080155c0 .word 0x080155c0 800a414: 08015624 .word 0x08015624 800a418: 080144e8 .word 0x080144e8 800a41c: 08015630 .word 0x08015630 800a420: 080156d8 .word 0x080156d8 800a424: 24013034 .word 0x24013034 0800a428 : { 800a428: b510 push {r4, lr} 800a42a: b084 sub sp, #16 800a42c: 9c08 ldr r4, [sp, #32] if (dest != LWIP_IP_HDRINCL) { 800a42e: 4694 mov ip, r2 800a430: b11a cbz r2, 800a43a if (ip4_addr_isany(src)) { 800a432: b109 cbz r1, 800a438 800a434: 680a ldr r2, [r1, #0] 800a436: b902 cbnz r2, 800a43a src_used = netif_ip4_addr(netif); 800a438: 1d21 adds r1, r4, #4 return ip4_output_if_src(p, src_used, dest, ttl, tos, proto, netif); 800a43a: 9402 str r4, [sp, #8] 800a43c: f89d 201c ldrb.w r2, [sp, #28] 800a440: 9201 str r2, [sp, #4] 800a442: f89d 2018 ldrb.w r2, [sp, #24] 800a446: 9200 str r2, [sp, #0] 800a448: 4662 mov r2, ip 800a44a: f7ff ff6b bl 800a324 } 800a44e: b004 add sp, #16 800a450: bd10 pop {r4, pc} 0800a452 : * @param netif the network interface against which the address is checked * @return returns non-zero if the address is a broadcast address */ u8_t ip4_addr_isbroadcast_u32(u32_t addr, const struct netif *netif) { 800a452: 4603 mov r3, r0 ip4_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 800a454: 1e42 subs r2, r0, #1 800a456: f112 0f03 cmn.w r2, #3 800a45a: d812 bhi.n 800a482 (addr == IPADDR_ANY)) { return 1; /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 800a45c: f891 0031 ldrb.w r0, [r1, #49] @ 0x31 800a460: f010 0002 ands.w r0, r0, #2 800a464: d014 beq.n 800a490 /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { 800a466: 684a ldr r2, [r1, #4] 800a468: 429a cmp r2, r3 800a46a: d00c beq.n 800a486 return 0; /* on the same (sub) network... */ } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) 800a46c: 6889 ldr r1, [r1, #8] 800a46e: 405a eors r2, r3 800a470: 420a tst r2, r1 800a472: d10a bne.n 800a48a /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 800a474: 43ca mvns r2, r1 800a476: ea23 0301 bic.w r3, r3, r1 800a47a: 429a cmp r2, r3 800a47c: d007 beq.n 800a48e (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { /* => network broadcast address */ return 1; } else { return 0; 800a47e: 2000 movs r0, #0 800a480: 4770 bx lr return 1; 800a482: 2001 movs r0, #1 800a484: 4770 bx lr return 0; 800a486: 2000 movs r0, #0 800a488: 4770 bx lr return 0; 800a48a: 2000 movs r0, #0 800a48c: 4770 bx lr return 1; 800a48e: 2001 movs r0, #1 } } 800a490: 4770 bx lr ... 0800a494 : * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ip4addr_aton(const char *cp, ip4_addr_t *addr) { 800a494: b530 push {r4, r5, lr} 800a496: b085 sub sp, #20 800a498: 460d mov r5, r1 u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 800a49a: 7803 ldrb r3, [r0, #0] u32_t *pp = parts; 800a49c: 46ec mov ip, sp 800a49e: e035 b.n 800a50c return 0; } val = 0; base = 10; if (c == '0') { c = *++cp; 800a4a0: 1c42 adds r2, r0, #1 800a4a2: 7843 ldrb r3, [r0, #1] if (c == 'x' || c == 'X') { 800a4a4: 2b58 cmp r3, #88 @ 0x58 800a4a6: bf18 it ne 800a4a8: 2b78 cmpne r3, #120 @ 0x78 800a4aa: d103 bne.n 800a4b4 base = 16; c = *++cp; 800a4ac: 7883 ldrb r3, [r0, #2] 800a4ae: 3002 adds r0, #2 base = 16; 800a4b0: 2110 movs r1, #16 800a4b2: e033 b.n 800a51c c = *++cp; 800a4b4: 4610 mov r0, r2 } else { base = 8; 800a4b6: 2108 movs r1, #8 800a4b8: e030 b.n 800a51c } } for (;;) { if (lwip_isdigit(c)) { val = (val * base) + (u32_t)(c - '0'); 800a4ba: fb04 3301 mla r3, r4, r1, r3 800a4be: f1a3 0430 sub.w r4, r3, #48 @ 0x30 c = *++cp; 800a4c2: f810 3f01 ldrb.w r3, [r0, #1]! if (lwip_isdigit(c)) { 800a4c6: 4a47 ldr r2, [pc, #284] @ (800a5e4 ) 800a4c8: 5cd2 ldrb r2, [r2, r3] 800a4ca: f012 0f04 tst.w r2, #4 800a4ce: d1f4 bne.n 800a4ba } else if (base == 16 && lwip_isxdigit(c)) { 800a4d0: 2910 cmp r1, #16 800a4d2: d110 bne.n 800a4f6 800a4d4: f012 0f44 tst.w r2, #68 @ 0x44 800a4d8: d00d beq.n 800a4f6 val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A')); 800a4da: 0124 lsls r4, r4, #4 800a4dc: 330a adds r3, #10 800a4de: f002 0203 and.w r2, r2, #3 800a4e2: 2a02 cmp r2, #2 800a4e4: d005 beq.n 800a4f2 800a4e6: 2241 movs r2, #65 @ 0x41 800a4e8: 1a9b subs r3, r3, r2 800a4ea: 431c orrs r4, r3 c = *++cp; 800a4ec: f810 3f01 ldrb.w r3, [r0, #1]! 800a4f0: e7e9 b.n 800a4c6 val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A')); 800a4f2: 2261 movs r2, #97 @ 0x61 800a4f4: e7f8 b.n 800a4e8 } else { break; } } if (c == '.') { 800a4f6: 2b2e cmp r3, #46 @ 0x2e 800a4f8: d112 bne.n 800a520 * Internet format: * a.b.c.d * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ if (pp >= parts + 3) { 800a4fa: ab03 add r3, sp, #12 800a4fc: 459c cmp ip, r3 800a4fe: d258 bcs.n 800a5b2 return 0; } *pp++ = val; 800a500: 4662 mov r2, ip 800a502: f842 4b04 str.w r4, [r2], #4 c = *++cp; 800a506: 7843 ldrb r3, [r0, #1] *pp++ = val; 800a508: 4694 mov ip, r2 c = *++cp; 800a50a: 3001 adds r0, #1 if (!lwip_isdigit(c)) { 800a50c: 4a35 ldr r2, [pc, #212] @ (800a5e4 ) 800a50e: 5cd2 ldrb r2, [r2, r3] 800a510: f012 0f04 tst.w r2, #4 800a514: d04b beq.n 800a5ae if (c == '0') { 800a516: 2b30 cmp r3, #48 @ 0x30 800a518: d0c2 beq.n 800a4a0 base = 10; 800a51a: 210a movs r1, #10 base = 8; 800a51c: 2400 movs r4, #0 800a51e: e7d2 b.n 800a4c6 } } /* * Check for trailing characters. */ if (c != '\0' && !lwip_isspace(c)) { 800a520: b113 cbz r3, 800a528 800a522: f012 0f08 tst.w r2, #8 800a526: d047 beq.n 800a5b8 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 800a528: 466b mov r3, sp 800a52a: ebac 0003 sub.w r0, ip, r3 800a52e: 1080 asrs r0, r0, #2 800a530: 3001 adds r0, #1 800a532: 2804 cmp r0, #4 800a534: d834 bhi.n 800a5a0 800a536: e8df f000 tbb [pc, r0] 800a53a: 0b3d .short 0x0b3d 800a53c: 1303 .short 0x1303 800a53e: 21 .byte 0x21 800a53f: 00 .byte 0x00 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 800a540: f1b4 7f80 cmp.w r4, #16777216 @ 0x1000000 800a544: d23a bcs.n 800a5bc return 0; } if (parts[0] > 0xff) { 800a546: 9b00 ldr r3, [sp, #0] 800a548: 2bff cmp r3, #255 @ 0xff 800a54a: d839 bhi.n 800a5c0 return 0; } val |= parts[0] << 24; 800a54c: ea44 6403 orr.w r4, r4, r3, lsl #24 break; default: LWIP_ASSERT("unhandled", 0); break; } if (addr) { 800a550: 2d00 cmp r5, #0 800a552: d045 beq.n 800a5e0 ip4_addr_set_u32(addr, lwip_htonl(val)); 800a554: 4620 mov r0, r4 800a556: f7fd fc96 bl 8007e86 800a55a: 6028 str r0, [r5, #0] } return 1; 800a55c: 2001 movs r0, #1 800a55e: e029 b.n 800a5b4 if (val > 0xffff) { 800a560: f5b4 3f80 cmp.w r4, #65536 @ 0x10000 800a564: d22e bcs.n 800a5c4 if ((parts[0] > 0xff) || (parts[1] > 0xff)) { 800a566: 9a00 ldr r2, [sp, #0] 800a568: 2aff cmp r2, #255 @ 0xff 800a56a: d82d bhi.n 800a5c8 800a56c: 9b01 ldr r3, [sp, #4] 800a56e: 2bff cmp r3, #255 @ 0xff 800a570: d82c bhi.n 800a5cc val |= (parts[0] << 24) | (parts[1] << 16); 800a572: 041b lsls r3, r3, #16 800a574: ea43 6302 orr.w r3, r3, r2, lsl #24 800a578: 431c orrs r4, r3 break; 800a57a: e7e9 b.n 800a550 if (val > 0xff) { 800a57c: 2cff cmp r4, #255 @ 0xff 800a57e: d827 bhi.n 800a5d0 if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { 800a580: 9900 ldr r1, [sp, #0] 800a582: 29ff cmp r1, #255 @ 0xff 800a584: d826 bhi.n 800a5d4 800a586: 9b01 ldr r3, [sp, #4] 800a588: 2bff cmp r3, #255 @ 0xff 800a58a: d825 bhi.n 800a5d8 800a58c: 9a02 ldr r2, [sp, #8] 800a58e: 2aff cmp r2, #255 @ 0xff 800a590: d824 bhi.n 800a5dc val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 800a592: 041b lsls r3, r3, #16 800a594: ea43 6301 orr.w r3, r3, r1, lsl #24 800a598: ea43 2302 orr.w r3, r3, r2, lsl #8 800a59c: 431c orrs r4, r3 break; 800a59e: e7d7 b.n 800a550 LWIP_ASSERT("unhandled", 0); 800a5a0: 4b11 ldr r3, [pc, #68] @ (800a5e8 ) 800a5a2: 22f9 movs r2, #249 @ 0xf9 800a5a4: 4911 ldr r1, [pc, #68] @ (800a5ec ) 800a5a6: 4812 ldr r0, [pc, #72] @ (800a5f0 ) 800a5a8: f008 ff2e bl 8013408 break; 800a5ac: e7d0 b.n 800a550 return 0; 800a5ae: 2000 movs r0, #0 800a5b0: e000 b.n 800a5b4 return 0; 800a5b2: 2000 movs r0, #0 } 800a5b4: b005 add sp, #20 800a5b6: bd30 pop {r4, r5, pc} return 0; 800a5b8: 2000 movs r0, #0 800a5ba: e7fb b.n 800a5b4 return 0; 800a5bc: 2000 movs r0, #0 800a5be: e7f9 b.n 800a5b4 return 0; 800a5c0: 2000 movs r0, #0 800a5c2: e7f7 b.n 800a5b4 return 0; 800a5c4: 2000 movs r0, #0 800a5c6: e7f5 b.n 800a5b4 return 0; 800a5c8: 2000 movs r0, #0 800a5ca: e7f3 b.n 800a5b4 800a5cc: 2000 movs r0, #0 800a5ce: e7f1 b.n 800a5b4 return 0; 800a5d0: 2000 movs r0, #0 800a5d2: e7ef b.n 800a5b4 return 0; 800a5d4: 2000 movs r0, #0 800a5d6: e7ed b.n 800a5b4 800a5d8: 2000 movs r0, #0 800a5da: e7eb b.n 800a5b4 800a5dc: 2000 movs r0, #0 800a5de: e7e9 b.n 800a5b4 return 1; 800a5e0: 2001 movs r0, #1 800a5e2: e7e7 b.n 800a5b4 800a5e4: 08017f4b .word 0x08017f4b 800a5e8: 08015660 .word 0x08015660 800a5ec: 080156c8 .word 0x080156c8 800a5f0: 080144e8 .word 0x080144e8 0800a5f4 : { 800a5f4: b500 push {lr} 800a5f6: b083 sub sp, #12 if (ip4addr_aton(cp, &val)) { 800a5f8: a901 add r1, sp, #4 800a5fa: f7ff ff4b bl 800a494 800a5fe: b920 cbnz r0, 800a60a return (IPADDR_NONE); 800a600: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } 800a604: b003 add sp, #12 800a606: f85d fb04 ldr.w pc, [sp], #4 return ip4_addr_get_u32(&val); 800a60a: 9801 ldr r0, [sp, #4] 800a60c: e7fa b.n 800a604 ... 0800a610 : * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char * ip4addr_ntoa_r(const ip4_addr_t *addr, char *buf, int buflen) { 800a610: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800a614: b082 sub sp, #8 800a616: 4688 mov r8, r1 u8_t rem; u8_t n; u8_t i; int len = 0; s_addr = ip4_addr_get_u32(addr); 800a618: 6803 ldr r3, [r0, #0] 800a61a: 9301 str r3, [sp, #4] rp = buf; 800a61c: 460c mov r4, r1 int len = 0; 800a61e: 2600 movs r6, #0 ap = (u8_t *)&s_addr; for (n = 0; n < 4; n++) { 800a620: 4630 mov r0, r6 ap = (u8_t *)&s_addr; 800a622: af01 add r7, sp, #4 for (n = 0; n < 4; n++) { 800a624: 2803 cmp r0, #3 800a626: d83b bhi.n 800a6a0 i = 0; 800a628: 2300 movs r3, #0 do { rem = *ap % (u8_t)10; 800a62a: 783d ldrb r5, [r7, #0] 800a62c: 4920 ldr r1, [pc, #128] @ (800a6b0 ) 800a62e: fba1 ce05 umull ip, lr, r1, r5 800a632: ea4f 0ede mov.w lr, lr, lsr #3 800a636: eb0e 0c8e add.w ip, lr, lr, lsl #2 800a63a: eba5 0c4c sub.w ip, r5, ip, lsl #1 800a63e: fa5f fc8c uxtb.w ip, ip *ap /= (u8_t)10; 800a642: f887 e000 strb.w lr, [r7] inv[i++] = (char)('0' + rem); 800a646: 469e mov lr, r3 800a648: 3301 adds r3, #1 800a64a: b2db uxtb r3, r3 800a64c: f10c 0c30 add.w ip, ip, #48 @ 0x30 800a650: f10e 0108 add.w r1, lr, #8 800a654: eb0d 0e01 add.w lr, sp, r1 800a658: f80e cc08 strb.w ip, [lr, #-8] } while (*ap); 800a65c: 2d09 cmp r5, #9 800a65e: d8e4 bhi.n 800a62a 800a660: e009 b.n 800a676 while (i--) { if (len++ >= buflen) { return NULL; } *rp++ = inv[i]; 800a662: f105 0108 add.w r1, r5, #8 800a666: eb0d 0601 add.w r6, sp, r1 800a66a: f816 6c08 ldrb.w r6, [r6, #-8] 800a66e: f804 6b01 strb.w r6, [r4], #1 if (len++ >= buflen) { 800a672: 461e mov r6, r3 while (i--) { 800a674: 462b mov r3, r5 800a676: 1e5d subs r5, r3, #1 800a678: b2ed uxtb r5, r5 800a67a: b133 cbz r3, 800a68a if (len++ >= buflen) { 800a67c: 1c73 adds r3, r6, #1 800a67e: 4296 cmp r6, r2 800a680: dbef blt.n 800a662 return NULL; 800a682: 2000 movs r0, #0 *rp++ = '.'; ap++; } *--rp = 0; return buf; } 800a684: b002 add sp, #8 800a686: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} if (len++ >= buflen) { 800a68a: 1c73 adds r3, r6, #1 800a68c: 4296 cmp r6, r2 800a68e: da0c bge.n 800a6aa *rp++ = '.'; 800a690: 252e movs r5, #46 @ 0x2e 800a692: f804 5b01 strb.w r5, [r4], #1 ap++; 800a696: 3701 adds r7, #1 for (n = 0; n < 4; n++) { 800a698: 3001 adds r0, #1 800a69a: b2c0 uxtb r0, r0 if (len++ >= buflen) { 800a69c: 461e mov r6, r3 800a69e: e7c1 b.n 800a624 *--rp = 0; 800a6a0: 2300 movs r3, #0 800a6a2: f804 3c01 strb.w r3, [r4, #-1] return buf; 800a6a6: 4640 mov r0, r8 800a6a8: e7ec b.n 800a684 return NULL; 800a6aa: 2000 movs r0, #0 800a6ac: e7ea b.n 800a684 800a6ae: bf00 nop 800a6b0: cccccccd .word 0xcccccccd 0800a6b4 : { 800a6b4: b508 push {r3, lr} return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX); 800a6b6: 2210 movs r2, #16 800a6b8: 4901 ldr r1, [pc, #4] @ (800a6c0 ) 800a6ba: f7ff ffa9 bl 800a610 } 800a6be: bd08 pop {r3, pc} 800a6c0: 24013038 .word 0x24013038 0800a6c4 : * Dequeues a datagram from the datagram queue. Doesn't deallocate the pbufs. * @param ipr points to the queue entry to dequeue */ static void ip_reass_dequeue_datagram(struct ip_reassdata *ipr, struct ip_reassdata *prev) { 800a6c4: b538 push {r3, r4, r5, lr} 800a6c6: 4604 mov r4, r0 /* dequeue the reass struct */ if (reassdatagrams == ipr) { 800a6c8: 4b0c ldr r3, [pc, #48] @ (800a6fc ) 800a6ca: 681b ldr r3, [r3, #0] 800a6cc: 4283 cmp r3, r0 800a6ce: d008 beq.n 800a6e2 800a6d0: 460d mov r5, r1 /* it was the first in the list */ reassdatagrams = ipr->next; } else { /* it wasn't the first, so it must have a valid 'prev' */ LWIP_ASSERT("sanity check linked list", prev != NULL); 800a6d2: b151 cbz r1, 800a6ea prev->next = ipr->next; 800a6d4: 6823 ldr r3, [r4, #0] 800a6d6: 602b str r3, [r5, #0] } /* now we can free the ip_reassdata struct */ memp_free(MEMP_REASSDATA, ipr); 800a6d8: 4621 mov r1, r4 800a6da: 2004 movs r0, #4 800a6dc: f000 ffc8 bl 800b670 } 800a6e0: bd38 pop {r3, r4, r5, pc} reassdatagrams = ipr->next; 800a6e2: 6802 ldr r2, [r0, #0] 800a6e4: 4b05 ldr r3, [pc, #20] @ (800a6fc ) 800a6e6: 601a str r2, [r3, #0] 800a6e8: e7f6 b.n 800a6d8 LWIP_ASSERT("sanity check linked list", prev != NULL); 800a6ea: 4b05 ldr r3, [pc, #20] @ (800a700 ) 800a6ec: f240 1245 movw r2, #325 @ 0x145 800a6f0: 4904 ldr r1, [pc, #16] @ (800a704 ) 800a6f2: 4805 ldr r0, [pc, #20] @ (800a708 ) 800a6f4: f008 fe88 bl 8013408 800a6f8: e7ec b.n 800a6d4 800a6fa: bf00 nop 800a6fc: 2401304c .word 0x2401304c 800a700: 080156dc .word 0x080156dc 800a704: 08015744 .word 0x08015744 800a708: 080144e8 .word 0x080144e8 0800a70c : { 800a70c: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 800a710: 4680 mov r8, r0 800a712: 4689 mov r9, r1 LWIP_ASSERT("prev != ipr", prev != ipr); 800a714: 4281 cmp r1, r0 800a716: d015 beq.n 800a744 if (prev != NULL) { 800a718: f1b9 0f00 cmp.w r9, #0 800a71c: d009 beq.n 800a732 LWIP_ASSERT("prev->next == ipr", prev->next == ipr); 800a71e: f8d9 3000 ldr.w r3, [r9] 800a722: 4543 cmp r3, r8 800a724: d005 beq.n 800a732 800a726: 4b31 ldr r3, [pc, #196] @ (800a7ec ) 800a728: 22ad movs r2, #173 @ 0xad 800a72a: 4931 ldr r1, [pc, #196] @ (800a7f0 ) 800a72c: 4831 ldr r0, [pc, #196] @ (800a7f4 ) 800a72e: f008 fe6b bl 8013408 iprh = (struct ip_reass_helper *)ipr->p->payload; 800a732: f8d8 4004 ldr.w r4, [r8, #4] 800a736: 6863 ldr r3, [r4, #4] if (iprh->start == 0) { 800a738: 889a ldrh r2, [r3, #4] 800a73a: b152 cbz r2, 800a752 u16_t pbufs_freed = 0; 800a73c: 2600 movs r6, #0 p = ipr->p; 800a73e: f8d8 5004 ldr.w r5, [r8, #4] while (p != NULL) { 800a742: e02b b.n 800a79c LWIP_ASSERT("prev != ipr", prev != ipr); 800a744: 4b29 ldr r3, [pc, #164] @ (800a7ec ) 800a746: 22ab movs r2, #171 @ 0xab 800a748: 492b ldr r1, [pc, #172] @ (800a7f8 ) 800a74a: 482a ldr r0, [pc, #168] @ (800a7f4 ) 800a74c: f008 fe5c bl 8013408 800a750: e7e2 b.n 800a718 ipr->p = iprh->next_pbuf; 800a752: 681b ldr r3, [r3, #0] 800a754: f8c8 3004 str.w r3, [r8, #4] SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); 800a758: 6863 ldr r3, [r4, #4] 800a75a: f8d8 2008 ldr.w r2, [r8, #8] 800a75e: f8d8 500c ldr.w r5, [r8, #12] 800a762: f8d8 0010 ldr.w r0, [r8, #16] 800a766: f8d8 1014 ldr.w r1, [r8, #20] 800a76a: 601a str r2, [r3, #0] 800a76c: 605d str r5, [r3, #4] 800a76e: 6098 str r0, [r3, #8] 800a770: 60d9 str r1, [r3, #12] 800a772: f8d8 2018 ldr.w r2, [r8, #24] 800a776: 611a str r2, [r3, #16] icmp_time_exceeded(p, ICMP_TE_FRAG); 800a778: 2101 movs r1, #1 800a77a: 4620 mov r0, r4 800a77c: f7ff fc34 bl 8009fe8 clen = pbuf_clen(p); 800a780: 4620 mov r0, r4 800a782: f001 fc92 bl 800c0aa 800a786: 4606 mov r6, r0 pbuf_free(p); 800a788: 4620 mov r0, r4 800a78a: f001 fb09 bl 800bda0 800a78e: e7d6 b.n 800a73e pbufs_freed = (u16_t)(pbufs_freed + clen); 800a790: 4434 add r4, r6 800a792: b2a6 uxth r6, r4 pbuf_free(pcur); 800a794: 4628 mov r0, r5 800a796: f001 fb03 bl 800bda0 p = iprh->next_pbuf; 800a79a: 463d mov r5, r7 while (p != NULL) { 800a79c: b185 cbz r5, 800a7c0 iprh = (struct ip_reass_helper *)p->payload; 800a79e: 686b ldr r3, [r5, #4] p = iprh->next_pbuf; 800a7a0: 681f ldr r7, [r3, #0] clen = pbuf_clen(pcur); 800a7a2: 4628 mov r0, r5 800a7a4: f001 fc81 bl 800c0aa 800a7a8: 4604 mov r4, r0 LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 800a7aa: 1833 adds r3, r6, r0 800a7ac: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800a7b0: dbee blt.n 800a790 800a7b2: 4b0e ldr r3, [pc, #56] @ (800a7ec ) 800a7b4: 22cc movs r2, #204 @ 0xcc 800a7b6: 4911 ldr r1, [pc, #68] @ (800a7fc ) 800a7b8: 480e ldr r0, [pc, #56] @ (800a7f4 ) 800a7ba: f008 fe25 bl 8013408 800a7be: e7e7 b.n 800a790 ip_reass_dequeue_datagram(ipr, prev); 800a7c0: 4649 mov r1, r9 800a7c2: 4640 mov r0, r8 800a7c4: f7ff ff7e bl 800a6c4 LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); 800a7c8: 4b0d ldr r3, [pc, #52] @ (800a800 ) 800a7ca: 881b ldrh r3, [r3, #0] 800a7cc: 42b3 cmp r3, r6 800a7ce: d306 bcc.n 800a7de ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); 800a7d0: 4a0b ldr r2, [pc, #44] @ (800a800 ) 800a7d2: 8813 ldrh r3, [r2, #0] 800a7d4: 1b9b subs r3, r3, r6 800a7d6: 8013 strh r3, [r2, #0] } 800a7d8: 4630 mov r0, r6 800a7da: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); 800a7de: 4b03 ldr r3, [pc, #12] @ (800a7ec ) 800a7e0: 22d2 movs r2, #210 @ 0xd2 800a7e2: 4908 ldr r1, [pc, #32] @ (800a804 ) 800a7e4: 4803 ldr r0, [pc, #12] @ (800a7f4 ) 800a7e6: f008 fe0f bl 8013408 800a7ea: e7f1 b.n 800a7d0 800a7ec: 080156dc .word 0x080156dc 800a7f0: 0801576c .word 0x0801576c 800a7f4: 080144e8 .word 0x080144e8 800a7f8: 08015760 .word 0x08015760 800a7fc: 08015780 .word 0x08015780 800a800: 24013048 .word 0x24013048 800a804: 080157a0 .word 0x080157a0 0800a808 : { 800a808: b5f8 push {r3, r4, r5, r6, r7, lr} 800a80a: 4605 mov r5, r0 800a80c: 460f mov r7, r1 int pbufs_freed = 0, pbufs_freed_current; 800a80e: 2600 movs r6, #0 800a810: e02e b.n 800a870 if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { 800a812: 699a ldr r2, [r3, #24] 800a814: f8d5 e010 ldr.w lr, [r5, #16] 800a818: 4572 cmp r2, lr 800a81a: d111 bne.n 800a840 800a81c: f8b3 e00c ldrh.w lr, [r3, #12] 800a820: 88aa ldrh r2, [r5, #4] 800a822: 4596 cmp lr, r2 800a824: d10c bne.n 800a840 800a826: e001 b.n 800a82c oldest_prev = prev; 800a828: 4661 mov r1, ip oldest = r; 800a82a: 4618 mov r0, r3 if (r->next != NULL) { 800a82c: 681a ldr r2, [r3, #0] 800a82e: b192 cbz r2, 800a856 800a830: 469c mov ip, r3 800a832: 4613 mov r3, r2 while (r != NULL) { 800a834: b18b cbz r3, 800a85a if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { 800a836: 695a ldr r2, [r3, #20] 800a838: f8d5 e00c ldr.w lr, [r5, #12] 800a83c: 4572 cmp r2, lr 800a83e: d0e8 beq.n 800a812 other_datagrams++; 800a840: 3401 adds r4, #1 if (oldest == NULL) { 800a842: 2800 cmp r0, #0 800a844: d0f0 beq.n 800a828 } else if (r->timer <= oldest->timer) { 800a846: f893 e01f ldrb.w lr, [r3, #31] 800a84a: 7fc2 ldrb r2, [r0, #31] 800a84c: 4596 cmp lr, r2 800a84e: d8ed bhi.n 800a82c oldest_prev = prev; 800a850: 4661 mov r1, ip oldest = r; 800a852: 4618 mov r0, r3 800a854: e7ea b.n 800a82c if (r->next != NULL) { 800a856: 4663 mov r3, ip 800a858: e7ea b.n 800a830 if (oldest != NULL) { 800a85a: b110 cbz r0, 800a862 pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); 800a85c: f7ff ff56 bl 800a70c pbufs_freed += pbufs_freed_current; 800a860: 4406 add r6, r0 } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); 800a862: 2c01 cmp r4, #1 800a864: bfd4 ite le 800a866: 2400 movle r4, #0 800a868: 2401 movgt r4, #1 800a86a: 42be cmp r6, r7 800a86c: da07 bge.n 800a87e 800a86e: b134 cbz r4, 800a87e r = reassdatagrams; 800a870: 4b04 ldr r3, [pc, #16] @ (800a884 ) 800a872: 681b ldr r3, [r3, #0] other_datagrams = 0; 800a874: 2400 movs r4, #0 oldest_prev = NULL; 800a876: 4621 mov r1, r4 prev = NULL; 800a878: 46a4 mov ip, r4 oldest = NULL; 800a87a: 4620 mov r0, r4 while (r != NULL) { 800a87c: e7da b.n 800a834 } 800a87e: 4630 mov r0, r6 800a880: bdf8 pop {r3, r4, r5, r6, r7, pc} 800a882: bf00 nop 800a884: 2401304c .word 0x2401304c 0800a888 : } /** Free a struct pbuf_custom_ref */ static void ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p) { 800a888: b510 push {r4, lr} LWIP_ASSERT("p != NULL", p != NULL); 800a88a: 4604 mov r4, r0 800a88c: b120 cbz r0, 800a898 memp_free(MEMP_FRAG_PBUF, p); 800a88e: 4621 mov r1, r4 800a890: 2005 movs r0, #5 800a892: f000 feed bl 800b670 } 800a896: bd10 pop {r4, pc} LWIP_ASSERT("p != NULL", p != NULL); 800a898: 4b03 ldr r3, [pc, #12] @ (800a8a8 ) 800a89a: f44f 7231 mov.w r2, #708 @ 0x2c4 800a89e: 4903 ldr r1, [pc, #12] @ (800a8ac ) 800a8a0: 4803 ldr r0, [pc, #12] @ (800a8b0 ) 800a8a2: f008 fdb1 bl 8013408 800a8a6: e7f2 b.n 800a88e 800a8a8: 080156dc .word 0x080156dc 800a8ac: 08014fc0 .word 0x08014fc0 800a8b0: 080144e8 .word 0x080144e8 0800a8b4 : /** Free-callback function to free a 'struct pbuf_custom_ref', called by * pbuf_free. */ static void ipfrag_free_pbuf_custom(struct pbuf *p) { 800a8b4: b510 push {r4, lr} struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p; LWIP_ASSERT("pcr != NULL", pcr != NULL); 800a8b6: 4604 mov r4, r0 800a8b8: b138 cbz r0, 800a8ca LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p); if (pcr->original != NULL) { 800a8ba: 6960 ldr r0, [r4, #20] 800a8bc: b108 cbz r0, 800a8c2 pbuf_free(pcr->original); 800a8be: f001 fa6f bl 800bda0 } ip_frag_free_pbuf_custom_ref(pcr); 800a8c2: 4620 mov r0, r4 800a8c4: f7ff ffe0 bl 800a888 } 800a8c8: bd10 pop {r4, pc} LWIP_ASSERT("pcr != NULL", pcr != NULL); 800a8ca: 4b04 ldr r3, [pc, #16] @ (800a8dc ) 800a8cc: f240 22ce movw r2, #718 @ 0x2ce 800a8d0: 4903 ldr r1, [pc, #12] @ (800a8e0 ) 800a8d2: 4804 ldr r0, [pc, #16] @ (800a8e4 ) 800a8d4: f008 fd98 bl 8013408 800a8d8: e7ef b.n 800a8ba 800a8da: bf00 nop 800a8dc: 080156dc .word 0x080156dc 800a8e0: 080157c4 .word 0x080157c4 800a8e4: 080144e8 .word 0x080144e8 0800a8e8 : { 800a8e8: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 800a8ec: 4680 mov r8, r0 800a8ee: 460d mov r5, r1 800a8f0: 4691 mov r9, r2 fraghdr = (struct ip_hdr *)new_p->payload; 800a8f2: 684c ldr r4, [r1, #4] len = lwip_ntohs(IPH_LEN(fraghdr)); 800a8f4: 8860 ldrh r0, [r4, #2] 800a8f6: f7fd fac1 bl 8007e7c hlen = IPH_HL_BYTES(fraghdr); 800a8fa: 7823 ldrb r3, [r4, #0] 800a8fc: f003 030f and.w r3, r3, #15 if (hlen > len) { 800a900: ebb0 0f83 cmp.w r0, r3, lsl #2 800a904: d203 bcs.n 800a90e return IP_REASS_VALIDATE_PBUF_DROPPED; 800a906: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } 800a90a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 800a90e: 009a lsls r2, r3, #2 len = (u16_t)(len - hlen); 800a910: 1a80 subs r0, r0, r2 800a912: b287 uxth r7, r0 offset = IPH_OFFSET_BYTES(fraghdr); 800a914: 88e0 ldrh r0, [r4, #6] 800a916: f7fd fab1 bl 8007e7c 800a91a: f3c0 0c0c ubfx ip, r0, #0, #13 800a91e: ea4f 0ccc mov.w ip, ip, lsl #3 iprh = (struct ip_reass_helper *)new_p->payload; 800a922: 686e ldr r6, [r5, #4] iprh->next_pbuf = NULL; 800a924: 2300 movs r3, #0 800a926: 7033 strb r3, [r6, #0] 800a928: 7073 strb r3, [r6, #1] 800a92a: 70b3 strb r3, [r6, #2] 800a92c: 70f3 strb r3, [r6, #3] iprh->start = offset; 800a92e: f8a6 c004 strh.w ip, [r6, #4] iprh->end = (u16_t)(offset + len); 800a932: eb07 000c add.w r0, r7, ip 800a936: fa1f fe80 uxth.w lr, r0 800a93a: 80f0 strh r0, [r6, #6] if (iprh->end < offset) { 800a93c: 45e6 cmp lr, ip 800a93e: f0c0 8085 bcc.w 800aa4c for (q = ipr->p; q != NULL;) { 800a942: f8d8 1004 ldr.w r1, [r8, #4] int valid = 1; 800a946: 2701 movs r7, #1 struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL; 800a948: 461c mov r4, r3 for (q = ipr->p; q != NULL;) { 800a94a: e01f b.n 800a98c iprh->next_pbuf = q; 800a94c: 6031 str r1, [r6, #0] if (iprh_prev != NULL) { 800a94e: b1ac cbz r4, 800a97c if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { 800a950: 88e2 ldrh r2, [r4, #6] 800a952: 4562 cmp r2, ip 800a954: d87d bhi.n 800aa52 800a956: 889b ldrh r3, [r3, #4] 800a958: 459e cmp lr, r3 800a95a: d87d bhi.n 800aa58 iprh_prev->next_pbuf = new_p; 800a95c: 6025 str r5, [r4, #0] if (iprh_prev->end != iprh->start) { 800a95e: 88b3 ldrh r3, [r6, #4] 800a960: 429a cmp r2, r3 800a962: d000 beq.n 800a966 valid = 0; 800a964: 2700 movs r7, #0 if (q == NULL) { 800a966: b319 cbz r1, 800a9b0 if (is_last || ((ipr->flags & IP_REASS_FLAG_LASTFRAG) != 0)) { 800a968: f1b9 0f00 cmp.w r9, #0 800a96c: d141 bne.n 800a9f2 800a96e: f898 301e ldrb.w r3, [r8, #30] 800a972: f013 0f01 tst.w r3, #1 800a976: d13c bne.n 800a9f2 return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ 800a978: 4648 mov r0, r9 800a97a: e7c6 b.n 800a90a if (iprh->end > iprh_tmp->start) { 800a97c: 889b ldrh r3, [r3, #4] 800a97e: 459e cmp lr, r3 800a980: d86d bhi.n 800aa5e ipr->p = new_p; 800a982: f8c8 5004 str.w r5, [r8, #4] 800a986: e7ee b.n 800a966 q = iprh_tmp->next_pbuf; 800a988: 6819 ldr r1, [r3, #0] iprh_prev = iprh_tmp; 800a98a: 461c mov r4, r3 for (q = ipr->p; q != NULL;) { 800a98c: 2900 cmp r1, #0 800a98e: d0ea beq.n 800a966 iprh_tmp = (struct ip_reass_helper *)q->payload; 800a990: 684b ldr r3, [r1, #4] if (iprh->start < iprh_tmp->start) { 800a992: 889a ldrh r2, [r3, #4] 800a994: 4562 cmp r2, ip 800a996: d8d9 bhi.n 800a94c } else if (iprh->start == iprh_tmp->start) { 800a998: 4562 cmp r2, ip 800a99a: d063 beq.n 800aa64 } else if (iprh->start < iprh_tmp->end) { 800a99c: 88d9 ldrh r1, [r3, #6] 800a99e: 4561 cmp r1, ip 800a9a0: d863 bhi.n 800aa6a if (iprh_prev != NULL) { 800a9a2: 2c00 cmp r4, #0 800a9a4: d0f0 beq.n 800a988 if (iprh_prev->end != iprh_tmp->start) { 800a9a6: 88e1 ldrh r1, [r4, #6] 800a9a8: 428a cmp r2, r1 800a9aa: d0ed beq.n 800a988 valid = 0; 800a9ac: 2700 movs r7, #0 800a9ae: e7eb b.n 800a988 if (iprh_prev != NULL) { 800a9b0: b194 cbz r4, 800a9d8 LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); 800a9b2: 88e2 ldrh r2, [r4, #6] 800a9b4: 88b3 ldrh r3, [r6, #4] 800a9b6: 429a cmp r2, r3 800a9b8: d806 bhi.n 800a9c8 iprh_prev->next_pbuf = new_p; 800a9ba: 6025 str r5, [r4, #0] if (iprh_prev->end != iprh->start) { 800a9bc: 88e2 ldrh r2, [r4, #6] 800a9be: 88b3 ldrh r3, [r6, #4] 800a9c0: 429a cmp r2, r3 800a9c2: d0d1 beq.n 800a968 valid = 0; 800a9c4: 2700 movs r7, #0 800a9c6: e7cf b.n 800a968 LWIP_ASSERT("check fragments don't overlap", iprh_prev->end <= iprh->start); 800a9c8: 4b29 ldr r3, [pc, #164] @ (800aa70 ) 800a9ca: f44f 72db mov.w r2, #438 @ 0x1b6 800a9ce: 4929 ldr r1, [pc, #164] @ (800aa74 ) 800a9d0: 4829 ldr r0, [pc, #164] @ (800aa78 ) 800a9d2: f008 fd19 bl 8013408 800a9d6: e7f0 b.n 800a9ba LWIP_ASSERT("no previous fragment, this must be the first fragment!", 800a9d8: f8d8 3004 ldr.w r3, [r8, #4] 800a9dc: b133 cbz r3, 800a9ec 800a9de: 4b24 ldr r3, [pc, #144] @ (800aa70 ) 800a9e0: f44f 72df mov.w r2, #446 @ 0x1be 800a9e4: 4925 ldr r1, [pc, #148] @ (800aa7c ) 800a9e6: 4824 ldr r0, [pc, #144] @ (800aa78 ) 800a9e8: f008 fd0e bl 8013408 ipr->p = new_p; 800a9ec: f8c8 5004 str.w r5, [r8, #4] 800a9f0: e7ba b.n 800a968 if (valid) { 800a9f2: b34f cbz r7, 800aa48 if ((ipr->p == NULL) || (((struct ip_reass_helper *)ipr->p->payload)->start != 0)) { 800a9f4: f8d8 3004 ldr.w r3, [r8, #4] 800a9f8: b31b cbz r3, 800aa42 800a9fa: 6858 ldr r0, [r3, #4] 800a9fc: 8883 ldrh r3, [r0, #4] 800a9fe: bb13 cbnz r3, 800aa46 q = iprh->next_pbuf; 800aa00: 6832 ldr r2, [r6, #0] while (q != NULL) { 800aa02: b14a cbz r2, 800aa18 iprh = (struct ip_reass_helper *)q->payload; 800aa04: 6853 ldr r3, [r2, #4] if (iprh_prev->end != iprh->start) { 800aa06: 88f1 ldrh r1, [r6, #6] 800aa08: 889a ldrh r2, [r3, #4] 800aa0a: 4291 cmp r1, r2 800aa0c: d102 bne.n 800aa14 q = iprh->next_pbuf; 800aa0e: 681a ldr r2, [r3, #0] iprh = (struct ip_reass_helper *)q->payload; 800aa10: 461e mov r6, r3 800aa12: e7f6 b.n 800aa02 800aa14: 461e mov r6, r3 valid = 0; 800aa16: 2700 movs r7, #0 if (valid) { 800aa18: b1b7 cbz r7, 800aa48 LWIP_ASSERT("sanity check", 800aa1a: 42b0 cmp r0, r6 800aa1c: d009 beq.n 800aa32 LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", 800aa1e: 6833 ldr r3, [r6, #0] 800aa20: b193 cbz r3, 800aa48 800aa22: 4b13 ldr r3, [pc, #76] @ (800aa70 ) 800aa24: f44f 72f1 mov.w r2, #482 @ 0x1e2 800aa28: 4915 ldr r1, [pc, #84] @ (800aa80 ) 800aa2a: 4813 ldr r0, [pc, #76] @ (800aa78 ) 800aa2c: f008 fcec bl 8013408 800aa30: e00a b.n 800aa48 LWIP_ASSERT("sanity check", 800aa32: 4b0f ldr r3, [pc, #60] @ (800aa70 ) 800aa34: f44f 72f0 mov.w r2, #480 @ 0x1e0 800aa38: 4912 ldr r1, [pc, #72] @ (800aa84 ) 800aa3a: 480f ldr r0, [pc, #60] @ (800aa78 ) 800aa3c: f008 fce4 bl 8013408 800aa40: e7ed b.n 800aa1e valid = 0; 800aa42: 2700 movs r7, #0 800aa44: e000 b.n 800aa48 800aa46: 2700 movs r7, #0 return valid ? IP_REASS_VALIDATE_TELEGRAM_FINISHED : IP_REASS_VALIDATE_PBUF_QUEUED; 800aa48: 4638 mov r0, r7 800aa4a: e75e b.n 800a90a return IP_REASS_VALIDATE_PBUF_DROPPED; 800aa4c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800aa50: e75b b.n 800a90a return IP_REASS_VALIDATE_PBUF_DROPPED; 800aa52: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800aa56: e758 b.n 800a90a 800aa58: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800aa5c: e755 b.n 800a90a return IP_REASS_VALIDATE_PBUF_DROPPED; 800aa5e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800aa62: e752 b.n 800a90a return IP_REASS_VALIDATE_PBUF_DROPPED; 800aa64: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800aa68: e74f b.n 800a90a return IP_REASS_VALIDATE_PBUF_DROPPED; 800aa6a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800aa6e: e74c b.n 800a90a 800aa70: 080156dc .word 0x080156dc 800aa74: 080157d0 .word 0x080157d0 800aa78: 080144e8 .word 0x080144e8 800aa7c: 080157f0 .word 0x080157f0 800aa80: 08015838 .word 0x08015838 800aa84: 08015828 .word 0x08015828 0800aa88 : { 800aa88: b508 push {r3, lr} return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF); 800aa8a: 2005 movs r0, #5 800aa8c: f000 fdba bl 800b604 } 800aa90: bd08 pop {r3, pc} ... 0800aa94 : { 800aa94: b570 push {r4, r5, r6, lr} 800aa96: 4605 mov r5, r0 800aa98: 460e mov r6, r1 ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); 800aa9a: 2004 movs r0, #4 800aa9c: f000 fdb2 bl 800b604 if (ipr == NULL) { 800aaa0: 4604 mov r4, r0 800aaa2: b1b0 cbz r0, 800aad2 memset(ipr, 0, sizeof(struct ip_reassdata)); 800aaa4: 2220 movs r2, #32 800aaa6: 2100 movs r1, #0 800aaa8: 4620 mov r0, r4 800aaaa: f008 fe05 bl 80136b8 ipr->timer = IP_REASS_MAXAGE; 800aaae: 230f movs r3, #15 800aab0: 77e3 strb r3, [r4, #31] ipr->next = reassdatagrams; 800aab2: 4b0f ldr r3, [pc, #60] @ (800aaf0 ) 800aab4: 681a ldr r2, [r3, #0] 800aab6: 6022 str r2, [r4, #0] reassdatagrams = ipr; 800aab8: 601c str r4, [r3, #0] SMEMCPY(&(ipr->iphdr), fraghdr, IP_HLEN); 800aaba: 682b ldr r3, [r5, #0] 800aabc: 6868 ldr r0, [r5, #4] 800aabe: 68a9 ldr r1, [r5, #8] 800aac0: 68ea ldr r2, [r5, #12] 800aac2: 60a3 str r3, [r4, #8] 800aac4: 60e0 str r0, [r4, #12] 800aac6: 6121 str r1, [r4, #16] 800aac8: 6162 str r2, [r4, #20] 800aaca: 692b ldr r3, [r5, #16] 800aacc: 61a3 str r3, [r4, #24] } 800aace: 4620 mov r0, r4 800aad0: bd70 pop {r4, r5, r6, pc} if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { 800aad2: 4631 mov r1, r6 800aad4: 4628 mov r0, r5 800aad6: f7ff fe97 bl 800a808 800aada: 42b0 cmp r0, r6 800aadc: da02 bge.n 800aae4 if (ipr == NULL) 800aade: 2c00 cmp r4, #0 800aae0: d1e0 bne.n 800aaa4 800aae2: e7f4 b.n 800aace ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); 800aae4: 2004 movs r0, #4 800aae6: f000 fd8d bl 800b604 800aaea: 4604 mov r4, r0 800aaec: e7f7 b.n 800aade 800aaee: bf00 nop 800aaf0: 2401304c .word 0x2401304c 0800aaf4 : { 800aaf4: b538 push {r3, r4, r5, lr} r = reassdatagrams; 800aaf6: 4b09 ldr r3, [pc, #36] @ (800ab1c ) 800aaf8: 6818 ldr r0, [r3, #0] struct ip_reassdata *r, *prev = NULL; 800aafa: 2400 movs r4, #0 while (r != NULL) { 800aafc: e003 b.n 800ab06 r->timer--; 800aafe: 3b01 subs r3, #1 800ab00: 77c3 strb r3, [r0, #31] prev = r; 800ab02: 4604 mov r4, r0 r = r->next; 800ab04: 6800 ldr r0, [r0, #0] while (r != NULL) { 800ab06: b140 cbz r0, 800ab1a if (r->timer > 0) { 800ab08: 7fc3 ldrb r3, [r0, #31] 800ab0a: 2b00 cmp r3, #0 800ab0c: d1f7 bne.n 800aafe r = r->next; 800ab0e: 6805 ldr r5, [r0, #0] ip_reass_free_complete_datagram(tmp, prev); 800ab10: 4621 mov r1, r4 800ab12: f7ff fdfb bl 800a70c r = r->next; 800ab16: 4628 mov r0, r5 800ab18: e7f5 b.n 800ab06 } 800ab1a: bd38 pop {r3, r4, r5, pc} 800ab1c: 2401304c .word 0x2401304c 0800ab20 : { 800ab20: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 800ab24: 4606 mov r6, r0 fraghdr = (struct ip_hdr *)p->payload; 800ab26: 6845 ldr r5, [r0, #4] if (IPH_HL_BYTES(fraghdr) != IP_HLEN) { 800ab28: 782b ldrb r3, [r5, #0] 800ab2a: f003 030f and.w r3, r3, #15 800ab2e: 2b05 cmp r3, #5 800ab30: f040 80d1 bne.w 800acd6 offset = IPH_OFFSET_BYTES(fraghdr); 800ab34: 88e8 ldrh r0, [r5, #6] 800ab36: f7fd f9a1 bl 8007e7c 800ab3a: f3c0 080c ubfx r8, r0, #0, #13 800ab3e: ea4f 08c8 mov.w r8, r8, lsl #3 len = lwip_ntohs(IPH_LEN(fraghdr)); 800ab42: 8868 ldrh r0, [r5, #2] 800ab44: f7fd f99a bl 8007e7c hlen = IPH_HL_BYTES(fraghdr); 800ab48: 782b ldrb r3, [r5, #0] 800ab4a: f003 030f and.w r3, r3, #15 800ab4e: 009a lsls r2, r3, #2 if (hlen > len) { 800ab50: ebb0 0f83 cmp.w r0, r3, lsl #2 800ab54: f0c0 80bf bcc.w 800acd6 len = (u16_t)(len - hlen); 800ab58: 1a80 subs r0, r0, r2 800ab5a: b287 uxth r7, r0 clen = pbuf_clen(p); 800ab5c: 4630 mov r0, r6 800ab5e: f001 faa4 bl 800c0aa 800ab62: 4681 mov r9, r0 if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { 800ab64: 4b6b ldr r3, [pc, #428] @ (800ad14 ) 800ab66: 881b ldrh r3, [r3, #0] 800ab68: 4403 add r3, r0 800ab6a: 2b0a cmp r3, #10 800ab6c: dc02 bgt.n 800ab74 for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { 800ab6e: 4b6a ldr r3, [pc, #424] @ (800ad18 ) 800ab70: 681c ldr r4, [r3, #0] 800ab72: e00d b.n 800ab90 if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 800ab74: 4601 mov r1, r0 800ab76: 4628 mov r0, r5 800ab78: f7ff fe46 bl 800a808 800ab7c: 2800 cmp r0, #0 800ab7e: f000 80aa beq.w 800acd6 ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) 800ab82: 4b64 ldr r3, [pc, #400] @ (800ad14 ) 800ab84: 881b ldrh r3, [r3, #0] 800ab86: 444b add r3, r9 if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 800ab88: 2b0a cmp r3, #10 800ab8a: ddf0 ble.n 800ab6e 800ab8c: e0a3 b.n 800acd6 for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { 800ab8e: 6824 ldr r4, [r4, #0] 800ab90: b15c cbz r4, 800abaa if (IP_ADDRESSES_AND_ID_MATCH(&ipr->iphdr, fraghdr)) { 800ab92: 6962 ldr r2, [r4, #20] 800ab94: 68eb ldr r3, [r5, #12] 800ab96: 429a cmp r2, r3 800ab98: d1f9 bne.n 800ab8e 800ab9a: 69a2 ldr r2, [r4, #24] 800ab9c: 692b ldr r3, [r5, #16] 800ab9e: 429a cmp r2, r3 800aba0: d1f5 bne.n 800ab8e 800aba2: 89a2 ldrh r2, [r4, #12] 800aba4: 88ab ldrh r3, [r5, #4] 800aba6: 429a cmp r2, r3 800aba8: d1f1 bne.n 800ab8e if (ipr == NULL) { 800abaa: b374 cbz r4, 800ac0a if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 800abac: 88e8 ldrh r0, [r5, #6] 800abae: f7fd f965 bl 8007e7c 800abb2: f3c0 000c ubfx r0, r0, #0, #13 800abb6: b380 cbz r0, 800ac1a is_last = (IPH_OFFSET(fraghdr) & PP_NTOHS(IP_MF)) == 0; 800abb8: 88ed ldrh r5, [r5, #6] 800abba: f005 0520 and.w r5, r5, #32 800abbe: 2d00 cmp r5, #0 800abc0: bf0c ite eq 800abc2: 2201 moveq r2, #1 800abc4: 2200 movne r2, #0 if (is_last) { 800abc6: d108 bne.n 800abda u16_t datagram_len = (u16_t)(offset + len); 800abc8: eb08 0307 add.w r3, r8, r7 800abcc: b29b uxth r3, r3 if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { 800abce: f64f 71eb movw r1, #65515 @ 0xffeb 800abd2: 428b cmp r3, r1 800abd4: bf98 it ls 800abd6: 4598 cmpls r8, r3 800abd8: d87a bhi.n 800acd0 valid = ip_reass_chain_frag_into_datagram_and_validate(ipr, p, is_last); 800abda: 4631 mov r1, r6 800abdc: 4620 mov r0, r4 800abde: f7ff fe83 bl 800a8e8 if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { 800abe2: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 800abe6: d073 beq.n 800acd0 ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount + clen); 800abe8: 4b4a ldr r3, [pc, #296] @ (800ad14 ) 800abea: 881a ldrh r2, [r3, #0] 800abec: 4491 add r9, r2 800abee: f8a3 9000 strh.w r9, [r3] if (is_last) { 800abf2: b935 cbnz r5, 800ac02 u16_t datagram_len = (u16_t)(offset + len); 800abf4: 44b8 add r8, r7 ipr->datagram_len = datagram_len; 800abf6: f8a4 801c strh.w r8, [r4, #28] ipr->flags |= IP_REASS_FLAG_LASTFRAG; 800abfa: 7fa3 ldrb r3, [r4, #30] 800abfc: f043 0301 orr.w r3, r3, #1 800ac00: 77a3 strb r3, [r4, #30] if (valid == IP_REASS_VALIDATE_TELEGRAM_FINISHED) { 800ac02: 2801 cmp r0, #1 800ac04: d01b beq.n 800ac3e return NULL; 800ac06: 2600 movs r6, #0 800ac08: e069 b.n 800acde ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); 800ac0a: 4649 mov r1, r9 800ac0c: 4628 mov r0, r5 800ac0e: f7ff ff41 bl 800aa94 if (ipr == NULL) { 800ac12: 4604 mov r4, r0 800ac14: 2800 cmp r0, #0 800ac16: d1cf bne.n 800abb8 800ac18: e05d b.n 800acd6 ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { 800ac1a: 89e0 ldrh r0, [r4, #14] 800ac1c: f7fd f92e bl 8007e7c if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 800ac20: f3c0 000c ubfx r0, r0, #0, #13 800ac24: 2800 cmp r0, #0 800ac26: d0c7 beq.n 800abb8 SMEMCPY(&ipr->iphdr, fraghdr, IP_HLEN); 800ac28: 682b ldr r3, [r5, #0] 800ac2a: 6868 ldr r0, [r5, #4] 800ac2c: 68a9 ldr r1, [r5, #8] 800ac2e: 68ea ldr r2, [r5, #12] 800ac30: 60a3 str r3, [r4, #8] 800ac32: 60e0 str r0, [r4, #12] 800ac34: 6121 str r1, [r4, #16] 800ac36: 6162 str r2, [r4, #20] 800ac38: 692b ldr r3, [r5, #16] 800ac3a: 61a3 str r3, [r4, #24] 800ac3c: e7bc b.n 800abb8 u16_t datagram_len = (u16_t)(ipr->datagram_len + IP_HLEN); 800ac3e: 8ba0 ldrh r0, [r4, #28] 800ac40: 3014 adds r0, #20 r = ((struct ip_reass_helper *)ipr->p->payload)->next_pbuf; 800ac42: 6863 ldr r3, [r4, #4] 800ac44: 685e ldr r6, [r3, #4] 800ac46: 6835 ldr r5, [r6, #0] SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); 800ac48: 68a3 ldr r3, [r4, #8] 800ac4a: 68e7 ldr r7, [r4, #12] 800ac4c: 6921 ldr r1, [r4, #16] 800ac4e: 6962 ldr r2, [r4, #20] 800ac50: 6033 str r3, [r6, #0] 800ac52: 6077 str r7, [r6, #4] 800ac54: 60b1 str r1, [r6, #8] 800ac56: 60f2 str r2, [r6, #12] 800ac58: 69a3 ldr r3, [r4, #24] 800ac5a: 6133 str r3, [r6, #16] IPH_LEN_SET(fraghdr, lwip_htons(datagram_len)); 800ac5c: b280 uxth r0, r0 800ac5e: f7fd f90d bl 8007e7c 800ac62: 8070 strh r0, [r6, #2] IPH_OFFSET_SET(fraghdr, 0); 800ac64: 2300 movs r3, #0 800ac66: 71b3 strb r3, [r6, #6] 800ac68: 71f3 strb r3, [r6, #7] IPH_CHKSUM_SET(fraghdr, 0); 800ac6a: 72b3 strb r3, [r6, #10] 800ac6c: 72f3 strb r3, [r6, #11] p = ipr->p; 800ac6e: 6866 ldr r6, [r4, #4] while (r != NULL) { 800ac70: e009 b.n 800ac86 iprh = (struct ip_reass_helper *)r->payload; 800ac72: 686f ldr r7, [r5, #4] pbuf_remove_header(r, IP_HLEN); 800ac74: 2114 movs r1, #20 800ac76: 4628 mov r0, r5 800ac78: f001 f84c bl 800bd14 pbuf_cat(p, r); 800ac7c: 4629 mov r1, r5 800ac7e: 4630 mov r0, r6 800ac80: f001 fa38 bl 800c0f4 r = iprh->next_pbuf; 800ac84: 683d ldr r5, [r7, #0] while (r != NULL) { 800ac86: 2d00 cmp r5, #0 800ac88: d1f3 bne.n 800ac72 if (ipr == reassdatagrams) { 800ac8a: 4b23 ldr r3, [pc, #140] @ (800ad18 ) 800ac8c: 6819 ldr r1, [r3, #0] 800ac8e: 428c cmp r4, r1 800ac90: d005 beq.n 800ac9e for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 800ac92: b129 cbz r1, 800aca0 if (ipr_prev->next == ipr) { 800ac94: 680b ldr r3, [r1, #0] 800ac96: 429c cmp r4, r3 800ac98: d002 beq.n 800aca0 for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 800ac9a: 4619 mov r1, r3 800ac9c: e7f9 b.n 800ac92 ipr_prev = NULL; 800ac9e: 4629 mov r1, r5 ip_reass_dequeue_datagram(ipr, ipr_prev); 800aca0: 4620 mov r0, r4 800aca2: f7ff fd0f bl 800a6c4 clen = pbuf_clen(p); 800aca6: 4630 mov r0, r6 800aca8: f001 f9ff bl 800c0aa 800acac: 4604 mov r4, r0 LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); 800acae: 4b19 ldr r3, [pc, #100] @ (800ad14 ) 800acb0: 881b ldrh r3, [r3, #0] 800acb2: 4283 cmp r3, r0 800acb4: d304 bcc.n 800acc0 ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen); 800acb6: 4a17 ldr r2, [pc, #92] @ (800ad14 ) 800acb8: 8813 ldrh r3, [r2, #0] 800acba: 1b1b subs r3, r3, r4 800acbc: 8013 strh r3, [r2, #0] return p; 800acbe: e00e b.n 800acde LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); 800acc0: 4b16 ldr r3, [pc, #88] @ (800ad1c ) 800acc2: f240 229b movw r2, #667 @ 0x29b 800acc6: 4916 ldr r1, [pc, #88] @ (800ad20 ) 800acc8: 4816 ldr r0, [pc, #88] @ (800ad24 ) 800acca: f008 fb9d bl 8013408 800acce: e7f2 b.n 800acb6 LWIP_ASSERT("ipr != NULL", ipr != NULL); 800acd0: b144 cbz r4, 800ace4 if (ipr->p == NULL) { 800acd2: 6863 ldr r3, [r4, #4] 800acd4: b173 cbz r3, 800acf4 pbuf_free(p); 800acd6: 4630 mov r0, r6 800acd8: f001 f862 bl 800bda0 return NULL; 800acdc: 2600 movs r6, #0 } 800acde: 4630 mov r0, r6 800ace0: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} LWIP_ASSERT("ipr != NULL", ipr != NULL); 800ace4: 4b0d ldr r3, [pc, #52] @ (800ad1c ) 800ace6: f44f 722a mov.w r2, #680 @ 0x2a8 800acea: 490f ldr r1, [pc, #60] @ (800ad28 ) 800acec: 480d ldr r0, [pc, #52] @ (800ad24 ) 800acee: f008 fb8b bl 8013408 800acf2: e7ee b.n 800acd2 LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams); 800acf4: 4b08 ldr r3, [pc, #32] @ (800ad18 ) 800acf6: 681b ldr r3, [r3, #0] 800acf8: 429c cmp r4, r3 800acfa: d006 beq.n 800ad0a 800acfc: 4b07 ldr r3, [pc, #28] @ (800ad1c ) 800acfe: f240 22ab movw r2, #683 @ 0x2ab 800ad02: 490a ldr r1, [pc, #40] @ (800ad2c ) 800ad04: 4807 ldr r0, [pc, #28] @ (800ad24 ) 800ad06: f008 fb7f bl 8013408 ip_reass_dequeue_datagram(ipr, NULL); 800ad0a: 2100 movs r1, #0 800ad0c: 4620 mov r0, r4 800ad0e: f7ff fcd9 bl 800a6c4 800ad12: e7e0 b.n 800acd6 800ad14: 24013048 .word 0x24013048 800ad18: 2401304c .word 0x2401304c 800ad1c: 080156dc .word 0x080156dc 800ad20: 0801585c .word 0x0801585c 800ad24: 080144e8 .word 0x080144e8 800ad28: 08015878 .word 0x08015878 800ad2c: 08015884 .word 0x08015884 0800ad30 : * * @return ERR_OK if sent successfully, err_t otherwise */ err_t ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) { 800ad30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 800ad34: b08b sub sp, #44 @ 0x2c 800ad36: 4606 mov r6, r0 800ad38: 9107 str r1, [sp, #28] 800ad3a: 9208 str r2, [sp, #32] u16_t newpbuflen = 0; u16_t left_to_copy; #endif struct ip_hdr *original_iphdr; struct ip_hdr *iphdr; const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8); 800ad3c: 8d0b ldrh r3, [r1, #40] @ 0x28 800ad3e: 3b14 subs r3, #20 800ad40: d44e bmi.n 800ade0 800ad42: f3c3 03cf ubfx r3, r3, #3, #16 800ad46: 9305 str r3, [sp, #20] int last; u16_t poff = IP_HLEN; u16_t tmp; int mf_set; original_iphdr = (struct ip_hdr *)p->payload; 800ad48: f8d6 b004 ldr.w fp, [r6, #4] iphdr = original_iphdr; if (IPH_HL_BYTES(iphdr) != IP_HLEN) { 800ad4c: f89b 3000 ldrb.w r3, [fp] 800ad50: f003 030f and.w r3, r3, #15 800ad54: 2b05 cmp r3, #5 800ad56: f040 80da bne.w 800af0e /* ip4_frag() does not support IP options */ return ERR_VAL; } LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL); 800ad5a: 8973 ldrh r3, [r6, #10] 800ad5c: 2b13 cmp r3, #19 800ad5e: d941 bls.n 800ade4 /* Save original offset */ tmp = lwip_ntohs(IPH_OFFSET(iphdr)); 800ad60: f8bb 0006 ldrh.w r0, [fp, #6] 800ad64: f7fd f88a bl 8007e7c ofo = tmp & IP_OFFMASK; 800ad68: f3c0 030c ubfx r3, r0, #0, #13 800ad6c: 9306 str r3, [sp, #24] /* already fragmented? if so, the last fragment we create must have MF, too */ mf_set = tmp & IP_MF; 800ad6e: f400 5300 and.w r3, r0, #8192 @ 0x2000 800ad72: 9309 str r3, [sp, #36] @ 0x24 left = (u16_t)(p->tot_len - IP_HLEN); 800ad74: 8933 ldrh r3, [r6, #8] 800ad76: 3b14 subs r3, #20 800ad78: fa1f f883 uxth.w r8, r3 u16_t poff = IP_HLEN; 800ad7c: 2714 movs r7, #20 u16_t newpbuflen = 0; 800ad7e: 2400 movs r4, #0 800ad80: f8cd 800c str.w r8, [sp, #12] while (left) { 800ad84: 9b03 ldr r3, [sp, #12] 800ad86: 2b00 cmp r3, #0 800ad88: f000 80bf beq.w 800af0a /* Fill this fragment */ fragsize = LWIP_MIN(left, (u16_t)(nfb * 8)); 800ad8c: 9b05 ldr r3, [sp, #20] 800ad8e: 00db lsls r3, r3, #3 800ad90: b29b uxth r3, r3 800ad92: 9a03 ldr r2, [sp, #12] 800ad94: 4293 cmp r3, r2 800ad96: bf28 it cs 800ad98: 4613 movcs r3, r2 800ad9a: 9304 str r3, [sp, #16] /* When not using a static buffer, create a chain of pbufs. * The first will be a PBUF_RAM holding the link and IP header. * The rest will be PBUF_REFs mirroring the pbuf chain to be fragged, * but limited to the size of an mtu. */ rambuf = pbuf_alloc(PBUF_LINK, IP_HLEN, PBUF_RAM); 800ad9c: f44f 7220 mov.w r2, #640 @ 0x280 800ada0: 2114 movs r1, #20 800ada2: 200e movs r0, #14 800ada4: f001 f864 bl 800be70 if (rambuf == NULL) { 800ada8: 4681 mov r9, r0 800adaa: 2800 cmp r0, #0 800adac: f000 80b2 beq.w 800af14 goto memerr; } LWIP_ASSERT("this needs a pbuf in one piece!", 800adb0: 8943 ldrh r3, [r0, #10] 800adb2: 2b13 cmp r3, #19 800adb4: d920 bls.n 800adf8 (rambuf->len >= (IP_HLEN))); SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); 800adb6: f8d9 3004 ldr.w r3, [r9, #4] 800adba: f8db 2000 ldr.w r2, [fp] 800adbe: f8db 5004 ldr.w r5, [fp, #4] 800adc2: f8db 0008 ldr.w r0, [fp, #8] 800adc6: f8db 100c ldr.w r1, [fp, #12] 800adca: 601a str r2, [r3, #0] 800adcc: 605d str r5, [r3, #4] 800adce: 6098 str r0, [r3, #8] 800add0: 60d9 str r1, [r3, #12] 800add2: f8db 2010 ldr.w r2, [fp, #16] 800add6: 611a str r2, [r3, #16] iphdr = (struct ip_hdr *)rambuf->payload; 800add8: f8d9 a004 ldr.w sl, [r9, #4] left_to_copy = fragsize; 800addc: 9d04 ldr r5, [sp, #16] while (left_to_copy) { 800adde: e03c b.n 800ae5a const u16_t nfb = (u16_t)((netif->mtu - IP_HLEN) / 8); 800ade0: 3307 adds r3, #7 800ade2: e7ae b.n 800ad42 LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL); 800ade4: 4b4d ldr r3, [pc, #308] @ (800af1c ) 800ade6: f44f 723f mov.w r2, #764 @ 0x2fc 800adea: 494d ldr r1, [pc, #308] @ (800af20 ) 800adec: 484d ldr r0, [pc, #308] @ (800af24 ) 800adee: f008 fb0b bl 8013408 800adf2: f06f 0005 mvn.w r0, #5 800adf6: e043 b.n 800ae80 LWIP_ASSERT("this needs a pbuf in one piece!", 800adf8: 4b48 ldr r3, [pc, #288] @ (800af1c ) 800adfa: f44f 7249 mov.w r2, #804 @ 0x324 800adfe: 494a ldr r1, [pc, #296] @ (800af28 ) 800ae00: 4848 ldr r0, [pc, #288] @ (800af24 ) 800ae02: f008 fb01 bl 8013408 800ae06: e7d6 b.n 800adb6 struct pbuf_custom_ref *pcr; u16_t plen = (u16_t)(p->len - poff); LWIP_ASSERT("p->len >= poff", p->len >= poff); 800ae08: 4b44 ldr r3, [pc, #272] @ (800af1c ) 800ae0a: f240 322d movw r2, #813 @ 0x32d 800ae0e: 4947 ldr r1, [pc, #284] @ (800af2c ) 800ae10: 4844 ldr r0, [pc, #272] @ (800af24 ) 800ae12: f008 faf9 bl 8013408 800ae16: e026 b.n 800ae66 if (!newpbuflen) { poff = 0; p = p->next; continue; } pcr = ip_frag_alloc_pbuf_custom_ref(); 800ae18: f7ff fe36 bl 800aa88 if (pcr == NULL) { 800ae1c: 4680 mov r8, r0 800ae1e: b350 cbz r0, 800ae76 pbuf_free(rambuf); goto memerr; } /* Mirror this pbuf, although we might not need all of it. */ newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, (u8_t *)p->payload + poff, newpbuflen); 800ae20: 6873 ldr r3, [r6, #4] newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 800ae22: 9401 str r4, [sp, #4] 800ae24: 443b add r3, r7 800ae26: 9300 str r3, [sp, #0] 800ae28: 4603 mov r3, r0 800ae2a: 2241 movs r2, #65 @ 0x41 800ae2c: 4621 mov r1, r4 800ae2e: 2000 movs r0, #0 800ae30: f000 ff4c bl 800bccc if (newpbuf == NULL) { 800ae34: 9002 str r0, [sp, #8] 800ae36: b330 cbz r0, 800ae86 ip_frag_free_pbuf_custom_ref(pcr); pbuf_free(rambuf); goto memerr; } pbuf_ref(p); 800ae38: 4630 mov r0, r6 800ae3a: f001 f93f bl 800c0bc pcr->original = p; 800ae3e: f8c8 6014 str.w r6, [r8, #20] pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; 800ae42: 4b3b ldr r3, [pc, #236] @ (800af30 ) 800ae44: f8c8 3010 str.w r3, [r8, #16] /* Add it to end of rambuf's chain, but using pbuf_cat, not pbuf_chain * so that it is removed when pbuf_dechain is later called on rambuf. */ pbuf_cat(rambuf, newpbuf); 800ae48: 9902 ldr r1, [sp, #8] 800ae4a: 4648 mov r0, r9 800ae4c: f001 f952 bl 800c0f4 left_to_copy = (u16_t)(left_to_copy - newpbuflen); 800ae50: 1b2d subs r5, r5, r4 800ae52: b2ad uxth r5, r5 if (left_to_copy) { 800ae54: b10d cbz r5, 800ae5a poff = 0; p = p->next; 800ae56: 6836 ldr r6, [r6, #0] poff = 0; 800ae58: 2700 movs r7, #0 while (left_to_copy) { 800ae5a: b1ed cbz r5, 800ae98 u16_t plen = (u16_t)(p->len - poff); 800ae5c: 8973 ldrh r3, [r6, #10] 800ae5e: 1bdc subs r4, r3, r7 800ae60: b2a4 uxth r4, r4 LWIP_ASSERT("p->len >= poff", p->len >= poff); 800ae62: 42bb cmp r3, r7 800ae64: d3d0 bcc.n 800ae08 newpbuflen = LWIP_MIN(left_to_copy, plen); 800ae66: 42ac cmp r4, r5 800ae68: bf28 it cs 800ae6a: 462c movcs r4, r5 if (!newpbuflen) { 800ae6c: 2c00 cmp r4, #0 800ae6e: d1d3 bne.n 800ae18 p = p->next; 800ae70: 6836 ldr r6, [r6, #0] poff = 0; 800ae72: 4627 mov r7, r4 continue; 800ae74: e7f1 b.n 800ae5a pbuf_free(rambuf); 800ae76: 4648 mov r0, r9 800ae78: f000 ff92 bl 800bda0 } MIB2_STATS_INC(mib2.ipfragoks); return ERR_OK; memerr: MIB2_STATS_INC(mib2.ipfragfails); return ERR_MEM; 800ae7c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } 800ae80: b00b add sp, #44 @ 0x2c 800ae82: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} ip_frag_free_pbuf_custom_ref(pcr); 800ae86: 4640 mov r0, r8 800ae88: f7ff fcfe bl 800a888 pbuf_free(rambuf); 800ae8c: 4648 mov r0, r9 800ae8e: f000 ff87 bl 800bda0 return ERR_MEM; 800ae92: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff goto memerr; 800ae96: e7f3 b.n 800ae80 poff = (u16_t)(poff + newpbuflen); 800ae98: 4427 add r7, r4 800ae9a: b2bf uxth r7, r7 last = (left <= netif->mtu - IP_HLEN); 800ae9c: 9b07 ldr r3, [sp, #28] 800ae9e: 8d1a ldrh r2, [r3, #40] @ 0x28 800aea0: 3a13 subs r2, #19 tmp = (IP_OFFMASK & (ofo)); 800aea2: 9b06 ldr r3, [sp, #24] 800aea4: f3c3 000c ubfx r0, r3, #0, #13 if (!last || mf_set) { 800aea8: 9b09 ldr r3, [sp, #36] @ 0x24 800aeaa: 3b00 subs r3, #0 800aeac: bf18 it ne 800aeae: 2301 movne r3, #1 800aeb0: 9903 ldr r1, [sp, #12] 800aeb2: 428a cmp r2, r1 800aeb4: bfd8 it le 800aeb6: f043 0301 orrle.w r3, r3, #1 800aeba: b10b cbz r3, 800aec0 tmp = tmp | IP_MF; 800aebc: f440 5000 orr.w r0, r0, #8192 @ 0x2000 IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); 800aec0: f7fc ffdc bl 8007e7c 800aec4: f8aa 0006 strh.w r0, [sl, #6] IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN))); 800aec8: 9d04 ldr r5, [sp, #16] 800aeca: f105 0014 add.w r0, r5, #20 800aece: b280 uxth r0, r0 800aed0: f7fc ffd4 bl 8007e7c 800aed4: f8aa 0002 strh.w r0, [sl, #2] IPH_CHKSUM_SET(iphdr, 0); 800aed8: 2300 movs r3, #0 800aeda: f88a 300a strb.w r3, [sl, #10] 800aede: f88a 300b strb.w r3, [sl, #11] netif->output(netif, rambuf, dest); 800aee2: 9807 ldr r0, [sp, #28] 800aee4: 6943 ldr r3, [r0, #20] 800aee6: 9a08 ldr r2, [sp, #32] 800aee8: 4649 mov r1, r9 800aeea: 4798 blx r3 pbuf_free(rambuf); 800aeec: 4648 mov r0, r9 800aeee: f000 ff57 bl 800bda0 left = (u16_t)(left - fragsize); 800aef2: 9b03 ldr r3, [sp, #12] 800aef4: eba3 0a05 sub.w sl, r3, r5 800aef8: fa1f f38a uxth.w r3, sl 800aefc: 9303 str r3, [sp, #12] ofo = (u16_t)(ofo + nfb); 800aefe: 9b06 ldr r3, [sp, #24] 800af00: 9a05 ldr r2, [sp, #20] 800af02: 4413 add r3, r2 800af04: b29b uxth r3, r3 800af06: 9306 str r3, [sp, #24] 800af08: e73c b.n 800ad84 return ERR_OK; 800af0a: 2000 movs r0, #0 800af0c: e7b8 b.n 800ae80 return ERR_VAL; 800af0e: f06f 0005 mvn.w r0, #5 800af12: e7b5 b.n 800ae80 return ERR_MEM; 800af14: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800af18: e7b2 b.n 800ae80 800af1a: bf00 nop 800af1c: 080156dc .word 0x080156dc 800af20: 080158a4 .word 0x080158a4 800af24: 080144e8 .word 0x080144e8 800af28: 080158c0 .word 0x080158c0 800af2c: 080158e0 .word 0x080158e0 800af30: 0800a8b5 .word 0x0800a8b5 0800af34 : #endif /* MEM_OVERFLOW_CHECK */ static struct mem * ptr_to_mem(mem_size_t ptr) { return (struct mem *)(void *)&ram[ptr]; 800af34: 4b01 ldr r3, [pc, #4] @ (800af3c ) 800af36: 681b ldr r3, [r3, #0] } 800af38: 4418 add r0, r3 800af3a: 4770 bx lr 800af3c: 2401305c .word 0x2401305c 0800af40 : static mem_size_t mem_to_ptr(void *mem) { return (mem_size_t)((u8_t *)mem - ram); 800af40: 4b01 ldr r3, [pc, #4] @ (800af48 ) 800af42: 681b ldr r3, [r3, #0] } 800af44: 1ac0 subs r0, r0, r3 800af46: 4770 bx lr 800af48: 2401305c .word 0x2401305c 0800af4c : /* Check if a struct mem is correctly linked. * If not, double-free is a possible reason. */ static int mem_link_valid(struct mem *mem) { 800af4c: b5f8 push {r3, r4, r5, r6, r7, lr} 800af4e: 4604 mov r4, r0 struct mem *nmem, *pmem; mem_size_t rmem_idx; rmem_idx = mem_to_ptr(mem); 800af50: f7ff fff6 bl 800af40 800af54: 4605 mov r5, r0 nmem = ptr_to_mem(mem->next); 800af56: 6826 ldr r6, [r4, #0] 800af58: 4630 mov r0, r6 800af5a: f7ff ffeb bl 800af34 800af5e: 4607 mov r7, r0 pmem = ptr_to_mem(mem->prev); 800af60: 6864 ldr r4, [r4, #4] 800af62: 4620 mov r0, r4 800af64: f7ff ffe6 bl 800af34 if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 800af68: 4b0e ldr r3, [pc, #56] @ (800afa4 ) 800af6a: 429e cmp r6, r3 800af6c: d80f bhi.n 800af8e 800af6e: 429c cmp r4, r3 800af70: d80f bhi.n 800af92 800af72: 42ac cmp r4, r5 800af74: d002 beq.n 800af7c ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 800af76: 6803 ldr r3, [r0, #0] 800af78: 42ab cmp r3, r5 800af7a: d10c bne.n 800af96 ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 800af7c: 4b0a ldr r3, [pc, #40] @ (800afa8 ) 800af7e: 681b ldr r3, [r3, #0] ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 800af80: 42bb cmp r3, r7 800af82: d00a beq.n 800af9a ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 800af84: 687b ldr r3, [r7, #4] 800af86: 42ab cmp r3, r5 800af88: d109 bne.n 800af9e return 0; } return 1; 800af8a: 2001 movs r0, #1 800af8c: e000 b.n 800af90 return 0; 800af8e: 2000 movs r0, #0 } 800af90: bdf8 pop {r3, r4, r5, r6, r7, pc} return 0; 800af92: 2000 movs r0, #0 800af94: e7fc b.n 800af90 800af96: 2000 movs r0, #0 800af98: e7fa b.n 800af90 return 1; 800af9a: 2001 movs r0, #1 800af9c: e7f8 b.n 800af90 return 0; 800af9e: 2000 movs r0, #0 800afa0: e7f6 b.n 800af90 800afa2: bf00 nop 800afa4: 0001ffe8 .word 0x0001ffe8 800afa8: 24013058 .word 0x24013058 0800afac : { 800afac: b538 push {r3, r4, r5, lr} 800afae: 4604 mov r4, r0 LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); 800afb0: 4b34 ldr r3, [pc, #208] @ (800b084 ) 800afb2: 681b ldr r3, [r3, #0] 800afb4: 4283 cmp r3, r0 800afb6: d83e bhi.n 800b036 LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); 800afb8: 4b33 ldr r3, [pc, #204] @ (800b088 ) 800afba: 681b ldr r3, [r3, #0] 800afbc: 42a3 cmp r3, r4 800afbe: d942 bls.n 800b046 LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); 800afc0: 7a23 ldrb r3, [r4, #8] 800afc2: 2b00 cmp r3, #0 800afc4: d147 bne.n 800b056 LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); 800afc6: 6822 ldr r2, [r4, #0] 800afc8: 4b30 ldr r3, [pc, #192] @ (800b08c ) 800afca: 429a cmp r2, r3 800afcc: d84b bhi.n 800b066 nmem = ptr_to_mem(mem->next); 800afce: 6820 ldr r0, [r4, #0] 800afd0: f7ff ffb0 bl 800af34 if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 800afd4: 4284 cmp r4, r0 800afd6: d015 beq.n 800b004 800afd8: 7a03 ldrb r3, [r0, #8] 800afda: b99b cbnz r3, 800b004 800afdc: 4b2a ldr r3, [pc, #168] @ (800b088 ) 800afde: 681b ldr r3, [r3, #0] 800afe0: 4283 cmp r3, r0 800afe2: d00f beq.n 800b004 if (lfree == nmem) { 800afe4: 4b2a ldr r3, [pc, #168] @ (800b090 ) 800afe6: 681b ldr r3, [r3, #0] 800afe8: 4283 cmp r3, r0 800afea: d044 beq.n 800b076 mem->next = nmem->next; 800afec: 6800 ldr r0, [r0, #0] 800afee: 6020 str r0, [r4, #0] if (nmem->next != MEM_SIZE_ALIGNED) { 800aff0: 4b26 ldr r3, [pc, #152] @ (800b08c ) 800aff2: 4298 cmp r0, r3 800aff4: d006 beq.n 800b004 ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem); 800aff6: f7ff ff9d bl 800af34 800affa: 4605 mov r5, r0 800affc: 4620 mov r0, r4 800affe: f7ff ff9f bl 800af40 800b002: 6068 str r0, [r5, #4] pmem = ptr_to_mem(mem->prev); 800b004: 6860 ldr r0, [r4, #4] 800b006: f7ff ff95 bl 800af34 800b00a: 4605 mov r5, r0 if (pmem != mem && pmem->used == 0) { 800b00c: 4284 cmp r4, r0 800b00e: d011 beq.n 800b034 800b010: 7a03 ldrb r3, [r0, #8] 800b012: b97b cbnz r3, 800b034 if (lfree == mem) { 800b014: 4b1e ldr r3, [pc, #120] @ (800b090 ) 800b016: 681b ldr r3, [r3, #0] 800b018: 42a3 cmp r3, r4 800b01a: d02f beq.n 800b07c pmem->next = mem->next; 800b01c: 6820 ldr r0, [r4, #0] 800b01e: 6028 str r0, [r5, #0] if (mem->next != MEM_SIZE_ALIGNED) { 800b020: 4b1a ldr r3, [pc, #104] @ (800b08c ) 800b022: 4298 cmp r0, r3 800b024: d006 beq.n 800b034 ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem); 800b026: f7ff ff85 bl 800af34 800b02a: 4604 mov r4, r0 800b02c: 4628 mov r0, r5 800b02e: f7ff ff87 bl 800af40 800b032: 6060 str r0, [r4, #4] } 800b034: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); 800b036: 4b17 ldr r3, [pc, #92] @ (800b094 ) 800b038: f240 12df movw r2, #479 @ 0x1df 800b03c: 4916 ldr r1, [pc, #88] @ (800b098 ) 800b03e: 4817 ldr r0, [pc, #92] @ (800b09c ) 800b040: f008 f9e2 bl 8013408 800b044: e7b8 b.n 800afb8 LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); 800b046: 4b13 ldr r3, [pc, #76] @ (800b094 ) 800b048: f44f 72f0 mov.w r2, #480 @ 0x1e0 800b04c: 4914 ldr r1, [pc, #80] @ (800b0a0 ) 800b04e: 4813 ldr r0, [pc, #76] @ (800b09c ) 800b050: f008 f9da bl 8013408 800b054: e7b4 b.n 800afc0 LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); 800b056: 4b0f ldr r3, [pc, #60] @ (800b094 ) 800b058: f240 12e1 movw r2, #481 @ 0x1e1 800b05c: 4911 ldr r1, [pc, #68] @ (800b0a4 ) 800b05e: 480f ldr r0, [pc, #60] @ (800b09c ) 800b060: f008 f9d2 bl 8013408 800b064: e7af b.n 800afc6 LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); 800b066: 4b0b ldr r3, [pc, #44] @ (800b094 ) 800b068: f44f 72f2 mov.w r2, #484 @ 0x1e4 800b06c: 490e ldr r1, [pc, #56] @ (800b0a8 ) 800b06e: 480b ldr r0, [pc, #44] @ (800b09c ) 800b070: f008 f9ca bl 8013408 800b074: e7ab b.n 800afce lfree = mem; 800b076: 4b06 ldr r3, [pc, #24] @ (800b090 ) 800b078: 601c str r4, [r3, #0] 800b07a: e7b7 b.n 800afec lfree = pmem; 800b07c: 4b04 ldr r3, [pc, #16] @ (800b090 ) 800b07e: 6018 str r0, [r3, #0] 800b080: e7cc b.n 800b01c 800b082: bf00 nop 800b084: 2401305c .word 0x2401305c 800b088: 24013058 .word 0x24013058 800b08c: 0001ffe8 .word 0x0001ffe8 800b090: 24013050 .word 0x24013050 800b094: 080158f0 .word 0x080158f0 800b098: 08015950 .word 0x08015950 800b09c: 080144e8 .word 0x080144e8 800b0a0: 08015968 .word 0x08015968 800b0a4: 08015984 .word 0x08015984 800b0a8: 080159a0 .word 0x080159a0 0800b0ac : { 800b0ac: b538 push {r3, r4, r5, lr} ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); 800b0ae: 4d10 ldr r5, [pc, #64] @ (800b0f0 ) 800b0b0: 4b10 ldr r3, [pc, #64] @ (800b0f4 ) 800b0b2: 602b str r3, [r5, #0] mem->next = MEM_SIZE_ALIGNED; 800b0b4: 4c10 ldr r4, [pc, #64] @ (800b0f8 ) 800b0b6: 601c str r4, [r3, #0] mem->prev = 0; 800b0b8: 2200 movs r2, #0 800b0ba: 605a str r2, [r3, #4] mem->used = 0; 800b0bc: 721a strb r2, [r3, #8] ram_end = ptr_to_mem(MEM_SIZE_ALIGNED); 800b0be: 4620 mov r0, r4 800b0c0: f7ff ff38 bl 800af34 800b0c4: 4b0d ldr r3, [pc, #52] @ (800b0fc ) 800b0c6: 6018 str r0, [r3, #0] ram_end->used = 1; 800b0c8: 2301 movs r3, #1 800b0ca: 7203 strb r3, [r0, #8] ram_end->next = MEM_SIZE_ALIGNED; 800b0cc: 6004 str r4, [r0, #0] ram_end->prev = MEM_SIZE_ALIGNED; 800b0ce: 6044 str r4, [r0, #4] lfree = (struct mem *)(void *)ram; 800b0d0: 682a ldr r2, [r5, #0] 800b0d2: 4b0b ldr r3, [pc, #44] @ (800b100 ) 800b0d4: 601a str r2, [r3, #0] if (sys_mutex_new(&mem_mutex) != ERR_OK) { 800b0d6: 480b ldr r0, [pc, #44] @ (800b104 ) 800b0d8: f001 ff9c bl 800d014 800b0dc: b900 cbnz r0, 800b0e0 } 800b0de: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("failed to create mem_mutex", 0); 800b0e0: 4b09 ldr r3, [pc, #36] @ (800b108 ) 800b0e2: f240 221f movw r2, #543 @ 0x21f 800b0e6: 4909 ldr r1, [pc, #36] @ (800b10c ) 800b0e8: 4809 ldr r0, [pc, #36] @ (800b110 ) 800b0ea: f008 f98d bl 8013408 } 800b0ee: e7f6 b.n 800b0de 800b0f0: 2401305c .word 0x2401305c 800b0f4: 30020000 .word 0x30020000 800b0f8: 0001ffe8 .word 0x0001ffe8 800b0fc: 24013058 .word 0x24013058 800b100: 24013050 .word 0x24013050 800b104: 24013054 .word 0x24013054 800b108: 080158f0 .word 0x080158f0 800b10c: 080159cc .word 0x080159cc 800b110: 080144e8 .word 0x080144e8 0800b114 : mem_free(void *rmem) { struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 800b114: 2800 cmp r0, #0 800b116: d060 beq.n 800b1da { 800b118: b538 push {r3, r4, r5, lr} 800b11a: 4604 mov r4, r0 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("mem_free(p == NULL) was called.\n")); return; } if ((((mem_ptr_t)rmem) & (MEM_ALIGNMENT - 1)) != 0) { 800b11c: f010 0f03 tst.w r0, #3 800b120: d117 bne.n 800b152 return; } /* Get the corresponding struct mem: */ /* cast through void* to get rid of alignment warnings */ mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET)); 800b122: f1a0 050c sub.w r5, r0, #12 if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) { 800b126: 4b2d ldr r3, [pc, #180] @ (800b1dc ) 800b128: 681b ldr r3, [r3, #0] 800b12a: 42ab cmp r3, r5 800b12c: d805 bhi.n 800b13a 800b12e: f100 030c add.w r3, r0, #12 800b132: 4a2b ldr r2, [pc, #172] @ (800b1e0 ) 800b134: 6812 ldr r2, [r2, #0] 800b136: 4293 cmp r3, r2 800b138: d917 bls.n 800b16a LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory"); 800b13a: 4b2a ldr r3, [pc, #168] @ (800b1e4 ) 800b13c: f240 227f movw r2, #639 @ 0x27f 800b140: 4929 ldr r1, [pc, #164] @ (800b1e8 ) 800b142: 482a ldr r0, [pc, #168] @ (800b1ec ) 800b144: f008 f960 bl 8013408 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); 800b148: f001 ff92 bl 800d070 800b14c: f001 ff9c bl 800d088 MEM_SANITY(); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); } 800b150: bd38 pop {r3, r4, r5, pc} LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment"); 800b152: 4b24 ldr r3, [pc, #144] @ (800b1e4 ) 800b154: f240 2273 movw r2, #627 @ 0x273 800b158: 4925 ldr r1, [pc, #148] @ (800b1f0 ) 800b15a: 4824 ldr r0, [pc, #144] @ (800b1ec ) 800b15c: f008 f954 bl 8013408 MEM_STATS_INC_LOCKED(illegal); 800b160: f001 ff86 bl 800d070 800b164: f001 ff90 bl 800d088 return; 800b168: e7f2 b.n 800b150 LWIP_MEM_FREE_PROTECT(); 800b16a: 4822 ldr r0, [pc, #136] @ (800b1f4 ) 800b16c: f001 ff5e bl 800d02c if (!mem->used) { 800b170: f814 3c04 ldrb.w r3, [r4, #-4] 800b174: b19b cbz r3, 800b19e if (!mem_link_valid(mem)) { 800b176: 4628 mov r0, r5 800b178: f7ff fee8 bl 800af4c 800b17c: b1f0 cbz r0, 800b1bc mem->used = 0; 800b17e: 2300 movs r3, #0 800b180: f804 3c04 strb.w r3, [r4, #-4] if (mem < lfree) { 800b184: 4b1c ldr r3, [pc, #112] @ (800b1f8 ) 800b186: 681b ldr r3, [r3, #0] 800b188: 42ab cmp r3, r5 800b18a: d901 bls.n 800b190 lfree = mem; 800b18c: 4b1a ldr r3, [pc, #104] @ (800b1f8 ) 800b18e: 601d str r5, [r3, #0] plug_holes(mem); 800b190: 4628 mov r0, r5 800b192: f7ff ff0b bl 800afac LWIP_MEM_FREE_UNPROTECT(); 800b196: 4817 ldr r0, [pc, #92] @ (800b1f4 ) 800b198: f001 ff4f bl 800d03a 800b19c: e7d8 b.n 800b150 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free"); 800b19e: 4b11 ldr r3, [pc, #68] @ (800b1e4 ) 800b1a0: f44f 7223 mov.w r2, #652 @ 0x28c 800b1a4: 4915 ldr r1, [pc, #84] @ (800b1fc ) 800b1a6: 4811 ldr r0, [pc, #68] @ (800b1ec ) 800b1a8: f008 f92e bl 8013408 LWIP_MEM_FREE_UNPROTECT(); 800b1ac: 4811 ldr r0, [pc, #68] @ (800b1f4 ) 800b1ae: f001 ff44 bl 800d03a MEM_STATS_INC_LOCKED(illegal); 800b1b2: f001 ff5d bl 800d070 800b1b6: f001 ff67 bl 800d088 return; 800b1ba: e7c9 b.n 800b150 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free"); 800b1bc: 4b09 ldr r3, [pc, #36] @ (800b1e4 ) 800b1be: f240 2295 movw r2, #661 @ 0x295 800b1c2: 490f ldr r1, [pc, #60] @ (800b200 ) 800b1c4: 4809 ldr r0, [pc, #36] @ (800b1ec ) 800b1c6: f008 f91f bl 8013408 LWIP_MEM_FREE_UNPROTECT(); 800b1ca: 480a ldr r0, [pc, #40] @ (800b1f4 ) 800b1cc: f001 ff35 bl 800d03a MEM_STATS_INC_LOCKED(illegal); 800b1d0: f001 ff4e bl 800d070 800b1d4: f001 ff58 bl 800d088 return; 800b1d8: e7ba b.n 800b150 800b1da: 4770 bx lr 800b1dc: 2401305c .word 0x2401305c 800b1e0: 24013058 .word 0x24013058 800b1e4: 080158f0 .word 0x080158f0 800b1e8: 08015a0c .word 0x08015a0c 800b1ec: 080144e8 .word 0x080144e8 800b1f0: 080159e8 .word 0x080159e8 800b1f4: 24013054 .word 0x24013054 800b1f8: 24013050 .word 0x24013050 800b1fc: 08015a28 .word 0x08015a28 800b200: 08015a50 .word 0x08015a50 0800b204 : * or NULL if newsize is > old size, in which case rmem is NOT touched * or freed! */ void * mem_trim(void *rmem, mem_size_t new_size) { 800b204: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 800b208: 4604 mov r4, r0 /* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */ LWIP_MEM_FREE_DECL_PROTECT(); /* Expand the size of the allocated memory region so that we can adjust for alignment. */ newsize = (mem_size_t)LWIP_MEM_ALIGN_SIZE(new_size); 800b20a: 1ccd adds r5, r1, #3 800b20c: f025 0503 bic.w r5, r5, #3 if (newsize < MIN_SIZE_ALIGNED) { 800b210: 2d0b cmp r5, #11 800b212: d800 bhi.n 800b216 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; 800b214: 250c movs r5, #12 } #if MEM_OVERFLOW_CHECK newsize += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED; #endif if ((newsize > MEM_SIZE_ALIGNED) || (newsize < new_size)) { 800b216: 428d cmp r5, r1 800b218: bf2c ite cs 800b21a: 2100 movcs r1, #0 800b21c: 2101 movcc r1, #1 800b21e: 4b53 ldr r3, [pc, #332] @ (800b36c ) 800b220: 429d cmp r5, r3 800b222: bf88 it hi 800b224: f041 0101 orrhi.w r1, r1, #1 800b228: 2900 cmp r1, #0 800b22a: f040 8098 bne.w 800b35e return NULL; } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && 800b22e: 4b50 ldr r3, [pc, #320] @ (800b370 ) 800b230: 681b ldr r3, [r3, #0] 800b232: 42a3 cmp r3, r4 800b234: d803 bhi.n 800b23e 800b236: 4b4f ldr r3, [pc, #316] @ (800b374 ) 800b238: 681b ldr r3, [r3, #0] 800b23a: 42a3 cmp r3, r4 800b23c: d806 bhi.n 800b24c 800b23e: 4b4e ldr r3, [pc, #312] @ (800b378 ) 800b240: f240 22d1 movw r2, #721 @ 0x2d1 800b244: 494d ldr r1, [pc, #308] @ (800b37c ) 800b246: 484e ldr r0, [pc, #312] @ (800b380 ) 800b248: f008 f8de bl 8013408 (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 800b24c: 4b48 ldr r3, [pc, #288] @ (800b370 ) 800b24e: 681b ldr r3, [r3, #0] 800b250: 42a3 cmp r3, r4 800b252: d83d bhi.n 800b2d0 800b254: 4b47 ldr r3, [pc, #284] @ (800b374 ) 800b256: 681b ldr r3, [r3, #0] 800b258: 42a3 cmp r3, r4 800b25a: d939 bls.n 800b2d0 mem = (struct mem *)(void *)((u8_t *)rmem - (SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET)); #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* ... and its offset pointer */ ptr = mem_to_ptr(mem); 800b25c: f1a4 000c sub.w r0, r4, #12 800b260: f7ff fe6e bl 800af40 800b264: 4607 mov r7, r0 size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD)); 800b266: f854 6c0c ldr.w r6, [r4, #-12] 800b26a: 1a36 subs r6, r6, r0 800b26c: 3e0c subs r6, #12 LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); 800b26e: 42b5 cmp r5, r6 800b270: d835 bhi.n 800b2de if (newsize > size) { 800b272: 42b5 cmp r5, r6 800b274: d875 bhi.n 800b362 /* not supported */ return NULL; } if (newsize == size) { 800b276: d076 beq.n 800b366 /* No change in size, simply return */ return rmem; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 800b278: 4842 ldr r0, [pc, #264] @ (800b384 ) 800b27a: f001 fed7 bl 800d02c mem2 = ptr_to_mem(mem->next); 800b27e: f854 9c0c ldr.w r9, [r4, #-12] 800b282: 4648 mov r0, r9 800b284: f7ff fe56 bl 800af34 800b288: 4680 mov r8, r0 if (mem2->used == 0) { 800b28a: 7a03 ldrb r3, [r0, #8] 800b28c: 2b00 cmp r3, #0 800b28e: d13c bne.n 800b30a /* The next struct is unused, we can simply move it at little */ mem_size_t next; LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 800b290: 4b36 ldr r3, [pc, #216] @ (800b36c ) 800b292: 4599 cmp r9, r3 800b294: d02b beq.n 800b2ee /* remember the old next pointer */ next = mem2->next; 800b296: f8d8 6000 ldr.w r6, [r8] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize); 800b29a: 443d add r5, r7 800b29c: 350c adds r5, #12 if (lfree == mem2) { 800b29e: 4b3a ldr r3, [pc, #232] @ (800b388 ) 800b2a0: 681b ldr r3, [r3, #0] 800b2a2: 4543 cmp r3, r8 800b2a4: d02b beq.n 800b2fe lfree = ptr_to_mem(ptr2); } mem2 = ptr_to_mem(ptr2); 800b2a6: 4628 mov r0, r5 800b2a8: f7ff fe44 bl 800af34 mem2->used = 0; 800b2ac: 2300 movs r3, #0 800b2ae: 7203 strb r3, [r0, #8] /* restore the next pointer */ mem2->next = next; 800b2b0: 6006 str r6, [r0, #0] /* link it back to mem */ mem2->prev = ptr; 800b2b2: 6047 str r7, [r0, #4] /* link mem to it */ mem->next = ptr2; 800b2b4: f844 5c0c str.w r5, [r4, #-12] /* last thing to restore linked list: as we have moved mem2, * let 'mem2->next->prev' point to mem2 again. but only if mem2->next is not * the end of the heap */ if (mem2->next != MEM_SIZE_ALIGNED) { 800b2b8: 6800 ldr r0, [r0, #0] 800b2ba: 4b2c ldr r3, [pc, #176] @ (800b36c ) 800b2bc: 4298 cmp r0, r3 800b2be: d002 beq.n 800b2c6 ptr_to_mem(mem2->next)->prev = ptr2; 800b2c0: f7ff fe38 bl 800af34 800b2c4: 6045 str r5, [r0, #4] #endif MEM_SANITY(); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); 800b2c6: 482f ldr r0, [pc, #188] @ (800b384 ) 800b2c8: f001 feb7 bl 800d03a return rmem; 800b2cc: 4620 mov r0, r4 800b2ce: e004 b.n 800b2da MEM_STATS_INC_LOCKED(illegal); 800b2d0: f001 fece bl 800d070 800b2d4: f001 fed8 bl 800d088 return rmem; 800b2d8: 4620 mov r0, r4 } 800b2da: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); 800b2de: 4b26 ldr r3, [pc, #152] @ (800b378 ) 800b2e0: f44f 7239 mov.w r2, #740 @ 0x2e4 800b2e4: 4929 ldr r1, [pc, #164] @ (800b38c ) 800b2e6: 4826 ldr r0, [pc, #152] @ (800b380 ) 800b2e8: f008 f88e bl 8013408 800b2ec: e7c1 b.n 800b272 LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 800b2ee: 4b22 ldr r3, [pc, #136] @ (800b378 ) 800b2f0: f240 22f5 movw r2, #757 @ 0x2f5 800b2f4: 4926 ldr r1, [pc, #152] @ (800b390 ) 800b2f6: 4822 ldr r0, [pc, #136] @ (800b380 ) 800b2f8: f008 f886 bl 8013408 800b2fc: e7cb b.n 800b296 lfree = ptr_to_mem(ptr2); 800b2fe: 4628 mov r0, r5 800b300: f7ff fe18 bl 800af34 800b304: 4b20 ldr r3, [pc, #128] @ (800b388 ) 800b306: 6018 str r0, [r3, #0] 800b308: e7cd b.n 800b2a6 } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) { 800b30a: f105 0318 add.w r3, r5, #24 800b30e: 42b3 cmp r3, r6 800b310: d8d9 bhi.n 800b2c6 ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + newsize); 800b312: 443d add r5, r7 800b314: 350c adds r5, #12 LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 800b316: 4b15 ldr r3, [pc, #84] @ (800b36c ) 800b318: 4599 cmp r9, r3 800b31a: d018 beq.n 800b34e mem2 = ptr_to_mem(ptr2); 800b31c: 4628 mov r0, r5 800b31e: f7ff fe09 bl 800af34 if (mem2 < lfree) { 800b322: 4b19 ldr r3, [pc, #100] @ (800b388 ) 800b324: 681b ldr r3, [r3, #0] 800b326: 4283 cmp r3, r0 800b328: d901 bls.n 800b32e lfree = mem2; 800b32a: 4b17 ldr r3, [pc, #92] @ (800b388 ) 800b32c: 6018 str r0, [r3, #0] mem2->used = 0; 800b32e: 2300 movs r3, #0 800b330: 7203 strb r3, [r0, #8] mem2->next = mem->next; 800b332: f854 3c0c ldr.w r3, [r4, #-12] 800b336: 6003 str r3, [r0, #0] mem2->prev = ptr; 800b338: 6047 str r7, [r0, #4] mem->next = ptr2; 800b33a: f844 5c0c str.w r5, [r4, #-12] if (mem2->next != MEM_SIZE_ALIGNED) { 800b33e: 6800 ldr r0, [r0, #0] 800b340: 4b0a ldr r3, [pc, #40] @ (800b36c ) 800b342: 4298 cmp r0, r3 800b344: d0bf beq.n 800b2c6 ptr_to_mem(mem2->next)->prev = ptr2; 800b346: f7ff fdf5 bl 800af34 800b34a: 6045 str r5, [r0, #4] 800b34c: e7bb b.n 800b2c6 LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 800b34e: 4b0a ldr r3, [pc, #40] @ (800b378 ) 800b350: f240 3216 movw r2, #790 @ 0x316 800b354: 490e ldr r1, [pc, #56] @ (800b390 ) 800b356: 480a ldr r0, [pc, #40] @ (800b380 ) 800b358: f008 f856 bl 8013408 800b35c: e7de b.n 800b31c return NULL; 800b35e: 2000 movs r0, #0 800b360: e7bb b.n 800b2da return NULL; 800b362: 2000 movs r0, #0 800b364: e7b9 b.n 800b2da return rmem; 800b366: 4620 mov r0, r4 800b368: e7b7 b.n 800b2da 800b36a: bf00 nop 800b36c: 0001ffe8 .word 0x0001ffe8 800b370: 2401305c .word 0x2401305c 800b374: 24013058 .word 0x24013058 800b378: 080158f0 .word 0x080158f0 800b37c: 08015a84 .word 0x08015a84 800b380: 080144e8 .word 0x080144e8 800b384: 24013054 .word 0x24013054 800b388: 24013050 .word 0x24013050 800b38c: 08015a9c .word 0x08015a9c 800b390: 08015abc .word 0x08015abc 0800b394 : #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT u8_t local_mem_free_count = 0; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_ALLOC_DECL_PROTECT(); if (size_in == 0) { 800b394: 2800 cmp r0, #0 800b396: f000 809e beq.w 800b4d6 { 800b39a: b5f8 push {r3, r4, r5, r6, r7, lr} 800b39c: 4603 mov r3, r0 return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ size = (mem_size_t)LWIP_MEM_ALIGN_SIZE(size_in); 800b39e: 1cc6 adds r6, r0, #3 800b3a0: f026 0603 bic.w r6, r6, #3 if (size < MIN_SIZE_ALIGNED) { 800b3a4: 2e0b cmp r6, #11 800b3a6: d800 bhi.n 800b3aa /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; 800b3a8: 260c movs r6, #12 } #if MEM_OVERFLOW_CHECK size += MEM_SANITY_REGION_BEFORE_ALIGNED + MEM_SANITY_REGION_AFTER_ALIGNED; #endif if ((size > MEM_SIZE_ALIGNED) || (size < size_in)) { 800b3aa: 429e cmp r6, r3 800b3ac: bf2c ite cs 800b3ae: 2300 movcs r3, #0 800b3b0: 2301 movcc r3, #1 800b3b2: 4a4b ldr r2, [pc, #300] @ (800b4e0 ) 800b3b4: 4296 cmp r6, r2 800b3b6: bf88 it hi 800b3b8: f043 0301 orrhi.w r3, r3, #1 800b3bc: 2b00 cmp r3, #0 800b3be: f040 808c bne.w 800b4da return NULL; } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 800b3c2: 4848 ldr r0, [pc, #288] @ (800b4e4 ) 800b3c4: f001 fe32 bl 800d02c #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; 800b3c8: 4b47 ldr r3, [pc, #284] @ (800b4e8 ) 800b3ca: 6818 ldr r0, [r3, #0] 800b3cc: f7ff fdb8 bl 800af40 800b3d0: 4605 mov r5, r0 800b3d2: e04f b.n 800b474 * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size); LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED); 800b3d4: 4b45 ldr r3, [pc, #276] @ (800b4ec ) 800b3d6: f240 3287 movw r2, #903 @ 0x387 800b3da: 4945 ldr r1, [pc, #276] @ (800b4f0 ) 800b3dc: 4845 ldr r0, [pc, #276] @ (800b4f4 ) 800b3de: f008 f813 bl 8013408 800b3e2: e060 b.n 800b4a6 * take care of this). * -> near fit or exact fit: do not split, no mem2 creation * also can't move mem->next directly behind mem, since mem->next * will always be used at this point! */ mem->used = 1; 800b3e4: 2301 movs r3, #1 800b3e6: 7203 strb r3, [r0, #8] MEM_STATS_INC_USED(used, mem->next - mem_to_ptr(mem)); } #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_malloc_adjust_lfree: #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if (mem == lfree) { 800b3e8: 4b3f ldr r3, [pc, #252] @ (800b4e8 ) 800b3ea: 6818 ldr r0, [r3, #0] 800b3ec: 42a0 cmp r0, r4 800b3ee: d012 beq.n 800b416 } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 800b3f0: 483c ldr r0, [pc, #240] @ (800b4e4 ) 800b3f2: f001 fe22 bl 800d03a LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", 800b3f6: 4426 add r6, r4 800b3f8: 360c adds r6, #12 800b3fa: 4b3f ldr r3, [pc, #252] @ (800b4f8 ) 800b3fc: 681b ldr r3, [r3, #0] 800b3fe: 429e cmp r6, r3 800b400: d81f bhi.n 800b442 (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", 800b402: f014 0503 ands.w r5, r4, #3 800b406: d124 bne.n 800b452 ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", 800b408: bb5d cbnz r5, 800b462 #if MEM_OVERFLOW_CHECK mem_overflow_init_element(mem, size_in); #endif MEM_SANITY(); return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; 800b40a: f104 000c add.w r0, r4, #12 800b40e: e061 b.n 800b4d4 cur = ptr_to_mem(cur->next); 800b410: 6800 ldr r0, [r0, #0] 800b412: f7ff fd8f bl 800af34 while (cur->used && cur != ram_end) { 800b416: 7a03 ldrb r3, [r0, #8] 800b418: b11b cbz r3, 800b422 800b41a: 4a37 ldr r2, [pc, #220] @ (800b4f8 ) 800b41c: 6812 ldr r2, [r2, #0] 800b41e: 4282 cmp r2, r0 800b420: d1f6 bne.n 800b410 lfree = cur; 800b422: 4a31 ldr r2, [pc, #196] @ (800b4e8 ) 800b424: 6010 str r0, [r2, #0] LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); 800b426: 4a34 ldr r2, [pc, #208] @ (800b4f8 ) 800b428: 6812 ldr r2, [r2, #0] 800b42a: 4282 cmp r2, r0 800b42c: d0e0 beq.n 800b3f0 800b42e: 2b00 cmp r3, #0 800b430: d0de beq.n 800b3f0 800b432: 4b2e ldr r3, [pc, #184] @ (800b4ec ) 800b434: f240 32b5 movw r2, #949 @ 0x3b5 800b438: 4930 ldr r1, [pc, #192] @ (800b4fc ) 800b43a: 482e ldr r0, [pc, #184] @ (800b4f4 ) 800b43c: f007 ffe4 bl 8013408 800b440: e7d6 b.n 800b3f0 LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", 800b442: 4b2a ldr r3, [pc, #168] @ (800b4ec ) 800b444: f240 32b9 movw r2, #953 @ 0x3b9 800b448: 492d ldr r1, [pc, #180] @ (800b500 ) 800b44a: 482a ldr r0, [pc, #168] @ (800b4f4 ) 800b44c: f007 ffdc bl 8013408 800b450: e7d7 b.n 800b402 LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", 800b452: 4b26 ldr r3, [pc, #152] @ (800b4ec ) 800b454: f240 32bb movw r2, #955 @ 0x3bb 800b458: 492a ldr r1, [pc, #168] @ (800b504 ) 800b45a: 4826 ldr r0, [pc, #152] @ (800b4f4 ) 800b45c: f007 ffd4 bl 8013408 800b460: e7d2 b.n 800b408 LWIP_ASSERT("mem_malloc: sanity check alignment", 800b462: 4b22 ldr r3, [pc, #136] @ (800b4ec ) 800b464: f240 32bd movw r2, #957 @ 0x3bd 800b468: 4927 ldr r1, [pc, #156] @ (800b508 ) 800b46a: 4822 ldr r0, [pc, #136] @ (800b4f4 ) 800b46c: f007 ffcc bl 8013408 800b470: e7cb b.n 800b40a ptr = ptr_to_mem(ptr)->next) { 800b472: 6825 ldr r5, [r4, #0] for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; 800b474: 4b1a ldr r3, [pc, #104] @ (800b4e0 ) 800b476: 1b9b subs r3, r3, r6 800b478: 42ab cmp r3, r5 800b47a: d927 bls.n 800b4cc mem = ptr_to_mem(ptr); 800b47c: 4628 mov r0, r5 800b47e: f7ff fd59 bl 800af34 800b482: 4604 mov r4, r0 if ((!mem->used) && 800b484: 7a03 ldrb r3, [r0, #8] 800b486: 2b00 cmp r3, #0 800b488: d1f3 bne.n 800b472 (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 800b48a: 6803 ldr r3, [r0, #0] 800b48c: 1b5b subs r3, r3, r5 800b48e: 3b0c subs r3, #12 if ((!mem->used) && 800b490: 42b3 cmp r3, r6 800b492: d3ee bcc.n 800b472 if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) { 800b494: f106 0218 add.w r2, r6, #24 800b498: 4293 cmp r3, r2 800b49a: d3a3 bcc.n 800b3e4 ptr2 = (mem_size_t)(ptr + SIZEOF_STRUCT_MEM + size); 800b49c: 19af adds r7, r5, r6 800b49e: 370c adds r7, #12 LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED); 800b4a0: 4b0f ldr r3, [pc, #60] @ (800b4e0 ) 800b4a2: 429f cmp r7, r3 800b4a4: d096 beq.n 800b3d4 mem2 = ptr_to_mem(ptr2); 800b4a6: 4638 mov r0, r7 800b4a8: f7ff fd44 bl 800af34 mem2->used = 0; 800b4ac: 2300 movs r3, #0 800b4ae: 7203 strb r3, [r0, #8] mem2->next = mem->next; 800b4b0: 6823 ldr r3, [r4, #0] 800b4b2: 6003 str r3, [r0, #0] mem2->prev = ptr; 800b4b4: 6045 str r5, [r0, #4] mem->next = ptr2; 800b4b6: 6027 str r7, [r4, #0] mem->used = 1; 800b4b8: 2301 movs r3, #1 800b4ba: 7223 strb r3, [r4, #8] if (mem2->next != MEM_SIZE_ALIGNED) { 800b4bc: 6800 ldr r0, [r0, #0] 800b4be: 4b08 ldr r3, [pc, #32] @ (800b4e0 ) 800b4c0: 4298 cmp r0, r3 800b4c2: d091 beq.n 800b3e8 ptr_to_mem(mem2->next)->prev = ptr2; 800b4c4: f7ff fd36 bl 800af34 800b4c8: 6047 str r7, [r0, #4] 800b4ca: e78d b.n 800b3e8 /* if we got interrupted by a mem_free, try again */ } while (local_mem_free_count != 0); #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ MEM_STATS_INC(err); LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 800b4cc: 4805 ldr r0, [pc, #20] @ (800b4e4 ) 800b4ce: f001 fdb4 bl 800d03a LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); return NULL; 800b4d2: 2000 movs r0, #0 } 800b4d4: bdf8 pop {r3, r4, r5, r6, r7, pc} return NULL; 800b4d6: 2000 movs r0, #0 } 800b4d8: 4770 bx lr return NULL; 800b4da: 2000 movs r0, #0 800b4dc: e7fa b.n 800b4d4 800b4de: bf00 nop 800b4e0: 0001ffe8 .word 0x0001ffe8 800b4e4: 24013054 .word 0x24013054 800b4e8: 24013050 .word 0x24013050 800b4ec: 080158f0 .word 0x080158f0 800b4f0: 08015abc .word 0x08015abc 800b4f4: 080144e8 .word 0x080144e8 800b4f8: 24013058 .word 0x24013058 800b4fc: 08015ad0 .word 0x08015ad0 800b500: 08015aec .word 0x08015aec 800b504: 08015b1c .word 0x08015b1c 800b508: 08015b4c .word 0x08015b4c 0800b50c : #if !MEMP_OVERFLOW_CHECK do_memp_malloc_pool(const struct memp_desc *desc) #else do_memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int line) #endif { 800b50c: b538 push {r3, r4, r5, lr} 800b50e: 4604 mov r4, r0 #if MEMP_MEM_MALLOC memp = (struct memp *)mem_malloc(MEMP_SIZE + MEMP_ALIGN_SIZE(desc->size)); SYS_ARCH_PROTECT(old_level); #else /* MEMP_MEM_MALLOC */ SYS_ARCH_PROTECT(old_level); 800b510: f001 fdae bl 800d070 800b514: 4605 mov r5, r0 memp = *desc->tab; 800b516: 68e3 ldr r3, [r4, #12] 800b518: 681c ldr r4, [r3, #0] #endif /* MEMP_MEM_MALLOC */ if (memp != NULL) { 800b51a: b18c cbz r4, 800b540 #if !MEMP_MEM_MALLOC #if MEMP_OVERFLOW_CHECK == 1 memp_overflow_check_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ *desc->tab = memp->next; 800b51c: 6822 ldr r2, [r4, #0] 800b51e: 601a str r2, [r3, #0] memp->line = line; #if MEMP_MEM_MALLOC memp_overflow_init_element(memp, desc); #endif /* MEMP_MEM_MALLOC */ #endif /* MEMP_OVERFLOW_CHECK */ LWIP_ASSERT("memp_malloc: memp properly aligned", 800b520: f014 0f03 tst.w r4, #3 800b524: d104 bne.n 800b530 desc->stats->used++; if (desc->stats->used > desc->stats->max) { desc->stats->max = desc->stats->used; } #endif SYS_ARCH_UNPROTECT(old_level); 800b526: 4628 mov r0, r5 800b528: f001 fdae bl 800d088 SYS_ARCH_UNPROTECT(old_level); LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); } return NULL; } 800b52c: 4620 mov r0, r4 800b52e: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("memp_malloc: memp properly aligned", 800b530: 4b05 ldr r3, [pc, #20] @ (800b548 ) 800b532: f44f 728c mov.w r2, #280 @ 0x118 800b536: 4905 ldr r1, [pc, #20] @ (800b54c ) 800b538: 4805 ldr r0, [pc, #20] @ (800b550 ) 800b53a: f007 ff65 bl 8013408 800b53e: e7f2 b.n 800b526 SYS_ARCH_UNPROTECT(old_level); 800b540: f001 fda2 bl 800d088 return NULL; 800b544: e7f2 b.n 800b52c 800b546: bf00 nop 800b548: 08015b70 .word 0x08015b70 800b54c: 08015bd0 .word 0x08015bd0 800b550: 080144e8 .word 0x080144e8 0800b554 : return memp; } static void do_memp_free_pool(const struct memp_desc *desc, void *mem) { 800b554: b538 push {r3, r4, r5, lr} 800b556: 4605 mov r5, r0 800b558: 460c mov r4, r1 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ASSERT("memp_free: mem properly aligned", 800b55a: f011 0f03 tst.w r1, #3 800b55e: d109 bne.n 800b574 ((mem_ptr_t)mem % MEM_ALIGNMENT) == 0); /* cast through void* to get rid of alignment warnings */ memp = (struct memp *)(void *)((u8_t *)mem - MEMP_SIZE); SYS_ARCH_PROTECT(old_level); 800b560: f001 fd86 bl 800d070 #if MEMP_MEM_MALLOC LWIP_UNUSED_ARG(desc); SYS_ARCH_UNPROTECT(old_level); mem_free(memp); #else /* MEMP_MEM_MALLOC */ memp->next = *desc->tab; 800b564: 68eb ldr r3, [r5, #12] 800b566: 681b ldr r3, [r3, #0] 800b568: 6023 str r3, [r4, #0] *desc->tab = memp; 800b56a: 68eb ldr r3, [r5, #12] 800b56c: 601c str r4, [r3, #0] #if MEMP_SANITY_CHECK LWIP_ASSERT("memp sanity", memp_sanity(desc)); #endif /* MEMP_SANITY_CHECK */ SYS_ARCH_UNPROTECT(old_level); 800b56e: f001 fd8b bl 800d088 #endif /* !MEMP_MEM_MALLOC */ } 800b572: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("memp_free: mem properly aligned", 800b574: 4b03 ldr r3, [pc, #12] @ (800b584 ) 800b576: f44f 72b6 mov.w r2, #364 @ 0x16c 800b57a: 4903 ldr r1, [pc, #12] @ (800b588 ) 800b57c: 4803 ldr r0, [pc, #12] @ (800b58c ) 800b57e: f007 ff43 bl 8013408 800b582: e7ed b.n 800b560 800b584: 08015b70 .word 0x08015b70 800b588: 08015bf4 .word 0x08015bf4 800b58c: 080144e8 .word 0x080144e8 0800b590 : *desc->tab = NULL; 800b590: 68c3 ldr r3, [r0, #12] 800b592: 2200 movs r2, #0 800b594: 601a str r2, [r3, #0] memp = (struct memp *)LWIP_MEM_ALIGN(desc->base); 800b596: 6883 ldr r3, [r0, #8] 800b598: 3303 adds r3, #3 800b59a: f023 0303 bic.w r3, r3, #3 for (i = 0; i < desc->num; ++i) { 800b59e: e007 b.n 800b5b0 memp->next = *desc->tab; 800b5a0: 68c1 ldr r1, [r0, #12] 800b5a2: 6809 ldr r1, [r1, #0] 800b5a4: 6019 str r1, [r3, #0] *desc->tab = memp; 800b5a6: 68c1 ldr r1, [r0, #12] 800b5a8: 600b str r3, [r1, #0] memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + desc->size 800b5aa: 8881 ldrh r1, [r0, #4] 800b5ac: 440b add r3, r1 for (i = 0; i < desc->num; ++i) { 800b5ae: 3201 adds r2, #1 800b5b0: 88c1 ldrh r1, [r0, #6] 800b5b2: 4291 cmp r1, r2 800b5b4: dcf4 bgt.n 800b5a0 } 800b5b6: 4770 bx lr 0800b5b8 : { 800b5b8: b510 push {r4, lr} for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 800b5ba: 2400 movs r4, #0 800b5bc: e006 b.n 800b5cc memp_init_pool(memp_pools[i]); 800b5be: 4b05 ldr r3, [pc, #20] @ (800b5d4 ) 800b5c0: f853 0024 ldr.w r0, [r3, r4, lsl #2] 800b5c4: f7ff ffe4 bl 800b590 for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 800b5c8: 3401 adds r4, #1 800b5ca: b2a4 uxth r4, r4 800b5cc: 2c0c cmp r4, #12 800b5ce: d9f6 bls.n 800b5be } 800b5d0: bd10 pop {r4, pc} 800b5d2: bf00 nop 800b5d4: 08015c64 .word 0x08015c64 0800b5d8 : { 800b5d8: b510 push {r4, lr} LWIP_ASSERT("invalid pool desc", desc != NULL); 800b5da: 4604 mov r4, r0 800b5dc: b110 cbz r0, 800b5e4 return do_memp_malloc_pool(desc); 800b5de: f7ff ff95 bl 800b50c } 800b5e2: bd10 pop {r4, pc} LWIP_ASSERT("invalid pool desc", desc != NULL); 800b5e4: 4b04 ldr r3, [pc, #16] @ (800b5f8 ) 800b5e6: f44f 729e mov.w r2, #316 @ 0x13c 800b5ea: 4904 ldr r1, [pc, #16] @ (800b5fc ) 800b5ec: 4804 ldr r0, [pc, #16] @ (800b600 ) 800b5ee: f007 ff0b bl 8013408 return NULL; 800b5f2: 4620 mov r0, r4 800b5f4: e7f5 b.n 800b5e2 800b5f6: bf00 nop 800b5f8: 08015b70 .word 0x08015b70 800b5fc: 08015c14 .word 0x08015c14 800b600: 080144e8 .word 0x080144e8 0800b604 : { 800b604: b508 push {r3, lr} LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 800b606: 280c cmp r0, #12 800b608: d805 bhi.n 800b616 memp = do_memp_malloc_pool(memp_pools[type]); 800b60a: 4b07 ldr r3, [pc, #28] @ (800b628 ) 800b60c: f853 0020 ldr.w r0, [r3, r0, lsl #2] 800b610: f7ff ff7c bl 800b50c } 800b614: bd08 pop {r3, pc} LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 800b616: 4b05 ldr r3, [pc, #20] @ (800b62c ) 800b618: f240 1257 movw r2, #343 @ 0x157 800b61c: 4904 ldr r1, [pc, #16] @ (800b630 ) 800b61e: 4805 ldr r0, [pc, #20] @ (800b634 ) 800b620: f007 fef2 bl 8013408 800b624: 2000 movs r0, #0 800b626: e7f5 b.n 800b614 800b628: 08015c64 .word 0x08015c64 800b62c: 08015b70 .word 0x08015b70 800b630: 08015c28 .word 0x08015c28 800b634: 080144e8 .word 0x080144e8 0800b638 : * @param desc the pool where to put mem * @param mem the memp element to free */ void memp_free_pool(const struct memp_desc *desc, void *mem) { 800b638: b538 push {r3, r4, r5, lr} 800b63a: 460c mov r4, r1 LWIP_ASSERT("invalid pool desc", desc != NULL); 800b63c: 4605 mov r5, r0 800b63e: b120 cbz r0, 800b64a if ((desc == NULL) || (mem == NULL)) { 800b640: 2c00 cmp r4, #0 800b642: bf18 it ne 800b644: 2d00 cmpne r5, #0 800b646: d108 bne.n 800b65a return; } do_memp_free_pool(desc, mem); } 800b648: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("invalid pool desc", desc != NULL); 800b64a: 4b06 ldr r3, [pc, #24] @ (800b664 ) 800b64c: f240 1295 movw r2, #405 @ 0x195 800b650: 4905 ldr r1, [pc, #20] @ (800b668 ) 800b652: 4806 ldr r0, [pc, #24] @ (800b66c ) 800b654: f007 fed8 bl 8013408 800b658: e7f2 b.n 800b640 do_memp_free_pool(desc, mem); 800b65a: 4621 mov r1, r4 800b65c: 4628 mov r0, r5 800b65e: f7ff ff79 bl 800b554 800b662: e7f1 b.n 800b648 800b664: 08015b70 .word 0x08015b70 800b668: 08015c14 .word 0x08015c14 800b66c: 080144e8 .word 0x080144e8 0800b670 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 800b670: b508 push {r3, lr} #ifdef LWIP_HOOK_MEMP_AVAILABLE struct memp *old_first; #endif LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;); 800b672: 280c cmp r0, #12 800b674: d806 bhi.n 800b684 if (mem == NULL) { 800b676: b121 cbz r1, 800b682 #ifdef LWIP_HOOK_MEMP_AVAILABLE old_first = *memp_pools[type]->tab; #endif do_memp_free_pool(memp_pools[type], mem); 800b678: 4b06 ldr r3, [pc, #24] @ (800b694 ) 800b67a: f853 0020 ldr.w r0, [r3, r0, lsl #2] 800b67e: f7ff ff69 bl 800b554 #ifdef LWIP_HOOK_MEMP_AVAILABLE if (old_first == NULL) { LWIP_HOOK_MEMP_AVAILABLE(type); } #endif } 800b682: bd08 pop {r3, pc} LWIP_ERROR("memp_free: type < MEMP_MAX", (type < MEMP_MAX), return;); 800b684: 4b04 ldr r3, [pc, #16] @ (800b698 ) 800b686: f44f 72d5 mov.w r2, #426 @ 0x1aa 800b68a: 4904 ldr r1, [pc, #16] @ (800b69c ) 800b68c: 4804 ldr r0, [pc, #16] @ (800b6a0 ) 800b68e: f007 febb bl 8013408 800b692: e7f6 b.n 800b682 800b694: 08015c64 .word 0x08015c64 800b698: 08015b70 .word 0x08015b70 800b69c: 08015c48 .word 0x08015c48 800b6a0: 080144e8 .word 0x080144e8 0800b6a4 : * @param buf pointer to a netbuf allocated by netbuf_new() */ void netbuf_delete(struct netbuf *buf) { if (buf != NULL) { 800b6a4: b168 cbz r0, 800b6c2 { 800b6a6: b510 push {r4, lr} 800b6a8: 4604 mov r4, r0 if (buf->p != NULL) { 800b6aa: 6800 ldr r0, [r0, #0] 800b6ac: b120 cbz r0, 800b6b8 pbuf_free(buf->p); 800b6ae: f000 fb77 bl 800bda0 buf->p = buf->ptr = NULL; 800b6b2: 2300 movs r3, #0 800b6b4: 6063 str r3, [r4, #4] 800b6b6: 6023 str r3, [r4, #0] } memp_free(MEMP_NETBUF, buf); 800b6b8: 4621 mov r1, r4 800b6ba: 2006 movs r0, #6 800b6bc: f7ff ffd8 bl 800b670 } } 800b6c0: bd10 pop {r4, pc} 800b6c2: 4770 bx lr 0800b6c4 : * * @param buf pointer to the netbuf which contains the packet buffer to free */ void netbuf_free(struct netbuf *buf) { 800b6c4: b510 push {r4, lr} LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;); 800b6c6: b140 cbz r0, 800b6da 800b6c8: 4604 mov r4, r0 if (buf->p != NULL) { 800b6ca: 6800 ldr r0, [r0, #0] 800b6cc: b108 cbz r0, 800b6d2 pbuf_free(buf->p); 800b6ce: f000 fb67 bl 800bda0 } buf->p = buf->ptr = NULL; 800b6d2: 2300 movs r3, #0 800b6d4: 6063 str r3, [r4, #4] 800b6d6: 6023 str r3, [r4, #0] #if LWIP_CHECKSUM_ON_COPY buf->flags = 0; buf->toport_chksum = 0; #endif /* LWIP_CHECKSUM_ON_COPY */ } 800b6d8: bd10 pop {r4, pc} LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;); 800b6da: 4b03 ldr r3, [pc, #12] @ (800b6e8 ) 800b6dc: 2281 movs r2, #129 @ 0x81 800b6de: 4903 ldr r1, [pc, #12] @ (800b6ec ) 800b6e0: 4803 ldr r0, [pc, #12] @ (800b6f0 ) 800b6e2: f007 fe91 bl 8013408 800b6e6: e7f7 b.n 800b6d8 800b6e8: 08015e00 .word 0x08015e00 800b6ec: 08015ea0 .word 0x08015ea0 800b6f0: 080144e8 .word 0x080144e8 0800b6f4 : * @return ERR_OK if data is referenced * ERR_MEM if data couldn't be referenced due to lack of memory */ err_t netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size) { 800b6f4: b570 push {r4, r5, r6, lr} LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;); 800b6f6: b1b0 cbz r0, 800b726 800b6f8: 460e mov r6, r1 800b6fa: 4615 mov r5, r2 800b6fc: 4604 mov r4, r0 if (buf->p != NULL) { 800b6fe: 6800 ldr r0, [r0, #0] 800b700: b108 cbz r0, 800b706 pbuf_free(buf->p); 800b702: f000 fb4d bl 800bda0 } buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); 800b706: 2241 movs r2, #65 @ 0x41 800b708: 2100 movs r1, #0 800b70a: 2036 movs r0, #54 @ 0x36 800b70c: f000 fbb0 bl 800be70 800b710: 6020 str r0, [r4, #0] if (buf->p == NULL) { 800b712: b188 cbz r0, 800b738 buf->ptr = NULL; return ERR_MEM; } ((struct pbuf_rom *)buf->p)->payload = dataptr; 800b714: 6046 str r6, [r0, #4] buf->p->len = buf->p->tot_len = size; 800b716: 6823 ldr r3, [r4, #0] 800b718: 811d strh r5, [r3, #8] 800b71a: 6823 ldr r3, [r4, #0] 800b71c: 815d strh r5, [r3, #10] buf->ptr = buf->p; 800b71e: 6823 ldr r3, [r4, #0] 800b720: 6063 str r3, [r4, #4] return ERR_OK; 800b722: 2000 movs r0, #0 } 800b724: bd70 pop {r4, r5, r6, pc} LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;); 800b726: 4b07 ldr r3, [pc, #28] @ (800b744 ) 800b728: 2299 movs r2, #153 @ 0x99 800b72a: 4907 ldr r1, [pc, #28] @ (800b748 ) 800b72c: 4807 ldr r0, [pc, #28] @ (800b74c ) 800b72e: f007 fe6b bl 8013408 800b732: f06f 000f mvn.w r0, #15 800b736: e7f5 b.n 800b724 buf->ptr = NULL; 800b738: 2300 movs r3, #0 800b73a: 6063 str r3, [r4, #4] return ERR_MEM; 800b73c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800b740: e7f0 b.n 800b724 800b742: bf00 nop 800b744: 08015e00 .word 0x08015e00 800b748: 08015ebc .word 0x08015ebc 800b74c: 080144e8 .word 0x080144e8 0800b750 : static int netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm) { /* address is actually being changed? */ if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) { 800b750: 680b ldr r3, [r1, #0] 800b752: 6882 ldr r2, [r0, #8] 800b754: 4293 cmp r3, r2 800b756: d002 beq.n 800b75e #else LWIP_UNUSED_ARG(old_nm); #endif mib2_remove_route_ip4(0, netif); /* set new netmask to netif */ ip4_addr_set(ip_2_ip4(&netif->netmask), netmask); 800b758: 6083 str r3, [r0, #8] netif->name[0], netif->name[1], ip4_addr1_16(netif_ip4_netmask(netif)), ip4_addr2_16(netif_ip4_netmask(netif)), ip4_addr3_16(netif_ip4_netmask(netif)), ip4_addr4_16(netif_ip4_netmask(netif)))); return 1; /* netmask changed */ 800b75a: 2001 movs r0, #1 800b75c: 4770 bx lr } return 0; /* netmask unchanged */ 800b75e: 2000 movs r0, #0 } 800b760: 4770 bx lr 0800b762 : static int netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw) { /* address is actually being changed? */ if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) { 800b762: 680b ldr r3, [r1, #0] 800b764: 68c2 ldr r2, [r0, #12] 800b766: 4293 cmp r3, r2 800b768: d002 beq.n 800b770 ip_addr_copy(*old_gw, *netif_ip_gw4(netif)); #else LWIP_UNUSED_ARG(old_gw); #endif ip4_addr_set(ip_2_ip4(&netif->gw), gw); 800b76a: 60c3 str r3, [r0, #12] netif->name[0], netif->name[1], ip4_addr1_16(netif_ip4_gw(netif)), ip4_addr2_16(netif_ip4_gw(netif)), ip4_addr3_16(netif_ip4_gw(netif)), ip4_addr4_16(netif_ip4_gw(netif)))); return 1; /* gateway changed */ 800b76c: 2001 movs r0, #1 800b76e: 4770 bx lr } return 0; /* gateway unchanged */ 800b770: 2000 movs r0, #0 } 800b772: 4770 bx lr 0800b774 : LWIP_UNUSED_ARG(netif); LWIP_UNUSED_ARG(p); LWIP_UNUSED_ARG(ipaddr); return ERR_IF; } 800b774: f06f 000b mvn.w r0, #11 800b778: 4770 bx lr 0800b77a : { 800b77a: b538 push {r3, r4, r5, lr} 800b77c: 4604 mov r4, r0 800b77e: 460d mov r5, r1 tcp_netif_ip_addr_changed(old_addr, new_addr); 800b780: f002 f956 bl 800da30 udp_netif_ip_addr_changed(old_addr, new_addr); 800b784: 4629 mov r1, r5 800b786: 4620 mov r0, r4 800b788: f006 fbc4 bl 8011f14 } 800b78c: bd38 pop {r3, r4, r5, pc} ... 0800b790 : { 800b790: b538 push {r3, r4, r5, lr} 800b792: 460c mov r4, r1 LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL); 800b794: 4605 mov r5, r0 800b796: b170 cbz r0, 800b7b6 if (!(netif->flags & NETIF_FLAG_LINK_UP) || 800b798: f895 3031 ldrb.w r3, [r5, #49] @ 0x31 800b79c: f003 0205 and.w r2, r3, #5 800b7a0: 2a05 cmp r2, #5 800b7a2: d107 bne.n 800b7b4 if ((report_type & NETIF_REPORT_TYPE_IPV4) && 800b7a4: f014 0f01 tst.w r4, #1 800b7a8: d004 beq.n 800b7b4 !ip4_addr_isany_val(*netif_ip4_addr(netif))) { 800b7aa: 686a ldr r2, [r5, #4] if ((report_type & NETIF_REPORT_TYPE_IPV4) && 800b7ac: b112 cbz r2, 800b7b4 if (netif->flags & (NETIF_FLAG_ETHARP)) { 800b7ae: f013 0f08 tst.w r3, #8 800b7b2: d108 bne.n 800b7c6 } 800b7b4: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL); 800b7b6: 4b06 ldr r3, [pc, #24] @ (800b7d0 ) 800b7b8: f240 326d movw r2, #877 @ 0x36d 800b7bc: 4905 ldr r1, [pc, #20] @ (800b7d4 ) 800b7be: 4806 ldr r0, [pc, #24] @ (800b7d8 ) 800b7c0: f007 fe22 bl 8013408 800b7c4: e7e8 b.n 800b798 etharp_gratuitous(netif); 800b7c6: 1d29 adds r1, r5, #4 800b7c8: 4628 mov r0, r5 800b7ca: f7fe f829 bl 8009820 800b7ce: e7f1 b.n 800b7b4 800b7d0: 08015ed4 .word 0x08015ed4 800b7d4: 08015f34 .word 0x08015f34 800b7d8: 080144e8 .word 0x080144e8 0800b7dc : { 800b7dc: b570 push {r4, r5, r6, lr} 800b7de: b082 sub sp, #8 800b7e0: 4604 mov r4, r0 800b7e2: 4615 mov r5, r2 LWIP_ASSERT("invalid pointer", ipaddr != NULL); 800b7e4: 460e mov r6, r1 800b7e6: b139 cbz r1, 800b7f8 LWIP_ASSERT("invalid pointer", old_addr != NULL); 800b7e8: b175 cbz r5, 800b808 if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) { 800b7ea: 6832 ldr r2, [r6, #0] 800b7ec: 6863 ldr r3, [r4, #4] 800b7ee: 429a cmp r2, r3 800b7f0: d112 bne.n 800b818 return 0; /* address unchanged */ 800b7f2: 2000 movs r0, #0 } 800b7f4: b002 add sp, #8 800b7f6: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("invalid pointer", ipaddr != NULL); 800b7f8: 4b10 ldr r3, [pc, #64] @ (800b83c ) 800b7fa: f240 12cb movw r2, #459 @ 0x1cb 800b7fe: 4910 ldr r1, [pc, #64] @ (800b840 ) 800b800: 4810 ldr r0, [pc, #64] @ (800b844 ) 800b802: f007 fe01 bl 8013408 800b806: e7ef b.n 800b7e8 LWIP_ASSERT("invalid pointer", old_addr != NULL); 800b808: 4b0c ldr r3, [pc, #48] @ (800b83c ) 800b80a: f44f 72e6 mov.w r2, #460 @ 0x1cc 800b80e: 490c ldr r1, [pc, #48] @ (800b840 ) 800b810: 480c ldr r0, [pc, #48] @ (800b844 ) 800b812: f007 fdf9 bl 8013408 800b816: e7e8 b.n 800b7ea *ip_2_ip4(&new_addr) = *ipaddr; 800b818: 9201 str r2, [sp, #4] ip_addr_copy(*old_addr, *netif_ip_addr4(netif)); 800b81a: 602b str r3, [r5, #0] netif_do_ip_addr_changed(old_addr, &new_addr); 800b81c: a901 add r1, sp, #4 800b81e: 4628 mov r0, r5 800b820: f7ff ffab bl 800b77a ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); 800b824: b13e cbz r6, 800b836 800b826: 6833 ldr r3, [r6, #0] 800b828: 6063 str r3, [r4, #4] netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4); 800b82a: 2101 movs r1, #1 800b82c: 4620 mov r0, r4 800b82e: f7ff ffaf bl 800b790 return 1; /* address changed */ 800b832: 2001 movs r0, #1 800b834: e7de b.n 800b7f4 ip4_addr_set(ip_2_ip4(&netif->ip_addr), ipaddr); 800b836: 2300 movs r3, #0 800b838: e7f6 b.n 800b828 800b83a: bf00 nop 800b83c: 08015ed4 .word 0x08015ed4 800b840: 08015f58 .word 0x08015f58 800b844: 080144e8 .word 0x080144e8 0800b848 : } 800b848: 4770 bx lr ... 0800b84c : { 800b84c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800b850: b082 sub sp, #8 800b852: 4605 mov r5, r0 800b854: 460c mov r4, r1 800b856: 4617 mov r7, r2 800b858: 461e mov r6, r3 LWIP_ASSERT_CORE_LOCKED(); 800b85a: f7f8 f957 bl 8003b0c if (ipaddr == NULL) { 800b85e: b1dc cbz r4, 800b898 if (netmask == NULL) { 800b860: b1e7 cbz r7, 800b89c if (gw == NULL) { 800b862: b1ee cbz r6, 800b8a0 remove = ip4_addr_isany(ipaddr); 800b864: b10c cbz r4, 800b86a 800b866: 6823 ldr r3, [r4, #0] 800b868: b9e3 cbnz r3, 800b8a4 if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { 800b86a: aa01 add r2, sp, #4 800b86c: 4621 mov r1, r4 800b86e: 4628 mov r0, r5 800b870: f7ff ffb4 bl 800b7dc 800b874: f04f 0801 mov.w r8, #1 if (netif_do_set_netmask(netif, netmask, old_nm)) { 800b878: 2200 movs r2, #0 800b87a: 4639 mov r1, r7 800b87c: 4628 mov r0, r5 800b87e: f7ff ff67 bl 800b750 if (netif_do_set_gw(netif, gw, old_gw)) { 800b882: 2200 movs r2, #0 800b884: 4631 mov r1, r6 800b886: 4628 mov r0, r5 800b888: f7ff ff6b bl 800b762 if (!remove) { 800b88c: f1b8 0f00 cmp.w r8, #0 800b890: d00b beq.n 800b8aa } 800b892: b002 add sp, #8 800b894: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} ipaddr = IP4_ADDR_ANY4; 800b898: 4c07 ldr r4, [pc, #28] @ (800b8b8 ) 800b89a: e7e1 b.n 800b860 netmask = IP4_ADDR_ANY4; 800b89c: 4f06 ldr r7, [pc, #24] @ (800b8b8 ) 800b89e: e7e0 b.n 800b862 gw = IP4_ADDR_ANY4; 800b8a0: 4e05 ldr r6, [pc, #20] @ (800b8b8 ) 800b8a2: e7df b.n 800b864 remove = ip4_addr_isany(ipaddr); 800b8a4: f04f 0800 mov.w r8, #0 800b8a8: e7e6 b.n 800b878 if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { 800b8aa: aa01 add r2, sp, #4 800b8ac: 4621 mov r1, r4 800b8ae: 4628 mov r0, r5 800b8b0: f7ff ff94 bl 800b7dc } 800b8b4: e7ed b.n 800b892 800b8b6: bf00 nop 800b8b8: 080156d8 .word 0x080156d8 0800b8bc : { 800b8bc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800b8c0: 4606 mov r6, r0 800b8c2: 460c mov r4, r1 800b8c4: 4615 mov r5, r2 800b8c6: 461f mov r7, r3 800b8c8: f8dd 801c ldr.w r8, [sp, #28] LWIP_ASSERT_CORE_LOCKED(); 800b8cc: f7f8 f91e bl 8003b0c LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL); 800b8d0: b33e cbz r6, 800b922 LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL); 800b8d2: f1b8 0f00 cmp.w r8, #0 800b8d6: d02d beq.n 800b934 if (ipaddr == NULL) { 800b8d8: 2c00 cmp r4, #0 800b8da: d034 beq.n 800b946 if (netmask == NULL) { 800b8dc: 2d00 cmp r5, #0 800b8de: d034 beq.n 800b94a if (gw == NULL) { 800b8e0: 2f00 cmp r7, #0 800b8e2: d034 beq.n 800b94e ip_addr_set_zero_ip4(&netif->ip_addr); 800b8e4: 2000 movs r0, #0 800b8e6: 6070 str r0, [r6, #4] ip_addr_set_zero_ip4(&netif->netmask); 800b8e8: 60b0 str r0, [r6, #8] ip_addr_set_zero_ip4(&netif->gw); 800b8ea: 60f0 str r0, [r6, #12] netif->output = netif_null_output_ip4; 800b8ec: 4b38 ldr r3, [pc, #224] @ (800b9d0 ) 800b8ee: 6173 str r3, [r6, #20] netif->mtu = 0; 800b8f0: 8530 strh r0, [r6, #40] @ 0x28 netif->flags = 0; 800b8f2: f886 0031 strb.w r0, [r6, #49] @ 0x31 memset(netif->client_data, 0, sizeof(netif->client_data)); 800b8f6: 6270 str r0, [r6, #36] @ 0x24 netif->link_callback = NULL; 800b8f8: 61f0 str r0, [r6, #28] netif->state = state; 800b8fa: 9b06 ldr r3, [sp, #24] 800b8fc: 6233 str r3, [r6, #32] netif->num = netif_num; 800b8fe: 4b35 ldr r3, [pc, #212] @ (800b9d4 ) 800b900: 781b ldrb r3, [r3, #0] 800b902: f886 3034 strb.w r3, [r6, #52] @ 0x34 netif->input = input; 800b906: 9b08 ldr r3, [sp, #32] 800b908: 6133 str r3, [r6, #16] netif_set_addr(netif, ipaddr, netmask, gw); 800b90a: 463b mov r3, r7 800b90c: 462a mov r2, r5 800b90e: 4621 mov r1, r4 800b910: 4630 mov r0, r6 800b912: f7ff ff9b bl 800b84c if (init(netif) != ERR_OK) { 800b916: 4630 mov r0, r6 800b918: 47c0 blx r8 800b91a: 2800 cmp r0, #0 800b91c: d03e beq.n 800b99c return NULL; 800b91e: 2000 movs r0, #0 800b920: e050 b.n 800b9c4 LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL); 800b922: 4b2d ldr r3, [pc, #180] @ (800b9d8 ) 800b924: f240 1227 movw r2, #295 @ 0x127 800b928: 492c ldr r1, [pc, #176] @ (800b9dc ) 800b92a: 482d ldr r0, [pc, #180] @ (800b9e0 ) 800b92c: f007 fd6c bl 8013408 800b930: 4630 mov r0, r6 800b932: e047 b.n 800b9c4 LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL); 800b934: 4b28 ldr r3, [pc, #160] @ (800b9d8 ) 800b936: f44f 7294 mov.w r2, #296 @ 0x128 800b93a: 492a ldr r1, [pc, #168] @ (800b9e4 ) 800b93c: 4828 ldr r0, [pc, #160] @ (800b9e0 ) 800b93e: f007 fd63 bl 8013408 800b942: 2000 movs r0, #0 800b944: e03e b.n 800b9c4 ipaddr = ip_2_ip4(IP4_ADDR_ANY); 800b946: 4c28 ldr r4, [pc, #160] @ (800b9e8 ) 800b948: e7c8 b.n 800b8dc netmask = ip_2_ip4(IP4_ADDR_ANY); 800b94a: 4d27 ldr r5, [pc, #156] @ (800b9e8 ) 800b94c: e7c8 b.n 800b8e0 gw = ip_2_ip4(IP4_ADDR_ANY); 800b94e: 4f26 ldr r7, [pc, #152] @ (800b9e8 ) 800b950: e7c8 b.n 800b8e4 netif->num = 0; 800b952: 2300 movs r3, #0 800b954: f886 3034 strb.w r3, [r6, #52] @ 0x34 800b958: e024 b.n 800b9a4 LWIP_ASSERT("netif already added", netif2 != netif); 800b95a: 4b1f ldr r3, [pc, #124] @ (800b9d8 ) 800b95c: f240 128b movw r2, #395 @ 0x18b 800b960: 4922 ldr r1, [pc, #136] @ (800b9ec ) 800b962: 481f ldr r0, [pc, #124] @ (800b9e0 ) 800b964: f007 fd50 bl 8013408 800b968: e009 b.n 800b97e if (netif2->num == netif->num) { 800b96a: f894 2034 ldrb.w r2, [r4, #52] @ 0x34 800b96e: f896 3034 ldrb.w r3, [r6, #52] @ 0x34 800b972: 429a cmp r2, r3 800b974: d00e beq.n 800b994 for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 800b976: 6824 ldr r4, [r4, #0] 800b978: b17c cbz r4, 800b99a LWIP_ASSERT("netif already added", netif2 != netif); 800b97a: 42a6 cmp r6, r4 800b97c: d0ed beq.n 800b95a num_netifs++; 800b97e: 3501 adds r5, #1 LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255); 800b980: 2dff cmp r5, #255 @ 0xff 800b982: ddf2 ble.n 800b96a 800b984: 4b14 ldr r3, [pc, #80] @ (800b9d8 ) 800b986: f240 128d movw r2, #397 @ 0x18d 800b98a: 4919 ldr r1, [pc, #100] @ (800b9f0 ) 800b98c: 4814 ldr r0, [pc, #80] @ (800b9e0 ) 800b98e: f007 fd3b bl 8013408 800b992: e7ea b.n 800b96a netif->num++; 800b994: 3301 adds r3, #1 800b996: f886 3034 strb.w r3, [r6, #52] @ 0x34 } while (netif2 != NULL); 800b99a: b13c cbz r4, 800b9ac if (netif->num == 255) { 800b99c: f896 3034 ldrb.w r3, [r6, #52] @ 0x34 800b9a0: 2bff cmp r3, #255 @ 0xff 800b9a2: d0d6 beq.n 800b952 for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 800b9a4: 4b13 ldr r3, [pc, #76] @ (800b9f4 ) 800b9a6: 681c ldr r4, [r3, #0] num_netifs = 0; 800b9a8: 2500 movs r5, #0 for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 800b9aa: e7e5 b.n 800b978 if (netif->num == 254) { 800b9ac: f896 3034 ldrb.w r3, [r6, #52] @ 0x34 800b9b0: 2bfe cmp r3, #254 @ 0xfe 800b9b2: d009 beq.n 800b9c8 netif_num = (u8_t)(netif->num + 1); 800b9b4: 3301 adds r3, #1 800b9b6: 4a07 ldr r2, [pc, #28] @ (800b9d4 ) 800b9b8: 7013 strb r3, [r2, #0] netif->next = netif_list; 800b9ba: 4b0e ldr r3, [pc, #56] @ (800b9f4 ) 800b9bc: 681a ldr r2, [r3, #0] 800b9be: 6032 str r2, [r6, #0] netif_list = netif; 800b9c0: 601e str r6, [r3, #0] return netif; 800b9c2: 4630 mov r0, r6 } 800b9c4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} netif_num = 0; 800b9c8: 4b02 ldr r3, [pc, #8] @ (800b9d4 ) 800b9ca: 2200 movs r2, #0 800b9cc: 701a strb r2, [r3, #0] 800b9ce: e7f4 b.n 800b9ba 800b9d0: 0800b775 .word 0x0800b775 800b9d4: 24019b7b .word 0x24019b7b 800b9d8: 08015ed4 .word 0x08015ed4 800b9dc: 08015f68 .word 0x08015f68 800b9e0: 080144e8 .word 0x080144e8 800b9e4: 08015f84 .word 0x08015f84 800b9e8: 080156d8 .word 0x080156d8 800b9ec: 08015fa8 .word 0x08015fa8 800b9f0: 08015fbc .word 0x08015fbc 800b9f4: 24019b80 .word 0x24019b80 0800b9f8 : { 800b9f8: b510 push {r4, lr} 800b9fa: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 800b9fc: f7f8 f886 bl 8003b0c netif_default = netif; 800ba00: 4b01 ldr r3, [pc, #4] @ (800ba08 ) 800ba02: 601c str r4, [r3, #0] } 800ba04: bd10 pop {r4, pc} 800ba06: bf00 nop 800ba08: 24019b7c .word 0x24019b7c 0800ba0c : { 800ba0c: b510 push {r4, lr} 800ba0e: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 800ba10: f7f8 f87c bl 8003b0c LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return); 800ba14: b12c cbz r4, 800ba22 if (!(netif->flags & NETIF_FLAG_UP)) { 800ba16: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 800ba1a: f013 0f01 tst.w r3, #1 800ba1e: d008 beq.n 800ba32 } 800ba20: bd10 pop {r4, pc} LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return); 800ba22: 4b08 ldr r3, [pc, #32] @ (800ba44 ) 800ba24: f44f 7254 mov.w r2, #848 @ 0x350 800ba28: 4907 ldr r1, [pc, #28] @ (800ba48 ) 800ba2a: 4808 ldr r0, [pc, #32] @ (800ba4c ) 800ba2c: f007 fcec bl 8013408 800ba30: e7f6 b.n 800ba20 netif_set_flags(netif, NETIF_FLAG_UP); 800ba32: f043 0301 orr.w r3, r3, #1 800ba36: f884 3031 strb.w r3, [r4, #49] @ 0x31 netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); 800ba3a: 2103 movs r1, #3 800ba3c: 4620 mov r0, r4 800ba3e: f7ff fea7 bl 800b790 800ba42: e7ed b.n 800ba20 800ba44: 08015ed4 .word 0x08015ed4 800ba48: 08015fec .word 0x08015fec 800ba4c: 080144e8 .word 0x080144e8 0800ba50 : { 800ba50: b510 push {r4, lr} 800ba52: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 800ba54: f7f8 f85a bl 8003b0c LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return); 800ba58: b164 cbz r4, 800ba74 if (netif->flags & NETIF_FLAG_UP) { 800ba5a: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 800ba5e: f013 0f01 tst.w r3, #1 800ba62: d006 beq.n 800ba72 netif_clear_flags(netif, NETIF_FLAG_UP); 800ba64: f003 02fe and.w r2, r3, #254 @ 0xfe 800ba68: f884 2031 strb.w r2, [r4, #49] @ 0x31 if (netif->flags & NETIF_FLAG_ETHARP) { 800ba6c: f013 0f08 tst.w r3, #8 800ba70: d108 bne.n 800ba84 } 800ba72: bd10 pop {r4, pc} LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return); 800ba74: 4b05 ldr r3, [pc, #20] @ (800ba8c ) 800ba76: f240 329b movw r2, #923 @ 0x39b 800ba7a: 4905 ldr r1, [pc, #20] @ (800ba90 ) 800ba7c: 4805 ldr r0, [pc, #20] @ (800ba94 ) 800ba7e: f007 fcc3 bl 8013408 800ba82: e7f6 b.n 800ba72 etharp_cleanup_netif(netif); 800ba84: 4620 mov r0, r4 800ba86: f7fd fe49 bl 800971c NETIF_STATUS_CALLBACK(netif); 800ba8a: e7f2 b.n 800ba72 800ba8c: 08015ed4 .word 0x08015ed4 800ba90: 08016008 .word 0x08016008 800ba94: 080144e8 .word 0x080144e8 0800ba98 : { 800ba98: b510 push {r4, lr} 800ba9a: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 800ba9c: f7f8 f836 bl 8003b0c LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return); 800baa0: b12c cbz r4, 800baae if (!(netif->flags & NETIF_FLAG_LINK_UP)) { 800baa2: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 800baa6: f013 0f04 tst.w r3, #4 800baaa: d008 beq.n 800babe } 800baac: bd10 pop {r4, pc} LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return); 800baae: 4b0c ldr r3, [pc, #48] @ (800bae0 ) 800bab0: f44f 7278 mov.w r2, #992 @ 0x3e0 800bab4: 490b ldr r1, [pc, #44] @ (800bae4 ) 800bab6: 480c ldr r0, [pc, #48] @ (800bae8 ) 800bab8: f007 fca6 bl 8013408 800babc: e7f6 b.n 800baac netif_set_flags(netif, NETIF_FLAG_LINK_UP); 800babe: f043 0304 orr.w r3, r3, #4 800bac2: f884 3031 strb.w r3, [r4, #49] @ 0x31 dhcp_network_changed(netif); 800bac6: 4620 mov r0, r4 800bac8: f7fd f9fe bl 8008ec8 netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); 800bacc: 2103 movs r1, #3 800bace: 4620 mov r0, r4 800bad0: f7ff fe5e bl 800b790 NETIF_LINK_CALLBACK(netif); 800bad4: 69e3 ldr r3, [r4, #28] 800bad6: 2b00 cmp r3, #0 800bad8: d0e8 beq.n 800baac 800bada: 4620 mov r0, r4 800badc: 4798 blx r3 800bade: e7e5 b.n 800baac 800bae0: 08015ed4 .word 0x08015ed4 800bae4: 08016028 .word 0x08016028 800bae8: 080144e8 .word 0x080144e8 0800baec : { 800baec: b510 push {r4, lr} 800baee: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 800baf0: f7f8 f80c bl 8003b0c LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return); 800baf4: b16c cbz r4, 800bb12 if (netif->flags & NETIF_FLAG_LINK_UP) { 800baf6: f894 3031 ldrb.w r3, [r4, #49] @ 0x31 800bafa: f013 0f04 tst.w r3, #4 800bafe: d007 beq.n 800bb10 netif_clear_flags(netif, NETIF_FLAG_LINK_UP); 800bb00: f003 03fb and.w r3, r3, #251 @ 0xfb 800bb04: f884 3031 strb.w r3, [r4, #49] @ 0x31 NETIF_LINK_CALLBACK(netif); 800bb08: 69e3 ldr r3, [r4, #28] 800bb0a: b10b cbz r3, 800bb10 800bb0c: 4620 mov r0, r4 800bb0e: 4798 blx r3 } 800bb10: bd10 pop {r4, pc} LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return); 800bb12: 4b04 ldr r3, [pc, #16] @ (800bb24 ) 800bb14: f240 4206 movw r2, #1030 @ 0x406 800bb18: 4903 ldr r1, [pc, #12] @ (800bb28 ) 800bb1a: 4804 ldr r0, [pc, #16] @ (800bb2c ) 800bb1c: f007 fc74 bl 8013408 800bb20: e7f6 b.n 800bb10 800bb22: bf00 nop 800bb24: 08015ed4 .word 0x08015ed4 800bb28: 0801604c .word 0x0801604c 800bb2c: 080144e8 .word 0x080144e8 0800bb30 : { 800bb30: b538 push {r3, r4, r5, lr} 800bb32: 4604 mov r4, r0 800bb34: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800bb36: f7f7 ffe9 bl 8003b0c if (netif) { 800bb3a: b104 cbz r4, 800bb3e netif->link_callback = link_callback; 800bb3c: 61e5 str r5, [r4, #28] } 800bb3e: bd38 pop {r3, r4, r5, pc} 0800bb40 : * * @param idx index of netif to find */ struct netif * netif_get_by_index(u8_t idx) { 800bb40: b510 push {r4, lr} 800bb42: 4604 mov r4, r0 struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); 800bb44: f7f7 ffe2 bl 8003b0c if (idx != NETIF_NO_INDEX) { 800bb48: b154 cbz r4, 800bb60 NETIF_FOREACH(netif) { 800bb4a: 4b06 ldr r3, [pc, #24] @ (800bb64 ) 800bb4c: 6818 ldr r0, [r3, #0] 800bb4e: b140 cbz r0, 800bb62 if (idx == netif_get_index(netif)) { 800bb50: f890 3034 ldrb.w r3, [r0, #52] @ 0x34 800bb54: 3301 adds r3, #1 800bb56: b2db uxtb r3, r3 800bb58: 42a3 cmp r3, r4 800bb5a: d002 beq.n 800bb62 NETIF_FOREACH(netif) { 800bb5c: 6800 ldr r0, [r0, #0] 800bb5e: e7f6 b.n 800bb4e return netif; /* found! */ } } } return NULL; 800bb60: 2000 movs r0, #0 } 800bb62: bd10 pop {r4, pc} 800bb64: 24019b80 .word 0x24019b80 0800bb68 : #endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ /* Initialize members of struct pbuf after allocation */ static void pbuf_init_alloced_pbuf(struct pbuf *p, void *payload, u16_t tot_len, u16_t len, pbuf_type type, u8_t flags) { 800bb68: b410 push {r4} p->next = NULL; 800bb6a: 2400 movs r4, #0 800bb6c: 6004 str r4, [r0, #0] p->payload = payload; 800bb6e: 6041 str r1, [r0, #4] p->tot_len = tot_len; 800bb70: 8102 strh r2, [r0, #8] p->len = len; 800bb72: 8143 strh r3, [r0, #10] p->type_internal = (u8_t)type; 800bb74: f89d 3004 ldrb.w r3, [sp, #4] 800bb78: 7303 strb r3, [r0, #12] p->flags = flags; 800bb7a: f89d 3008 ldrb.w r3, [sp, #8] 800bb7e: 7343 strb r3, [r0, #13] p->ref = 1; 800bb80: 2301 movs r3, #1 800bb82: 7383 strb r3, [r0, #14] p->if_idx = NETIF_NO_INDEX; 800bb84: 73c4 strb r4, [r0, #15] } 800bb86: f85d 4b04 ldr.w r4, [sp], #4 800bb8a: 4770 bx lr 0800bb8c : * @return non-zero on failure, zero on success. * */ static u8_t pbuf_add_header_impl(struct pbuf *p, size_t header_size_increment, u8_t force) { 800bb8c: b570 push {r4, r5, r6, lr} 800bb8e: 460c mov r4, r1 800bb90: 4616 mov r6, r2 u16_t type_internal; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 800bb92: 4605 mov r5, r0 800bb94: b1c8 cbz r0, 800bbca if ((p == NULL) || (header_size_increment > 0xFFFF)) { 800bb96: 2d00 cmp r5, #0 800bb98: bf18 it ne 800bb9a: f5b4 3f80 cmpne.w r4, #65536 @ 0x10000 800bb9e: d224 bcs.n 800bbea return 1; } if (header_size_increment == 0) { 800bba0: b32c cbz r4, 800bbee return 0; } increment_magnitude = (u16_t)header_size_increment; 800bba2: b2a2 uxth r2, r4 /* Do not allow tot_len to wrap as a result. */ if ((u16_t)(increment_magnitude + p->tot_len) < increment_magnitude) { 800bba4: 892b ldrh r3, [r5, #8] 800bba6: 4413 add r3, r2 800bba8: b29b uxth r3, r3 800bbaa: 4293 cmp r3, r2 800bbac: d321 bcc.n 800bbf2 } type_internal = p->type_internal; /* pbuf types containing payloads? */ if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) { 800bbae: f995 100c ldrsb.w r1, [r5, #12] 800bbb2: 2900 cmp r1, #0 800bbb4: db11 blt.n 800bbda return 1; } /* pbuf types referring to external payloads? */ } else { /* hide a header in the payload? */ if (force) { 800bbb6: b1f6 cbz r6, 800bbf6 payload = (u8_t *)p->payload - header_size_increment; 800bbb8: 6869 ldr r1, [r5, #4] 800bbba: 1b0c subs r4, r1, r4 } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_add_header: old %p new %p (%"U16_F")\n", (void *)p->payload, (void *)payload, increment_magnitude)); /* modify pbuf fields */ p->payload = payload; 800bbbc: 606c str r4, [r5, #4] p->len = (u16_t)(p->len + increment_magnitude); 800bbbe: 8969 ldrh r1, [r5, #10] 800bbc0: 440a add r2, r1 800bbc2: 816a strh r2, [r5, #10] p->tot_len = (u16_t)(p->tot_len + increment_magnitude); 800bbc4: 812b strh r3, [r5, #8] return 0; 800bbc6: 2000 movs r0, #0 800bbc8: e010 b.n 800bbec LWIP_ASSERT("p != NULL", p != NULL); 800bbca: 4b0c ldr r3, [pc, #48] @ (800bbfc ) 800bbcc: f240 12df movw r2, #479 @ 0x1df 800bbd0: 490b ldr r1, [pc, #44] @ (800bc00 ) 800bbd2: 480c ldr r0, [pc, #48] @ (800bc04 ) 800bbd4: f007 fc18 bl 8013408 800bbd8: e7dd b.n 800bb96 payload = (u8_t *)p->payload - header_size_increment; 800bbda: 6869 ldr r1, [r5, #4] 800bbdc: 1b0c subs r4, r1, r4 if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 800bbde: f105 0110 add.w r1, r5, #16 800bbe2: 42a1 cmp r1, r4 800bbe4: d9ea bls.n 800bbbc return 1; 800bbe6: 2001 movs r0, #1 800bbe8: e000 b.n 800bbec return 1; 800bbea: 2001 movs r0, #1 } 800bbec: bd70 pop {r4, r5, r6, pc} return 0; 800bbee: 2000 movs r0, #0 800bbf0: e7fc b.n 800bbec return 1; 800bbf2: 2001 movs r0, #1 800bbf4: e7fa b.n 800bbec return 1; 800bbf6: 2001 movs r0, #1 800bbf8: e7f8 b.n 800bbec 800bbfa: bf00 nop 800bbfc: 08016070 .word 0x08016070 800bc00: 08014fc0 .word 0x08014fc0 800bc04: 080144e8 .word 0x080144e8 0800bc08 : { 800bc08: b510 push {r4, lr} SYS_ARCH_PROTECT(old_level); 800bc0a: f001 fa31 bl 800d070 queued = pbuf_free_ooseq_pending; 800bc0e: 4b0b ldr r3, [pc, #44] @ (800bc3c ) 800bc10: 781c ldrb r4, [r3, #0] 800bc12: b2e4 uxtb r4, r4 pbuf_free_ooseq_pending = 1; 800bc14: 2201 movs r2, #1 800bc16: 701a strb r2, [r3, #0] SYS_ARCH_UNPROTECT(old_level); 800bc18: f001 fa36 bl 800d088 if (!queued) { 800bc1c: b104 cbz r4, 800bc20 } 800bc1e: bd10 pop {r4, pc} PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); 800bc20: 2100 movs r1, #0 800bc22: 4807 ldr r0, [pc, #28] @ (800bc40 ) 800bc24: f005 fc0e bl 8011444 800bc28: 2800 cmp r0, #0 800bc2a: d0f8 beq.n 800bc1e 800bc2c: f001 fa20 bl 800d070 800bc30: 4b02 ldr r3, [pc, #8] @ (800bc3c ) 800bc32: 2200 movs r2, #0 800bc34: 701a strb r2, [r3, #0] 800bc36: f001 fa27 bl 800d088 } 800bc3a: e7f0 b.n 800bc1e 800bc3c: 24019b84 .word 0x24019b84 800bc40: 0800bc75 .word 0x0800bc75 0800bc44 : { 800bc44: b508 push {r3, lr} SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); 800bc46: f001 fa13 bl 800d070 800bc4a: 4b08 ldr r3, [pc, #32] @ (800bc6c ) 800bc4c: 2200 movs r2, #0 800bc4e: 701a strb r2, [r3, #0] 800bc50: f001 fa1a bl 800d088 for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 800bc54: 4b06 ldr r3, [pc, #24] @ (800bc70 ) 800bc56: 6818 ldr r0, [r3, #0] 800bc58: e000 b.n 800bc5c 800bc5a: 68c0 ldr r0, [r0, #12] 800bc5c: b120 cbz r0, 800bc68 if (pcb->ooseq != NULL) { 800bc5e: 6f43 ldr r3, [r0, #116] @ 0x74 800bc60: 2b00 cmp r3, #0 800bc62: d0fa beq.n 800bc5a tcp_free_ooseq(pcb); 800bc64: f001 fd4c bl 800d700 } 800bc68: bd08 pop {r3, pc} 800bc6a: bf00 nop 800bc6c: 24019b84 .word 0x24019b84 800bc70: 24019bd8 .word 0x24019bd8 0800bc74 : { 800bc74: b508 push {r3, lr} pbuf_free_ooseq(); 800bc76: f7ff ffe5 bl 800bc44 } 800bc7a: bd08 pop {r3, pc} 0800bc7c : { 800bc7c: b5f0 push {r4, r5, r6, r7, lr} 800bc7e: b083 sub sp, #12 800bc80: 4606 mov r6, r0 800bc82: 460d mov r5, r1 800bc84: 4614 mov r4, r2 LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM)); 800bc86: 2a41 cmp r2, #65 @ 0x41 800bc88: bf18 it ne 800bc8a: 2a01 cmpne r2, #1 800bc8c: d10f bne.n 800bcae p = (struct pbuf *)memp_malloc(MEMP_PBUF); 800bc8e: 200b movs r0, #11 800bc90: f7ff fcb8 bl 800b604 if (p == NULL) { 800bc94: 4607 mov r7, r0 800bc96: b138 cbz r0, 800bca8 pbuf_init_alloced_pbuf(p, payload, length, length, type, 0); 800bc98: 2300 movs r3, #0 800bc9a: 9301 str r3, [sp, #4] 800bc9c: 9400 str r4, [sp, #0] 800bc9e: 462b mov r3, r5 800bca0: 462a mov r2, r5 800bca2: 4631 mov r1, r6 800bca4: f7ff ff60 bl 800bb68 } 800bca8: 4638 mov r0, r7 800bcaa: b003 add sp, #12 800bcac: bdf0 pop {r4, r5, r6, r7, pc} LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM)); 800bcae: 4b04 ldr r3, [pc, #16] @ (800bcc0 ) 800bcb0: f44f 72a5 mov.w r2, #330 @ 0x14a 800bcb4: 4903 ldr r1, [pc, #12] @ (800bcc4 ) 800bcb6: 4804 ldr r0, [pc, #16] @ (800bcc8 ) 800bcb8: f007 fba6 bl 8013408 800bcbc: e7e7 b.n 800bc8e 800bcbe: bf00 nop 800bcc0: 08016070 .word 0x08016070 800bcc4: 080160d0 .word 0x080160d0 800bcc8: 080144e8 .word 0x080144e8 0800bccc : { 800bccc: b510 push {r4, lr} 800bcce: b082 sub sp, #8 800bcd0: 4684 mov ip, r0 800bcd2: 468e mov lr, r1 800bcd4: 4618 mov r0, r3 800bcd6: 9904 ldr r1, [sp, #16] if (LWIP_MEM_ALIGN_SIZE(offset) + length > payload_mem_len) { 800bcd8: f10c 0c03 add.w ip, ip, #3 800bcdc: f02c 0c03 bic.w ip, ip, #3 800bce0: eb0e 040c add.w r4, lr, ip 800bce4: f8bd 3014 ldrh.w r3, [sp, #20] 800bce8: 429c cmp r4, r3 800bcea: d80c bhi.n 800bd06 if (payload_mem != NULL) { 800bcec: b101 cbz r1, 800bcf0 payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); 800bcee: 4461 add r1, ip pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM); 800bcf0: 4604 mov r4, r0 800bcf2: 2302 movs r3, #2 800bcf4: 9301 str r3, [sp, #4] 800bcf6: 9200 str r2, [sp, #0] 800bcf8: 4673 mov r3, lr 800bcfa: 4672 mov r2, lr 800bcfc: f7ff ff34 bl 800bb68 } 800bd00: 4620 mov r0, r4 800bd02: b002 add sp, #8 800bd04: bd10 pop {r4, pc} return NULL; 800bd06: 2400 movs r4, #0 800bd08: e7fa b.n 800bd00 0800bd0a : * @return non-zero on failure, zero on success. * */ u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment) { 800bd0a: b508 push {r3, lr} return pbuf_add_header_impl(p, header_size_increment, 0); 800bd0c: 2200 movs r2, #0 800bd0e: f7ff ff3d bl 800bb8c } 800bd12: bd08 pop {r3, pc} 0800bd14 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_remove_header(struct pbuf *p, size_t header_size_decrement) { 800bd14: b538 push {r3, r4, r5, lr} 800bd16: 460c mov r4, r1 void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 800bd18: 4605 mov r5, r0 800bd1a: b198 cbz r0, 800bd44 if ((p == NULL) || (header_size_decrement > 0xFFFF)) { 800bd1c: 2d00 cmp r5, #0 800bd1e: bf18 it ne 800bd20: f5b4 3f80 cmpne.w r4, #65536 @ 0x10000 800bd24: d21f bcs.n 800bd66 return 1; } if (header_size_decrement == 0) { 800bd26: b304 cbz r4, 800bd6a return 0; } increment_magnitude = (u16_t)header_size_decrement; 800bd28: b2a2 uxth r2, r4 /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 800bd2a: 896b ldrh r3, [r5, #10] 800bd2c: 4293 cmp r3, r2 800bd2e: d311 bcc.n 800bd54 /* remember current payload pointer */ payload = p->payload; 800bd30: 6869 ldr r1, [r5, #4] LWIP_UNUSED_ARG(payload); /* only used in LWIP_DEBUGF below */ /* increase payload pointer (guarded by length check above) */ p->payload = (u8_t *)p->payload + header_size_decrement; 800bd32: 4421 add r1, r4 800bd34: 6069 str r1, [r5, #4] /* modify pbuf length fields */ p->len = (u16_t)(p->len - increment_magnitude); 800bd36: 1a9b subs r3, r3, r2 800bd38: 816b strh r3, [r5, #10] p->tot_len = (u16_t)(p->tot_len - increment_magnitude); 800bd3a: 892b ldrh r3, [r5, #8] 800bd3c: 1a9b subs r3, r3, r2 800bd3e: 812b strh r3, [r5, #8] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_remove_header: old %p new %p (%"U16_F")\n", (void *)payload, (void *)p->payload, increment_magnitude)); return 0; 800bd40: 2000 movs r0, #0 } 800bd42: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("p != NULL", p != NULL); 800bd44: 4b0a ldr r3, [pc, #40] @ (800bd70 ) 800bd46: f240 224b movw r2, #587 @ 0x24b 800bd4a: 490a ldr r1, [pc, #40] @ (800bd74 ) 800bd4c: 480a ldr r0, [pc, #40] @ (800bd78 ) 800bd4e: f007 fb5b bl 8013408 800bd52: e7e3 b.n 800bd1c LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 800bd54: 4b06 ldr r3, [pc, #24] @ (800bd70 ) 800bd56: f240 2255 movw r2, #597 @ 0x255 800bd5a: 4908 ldr r1, [pc, #32] @ (800bd7c ) 800bd5c: 4806 ldr r0, [pc, #24] @ (800bd78 ) 800bd5e: f007 fb53 bl 8013408 800bd62: 2001 movs r0, #1 800bd64: e7ed b.n 800bd42 return 1; 800bd66: 2001 movs r0, #1 800bd68: e7eb b.n 800bd42 return 0; 800bd6a: 2000 movs r0, #0 800bd6c: e7e9 b.n 800bd42 800bd6e: bf00 nop 800bd70: 08016070 .word 0x08016070 800bd74: 08014fc0 .word 0x08014fc0 800bd78: 080144e8 .word 0x080144e8 800bd7c: 080160e4 .word 0x080160e4 0800bd80 : static u8_t pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) { 800bd80: b508 push {r3, lr} if (header_size_increment < 0) { 800bd82: 2900 cmp r1, #0 800bd84: db02 blt.n 800bd8c return pbuf_remove_header(p, (size_t) - header_size_increment); } else { return pbuf_add_header_impl(p, (size_t)header_size_increment, force); 800bd86: f7ff ff01 bl 800bb8c } } 800bd8a: bd08 pop {r3, pc} return pbuf_remove_header(p, (size_t) - header_size_increment); 800bd8c: 4249 negs r1, r1 800bd8e: f7ff ffc1 bl 800bd14 800bd92: e7fa b.n 800bd8a 0800bd94 : * Same as pbuf_header but does not check if 'header_size > 0' is allowed. * This is used internally only, to allow PBUF_REF for RX. */ u8_t pbuf_header_force(struct pbuf *p, s16_t header_size_increment) { 800bd94: b508 push {r3, lr} return pbuf_header_impl(p, header_size_increment, 1); 800bd96: 2201 movs r2, #1 800bd98: f7ff fff2 bl 800bd80 } 800bd9c: bd08 pop {r3, pc} ... 0800bda0 : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 800bda0: b5f8 push {r3, r4, r5, r6, r7, lr} u8_t alloc_src; struct pbuf *q; u8_t count; if (p == NULL) { 800bda2: b110 cbz r0, 800bdaa 800bda4: 4604 mov r4, r0 } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); PERF_START; count = 0; 800bda6: 2600 movs r6, #0 800bda8: e017 b.n 800bdda LWIP_ASSERT("p != NULL", p != NULL); 800bdaa: 4b2b ldr r3, [pc, #172] @ (800be58 ) 800bdac: f44f 7237 mov.w r2, #732 @ 0x2dc 800bdb0: 492a ldr r1, [pc, #168] @ (800be5c ) 800bdb2: 482b ldr r0, [pc, #172] @ (800be60 ) 800bdb4: f007 fb28 bl 8013408 return 0; 800bdb8: 2600 movs r6, #0 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; } 800bdba: 4630 mov r0, r6 800bdbc: bdf8 pop {r3, r4, r5, r6, r7, pc} LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); 800bdbe: 4b26 ldr r3, [pc, #152] @ (800be58 ) 800bdc0: f240 22f1 movw r2, #753 @ 0x2f1 800bdc4: 4927 ldr r1, [pc, #156] @ (800be64 ) 800bdc6: 4826 ldr r0, [pc, #152] @ (800be60 ) 800bdc8: f007 fb1e bl 8013408 800bdcc: e00d b.n 800bdea pc->custom_free_function(p); 800bdce: 6923 ldr r3, [r4, #16] 800bdd0: 4620 mov r0, r4 800bdd2: 4798 blx r3 count++; 800bdd4: 3601 adds r6, #1 800bdd6: b2f6 uxtb r6, r6 p = q; 800bdd8: 462c mov r4, r5 while (p != NULL) { 800bdda: 2c00 cmp r4, #0 800bddc: d0ed beq.n 800bdba SYS_ARCH_PROTECT(old_level); 800bdde: f001 f947 bl 800d070 800bde2: 4607 mov r7, r0 LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); 800bde4: 7ba3 ldrb r3, [r4, #14] 800bde6: 2b00 cmp r3, #0 800bde8: d0e9 beq.n 800bdbe ref = --(p->ref); 800bdea: 7ba5 ldrb r5, [r4, #14] 800bdec: 3d01 subs r5, #1 800bdee: b2ed uxtb r5, r5 800bdf0: 73a5 strb r5, [r4, #14] SYS_ARCH_UNPROTECT(old_level); 800bdf2: 4638 mov r0, r7 800bdf4: f001 f948 bl 800d088 if (ref == 0) { 800bdf8: 2d00 cmp r5, #0 800bdfa: d1de bne.n 800bdba q = p->next; 800bdfc: 6825 ldr r5, [r4, #0] alloc_src = pbuf_get_allocsrc(p); 800bdfe: 7b23 ldrb r3, [r4, #12] 800be00: f003 030f and.w r3, r3, #15 if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { 800be04: 7b62 ldrb r2, [r4, #13] 800be06: f012 0f02 tst.w r2, #2 800be0a: d00a beq.n 800be22 LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); 800be0c: 6923 ldr r3, [r4, #16] 800be0e: 2b00 cmp r3, #0 800be10: d1dd bne.n 800bdce 800be12: 4b11 ldr r3, [pc, #68] @ (800be58 ) 800be14: f240 22ff movw r2, #767 @ 0x2ff 800be18: 4913 ldr r1, [pc, #76] @ (800be68 ) 800be1a: 4811 ldr r0, [pc, #68] @ (800be60 ) 800be1c: f007 faf4 bl 8013408 800be20: e7d5 b.n 800bdce if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF_POOL) { 800be22: 2b02 cmp r3, #2 800be24: d006 beq.n 800be34 } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) { 800be26: 2b01 cmp r3, #1 800be28: d009 beq.n 800be3e } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) { 800be2a: b96b cbnz r3, 800be48 mem_free(p); 800be2c: 4620 mov r0, r4 800be2e: f7ff f971 bl 800b114 800be32: e7cf b.n 800bdd4 memp_free(MEMP_PBUF_POOL, p); 800be34: 4621 mov r1, r4 800be36: 200c movs r0, #12 800be38: f7ff fc1a bl 800b670 800be3c: e7ca b.n 800bdd4 memp_free(MEMP_PBUF, p); 800be3e: 4621 mov r1, r4 800be40: 200b movs r0, #11 800be42: f7ff fc15 bl 800b670 800be46: e7c5 b.n 800bdd4 LWIP_ASSERT("invalid pbuf type", 0); 800be48: 4b03 ldr r3, [pc, #12] @ (800be58 ) 800be4a: f240 320f movw r2, #783 @ 0x30f 800be4e: 4907 ldr r1, [pc, #28] @ (800be6c ) 800be50: 4803 ldr r0, [pc, #12] @ (800be60 ) 800be52: f007 fad9 bl 8013408 800be56: e7bd b.n 800bdd4 800be58: 08016070 .word 0x08016070 800be5c: 08014fc0 .word 0x08014fc0 800be60: 080144e8 .word 0x080144e8 800be64: 08016104 .word 0x08016104 800be68: 0801611c .word 0x0801611c 800be6c: 08016140 .word 0x08016140 0800be70 : { 800be70: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 800be74: b082 sub sp, #8 800be76: 460e mov r6, r1 800be78: 4690 mov r8, r2 switch (type) { 800be7a: f5b2 7fc1 cmp.w r2, #386 @ 0x182 800be7e: d044 beq.n 800bf0a 800be80: 4604 mov r4, r0 800be82: d80e bhi.n 800bea2 800be84: 2a01 cmp r2, #1 800be86: d002 beq.n 800be8e 800be88: 2a41 cmp r2, #65 @ 0x41 800be8a: f040 8084 bne.w 800bf96 p = pbuf_alloc_reference(NULL, length, type); 800be8e: 4642 mov r2, r8 800be90: 4631 mov r1, r6 800be92: 2000 movs r0, #0 800be94: f7ff fef2 bl 800bc7c 800be98: 4681 mov r9, r0 } 800be9a: 4648 mov r0, r9 800be9c: b002 add sp, #8 800be9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} switch (type) { 800bea2: f5b2 7f20 cmp.w r2, #640 @ 0x280 800bea6: d176 bne.n 800bf96 u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length)); 800bea8: 1cc1 adds r1, r0, #3 800beaa: f401 71fe and.w r1, r1, #508 @ 0x1fc 800beae: 1cf2 adds r2, r6, #3 800beb0: b293 uxth r3, r2 800beb2: f023 0303 bic.w r3, r3, #3 800beb6: 440b add r3, r1 800beb8: b29b uxth r3, r3 mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len); 800beba: f103 0010 add.w r0, r3, #16 if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 800bebe: f022 0203 bic.w r2, r2, #3 800bec2: 4293 cmp r3, r2 800bec4: d371 bcc.n 800bfaa 800bec6: 4282 cmp r2, r0 800bec8: d872 bhi.n 800bfb0 p = (struct pbuf *)mem_malloc(alloc_len); 800beca: f7ff fa63 bl 800b394 if (p == NULL) { 800bece: 4681 mov r9, r0 800bed0: 2800 cmp r0, #0 800bed2: d0e2 beq.n 800be9a pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)), 800bed4: f104 0110 add.w r1, r4, #16 800bed8: 4401 add r1, r0 800beda: 3103 adds r1, #3 800bedc: 2300 movs r3, #0 800bede: 9301 str r3, [sp, #4] 800bee0: f8cd 8000 str.w r8, [sp] 800bee4: 4633 mov r3, r6 800bee6: 4632 mov r2, r6 800bee8: f021 0103 bic.w r1, r1, #3 800beec: f7ff fe3c bl 800bb68 LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", 800bef0: f8d9 3004 ldr.w r3, [r9, #4] 800bef4: f013 0f03 tst.w r3, #3 800bef8: d0cf beq.n 800be9a 800befa: 4b2f ldr r3, [pc, #188] @ (800bfb8 ) 800befc: f44f 7291 mov.w r2, #290 @ 0x122 800bf00: 492e ldr r1, [pc, #184] @ (800bfbc ) 800bf02: 482f ldr r0, [pc, #188] @ (800bfc0 ) 800bf04: f007 fa80 bl 8013408 800bf08: e7c7 b.n 800be9a 800bf0a: 4605 mov r5, r0 switch (type) { 800bf0c: 2700 movs r7, #0 800bf0e: 46b9 mov r9, r7 800bf10: e013 b.n 800bf3a PBUF_POOL_IS_EMPTY(); 800bf12: f7ff fe79 bl 800bc08 if (p) { 800bf16: f1b9 0f00 cmp.w r9, #0 800bf1a: d002 beq.n 800bf22 pbuf_free(p); 800bf1c: 4648 mov r0, r9 800bf1e: f7ff ff3f bl 800bda0 return NULL; 800bf22: 46b9 mov r9, r7 800bf24: e7b9 b.n 800be9a if (p == NULL) { 800bf26: f1b9 0f00 cmp.w r9, #0 800bf2a: d032 beq.n 800bf92 last->next = q; 800bf2c: f8ca 7000 str.w r7, [sl] rem_len = (u16_t)(rem_len - qlen); 800bf30: 1b34 subs r4, r6, r4 800bf32: b2a6 uxth r6, r4 offset = 0; 800bf34: 2500 movs r5, #0 } while (rem_len > 0); 800bf36: 2e00 cmp r6, #0 800bf38: d0af beq.n 800be9a q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 800bf3a: 46ba mov sl, r7 800bf3c: 200c movs r0, #12 800bf3e: f7ff fb61 bl 800b604 if (q == NULL) { 800bf42: 4607 mov r7, r0 800bf44: 2800 cmp r0, #0 800bf46: d0e4 beq.n 800bf12 qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset))); 800bf48: 1ceb adds r3, r5, #3 800bf4a: f023 0303 bic.w r3, r3, #3 800bf4e: b29b uxth r3, r3 800bf50: f240 54ec movw r4, #1516 @ 0x5ec 800bf54: 1ae4 subs r4, r4, r3 800bf56: b2a4 uxth r4, r4 800bf58: 42b4 cmp r4, r6 800bf5a: bf28 it cs 800bf5c: 4634 movcs r4, r6 pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)), 800bf5e: f105 0110 add.w r1, r5, #16 800bf62: 4401 add r1, r0 800bf64: 3103 adds r1, #3 800bf66: 2300 movs r3, #0 800bf68: 9301 str r3, [sp, #4] 800bf6a: f8cd 8000 str.w r8, [sp] 800bf6e: 4623 mov r3, r4 800bf70: 4632 mov r2, r6 800bf72: f021 0103 bic.w r1, r1, #3 800bf76: f7ff fdf7 bl 800bb68 LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", 800bf7a: 687b ldr r3, [r7, #4] 800bf7c: f013 0f03 tst.w r3, #3 800bf80: d0d1 beq.n 800bf26 800bf82: 4b0d ldr r3, [pc, #52] @ (800bfb8 ) 800bf84: f44f 7280 mov.w r2, #256 @ 0x100 800bf88: 490e ldr r1, [pc, #56] @ (800bfc4 ) 800bf8a: 480d ldr r0, [pc, #52] @ (800bfc0 ) 800bf8c: f007 fa3c bl 8013408 LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", 800bf90: e7c9 b.n 800bf26 p = q; 800bf92: 46b9 mov r9, r7 800bf94: e7cc b.n 800bf30 LWIP_ASSERT("pbuf_alloc: erroneous type", 0); 800bf96: 4b08 ldr r3, [pc, #32] @ (800bfb8 ) 800bf98: f240 1227 movw r2, #295 @ 0x127 800bf9c: 490a ldr r1, [pc, #40] @ (800bfc8 ) 800bf9e: 4808 ldr r0, [pc, #32] @ (800bfc0 ) 800bfa0: f007 fa32 bl 8013408 return NULL; 800bfa4: f04f 0900 mov.w r9, #0 800bfa8: e777 b.n 800be9a return NULL; 800bfaa: f04f 0900 mov.w r9, #0 800bfae: e774 b.n 800be9a 800bfb0: f04f 0900 mov.w r9, #0 800bfb4: e771 b.n 800be9a 800bfb6: bf00 nop 800bfb8: 08016070 .word 0x08016070 800bfbc: 080161b8 .word 0x080161b8 800bfc0: 080144e8 .word 0x080144e8 800bfc4: 08016154 .word 0x08016154 800bfc8: 080161e4 .word 0x080161e4 0800bfcc : { 800bfcc: b5f8 push {r3, r4, r5, r6, r7, lr} 800bfce: 460e mov r6, r1 LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL); 800bfd0: 4604 mov r4, r0 800bfd2: b1b8 cbz r0, 800c004 if (new_len >= p->tot_len) { 800bfd4: 8927 ldrh r7, [r4, #8] 800bfd6: 42b7 cmp r7, r6 800bfd8: d92e bls.n 800c038 rem_len = new_len; 800bfda: 4635 mov r5, r6 while (rem_len > q->len) { 800bfdc: 8963 ldrh r3, [r4, #10] 800bfde: 42ab cmp r3, r5 800bfe0: d218 bcs.n 800c014 rem_len = (u16_t)(rem_len - q->len); 800bfe2: 1aeb subs r3, r5, r3 800bfe4: b29d uxth r5, r3 q->tot_len = (u16_t)(q->tot_len - shrink); 800bfe6: 8923 ldrh r3, [r4, #8] 800bfe8: 1bf2 subs r2, r6, r7 800bfea: 4413 add r3, r2 800bfec: 8123 strh r3, [r4, #8] q = q->next; 800bfee: 6824 ldr r4, [r4, #0] LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); 800bff0: 2c00 cmp r4, #0 800bff2: d1f3 bne.n 800bfdc 800bff4: 4b19 ldr r3, [pc, #100] @ (800c05c ) 800bff6: f240 12af movw r2, #431 @ 0x1af 800bffa: 4919 ldr r1, [pc, #100] @ (800c060 ) 800bffc: 4819 ldr r0, [pc, #100] @ (800c064 ) 800bffe: f007 fa03 bl 8013408 800c002: e7eb b.n 800bfdc LWIP_ASSERT("pbuf_realloc: p != NULL", p != NULL); 800c004: 4b15 ldr r3, [pc, #84] @ (800c05c ) 800c006: f44f 72cc mov.w r2, #408 @ 0x198 800c00a: 4917 ldr r1, [pc, #92] @ (800c068 ) 800c00c: 4815 ldr r0, [pc, #84] @ (800c064 ) 800c00e: f007 f9fb bl 8013408 800c012: e7df b.n 800bfd4 if (pbuf_match_allocsrc(q, PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) && (rem_len != q->len) 800c014: 7b22 ldrb r2, [r4, #12] 800c016: f012 0f0f tst.w r2, #15 800c01a: d105 bne.n 800c028 800c01c: 42ab cmp r3, r5 800c01e: d003 beq.n 800c028 && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) 800c020: 7b63 ldrb r3, [r4, #13] 800c022: f013 0f02 tst.w r3, #2 800c026: d008 beq.n 800c03a q->len = rem_len; 800c028: 8165 strh r5, [r4, #10] q->tot_len = q->len; 800c02a: 8125 strh r5, [r4, #8] if (q->next != NULL) { 800c02c: 6820 ldr r0, [r4, #0] 800c02e: b108 cbz r0, 800c034 pbuf_free(q->next); 800c030: f7ff feb6 bl 800bda0 q->next = NULL; 800c034: 2300 movs r3, #0 800c036: 6023 str r3, [r4, #0] } 800c038: bdf8 pop {r3, r4, r5, r6, r7, pc} q = (struct pbuf *)mem_trim(q, (mem_size_t)(((u8_t *)q->payload - (u8_t *)q) + rem_len)); 800c03a: 6863 ldr r3, [r4, #4] 800c03c: 1b1b subs r3, r3, r4 800c03e: 18e9 adds r1, r5, r3 800c040: 4620 mov r0, r4 800c042: f7ff f8df bl 800b204 LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); 800c046: 4604 mov r4, r0 800c048: 2800 cmp r0, #0 800c04a: d1ed bne.n 800c028 800c04c: 4b03 ldr r3, [pc, #12] @ (800c05c ) 800c04e: f240 12bd movw r2, #445 @ 0x1bd 800c052: 4906 ldr r1, [pc, #24] @ (800c06c ) 800c054: 4803 ldr r0, [pc, #12] @ (800c064 ) 800c056: f007 f9d7 bl 8013408 800c05a: e7e5 b.n 800c028 800c05c: 08016070 .word 0x08016070 800c060: 08016218 .word 0x08016218 800c064: 080144e8 .word 0x080144e8 800c068: 08016200 .word 0x08016200 800c06c: 08016230 .word 0x08016230 0800c070 : { 800c070: b570 push {r4, r5, r6, lr} 800c072: 4605 mov r5, r0 800c074: 460c mov r4, r1 while (free_left && p) { 800c076: e004 b.n 800c082 pbuf_remove_header(p, free_left); 800c078: 4621 mov r1, r4 800c07a: 4628 mov r0, r5 800c07c: f7ff fe4a bl 800bd14 free_left = 0; 800c080: 2400 movs r4, #0 while (free_left && p) { 800c082: 1e23 subs r3, r4, #0 800c084: bf18 it ne 800c086: 2301 movne r3, #1 800c088: b16d cbz r5, 800c0a6 800c08a: b163 cbz r3, 800c0a6 if (free_left >= p->len) { 800c08c: 896b ldrh r3, [r5, #10] 800c08e: 42a3 cmp r3, r4 800c090: d8f2 bhi.n 800c078 free_left = (u16_t)(free_left - p->len); 800c092: 1ae4 subs r4, r4, r3 800c094: b2a4 uxth r4, r4 p = p->next; 800c096: 682e ldr r6, [r5, #0] f->next = 0; 800c098: 2300 movs r3, #0 800c09a: 602b str r3, [r5, #0] pbuf_free(f); 800c09c: 4628 mov r0, r5 800c09e: f7ff fe7f bl 800bda0 p = p->next; 800c0a2: 4635 mov r5, r6 800c0a4: e7ed b.n 800c082 } 800c0a6: 4628 mov r0, r5 800c0a8: bd70 pop {r4, r5, r6, pc} 0800c0aa : * @param p first pbuf of chain * @return the number of pbufs in a chain */ u16_t pbuf_clen(const struct pbuf *p) { 800c0aa: 4603 mov r3, r0 u16_t len; len = 0; 800c0ac: 2000 movs r0, #0 while (p != NULL) { 800c0ae: e002 b.n 800c0b6 ++len; 800c0b0: 3001 adds r0, #1 800c0b2: b280 uxth r0, r0 p = p->next; 800c0b4: 681b ldr r3, [r3, #0] while (p != NULL) { 800c0b6: 2b00 cmp r3, #0 800c0b8: d1fa bne.n 800c0b0 } return len; } 800c0ba: 4770 bx lr 0800c0bc : */ void pbuf_ref(struct pbuf *p) { /* pbuf given? */ if (p != NULL) { 800c0bc: b198 cbz r0, 800c0e6 { 800c0be: b510 push {r4, lr} 800c0c0: 4604 mov r4, r0 SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1)); 800c0c2: f000 ffd5 bl 800d070 800c0c6: 7ba3 ldrb r3, [r4, #14] 800c0c8: 3301 adds r3, #1 800c0ca: 73a3 strb r3, [r4, #14] 800c0cc: f000 ffdc bl 800d088 LWIP_ASSERT("pbuf ref overflow", p->ref > 0); 800c0d0: 7ba3 ldrb r3, [r4, #14] 800c0d2: b103 cbz r3, 800c0d6 } } 800c0d4: bd10 pop {r4, pc} LWIP_ASSERT("pbuf ref overflow", p->ref > 0); 800c0d6: 4b04 ldr r3, [pc, #16] @ (800c0e8 ) 800c0d8: f240 3242 movw r2, #834 @ 0x342 800c0dc: 4903 ldr r1, [pc, #12] @ (800c0ec ) 800c0de: 4804 ldr r0, [pc, #16] @ (800c0f0 ) 800c0e0: f007 f992 bl 8013408 } 800c0e4: e7f6 b.n 800c0d4 800c0e6: 4770 bx lr 800c0e8: 08016070 .word 0x08016070 800c0ec: 0801624c .word 0x0801624c 800c0f0: 080144e8 .word 0x080144e8 0800c0f4 : * * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 800c0f4: b538 push {r3, r4, r5, lr} struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 800c0f6: 4604 mov r4, r0 800c0f8: 460d mov r5, r1 800c0fa: 2900 cmp r1, #0 800c0fc: bf18 it ne 800c0fe: 2800 cmpne r0, #0 800c100: d10c bne.n 800c11c 800c102: 4b15 ldr r3, [pc, #84] @ (800c158 ) 800c104: f240 3259 movw r2, #857 @ 0x359 800c108: 4914 ldr r1, [pc, #80] @ (800c15c ) 800c10a: 4815 ldr r0, [pc, #84] @ (800c160 ) 800c10c: f007 f97c bl 8013408 800c110: e019 b.n 800c146 ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { /* add total length of second chain to all totals of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 800c112: 8923 ldrh r3, [r4, #8] 800c114: 8929 ldrh r1, [r5, #8] 800c116: 440b add r3, r1 800c118: 8123 strh r3, [r4, #8] for (p = h; p->next != NULL; p = p->next) { 800c11a: 4614 mov r4, r2 800c11c: 6822 ldr r2, [r4, #0] 800c11e: 2a00 cmp r2, #0 800c120: d1f7 bne.n 800c112 } /* { p is last pbuf of first h chain, p->next == NULL } */ LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len); 800c122: 8922 ldrh r2, [r4, #8] 800c124: 8963 ldrh r3, [r4, #10] 800c126: 429a cmp r2, r3 800c128: d10e bne.n 800c148 LWIP_ASSERT("p->next == NULL", p->next == NULL); 800c12a: 6823 ldr r3, [r4, #0] 800c12c: b133 cbz r3, 800c13c 800c12e: 4b0a ldr r3, [pc, #40] @ (800c158 ) 800c130: f240 3263 movw r2, #867 @ 0x363 800c134: 490b ldr r1, [pc, #44] @ (800c164 ) 800c136: 480a ldr r0, [pc, #40] @ (800c160 ) 800c138: f007 f966 bl 8013408 /* add total length of second chain to last pbuf total of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 800c13c: 8923 ldrh r3, [r4, #8] 800c13e: 892a ldrh r2, [r5, #8] 800c140: 4413 add r3, r2 800c142: 8123 strh r3, [r4, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 800c144: 6025 str r5, [r4, #0] /* p->next now references t, but the caller will drop its reference to t, * so netto there is no change to the reference count of t. */ } 800c146: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len); 800c148: 4b03 ldr r3, [pc, #12] @ (800c158 ) 800c14a: f240 3262 movw r2, #866 @ 0x362 800c14e: 4906 ldr r1, [pc, #24] @ (800c168 ) 800c150: 4803 ldr r0, [pc, #12] @ (800c160 ) 800c152: f007 f959 bl 8013408 800c156: e7e8 b.n 800c12a 800c158: 08016070 .word 0x08016070 800c15c: 08016260 .word 0x08016260 800c160: 080144e8 .word 0x080144e8 800c164: 080162c8 .word 0x080162c8 800c168: 08016298 .word 0x08016298 0800c16c : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 800c16c: b510 push {r4, lr} 800c16e: 460c mov r4, r1 pbuf_cat(h, t); 800c170: f7ff ffc0 bl 800c0f4 /* t is now referenced by h */ pbuf_ref(t); 800c174: 4620 mov r0, r4 800c176: f7ff ffa1 bl 800c0bc LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 800c17a: bd10 pop {r4, pc} 0800c17c : * ERR_ARG if one of the pbufs is NULL or p_to is not big * enough to hold p_from */ err_t pbuf_copy(struct pbuf *p_to, const struct pbuf *p_from) { 800c17c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy(%p, %p)\n", (const void *)p_to, (const void *)p_from)); /* is the target big enough to hold the source? */ LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) && 800c180: 2900 cmp r1, #0 800c182: bf18 it ne 800c184: 2800 cmpne r0, #0 800c186: d008 beq.n 800c19a 800c188: 4605 mov r5, r0 800c18a: 460c mov r4, r1 800c18c: 8902 ldrh r2, [r0, #8] 800c18e: 890b ldrh r3, [r1, #8] 800c190: 429a cmp r2, r3 800c192: d302 bcc.n 800c19a size_t offset_to = 0, offset_from = 0, len; 800c194: 2700 movs r7, #0 800c196: 46b8 mov r8, r7 800c198: e03c b.n 800c214 LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) && 800c19a: 4b3b ldr r3, [pc, #236] @ (800c288 ) 800c19c: f240 32c9 movw r2, #969 @ 0x3c9 800c1a0: 493a ldr r1, [pc, #232] @ (800c28c ) 800c1a2: 483b ldr r0, [pc, #236] @ (800c290 ) 800c1a4: f007 f930 bl 8013408 800c1a8: f06f 000f mvn.w r0, #15 800c1ac: e06a b.n 800c284 len = p_to->len - offset_to; } MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len); offset_to += len; offset_from += len; LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); 800c1ae: 4b36 ldr r3, [pc, #216] @ (800c288 ) 800c1b0: f240 32d9 movw r2, #985 @ 0x3d9 800c1b4: 4937 ldr r1, [pc, #220] @ (800c294 ) 800c1b6: 4836 ldr r0, [pc, #216] @ (800c290 ) 800c1b8: f007 f926 bl 8013408 800c1bc: e03e b.n 800c23c LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); 800c1be: 4b32 ldr r3, [pc, #200] @ (800c288 ) 800c1c0: f240 32da movw r2, #986 @ 0x3da 800c1c4: 4934 ldr r1, [pc, #208] @ (800c298 ) 800c1c6: 4832 ldr r0, [pc, #200] @ (800c290 ) 800c1c8: f007 f91e bl 8013408 800c1cc: e039 b.n 800c242 p_from = p_from->next; } if (offset_to == p_to->len) { /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; 800c1ce: 682d ldr r5, [r5, #0] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;); 800c1d0: fab5 f385 clz r3, r5 800c1d4: 095b lsrs r3, r3, #5 800c1d6: 2c00 cmp r4, #0 800c1d8: bf08 it eq 800c1da: 2300 moveq r3, #0 800c1dc: b913 cbnz r3, 800c1e4 offset_to = 0; 800c1de: f04f 0800 mov.w r8, #0 800c1e2: e036 b.n 800c252 LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;); 800c1e4: 4b28 ldr r3, [pc, #160] @ (800c288 ) 800c1e6: f44f 7279 mov.w r2, #996 @ 0x3e4 800c1ea: 492c ldr r1, [pc, #176] @ (800c29c ) 800c1ec: 4828 ldr r0, [pc, #160] @ (800c290 ) 800c1ee: f007 f90b bl 8013408 800c1f2: f06f 000f mvn.w r0, #15 800c1f6: e045 b.n 800c284 } if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 800c1f8: 6823 ldr r3, [r4, #0] 800c1fa: b37b cbz r3, 800c25c 800c1fc: 4b22 ldr r3, [pc, #136] @ (800c288 ) 800c1fe: f240 32e9 movw r2, #1001 @ 0x3e9 800c202: 4927 ldr r1, [pc, #156] @ (800c2a0 ) 800c204: 4822 ldr r0, [pc, #136] @ (800c290 ) 800c206: f007 f8ff bl 8013408 800c20a: f06f 0005 mvn.w r0, #5 800c20e: e039 b.n 800c284 if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 800c210: 2c00 cmp r4, #0 800c212: d036 beq.n 800c282 if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { 800c214: 896e ldrh r6, [r5, #10] 800c216: eba6 0608 sub.w r6, r6, r8 800c21a: 8963 ldrh r3, [r4, #10] 800c21c: 1bdb subs r3, r3, r7 800c21e: 429e cmp r6, r3 800c220: d300 bcc.n 800c224 len = p_from->len - offset_from; 800c222: 461e mov r6, r3 MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len); 800c224: 6868 ldr r0, [r5, #4] 800c226: 6861 ldr r1, [r4, #4] 800c228: 4632 mov r2, r6 800c22a: 4439 add r1, r7 800c22c: 4440 add r0, r8 800c22e: f007 fb28 bl 8013882 offset_to += len; 800c232: 44b0 add r8, r6 offset_from += len; 800c234: 4437 add r7, r6 LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); 800c236: 896b ldrh r3, [r5, #10] 800c238: 4543 cmp r3, r8 800c23a: d3b8 bcc.n 800c1ae LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); 800c23c: 8963 ldrh r3, [r4, #10] 800c23e: 42bb cmp r3, r7 800c240: d3bd bcc.n 800c1be if (offset_from >= p_from->len) { 800c242: 8963 ldrh r3, [r4, #10] 800c244: 42bb cmp r3, r7 800c246: d801 bhi.n 800c24c p_from = p_from->next; 800c248: 6824 ldr r4, [r4, #0] offset_from = 0; 800c24a: 2700 movs r7, #0 if (offset_to == p_to->len) { 800c24c: 896b ldrh r3, [r5, #10] 800c24e: 4543 cmp r3, r8 800c250: d0bd beq.n 800c1ce if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { 800c252: b11c cbz r4, 800c25c 800c254: 8962 ldrh r2, [r4, #10] 800c256: 8923 ldrh r3, [r4, #8] 800c258: 429a cmp r2, r3 800c25a: d0cd beq.n 800c1f8 if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { 800c25c: 2d00 cmp r5, #0 800c25e: d0d7 beq.n 800c210 800c260: 896a ldrh r2, [r5, #10] 800c262: 892b ldrh r3, [r5, #8] 800c264: 429a cmp r2, r3 800c266: d1d3 bne.n 800c210 LWIP_ERROR("pbuf_copy() does not allow packet queues!", 800c268: 682b ldr r3, [r5, #0] 800c26a: 2b00 cmp r3, #0 800c26c: d0d0 beq.n 800c210 800c26e: 4b06 ldr r3, [pc, #24] @ (800c288 ) 800c270: f240 32ee movw r2, #1006 @ 0x3ee 800c274: 490a ldr r1, [pc, #40] @ (800c2a0 ) 800c276: 4806 ldr r0, [pc, #24] @ (800c290 ) 800c278: f007 f8c6 bl 8013408 800c27c: f06f 0005 mvn.w r0, #5 800c280: e000 b.n 800c284 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 800c282: 2000 movs r0, #0 } 800c284: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 800c288: 08016070 .word 0x08016070 800c28c: 080162d8 .word 0x080162d8 800c290: 080144e8 .word 0x080144e8 800c294: 08016308 .word 0x08016308 800c298: 08016320 .word 0x08016320 800c29c: 0801633c .word 0x0801633c 800c2a0: 0801634c .word 0x0801634c 0800c2a4 : * @param offset offset into the packet buffer from where to begin copying len bytes * @return the number of bytes copied, or 0 on failure */ u16_t pbuf_copy_partial(const struct pbuf *buf, void *dataptr, u16_t len, u16_t offset) { 800c2a4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} const struct pbuf *p; u16_t left = 0; u16_t buf_copy_len; u16_t copied_total = 0; LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 800c2a8: b130 cbz r0, 800c2b8 800c2aa: 4688 mov r8, r1 800c2ac: 4691 mov r9, r2 800c2ae: 4605 mov r5, r0 LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 800c2b0: b169 cbz r1, 800c2ce u16_t copied_total = 0; 800c2b2: 2700 movs r7, #0 u16_t left = 0; 800c2b4: 463e mov r6, r7 800c2b6: e02a b.n 800c30e LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 800c2b8: 4b1d ldr r3, [pc, #116] @ (800c330 ) 800c2ba: f240 420a movw r2, #1034 @ 0x40a 800c2be: 491d ldr r1, [pc, #116] @ (800c334 ) 800c2c0: 481d ldr r0, [pc, #116] @ (800c338 ) 800c2c2: f007 f8a1 bl 8013408 800c2c6: 2700 movs r7, #0 len = (u16_t)(len - buf_copy_len); offset = 0; } } return copied_total; } 800c2c8: 4638 mov r0, r7 800c2ca: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 800c2ce: 4b18 ldr r3, [pc, #96] @ (800c330 ) 800c2d0: f240 420b movw r2, #1035 @ 0x40b 800c2d4: 4919 ldr r1, [pc, #100] @ (800c33c ) 800c2d6: 4818 ldr r0, [pc, #96] @ (800c338 ) 800c2d8: f007 f896 bl 8013408 800c2dc: 2700 movs r7, #0 800c2de: e7f3 b.n 800c2c8 buf_copy_len = (u16_t)(p->len - offset); 800c2e0: 896c ldrh r4, [r5, #10] 800c2e2: 1ae4 subs r4, r4, r3 800c2e4: b2a4 uxth r4, r4 if (buf_copy_len > len) { 800c2e6: 45a1 cmp r9, r4 800c2e8: d200 bcs.n 800c2ec buf_copy_len = len; 800c2ea: 464c mov r4, r9 MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len); 800c2ec: 6869 ldr r1, [r5, #4] 800c2ee: 4622 mov r2, r4 800c2f0: 4419 add r1, r3 800c2f2: eb08 0006 add.w r0, r8, r6 800c2f6: f007 fac4 bl 8013882 copied_total = (u16_t)(copied_total + buf_copy_len); 800c2fa: 4427 add r7, r4 800c2fc: b2bf uxth r7, r7 left = (u16_t)(left + buf_copy_len); 800c2fe: 4426 add r6, r4 800c300: b2b6 uxth r6, r6 len = (u16_t)(len - buf_copy_len); 800c302: eba9 0404 sub.w r4, r9, r4 800c306: fa1f f984 uxth.w r9, r4 offset = 0; 800c30a: 2300 movs r3, #0 for (p = buf; len != 0 && p != NULL; p = p->next) { 800c30c: 682d ldr r5, [r5, #0] 800c30e: 1e2a subs r2, r5, #0 800c310: bf18 it ne 800c312: 2201 movne r2, #1 800c314: f1b9 0f00 cmp.w r9, #0 800c318: d0d6 beq.n 800c2c8 800c31a: 2a00 cmp r2, #0 800c31c: d0d4 beq.n 800c2c8 if ((offset != 0) && (offset >= p->len)) { 800c31e: 2b00 cmp r3, #0 800c320: d0de beq.n 800c2e0 800c322: 896a ldrh r2, [r5, #10] 800c324: 429a cmp r2, r3 800c326: d8db bhi.n 800c2e0 offset = (u16_t)(offset - p->len); 800c328: 1a9b subs r3, r3, r2 800c32a: b29b uxth r3, r3 800c32c: e7ee b.n 800c30c 800c32e: bf00 nop 800c330: 08016070 .word 0x08016070 800c334: 08016378 .word 0x08016378 800c338: 080144e8 .word 0x080144e8 800c33c: 08016398 .word 0x08016398 0800c340 : * * @return a new pbuf or NULL if allocation fails */ struct pbuf * pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p) { 800c340: b538 push {r3, r4, r5, lr} 800c342: 4614 mov r4, r2 struct pbuf *q; err_t err; q = pbuf_alloc(layer, p->tot_len, type); 800c344: 460a mov r2, r1 800c346: 8921 ldrh r1, [r4, #8] 800c348: f7ff fd92 bl 800be70 if (q == NULL) { 800c34c: 4605 mov r5, r0 800c34e: b118 cbz r0, 800c358 return NULL; } err = pbuf_copy(q, p); 800c350: 4621 mov r1, r4 800c352: f7ff ff13 bl 800c17c LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); 800c356: b908 cbnz r0, 800c35c return q; } 800c358: 4628 mov r0, r5 800c35a: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); 800c35c: 4b03 ldr r3, [pc, #12] @ (800c36c ) 800c35e: f240 5224 movw r2, #1316 @ 0x524 800c362: 4903 ldr r1, [pc, #12] @ (800c370 ) 800c364: 4803 ldr r0, [pc, #12] @ (800c374 ) 800c366: f007 f84f bl 8013408 800c36a: e7f5 b.n 800c358 800c36c: 08016070 .word 0x08016070 800c370: 080163bc .word 0x080163bc 800c374: 080144e8 .word 0x080144e8 0800c378 : /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ static struct lwip_sock * tryget_socket_unconn_nouse(int fd) { int s = fd - LWIP_SOCKET_OFFSET; if ((s < 0) || (s >= NUM_SOCKETS)) { 800c378: 2803 cmp r0, #3 800c37a: d803 bhi.n 800c384 LWIP_DEBUGF(SOCKETS_DEBUG, ("tryget_socket_unconn(%d): invalid\n", fd)); return NULL; } return &sockets[s]; 800c37c: 4b02 ldr r3, [pc, #8] @ (800c388 ) 800c37e: eb03 1000 add.w r0, r3, r0, lsl #4 800c382: 4770 bx lr return NULL; 800c384: 2000 movs r0, #0 } 800c386: 4770 bx lr 800c388: 24019b8c .word 0x24019b8c 0800c38c : } /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ static struct lwip_sock * tryget_socket_unconn(int fd) { 800c38c: b508 push {r3, lr} struct lwip_sock *ret = tryget_socket_unconn_nouse(fd); 800c38e: f7ff fff3 bl 800c378 if (!sock_inc_used(ret)) { return NULL; } } return ret; } 800c392: bd08 pop {r3, pc} 0800c394 : * @param fd externally used socket index * @return struct lwip_sock for the socket or NULL if not found */ static struct lwip_sock * tryget_socket(int fd) { 800c394: b508 push {r3, lr} struct lwip_sock *sock = tryget_socket_unconn(fd); 800c396: f7ff fff9 bl 800c38c if (sock != NULL) { 800c39a: 4603 mov r3, r0 800c39c: b108 cbz r0, 800c3a2 if (sock->conn) { 800c39e: 6802 ldr r2, [r0, #0] 800c3a0: b10a cbz r2, 800c3a6 return sock; } done_socket(sock); } return NULL; } 800c3a2: 4618 mov r0, r3 800c3a4: bd08 pop {r3, pc} return NULL; 800c3a6: 4613 mov r3, r2 800c3a8: e7fb b.n 800c3a2 ... 0800c3ac : * @param fd externally used socket index * @return struct lwip_sock for the socket or NULL if not found */ static struct lwip_sock * get_socket(int fd) { 800c3ac: b508 push {r3, lr} struct lwip_sock *sock = tryget_socket(fd); 800c3ae: f7ff fff1 bl 800c394 if (!sock) { 800c3b2: b100 cbz r0, 800c3b6 } set_errno(EBADF); return NULL; } return sock; } 800c3b4: bd08 pop {r3, pc} set_errno(EBADF); 800c3b6: 4b02 ldr r3, [pc, #8] @ (800c3c0 ) 800c3b8: 2209 movs r2, #9 800c3ba: 601a str r2, [r3, #0] return NULL; 800c3bc: e7fa b.n 800c3b4 800c3be: bf00 nop 800c3c0: 24019d8c .word 0x24019d8c 0800c3c4 : } #else /* LWIP_NETCONN_FULLDUPLEX */ LWIP_UNUSED_ARG(is_tcp); #endif /* LWIP_NETCONN_FULLDUPLEX */ *lastdata = sock->lastdata; 800c3c4: 6841 ldr r1, [r0, #4] 800c3c6: 6019 str r1, [r3, #0] sock->lastdata.pbuf = NULL; 800c3c8: 2300 movs r3, #0 800c3ca: 6043 str r3, [r0, #4] *conn = sock->conn; 800c3cc: 6801 ldr r1, [r0, #0] 800c3ce: 6011 str r1, [r2, #0] sock->conn = NULL; 800c3d0: 6003 str r3, [r0, #0] return 1; } 800c3d2: 2001 movs r0, #1 800c3d4: 4770 bx lr 0800c3d6 : * Check whether event_callback should wake up a thread waiting in * lwip_poll. */ static int lwip_poll_should_wake(const struct lwip_select_cb *scb, int fd, int has_recvevent, int has_sendevent, int has_errevent) { 800c3d6: b530 push {r4, r5, lr} 800c3d8: 9d03 ldr r5, [sp, #12] nfds_t fdi; for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 800c3da: f04f 0c00 mov.w ip, #0 800c3de: e002 b.n 800c3e6 return 1; } if (has_sendevent && (pollfd->events & POLLOUT) != 0) { return 1; } if (has_errevent) { 800c3e0: b9f5 cbnz r5, 800c420 for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 800c3e2: f10c 0c01 add.w ip, ip, #1 800c3e6: 6984 ldr r4, [r0, #24] 800c3e8: 4564 cmp r4, ip 800c3ea: d915 bls.n 800c418 const struct pollfd *pollfd = &scb->poll_fds[fdi]; 800c3ec: 6944 ldr r4, [r0, #20] 800c3ee: eb04 0ecc add.w lr, r4, ip, lsl #3 if (pollfd->fd == fd) { 800c3f2: f854 403c ldr.w r4, [r4, ip, lsl #3] 800c3f6: 428c cmp r4, r1 800c3f8: d1f3 bne.n 800c3e2 if (has_recvevent && (pollfd->events & POLLIN) != 0) { 800c3fa: b122 cbz r2, 800c406 800c3fc: f9be 4004 ldrsh.w r4, [lr, #4] 800c400: f014 0f01 tst.w r4, #1 800c404: d10a bne.n 800c41c if (has_sendevent && (pollfd->events & POLLOUT) != 0) { 800c406: 2b00 cmp r3, #0 800c408: d0ea beq.n 800c3e0 800c40a: f9be 4004 ldrsh.w r4, [lr, #4] 800c40e: f014 0f02 tst.w r4, #2 800c412: d0e5 beq.n 800c3e0 return 1; 800c414: 2001 movs r0, #1 800c416: e000 b.n 800c41a /* POLLERR is output only. */ return 1; } } } return 0; 800c418: 2000 movs r0, #0 } 800c41a: bd30 pop {r4, r5, pc} return 1; 800c41c: 2001 movs r0, #1 800c41e: e7fc b.n 800c41a return 1; 800c420: 2001 movs r0, #1 800c422: e7fa b.n 800c41a 0800c424 : { 800c424: b5f8 push {r3, r4, r5, r6, r7, lr} 800c426: 4606 mov r6, r0 800c428: 460d mov r5, r1 for (i = 0; i < NUM_SOCKETS; ++i) { 800c42a: 2400 movs r4, #0 800c42c: 2c03 cmp r4, #3 800c42e: dc31 bgt.n 800c494 SYS_ARCH_PROTECT(lev); 800c430: f000 fe1e bl 800d070 if (!sockets[i].conn) { 800c434: 0123 lsls r3, r4, #4 800c436: 4a19 ldr r2, [pc, #100] @ (800c49c ) 800c438: 58d3 ldr r3, [r2, r3] 800c43a: b11b cbz r3, 800c444 SYS_ARCH_UNPROTECT(lev); 800c43c: f000 fe24 bl 800d088 for (i = 0; i < NUM_SOCKETS; ++i) { 800c440: 3401 adds r4, #1 800c442: e7f3 b.n 800c42c sockets[i].conn = newconn; 800c444: 0123 lsls r3, r4, #4 800c446: eb02 1704 add.w r7, r2, r4, lsl #4 800c44a: 50d6 str r6, [r2, r3] SYS_ARCH_UNPROTECT(lev); 800c44c: f000 fe1c bl 800d088 sockets[i].lastdata.pbuf = NULL; 800c450: 2300 movs r3, #0 800c452: 607b str r3, [r7, #4] LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0); 800c454: 7bbb ldrb r3, [r7, #14] 800c456: b98b cbnz r3, 800c47c sockets[i].rcvevent = 0; 800c458: 4b10 ldr r3, [pc, #64] @ (800c49c ) 800c45a: eb03 1304 add.w r3, r3, r4, lsl #4 800c45e: 2200 movs r2, #0 800c460: 811a strh r2, [r3, #8] sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1); 800c462: 7833 ldrb r3, [r6, #0] 800c464: f003 03f0 and.w r3, r3, #240 @ 0xf0 800c468: 2b10 cmp r3, #16 800c46a: d00f beq.n 800c48c 800c46c: 2501 movs r5, #1 800c46e: 4b0b ldr r3, [pc, #44] @ (800c49c ) 800c470: eb03 1304 add.w r3, r3, r4, lsl #4 800c474: 815d strh r5, [r3, #10] sockets[i].errevent = 0; 800c476: 2200 movs r2, #0 800c478: 819a strh r2, [r3, #12] return i + LWIP_SOCKET_OFFSET; 800c47a: e00d b.n 800c498 LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0); 800c47c: 4b08 ldr r3, [pc, #32] @ (800c4a0 ) 800c47e: f240 220e movw r2, #526 @ 0x20e 800c482: 4908 ldr r1, [pc, #32] @ (800c4a4 ) 800c484: 4808 ldr r0, [pc, #32] @ (800c4a8 ) 800c486: f006 ffbf bl 8013408 800c48a: e7e5 b.n 800c458 sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1); 800c48c: 2d00 cmp r5, #0 800c48e: d0ee beq.n 800c46e 800c490: 2501 movs r5, #1 800c492: e7ec b.n 800c46e return -1; 800c494: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff } 800c498: 4620 mov r0, r4 800c49a: bdf8 pop {r3, r4, r5, r6, r7, pc} 800c49c: 24019b8c .word 0x24019b8c 800c4a0: 080163d0 .word 0x080163d0 800c4a4: 0801644c .word 0x0801644c 800c4a8: 080144e8 .word 0x080144e8 0800c4ac : { 800c4ac: b5f0 push {r4, r5, r6, r7, lr} 800c4ae: b085 sub sp, #20 800c4b0: 4616 mov r6, r2 800c4b2: 461c mov r4, r3 800c4b4: 9d0a ldr r5, [sp, #40] @ 0x28 LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL); 800c4b6: 460f mov r7, r1 800c4b8: b1d1 cbz r1, 800c4f0 LWIP_ASSERT("from != NULL", from != NULL); 800c4ba: b30c cbz r4, 800c500 LWIP_ASSERT("fromlen != NULL", fromlen != NULL); 800c4bc: b345 cbz r5, 800c510 IPADDR_PORT_TO_SOCKADDR(&saddr, fromaddr, port); 800c4be: 2310 movs r3, #16 800c4c0: f88d 3000 strb.w r3, [sp] 800c4c4: 2302 movs r3, #2 800c4c6: f88d 3001 strb.w r3, [sp, #1] 800c4ca: 4630 mov r0, r6 800c4cc: f7fb fcd6 bl 8007e7c 800c4d0: f8ad 0002 strh.w r0, [sp, #2] 800c4d4: 683b ldr r3, [r7, #0] 800c4d6: 9301 str r3, [sp, #4] 800c4d8: 2300 movs r3, #0 800c4da: 9302 str r3, [sp, #8] 800c4dc: 9303 str r3, [sp, #12] if (*fromlen < saddr.sa.sa_len) { 800c4de: 682a ldr r2, [r5, #0] 800c4e0: f89d 3000 ldrb.w r3, [sp] 800c4e4: 429a cmp r2, r3 800c4e6: d31b bcc.n 800c520 } else if (*fromlen > saddr.sa.sa_len) { 800c4e8: d923 bls.n 800c532 *fromlen = saddr.sa.sa_len; 800c4ea: 602b str r3, [r5, #0] int truncated = 0; 800c4ec: 2600 movs r6, #0 800c4ee: e018 b.n 800c522 LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL); 800c4f0: 4b11 ldr r3, [pc, #68] @ (800c538 ) 800c4f2: f240 4207 movw r2, #1031 @ 0x407 800c4f6: 4911 ldr r1, [pc, #68] @ (800c53c ) 800c4f8: 4811 ldr r0, [pc, #68] @ (800c540 ) 800c4fa: f006 ff85 bl 8013408 800c4fe: e7dc b.n 800c4ba LWIP_ASSERT("from != NULL", from != NULL); 800c500: 4b0d ldr r3, [pc, #52] @ (800c538 ) 800c502: f44f 6281 mov.w r2, #1032 @ 0x408 800c506: 490f ldr r1, [pc, #60] @ (800c544 ) 800c508: 480d ldr r0, [pc, #52] @ (800c540 ) 800c50a: f006 ff7d bl 8013408 800c50e: e7d5 b.n 800c4bc LWIP_ASSERT("fromlen != NULL", fromlen != NULL); 800c510: 4b09 ldr r3, [pc, #36] @ (800c538 ) 800c512: f240 4209 movw r2, #1033 @ 0x409 800c516: 490c ldr r1, [pc, #48] @ (800c548 ) 800c518: 4809 ldr r0, [pc, #36] @ (800c540 ) 800c51a: f006 ff75 bl 8013408 800c51e: e7ce b.n 800c4be truncated = 1; 800c520: 2601 movs r6, #1 MEMCPY(from, &saddr, *fromlen); 800c522: 682a ldr r2, [r5, #0] 800c524: 4669 mov r1, sp 800c526: 4620 mov r0, r4 800c528: f007 f9ab bl 8013882 } 800c52c: 4630 mov r0, r6 800c52e: b005 add sp, #20 800c530: bdf0 pop {r4, r5, r6, r7, pc} int truncated = 0; 800c532: 2600 movs r6, #0 800c534: e7f5 b.n 800c522 800c536: bf00 nop 800c538: 080163d0 .word 0x080163d0 800c53c: 0801646c .word 0x0801646c 800c540: 080144e8 .word 0x080144e8 800c544: 08016480 .word 0x08016480 800c548: 08016490 .word 0x08016490 0800c54c : if (sock == NULL) { 800c54c: b1d8 cbz r0, 800c586 { 800c54e: b570 push {r4, r5, r6, lr} 800c550: b084 sub sp, #16 800c552: 460c mov r4, r1 800c554: 4615 mov r5, r2 800c556: 4606 mov r6, r0 if (from && fromlen) 800c558: 2900 cmp r1, #0 800c55a: bf18 it ne 800c55c: 2a00 cmpne r2, #0 800c55e: d102 bne.n 800c566 return 0; 800c560: 2000 movs r0, #0 } 800c562: b004 add sp, #16 800c564: bd70 pop {r4, r5, r6, pc} netconn_getaddr(sock->conn, &tmpaddr, &port, 0); 800c566: 2300 movs r3, #0 800c568: f10d 020a add.w r2, sp, #10 800c56c: a903 add r1, sp, #12 800c56e: 6800 ldr r0, [r0, #0] 800c570: f7fa f91e bl 80067b0 return lwip_sock_make_addr(sock->conn, &tmpaddr, port, from, fromlen); 800c574: 9500 str r5, [sp, #0] 800c576: 4623 mov r3, r4 800c578: f8bd 200a ldrh.w r2, [sp, #10] 800c57c: a903 add r1, sp, #12 800c57e: 6830 ldr r0, [r6, #0] 800c580: f7ff ff94 bl 800c4ac 800c584: e7ed b.n 800c562 return 0; 800c586: 2000 movs r0, #0 } 800c588: 4770 bx lr 0800c58a : { 800c58a: b510 push {r4, lr} 800c58c: 4603 mov r3, r0 800c58e: 460c mov r4, r1 if (lastdata->pbuf != NULL) { 800c590: 6810 ldr r0, [r2, #0] 800c592: b110 cbz r0, 800c59a if (is_tcp) { 800c594: b133 cbz r3, 800c5a4 pbuf_free(lastdata->pbuf); 800c596: f7ff fc03 bl 800bda0 if (conn != NULL) { 800c59a: b114 cbz r4, 800c5a2 netconn_delete(conn); 800c59c: 4620 mov r0, r4 800c59e: f7fa f8f7 bl 8006790 } 800c5a2: bd10 pop {r4, pc} netbuf_delete(lastdata->netbuf); 800c5a4: f7ff f87e bl 800b6a4 800c5a8: e7f7 b.n 800c59a 0800c5aa : { 800c5aa: b570 push {r4, r5, r6, lr} 800c5ac: b082 sub sp, #8 800c5ae: 4605 mov r5, r0 800c5b0: 460c mov r4, r1 SYS_ARCH_PROTECT(lev); 800c5b2: f000 fd5d bl 800d070 800c5b6: 4606 mov r6, r0 freed = free_socket_locked(sock, is_tcp, &conn, &lastdata); 800c5b8: 466b mov r3, sp 800c5ba: aa01 add r2, sp, #4 800c5bc: 4621 mov r1, r4 800c5be: 4628 mov r0, r5 800c5c0: f7ff ff00 bl 800c3c4 800c5c4: 4605 mov r5, r0 SYS_ARCH_UNPROTECT(lev); 800c5c6: 4630 mov r0, r6 800c5c8: f000 fd5e bl 800d088 if (freed) { 800c5cc: b90d cbnz r5, 800c5d2 } 800c5ce: b002 add sp, #8 800c5d0: bd70 pop {r4, r5, r6, pc} free_socket_free_elements(is_tcp, conn, &lastdata); 800c5d2: 466a mov r2, sp 800c5d4: 9901 ldr r1, [sp, #4] 800c5d6: 4620 mov r0, r4 800c5d8: f7ff ffd7 bl 800c58a } 800c5dc: e7f7 b.n 800c5ce ... 0800c5e0 : { 800c5e0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 800c5e4: b085 sub sp, #20 800c5e6: 4681 mov r9, r0 800c5e8: 9101 str r1, [sp, #4] 800c5ea: 4698 mov r8, r3 ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX; 800c5ec: 4615 mov r5, r2 800c5ee: 2a00 cmp r2, #0 800c5f0: db10 blt.n 800c614 LWIP_ASSERT("no socket given", sock != NULL); 800c5f2: f1b9 0f00 cmp.w r9, #0 800c5f6: d010 beq.n 800c61a LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP); 800c5f8: f8d9 3000 ldr.w r3, [r9] 800c5fc: 781b ldrb r3, [r3, #0] 800c5fe: f003 03f0 and.w r3, r3, #240 @ 0xf0 800c602: 2b10 cmp r3, #16 800c604: d111 bne.n 800c62a if (flags & MSG_DONTWAIT) { 800c606: f018 0f08 tst.w r8, #8 800c60a: d116 bne.n 800c63a u8_t apiflags = NETCONN_NOAUTORCVD; 800c60c: f04f 0a08 mov.w sl, #8 apiflags |= NETCONN_DONTBLOCK; 800c610: 2600 movs r6, #0 800c612: e055 b.n 800c6c0 ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX; 800c614: f06f 4500 mvn.w r5, #2147483648 @ 0x80000000 800c618: e7eb b.n 800c5f2 LWIP_ASSERT("no socket given", sock != NULL); 800c61a: 4b47 ldr r3, [pc, #284] @ (800c738 ) 800c61c: f240 329e movw r2, #926 @ 0x39e 800c620: 4946 ldr r1, [pc, #280] @ (800c73c ) 800c622: 4847 ldr r0, [pc, #284] @ (800c740 ) 800c624: f006 fef0 bl 8013408 800c628: e7e6 b.n 800c5f8 LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP); 800c62a: 4b43 ldr r3, [pc, #268] @ (800c738 ) 800c62c: f240 329f movw r2, #927 @ 0x39f 800c630: 4944 ldr r1, [pc, #272] @ (800c744 ) 800c632: 4843 ldr r0, [pc, #268] @ (800c740 ) 800c634: f006 fee8 bl 8013408 800c638: e7e5 b.n 800c606 apiflags |= NETCONN_DONTBLOCK; 800c63a: f04f 0a0c mov.w sl, #12 800c63e: e7e7 b.n 800c610 err = netconn_recv_tcp_pbuf_flags(sock->conn, &p, apiflags); 800c640: 4652 mov r2, sl 800c642: a903 add r1, sp, #12 800c644: f8d9 0000 ldr.w r0, [r9] 800c648: f7fa fb14 bl 8006c74 if (err != ERR_OK) { 800c64c: 4604 mov r4, r0 800c64e: b928 cbnz r0, 800c65c LWIP_ASSERT("p != NULL", p != NULL); 800c650: 9b03 ldr r3, [sp, #12] 800c652: b193 cbz r3, 800c67a sock->lastdata.pbuf = p; 800c654: 9b03 ldr r3, [sp, #12] 800c656: f8c9 3004 str.w r3, [r9, #4] 800c65a: e036 b.n 800c6ca if (recvd > 0) { 800c65c: 2e00 cmp r6, #0 800c65e: dd01 ble.n 800c664 goto lwip_recv_tcp_done; 800c660: 46b3 mov fp, r6 800c662: e05b b.n 800c71c sock_set_errno(sock, err_to_errno(err)); 800c664: f7fc fe68 bl 8009338 800c668: b108 cbz r0, 800c66e 800c66a: 4a37 ldr r2, [pc, #220] @ (800c748 ) 800c66c: 6010 str r0, [r2, #0] if (err == ERR_CLSD) { 800c66e: f114 0f0f cmn.w r4, #15 800c672: d04d beq.n 800c710 return -1; 800c674: f04f 3bff mov.w fp, #4294967295 @ 0xffffffff 800c678: e053 b.n 800c722 LWIP_ASSERT("p != NULL", p != NULL); 800c67a: 4b2f ldr r3, [pc, #188] @ (800c738 ) 800c67c: f240 32c5 movw r2, #965 @ 0x3c5 800c680: 4932 ldr r1, [pc, #200] @ (800c74c ) 800c682: 482f ldr r0, [pc, #188] @ (800c740 ) 800c684: f006 fec0 bl 8013408 800c688: e7e4 b.n 800c654 LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen); 800c68a: 4b2b ldr r3, [pc, #172] @ (800c738 ) 800c68c: f240 32dd movw r2, #989 @ 0x3dd 800c690: 492f ldr r1, [pc, #188] @ (800c750 ) 800c692: 482b ldr r0, [pc, #172] @ (800c740 ) 800c694: f006 feb8 bl 8013408 800c698: e027 b.n 800c6ea LWIP_ASSERT("invalid copylen", p->tot_len >= copylen); 800c69a: 4b27 ldr r3, [pc, #156] @ (800c738 ) 800c69c: f240 32e3 movw r2, #995 @ 0x3e3 800c6a0: 492c ldr r1, [pc, #176] @ (800c754 ) 800c6a2: 4827 ldr r0, [pc, #156] @ (800c740 ) 800c6a4: f006 feb0 bl 8013408 800c6a8: e027 b.n 800c6fa sock->lastdata.pbuf = NULL; 800c6aa: 2300 movs r3, #0 800c6ac: f8c9 3004 str.w r3, [r9, #4] pbuf_free(p); 800c6b0: f7ff fb76 bl 800bda0 apiflags |= NETCONN_DONTBLOCK | NETCONN_NOFIN; 800c6b4: f04a 0a14 orr.w sl, sl, #20 } while ((recv_left > 0) && !(flags & MSG_PEEK)); 800c6b8: 2d00 cmp r5, #0 800c6ba: dd2c ble.n 800c716 800c6bc: bb5e cbnz r6, 800c716 recvd += copylen; 800c6be: 465e mov r6, fp if (sock->lastdata.pbuf) { 800c6c0: f8d9 3004 ldr.w r3, [r9, #4] 800c6c4: 2b00 cmp r3, #0 800c6c6: d0bb beq.n 800c640 p = sock->lastdata.pbuf; 800c6c8: 9303 str r3, [sp, #12] if (recv_left > p->tot_len) { 800c6ca: 9803 ldr r0, [sp, #12] 800c6cc: 8904 ldrh r4, [r0, #8] 800c6ce: 42a5 cmp r5, r4 800c6d0: dc00 bgt.n 800c6d4 copylen = (u16_t)recv_left; 800c6d2: b2ac uxth r4, r5 if (recvd + copylen < recvd) { 800c6d4: 4627 mov r7, r4 800c6d6: eb04 0b06 add.w fp, r4, r6 pbuf_copy_partial(p, (u8_t *)mem + recvd, copylen, 0); 800c6da: 2300 movs r3, #0 800c6dc: 4622 mov r2, r4 800c6de: 9901 ldr r1, [sp, #4] 800c6e0: 4431 add r1, r6 800c6e2: f7ff fddf bl 800c2a4 LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen); 800c6e6: 42a5 cmp r5, r4 800c6e8: dbcf blt.n 800c68a recv_left -= copylen; 800c6ea: 1bed subs r5, r5, r7 if ((flags & MSG_PEEK) == 0) { 800c6ec: f018 0601 ands.w r6, r8, #1 800c6f0: d1e0 bne.n 800c6b4 LWIP_ASSERT("invalid copylen", p->tot_len >= copylen); 800c6f2: 9b03 ldr r3, [sp, #12] 800c6f4: 891b ldrh r3, [r3, #8] 800c6f6: 429c cmp r4, r3 800c6f8: d8cf bhi.n 800c69a if (p->tot_len - copylen > 0) { 800c6fa: 9803 ldr r0, [sp, #12] 800c6fc: 8903 ldrh r3, [r0, #8] 800c6fe: 1bdb subs r3, r3, r7 800c700: 2b00 cmp r3, #0 800c702: ddd2 ble.n 800c6aa sock->lastdata.pbuf = pbuf_free_header(p, copylen); 800c704: 4621 mov r1, r4 800c706: f7ff fcb3 bl 800c070 800c70a: f8c9 0004 str.w r0, [r9, #4] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: lastdata now pbuf=%p\n", (void *)sock->lastdata.pbuf)); 800c70e: e7d1 b.n 800c6b4 return 0; 800c710: f04f 0b00 mov.w fp, #0 800c714: e005 b.n 800c722 if ((recvd > 0) && !(flags & MSG_PEEK)) { 800c716: f1bb 0f00 cmp.w fp, #0 800c71a: dd02 ble.n 800c722 800c71c: f018 0f01 tst.w r8, #1 800c720: d003 beq.n 800c72a } 800c722: 4658 mov r0, fp 800c724: b005 add sp, #20 800c726: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} netconn_tcp_recvd(sock->conn, (size_t)recvd); 800c72a: 4659 mov r1, fp 800c72c: f8d9 0000 ldr.w r0, [r9] 800c730: f7fa f8bc bl 80068ac 800c734: e7f5 b.n 800c722 800c736: bf00 nop 800c738: 080163d0 .word 0x080163d0 800c73c: 080164a0 .word 0x080164a0 800c740: 080144e8 .word 0x080144e8 800c744: 080164b0 .word 0x080164b0 800c748: 24019d8c .word 0x24019d8c 800c74c: 08014fc0 .word 0x08014fc0 800c750: 080164d4 .word 0x080164d4 800c754: 080164fc .word 0x080164fc 0800c758 : { 800c758: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 800c75c: b085 sub sp, #20 800c75e: 4681 mov r9, r0 800c760: 4688 mov r8, r1 800c762: 4616 mov r6, r2 800c764: 469a mov sl, r3 LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;); 800c766: 6893 ldr r3, [r2, #8] 800c768: b16b cbz r3, 800c786 if (flags & MSG_DONTWAIT) { 800c76a: f018 0f08 tst.w r8, #8 800c76e: d017 beq.n 800c7a0 apiflags = NETCONN_DONTBLOCK; 800c770: 2204 movs r2, #4 buf = sock->lastdata.netbuf; 800c772: f8d9 3004 ldr.w r3, [r9, #4] 800c776: 9303 str r3, [sp, #12] if (buf == NULL) { 800c778: b1a3 cbz r3, 800c7a4 buflen = buf->p->tot_len; 800c77a: 9b03 ldr r3, [sp, #12] 800c77c: 681b ldr r3, [r3, #0] 800c77e: 891f ldrh r7, [r3, #8] for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 800c780: 2500 movs r5, #0 copied = 0; 800c782: 46ab mov fp, r5 for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 800c784: e02e b.n 800c7e4 LWIP_ERROR("lwip_recvfrom_udp_raw: invalid arguments", (msg->msg_iov != NULL) || (msg->msg_iovlen <= 0), return ERR_ARG;); 800c786: 68d3 ldr r3, [r2, #12] 800c788: 2b00 cmp r3, #0 800c78a: ddee ble.n 800c76a 800c78c: 4b32 ldr r3, [pc, #200] @ (800c858 ) 800c78e: f240 4249 movw r2, #1097 @ 0x449 800c792: 4932 ldr r1, [pc, #200] @ (800c85c ) 800c794: 4832 ldr r0, [pc, #200] @ (800c860 ) 800c796: f006 fe37 bl 8013408 800c79a: f06f 000f mvn.w r0, #15 800c79e: e045 b.n 800c82c apiflags = 0; 800c7a0: 2200 movs r2, #0 800c7a2: e7e6 b.n 800c772 err = netconn_recv_udp_raw_netbuf_flags(sock->conn, &buf, apiflags); 800c7a4: a903 add r1, sp, #12 800c7a6: f8d9 0000 ldr.w r0, [r9] 800c7aa: f7fa f9f3 bl 8006b94 if (err != ERR_OK) { 800c7ae: 2800 cmp r0, #0 800c7b0: d13c bne.n 800c82c LWIP_ASSERT("buf != NULL", buf != NULL); 800c7b2: 9b03 ldr r3, [sp, #12] 800c7b4: b11b cbz r3, 800c7be sock->lastdata.netbuf = buf; 800c7b6: 9b03 ldr r3, [sp, #12] 800c7b8: f8c9 3004 str.w r3, [r9, #4] 800c7bc: e7dd b.n 800c77a LWIP_ASSERT("buf != NULL", buf != NULL); 800c7be: 4b26 ldr r3, [pc, #152] @ (800c858 ) 800c7c0: f240 425e movw r2, #1118 @ 0x45e 800c7c4: 4927 ldr r1, [pc, #156] @ (800c864 ) 800c7c6: 4826 ldr r0, [pc, #152] @ (800c860 ) 800c7c8: f006 fe1e bl 8013408 800c7cc: e7f3 b.n 800c7b6 pbuf_copy_partial(buf->p, (u8_t *)msg->msg_iov[i].iov_base, copylen, copied); 800c7ce: 465b mov r3, fp 800c7d0: 4622 mov r2, r4 800c7d2: 5809 ldr r1, [r1, r0] 800c7d4: 9803 ldr r0, [sp, #12] 800c7d6: 6800 ldr r0, [r0, #0] 800c7d8: f7ff fd64 bl 800c2a4 copied = (u16_t)(copied + copylen); 800c7dc: 445c add r4, fp 800c7de: fa1f fb84 uxth.w fp, r4 for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 800c7e2: 3501 adds r5, #1 800c7e4: 68f3 ldr r3, [r6, #12] 800c7e6: 42ab cmp r3, r5 800c7e8: dd0d ble.n 800c806 800c7ea: 45bb cmp fp, r7 800c7ec: d20b bcs.n 800c806 u16_t len_left = (u16_t)(buflen - copied); 800c7ee: eba7 040b sub.w r4, r7, fp 800c7f2: b2a4 uxth r4, r4 if (msg->msg_iov[i].iov_len > len_left) { 800c7f4: 68b1 ldr r1, [r6, #8] 800c7f6: 00e8 lsls r0, r5, #3 800c7f8: eb01 03c5 add.w r3, r1, r5, lsl #3 800c7fc: 685b ldr r3, [r3, #4] 800c7fe: 42a3 cmp r3, r4 800c800: d8e5 bhi.n 800c7ce copylen = (u16_t)msg->msg_iov[i].iov_len; 800c802: b29c uxth r4, r3 800c804: e7e3 b.n 800c7ce if (msg->msg_name && msg->msg_namelen) 800c806: 6833 ldr r3, [r6, #0] 800c808: b10b cbz r3, 800c80e 800c80a: 6872 ldr r2, [r6, #4] 800c80c: b98a cbnz r2, 800c832 msg->msg_flags = 0; 800c80e: 2300 movs r3, #0 800c810: 61b3 str r3, [r6, #24] if (msg->msg_control) { 800c812: 6933 ldr r3, [r6, #16] 800c814: b10b cbz r3, 800c81a msg->msg_controllen = 0; 800c816: 2300 movs r3, #0 800c818: 6173 str r3, [r6, #20] if ((flags & MSG_PEEK) == 0) { 800c81a: f018 0f01 tst.w r8, #1 800c81e: d012 beq.n 800c846 if (datagram_len) { 800c820: f1ba 0f00 cmp.w sl, #0 800c824: d016 beq.n 800c854 *datagram_len = buflen; 800c826: f8aa 7000 strh.w r7, [sl] return ERR_OK; 800c82a: 2000 movs r0, #0 } 800c82c: b005 add sp, #20 800c82e: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), 800c832: 9903 ldr r1, [sp, #12] 800c834: 898a ldrh r2, [r1, #12] 800c836: 1d30 adds r0, r6, #4 800c838: 9000 str r0, [sp, #0] 800c83a: 3108 adds r1, #8 800c83c: f8d9 0000 ldr.w r0, [r9] 800c840: f7ff fe34 bl 800c4ac 800c844: e7e3 b.n 800c80e sock->lastdata.netbuf = NULL; 800c846: 2300 movs r3, #0 800c848: f8c9 3004 str.w r3, [r9, #4] netbuf_delete(buf); 800c84c: 9803 ldr r0, [sp, #12] 800c84e: f7fe ff29 bl 800b6a4 800c852: e7e5 b.n 800c820 return ERR_OK; 800c854: 2000 movs r0, #0 800c856: e7e9 b.n 800c82c 800c858: 080163d0 .word 0x080163d0 800c85c: 0801650c .word 0x0801650c 800c860: 080144e8 .word 0x080144e8 800c864: 080148e4 .word 0x080148e4 0800c868 : * of the loop, thus creating a possibility where a thread could modify the * select_cb_list during our UNPROTECT/PROTECT. We use a generational counter to * detect this change and restart the list walk. The list is expected to be small */ static void select_check_waiters(int s, int has_recvevent, int has_sendevent, int has_errevent) { 800c868: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800c86c: b082 sub sp, #8 800c86e: 4605 mov r5, r0 800c870: 460e mov r6, r1 800c872: 4690 mov r8, r2 800c874: 461f mov r7, r3 #if !LWIP_TCPIP_CORE_LOCKING int last_select_cb_ctr; SYS_ARCH_DECL_PROTECT(lev); #endif /* !LWIP_TCPIP_CORE_LOCKING */ LWIP_ASSERT_CORE_LOCKED(); 800c876: f7f7 f949 bl 8003b0c SYS_ARCH_PROTECT(lev); again: /* remember the state of select_cb_list to detect changes */ last_select_cb_ctr = select_cb_ctr; #endif /* !LWIP_TCPIP_CORE_LOCKING */ for (scb = select_cb_list; scb != NULL; scb = scb->next) { 800c87a: 4b2e ldr r3, [pc, #184] @ (800c934 ) 800c87c: 681c ldr r4, [r3, #0] 800c87e: e03e b.n 800c8fe else #endif /* LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL */ #if LWIP_SOCKET_SELECT { /* Test this select call for our socket */ if (has_recvevent) { 800c880: b196 cbz r6, 800c8a8 if (scb->readset && FD_ISSET(s, scb->readset)) { 800c882: 68a2 ldr r2, [r4, #8] 800c884: b18a cbz r2, 800c8aa 800c886: 462b mov r3, r5 800c888: 2d00 cmp r5, #0 800c88a: db0a blt.n 800c8a2 800c88c: 115b asrs r3, r3, #5 800c88e: f852 3023 ldr.w r3, [r2, r3, lsl #2] 800c892: f005 021f and.w r2, r5, #31 800c896: 40d3 lsrs r3, r2 800c898: f013 0f01 tst.w r3, #1 800c89c: d005 beq.n 800c8aa do_signal = 1; 800c89e: 2001 movs r0, #1 800c8a0: e003 b.n 800c8aa if (scb->readset && FD_ISSET(s, scb->readset)) { 800c8a2: f105 031f add.w r3, r5, #31 800c8a6: e7f1 b.n 800c88c int do_signal = 0; 800c8a8: 4630 mov r0, r6 } } if (has_sendevent) { 800c8aa: f1b8 0f00 cmp.w r8, #0 800c8ae: d00f beq.n 800c8d0 if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { 800c8b0: b970 cbnz r0, 800c8d0 800c8b2: 68e2 ldr r2, [r4, #12] 800c8b4: b162 cbz r2, 800c8d0 800c8b6: 462b mov r3, r5 800c8b8: 2d00 cmp r5, #0 800c8ba: db31 blt.n 800c920 800c8bc: 115b asrs r3, r3, #5 800c8be: f852 3023 ldr.w r3, [r2, r3, lsl #2] 800c8c2: f005 021f and.w r2, r5, #31 800c8c6: 40d3 lsrs r3, r2 800c8c8: f013 0f01 tst.w r3, #1 800c8cc: d000 beq.n 800c8d0 do_signal = 1; 800c8ce: 2001 movs r0, #1 } } if (has_errevent) { 800c8d0: b31f cbz r7, 800c91a if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { 800c8d2: b968 cbnz r0, 800c8f0 800c8d4: 6922 ldr r2, [r4, #16] 800c8d6: b302 cbz r2, 800c91a 800c8d8: 462b mov r3, r5 800c8da: 2d00 cmp r5, #0 800c8dc: db23 blt.n 800c926 800c8de: 115b asrs r3, r3, #5 800c8e0: f852 3023 ldr.w r3, [r2, r3, lsl #2] 800c8e4: f005 021f and.w r2, r5, #31 800c8e8: 40d3 lsrs r3, r2 800c8ea: f013 0f01 tst.w r3, #1 800c8ee: d014 beq.n 800c91a } } } #endif /* LWIP_SOCKET_SELECT */ if (do_signal) { scb->sem_signalled = 1; 800c8f0: 2301 movs r3, #1 800c8f2: 61e3 str r3, [r4, #28] /* For !LWIP_TCPIP_CORE_LOCKING, we don't call SYS_ARCH_UNPROTECT() before signaling the semaphore, as this might lead to the select thread taking itself off the list, invalidating the semaphore. */ sys_sem_signal(SELECT_SEM_PTR(scb->sem)); 800c8f4: f104 0020 add.w r0, r4, #32 800c8f8: f000 fb6f bl 800cfda for (scb = select_cb_list; scb != NULL; scb = scb->next) { 800c8fc: 6824 ldr r4, [r4, #0] 800c8fe: b1ac cbz r4, 800c92c if (scb->sem_signalled == 0) { 800c900: 69e0 ldr r0, [r4, #28] 800c902: 2800 cmp r0, #0 800c904: d1fa bne.n 800c8fc if (scb->poll_fds != NULL) { 800c906: 6963 ldr r3, [r4, #20] 800c908: 2b00 cmp r3, #0 800c90a: d0b9 beq.n 800c880 do_signal = lwip_poll_should_wake(scb, s, has_recvevent, has_sendevent, has_errevent); 800c90c: 9700 str r7, [sp, #0] 800c90e: 4643 mov r3, r8 800c910: 4632 mov r2, r6 800c912: 4629 mov r1, r5 800c914: 4620 mov r0, r4 800c916: f7ff fd5e bl 800c3d6 if (do_signal) { 800c91a: 2800 cmp r0, #0 800c91c: d0ee beq.n 800c8fc 800c91e: e7e7 b.n 800c8f0 if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { 800c920: f105 031f add.w r3, r5, #31 800c924: e7ca b.n 800c8bc if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { 800c926: f105 031f add.w r3, r5, #31 800c92a: e7d8 b.n 800c8de /* remember the state of select_cb_list to detect changes */ last_select_cb_ctr = select_cb_ctr; } SYS_ARCH_UNPROTECT(lev); #endif } 800c92c: b002 add sp, #8 800c92e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 800c932: bf00 nop 800c934: 24019b88 .word 0x24019b88 0800c938 : if (conn) { 800c938: 2800 cmp r0, #0 800c93a: d06d beq.n 800ca18 { 800c93c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800c940: 460c mov r4, r1 800c942: 4605 mov r5, r0 s = conn->socket; 800c944: 6986 ldr r6, [r0, #24] if (s < 0) { 800c946: 2e00 cmp r6, #0 800c948: db0e blt.n 800c968 sock = get_socket(s); 800c94a: 4630 mov r0, r6 800c94c: f7ff fd2e bl 800c3ac if (!sock) { 800c950: 4605 mov r5, r0 800c952: b368 cbz r0, 800c9b0 SYS_ARCH_PROTECT(lev); 800c954: f000 fb8c bl 800d070 800c958: 4607 mov r7, r0 switch (evt) { 800c95a: 2c04 cmp r4, #4 800c95c: d838 bhi.n 800c9d0 800c95e: e8df f004 tbb [pc, r4] 800c962: 1c11 .short 0x1c11 800c964: 3129 .short 0x3129 800c966: 34 .byte 0x34 800c967: 00 .byte 0x00 SYS_ARCH_PROTECT(lev); 800c968: f000 fb82 bl 800d070 if (conn->socket < 0) { 800c96c: 69ae ldr r6, [r5, #24] 800c96e: 2e00 cmp r6, #0 800c970: db02 blt.n 800c978 SYS_ARCH_UNPROTECT(lev); 800c972: f000 fb89 bl 800d088 800c976: e7e8 b.n 800c94a if (evt == NETCONN_EVT_RCVPLUS) { 800c978: b90c cbnz r4, 800c97e conn->socket--; 800c97a: 3e01 subs r6, #1 800c97c: 61ae str r6, [r5, #24] SYS_ARCH_UNPROTECT(lev); 800c97e: f000 fb83 bl 800d088 return; 800c982: e015 b.n 800c9b0 sock->rcvevent++; 800c984: f9b5 3008 ldrsh.w r3, [r5, #8] 800c988: 3301 adds r3, #1 800c98a: b21b sxth r3, r3 800c98c: 812b strh r3, [r5, #8] if (sock->rcvevent > 1) { 800c98e: 2b01 cmp r3, #1 800c990: dd01 ble.n 800c996 check_waiters = 0; 800c992: 2300 movs r3, #0 800c994: e006 b.n 800c9a4 check_waiters = 1; 800c996: 2301 movs r3, #1 800c998: e004 b.n 800c9a4 sock->rcvevent--; 800c99a: f9b5 3008 ldrsh.w r3, [r5, #8] 800c99e: 3b01 subs r3, #1 800c9a0: 812b strh r3, [r5, #8] check_waiters = 0; 800c9a2: 2300 movs r3, #0 if (sock->select_waiting && check_waiters) { 800c9a4: 7baa ldrb r2, [r5, #14] 800c9a6: b102 cbz r2, 800c9aa 800c9a8: b9db cbnz r3, 800c9e2 SYS_ARCH_UNPROTECT(lev); 800c9aa: 4638 mov r0, r7 800c9ac: f000 fb6c bl 800d088 } 800c9b0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} if (sock->sendevent) { 800c9b4: 896b ldrh r3, [r5, #10] 800c9b6: b91b cbnz r3, 800c9c0 check_waiters = 1; 800c9b8: 2301 movs r3, #1 sock->sendevent = 1; 800c9ba: 2201 movs r2, #1 800c9bc: 816a strh r2, [r5, #10] break; 800c9be: e7f1 b.n 800c9a4 check_waiters = 0; 800c9c0: 2300 movs r3, #0 800c9c2: e7fa b.n 800c9ba sock->sendevent = 0; 800c9c4: 2300 movs r3, #0 800c9c6: 816b strh r3, [r5, #10] break; 800c9c8: e7ec b.n 800c9a4 sock->errevent = 1; 800c9ca: 2301 movs r3, #1 800c9cc: 81ab strh r3, [r5, #12] break; 800c9ce: e7e9 b.n 800c9a4 LWIP_ASSERT("unknown event", 0); 800c9d0: 4b12 ldr r3, [pc, #72] @ (800ca1c ) 800c9d2: f44f 621f mov.w r2, #2544 @ 0x9f0 800c9d6: 4912 ldr r1, [pc, #72] @ (800ca20 ) 800c9d8: 4812 ldr r0, [pc, #72] @ (800ca24 ) 800c9da: f006 fd15 bl 8013408 check_waiters = 1; 800c9de: 2301 movs r3, #1 break; 800c9e0: e7e0 b.n 800c9a4 has_recvevent = sock->rcvevent > 0; 800c9e2: f9b5 4008 ldrsh.w r4, [r5, #8] 800c9e6: 2c00 cmp r4, #0 800c9e8: bfd4 ite le 800c9ea: 2400 movle r4, #0 800c9ec: 2401 movgt r4, #1 has_sendevent = sock->sendevent != 0; 800c9ee: f8b5 800a ldrh.w r8, [r5, #10] 800c9f2: f1b8 0800 subs.w r8, r8, #0 800c9f6: bf18 it ne 800c9f8: f04f 0801 movne.w r8, #1 has_errevent = sock->errevent != 0; 800c9fc: 89ad ldrh r5, [r5, #12] 800c9fe: 3d00 subs r5, #0 800ca00: bf18 it ne 800ca02: 2501 movne r5, #1 SYS_ARCH_UNPROTECT(lev); 800ca04: 4638 mov r0, r7 800ca06: f000 fb3f bl 800d088 select_check_waiters(s, has_recvevent, has_sendevent, has_errevent); 800ca0a: 462b mov r3, r5 800ca0c: 4642 mov r2, r8 800ca0e: 4621 mov r1, r4 800ca10: 4630 mov r0, r6 800ca12: f7ff ff29 bl 800c868 if (sock->select_waiting && check_waiters) { 800ca16: e7cb b.n 800c9b0 800ca18: 4770 bx lr 800ca1a: bf00 nop 800ca1c: 080163d0 .word 0x080163d0 800ca20: 08016538 .word 0x08016538 800ca24: 080144e8 .word 0x080144e8 0800ca28 : { 800ca28: b538 push {r3, r4, r5, lr} sock = get_socket(s); 800ca2a: f7ff fcbf bl 800c3ac if (!sock) { 800ca2e: b340 cbz r0, 800ca82 800ca30: 4605 mov r5, r0 if (sock->conn != NULL) { 800ca32: 6803 ldr r3, [r0, #0] 800ca34: b183 cbz r3, 800ca58 is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP; 800ca36: 781c ldrb r4, [r3, #0] 800ca38: f004 04f0 and.w r4, r4, #240 @ 0xf0 800ca3c: 2c10 cmp r4, #16 800ca3e: bf14 ite ne 800ca40: 2400 movne r4, #0 800ca42: 2401 moveq r4, #1 err = netconn_prepare_delete(sock->conn); 800ca44: 6828 ldr r0, [r5, #0] 800ca46: f7f9 fe91 bl 800676c if (err != ERR_OK) { 800ca4a: b990 cbnz r0, 800ca72 free_socket(sock, is_tcp); 800ca4c: 4621 mov r1, r4 800ca4e: 4628 mov r0, r5 800ca50: f7ff fdab bl 800c5aa return 0; 800ca54: 2000 movs r0, #0 } 800ca56: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata.pbuf == NULL); 800ca58: 6843 ldr r3, [r0, #4] 800ca5a: b143 cbz r3, 800ca6e 800ca5c: 4b0a ldr r3, [pc, #40] @ (800ca88 ) 800ca5e: f44f 7245 mov.w r2, #788 @ 0x314 800ca62: 490a ldr r1, [pc, #40] @ (800ca8c ) 800ca64: 480a ldr r0, [pc, #40] @ (800ca90 ) 800ca66: f006 fccf bl 8013408 int is_tcp = 0; 800ca6a: 2400 movs r4, #0 800ca6c: e7ea b.n 800ca44 800ca6e: 2400 movs r4, #0 800ca70: e7e8 b.n 800ca44 sock_set_errno(sock, err_to_errno(err)); 800ca72: f7fc fc61 bl 8009338 800ca76: b108 cbz r0, 800ca7c 800ca78: 4a06 ldr r2, [pc, #24] @ (800ca94 ) 800ca7a: 6010 str r0, [r2, #0] return -1; 800ca7c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ca80: e7e9 b.n 800ca56 return -1; 800ca82: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ca86: e7e6 b.n 800ca56 800ca88: 080163d0 .word 0x080163d0 800ca8c: 08016548 .word 0x08016548 800ca90: 080144e8 .word 0x080144e8 800ca94: 24019d8c .word 0x24019d8c 0800ca98 : { 800ca98: b570 push {r4, r5, r6, lr} 800ca9a: b082 sub sp, #8 800ca9c: 460c mov r4, r1 800ca9e: 4615 mov r5, r2 sock = get_socket(s); 800caa0: f7ff fc84 bl 800c3ac if (!sock) { 800caa4: 2800 cmp r0, #0 800caa6: d034 beq.n 800cb12 800caa8: 4606 mov r6, r0 if (name->sa_family == AF_UNSPEC) { 800caaa: 7863 ldrb r3, [r4, #1] 800caac: b1a3 cbz r3, 800cad8 LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) && 800caae: 2d10 cmp r5, #16 800cab0: d116 bne.n 800cae0 800cab2: 2b02 cmp r3, #2 800cab4: d114 bne.n 800cae0 800cab6: f014 0f03 tst.w r4, #3 800caba: d111 bne.n 800cae0 SOCKADDR_TO_IPADDR_PORT(name, &remote_addr, remote_port); 800cabc: 6863 ldr r3, [r4, #4] 800cabe: 9301 str r3, [sp, #4] 800cac0: 8860 ldrh r0, [r4, #2] 800cac2: f7fb f9db bl 8007e7c 800cac6: 4602 mov r2, r0 err = netconn_connect(sock->conn, &remote_addr, remote_port); 800cac8: a901 add r1, sp, #4 800caca: 6830 ldr r0, [r6, #0] 800cacc: f7f9 feaa bl 8006824 if (err != ERR_OK) { 800cad0: b9b8 cbnz r0, 800cb02 return 0; 800cad2: 2000 movs r0, #0 } 800cad4: b002 add sp, #8 800cad6: bd70 pop {r4, r5, r6, pc} err = netconn_disconnect(sock->conn); 800cad8: 6800 ldr r0, [r0, #0] 800cada: f7f9 fec9 bl 8006870 800cade: e7f7 b.n 800cad0 LWIP_ERROR("lwip_connect: invalid address", IS_SOCK_ADDR_LEN_VALID(namelen) && 800cae0: 4b0d ldr r3, [pc, #52] @ (800cb18 ) 800cae2: f240 3247 movw r2, #839 @ 0x347 800cae6: 490d ldr r1, [pc, #52] @ (800cb1c ) 800cae8: 480d ldr r0, [pc, #52] @ (800cb20 ) 800caea: f006 fc8d bl 8013408 800caee: f06f 000f mvn.w r0, #15 800caf2: f7fc fc21 bl 8009338 800caf6: b108 cbz r0, 800cafc 800caf8: 4a0a ldr r2, [pc, #40] @ (800cb24 ) 800cafa: 6010 str r0, [r2, #0] 800cafc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cb00: e7e8 b.n 800cad4 sock_set_errno(sock, err_to_errno(err)); 800cb02: f7fc fc19 bl 8009338 800cb06: b108 cbz r0, 800cb0c 800cb08: 4a06 ldr r2, [pc, #24] @ (800cb24 ) 800cb0a: 6010 str r0, [r2, #0] return -1; 800cb0c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cb10: e7e0 b.n 800cad4 return -1; 800cb12: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cb16: e7dd b.n 800cad4 800cb18: 080163d0 .word 0x080163d0 800cb1c: 08016560 .word 0x08016560 800cb20: 080144e8 .word 0x080144e8 800cb24: 24019d8c .word 0x24019d8c 0800cb28 : { 800cb28: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 800cb2c: b08d sub sp, #52 @ 0x34 800cb2e: 4607 mov r7, r0 800cb30: 4689 mov r9, r1 800cb32: 4614 mov r4, r2 800cb34: 461e mov r6, r3 800cb36: 9d15 ldr r5, [sp, #84] @ 0x54 sock = get_socket(s); 800cb38: f7ff fc38 bl 800c3ac if (!sock) { 800cb3c: 2800 cmp r0, #0 800cb3e: d04e beq.n 800cbde 800cb40: 4680 mov r8, r0 if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 800cb42: 6803 ldr r3, [r0, #0] 800cb44: 781b ldrb r3, [r3, #0] 800cb46: f003 03f0 and.w r3, r3, #240 @ 0xf0 800cb4a: 2b10 cmp r3, #16 800cb4c: d025 beq.n 800cb9a u16_t datagram_len = 0; 800cb4e: 2200 movs r2, #0 800cb50: f8ad 200a strh.w r2, [sp, #10] vec.iov_base = mem; 800cb54: f8cd 900c str.w r9, [sp, #12] vec.iov_len = len; 800cb58: 9404 str r4, [sp, #16] msg.msg_control = NULL; 800cb5a: 9209 str r2, [sp, #36] @ 0x24 msg.msg_controllen = 0; 800cb5c: 920a str r2, [sp, #40] @ 0x28 msg.msg_flags = 0; 800cb5e: 920b str r2, [sp, #44] @ 0x2c msg.msg_iov = &vec; 800cb60: ab03 add r3, sp, #12 800cb62: 9307 str r3, [sp, #28] msg.msg_iovlen = 1; 800cb64: 2301 movs r3, #1 800cb66: 9308 str r3, [sp, #32] msg.msg_name = from; 800cb68: 9b14 ldr r3, [sp, #80] @ 0x50 800cb6a: 9305 str r3, [sp, #20] msg.msg_namelen = (fromlen ? *fromlen : 0); 800cb6c: b325 cbz r5, 800cbb8 800cb6e: 682b ldr r3, [r5, #0] 800cb70: 9306 str r3, [sp, #24] err = lwip_recvfrom_udp_raw(sock, flags, &msg, &datagram_len, s); 800cb72: 9700 str r7, [sp, #0] 800cb74: f10d 030a add.w r3, sp, #10 800cb78: aa05 add r2, sp, #20 800cb7a: 4631 mov r1, r6 800cb7c: 4640 mov r0, r8 800cb7e: f7ff fdeb bl 800c758 if (err != ERR_OK) { 800cb82: b9d8 cbnz r0, 800cbbc ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX); 800cb84: f8bd 000a ldrh.w r0, [sp, #10] 800cb88: 42a0 cmp r0, r4 800cb8a: bf28 it cs 800cb8c: 4620 movcs r0, r4 800cb8e: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 800cb92: 4298 cmp r0, r3 800cb94: d21a bcs.n 800cbcc 800cb96: 4604 mov r4, r0 800cb98: e01a b.n 800cbd0 ret = lwip_recv_tcp(sock, mem, len, flags); 800cb9a: 4633 mov r3, r6 800cb9c: 4622 mov r2, r4 800cb9e: 4649 mov r1, r9 800cba0: f7ff fd1e bl 800c5e0 800cba4: 4604 mov r4, r0 lwip_recv_tcp_from(sock, from, fromlen, "lwip_recvfrom", s, ret); 800cba6: 9001 str r0, [sp, #4] 800cba8: 9700 str r7, [sp, #0] 800cbaa: 4b0e ldr r3, [pc, #56] @ (800cbe4 ) 800cbac: 462a mov r2, r5 800cbae: 9914 ldr r1, [sp, #80] @ 0x50 800cbb0: 4640 mov r0, r8 800cbb2: f7ff fccb bl 800c54c return ret; 800cbb6: e00e b.n 800cbd6 msg.msg_namelen = (fromlen ? *fromlen : 0); 800cbb8: 2300 movs r3, #0 800cbba: e7d9 b.n 800cb70 sock_set_errno(sock, err_to_errno(err)); 800cbbc: f7fc fbbc bl 8009338 800cbc0: b108 cbz r0, 800cbc6 800cbc2: 4a09 ldr r2, [pc, #36] @ (800cbe8 ) 800cbc4: 6010 str r0, [r2, #0] return -1; 800cbc6: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 800cbca: e004 b.n 800cbd6 ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX); 800cbcc: f06f 4400 mvn.w r4, #2147483648 @ 0x80000000 if (fromlen) { 800cbd0: b10d cbz r5, 800cbd6 *fromlen = msg.msg_namelen; 800cbd2: 9b06 ldr r3, [sp, #24] 800cbd4: 602b str r3, [r5, #0] } 800cbd6: 4620 mov r0, r4 800cbd8: b00d add sp, #52 @ 0x34 800cbda: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} return -1; 800cbde: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 800cbe2: e7f8 b.n 800cbd6 800cbe4: 08016580 .word 0x08016580 800cbe8: 24019d8c .word 0x24019d8c 0800cbec : { 800cbec: b510 push {r4, lr} 800cbee: b082 sub sp, #8 return lwip_recvfrom(s, mem, len, flags, NULL, NULL); 800cbf0: 2400 movs r4, #0 800cbf2: 9401 str r4, [sp, #4] 800cbf4: 9400 str r4, [sp, #0] 800cbf6: f7ff ff97 bl 800cb28 } 800cbfa: b002 add sp, #8 800cbfc: bd10 pop {r4, pc} ... 0800cc00 : { 800cc00: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 800cc04: b084 sub sp, #16 800cc06: 4607 mov r7, r0 800cc08: 460e mov r6, r1 800cc0a: 4614 mov r4, r2 800cc0c: 4698 mov r8, r3 800cc0e: 9d0c ldr r5, [sp, #48] @ 0x30 800cc10: f8dd 9034 ldr.w r9, [sp, #52] @ 0x34 sock = get_socket(s); 800cc14: f7ff fbca bl 800c3ac if (!sock) { 800cc18: 2800 cmp r0, #0 800cc1a: d068 beq.n 800ccee 800cc1c: 4682 mov sl, r0 if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 800cc1e: 6803 ldr r3, [r0, #0] 800cc20: 781a ldrb r2, [r3, #0] 800cc22: f002 02f0 and.w r2, r2, #240 @ 0xf0 800cc26: 2a10 cmp r2, #16 800cc28: d039 beq.n 800cc9e if (size > LWIP_MIN(0xFFFF, SSIZE_MAX)) { 800cc2a: f5b4 3f80 cmp.w r4, #65536 @ 0x10000 800cc2e: d23d bcs.n 800ccac short_size = (u16_t)size; 800cc30: b2a7 uxth r7, r4 LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || 800cc32: f1b9 0f00 cmp.w r9, #0 800cc36: bf08 it eq 800cc38: 2d00 cmpeq r5, #0 800cc3a: d00f beq.n 800cc5c 800cc3c: fab5 f385 clz r3, r5 800cc40: 095b lsrs r3, r3, #5 800cc42: f1b9 0f10 cmp.w r9, #16 800cc46: bf18 it ne 800cc48: f043 0301 orrne.w r3, r3, #1 800cc4c: 2b00 cmp r3, #0 800cc4e: d133 bne.n 800ccb8 800cc50: 786b ldrb r3, [r5, #1] 800cc52: 2b02 cmp r3, #2 800cc54: d130 bne.n 800ccb8 800cc56: f015 0f03 tst.w r5, #3 800cc5a: d12d bne.n 800ccb8 buf.p = buf.ptr = NULL; 800cc5c: 2300 movs r3, #0 800cc5e: 9301 str r3, [sp, #4] 800cc60: 9300 str r3, [sp, #0] if (to) { 800cc62: 2d00 cmp r5, #0 800cc64: d039 beq.n 800ccda SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port); 800cc66: 686b ldr r3, [r5, #4] 800cc68: 9302 str r3, [sp, #8] 800cc6a: 8868 ldrh r0, [r5, #2] 800cc6c: f7fb f906 bl 8007e7c netbuf_fromport(&buf) = remote_port; 800cc70: f8ad 000c strh.w r0, [sp, #12] err = netbuf_ref(&buf, data, short_size); 800cc74: 463a mov r2, r7 800cc76: 4631 mov r1, r6 800cc78: 4668 mov r0, sp 800cc7a: f7fe fd3b bl 800b6f4 if (err == ERR_OK) { 800cc7e: 4605 mov r5, r0 800cc80: b370 cbz r0, 800cce0 netbuf_free(&buf); 800cc82: 4668 mov r0, sp 800cc84: f7fe fd1e bl 800b6c4 sock_set_errno(sock, err_to_errno(err)); 800cc88: 4628 mov r0, r5 800cc8a: f7fc fb55 bl 8009338 800cc8e: b108 cbz r0, 800cc94 800cc90: 4a1a ldr r2, [pc, #104] @ (800ccfc ) 800cc92: 6010 str r0, [r2, #0] return (err == ERR_OK ? short_size : -1); 800cc94: bb75 cbnz r5, 800ccf4 800cc96: b2a0 uxth r0, r4 } 800cc98: b004 add sp, #16 800cc9a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} return lwip_send(s, data, size, flags); 800cc9e: 4643 mov r3, r8 800cca0: 4622 mov r2, r4 800cca2: 4631 mov r1, r6 800cca4: 4638 mov r0, r7 800cca6: f000 f831 bl 800cd0c 800ccaa: e7f5 b.n 800cc98 sock_set_errno(sock, EMSGSIZE); 800ccac: 4b13 ldr r3, [pc, #76] @ (800ccfc ) 800ccae: 225a movs r2, #90 @ 0x5a 800ccb0: 601a str r2, [r3, #0] return -1; 800ccb2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ccb6: e7ef b.n 800cc98 LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || 800ccb8: 4b11 ldr r3, [pc, #68] @ (800cd00 ) 800ccba: f240 6252 movw r2, #1618 @ 0x652 800ccbe: 4911 ldr r1, [pc, #68] @ (800cd04 ) 800ccc0: 4811 ldr r0, [pc, #68] @ (800cd08 ) 800ccc2: f006 fba1 bl 8013408 800ccc6: f06f 000f mvn.w r0, #15 800ccca: f7fc fb35 bl 8009338 800ccce: b108 cbz r0, 800ccd4 800ccd0: 4a0a ldr r2, [pc, #40] @ (800ccfc ) 800ccd2: 6010 str r0, [r2, #0] 800ccd4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ccd8: e7de b.n 800cc98 ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr); 800ccda: 2000 movs r0, #0 800ccdc: 9002 str r0, [sp, #8] 800ccde: e7c7 b.n 800cc70 err = netconn_send(sock->conn, &buf); 800cce0: 4669 mov r1, sp 800cce2: f8da 0000 ldr.w r0, [sl] 800cce6: f7f9 fdff bl 80068e8 800ccea: 4605 mov r5, r0 800ccec: e7c9 b.n 800cc82 return -1; 800ccee: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ccf2: e7d1 b.n 800cc98 return (err == ERR_OK ? short_size : -1); 800ccf4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ccf8: e7ce b.n 800cc98 800ccfa: bf00 nop 800ccfc: 24019d8c .word 0x24019d8c 800cd00: 080163d0 .word 0x080163d0 800cd04: 08016590 .word 0x08016590 800cd08: 080144e8 .word 0x080144e8 0800cd0c : { 800cd0c: b5f0 push {r4, r5, r6, r7, lr} 800cd0e: b085 sub sp, #20 800cd10: 4607 mov r7, r0 800cd12: 460d mov r5, r1 800cd14: 4616 mov r6, r2 800cd16: 461c mov r4, r3 sock = get_socket(s); 800cd18: f7ff fb48 bl 800c3ac if (!sock) { 800cd1c: b368 cbz r0, 800cd7a 800cd1e: 4602 mov r2, r0 if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { 800cd20: 6803 ldr r3, [r0, #0] 800cd22: 781b ldrb r3, [r3, #0] 800cd24: f003 03f0 and.w r3, r3, #240 @ 0xf0 800cd28: 2b10 cmp r3, #16 800cd2a: d11a bne.n 800cd62 write_flags = (u8_t)(NETCONN_COPY | 800cd2c: f014 0f10 tst.w r4, #16 800cd30: d021 beq.n 800cd76 800cd32: 2303 movs r3, #3 ((flags & MSG_MORE) ? NETCONN_MORE : 0) | 800cd34: 1064 asrs r4, r4, #1 800cd36: f004 0404 and.w r4, r4, #4 written = 0; 800cd3a: 2100 movs r1, #0 800cd3c: 9103 str r1, [sp, #12] err = netconn_write_partly(sock->conn, data, size, write_flags, &written); 800cd3e: 6810 ldr r0, [r2, #0] 800cd40: aa03 add r2, sp, #12 800cd42: 9200 str r2, [sp, #0] 800cd44: 4323 orrs r3, r4 800cd46: 4632 mov r2, r6 800cd48: 4629 mov r1, r5 800cd4a: f7f9 fe67 bl 8006a1c 800cd4e: 4604 mov r4, r0 sock_set_errno(sock, err_to_errno(err)); 800cd50: f7fc faf2 bl 8009338 800cd54: b108 cbz r0, 800cd5a 800cd56: 4a0c ldr r2, [pc, #48] @ (800cd88 ) 800cd58: 6010 str r0, [r2, #0] return (err == ERR_OK ? (ssize_t)written : -1); 800cd5a: b98c cbnz r4, 800cd80 800cd5c: 9803 ldr r0, [sp, #12] } 800cd5e: b005 add sp, #20 800cd60: bdf0 pop {r4, r5, r6, r7, pc} return lwip_sendto(s, data, size, flags, NULL, 0); 800cd62: 2300 movs r3, #0 800cd64: 9301 str r3, [sp, #4] 800cd66: 9300 str r3, [sp, #0] 800cd68: 4623 mov r3, r4 800cd6a: 4632 mov r2, r6 800cd6c: 4629 mov r1, r5 800cd6e: 4638 mov r0, r7 800cd70: f7ff ff46 bl 800cc00 800cd74: e7f3 b.n 800cd5e write_flags = (u8_t)(NETCONN_COPY | 800cd76: 2301 movs r3, #1 800cd78: e7dc b.n 800cd34 return -1; 800cd7a: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cd7e: e7ee b.n 800cd5e return (err == ERR_OK ? (ssize_t)written : -1); 800cd80: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cd84: e7eb b.n 800cd5e 800cd86: bf00 nop 800cd88: 24019d8c .word 0x24019d8c 0800cd8c : { 800cd8c: b538 push {r3, r4, r5, lr} 800cd8e: 4613 mov r3, r2 switch (type) { 800cd90: 2902 cmp r1, #2 800cd92: d01b beq.n 800cdcc 800cd94: 2903 cmp r1, #3 800cd96: d007 beq.n 800cda8 800cd98: 2901 cmp r1, #1 800cd9a: d022 beq.n 800cde2 set_errno(EINVAL); 800cd9c: 4b1b ldr r3, [pc, #108] @ (800ce0c ) 800cd9e: 2216 movs r2, #22 800cda0: 601a str r2, [r3, #0] return -1; 800cda2: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 800cda6: e00f b.n 800cdc8 conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), 800cda8: 4a19 ldr r2, [pc, #100] @ (800ce10 ) 800cdaa: b2d9 uxtb r1, r3 800cdac: 2040 movs r0, #64 @ 0x40 800cdae: f7f9 fc81 bl 80066b4 800cdb2: 4605 mov r5, r0 if (!conn) { 800cdb4: b1e5 cbz r5, 800cdf0 i = alloc_socket(conn, 0); 800cdb6: 2100 movs r1, #0 800cdb8: 4628 mov r0, r5 800cdba: f7ff fb33 bl 800c424 800cdbe: 4604 mov r4, r0 if (i == -1) { 800cdc0: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 800cdc4: d01a beq.n 800cdfc conn->socket = i; 800cdc6: 61a8 str r0, [r5, #24] } 800cdc8: 4620 mov r0, r4 800cdca: bd38 pop {r3, r4, r5, pc} conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, 800cdcc: 2a88 cmp r2, #136 @ 0x88 800cdce: d006 beq.n 800cdde 800cdd0: 2020 movs r0, #32 800cdd2: 4a0f ldr r2, [pc, #60] @ (800ce10 ) 800cdd4: 2100 movs r1, #0 800cdd6: f7f9 fc6d bl 80066b4 800cdda: 4605 mov r5, r0 break; 800cddc: e7ea b.n 800cdb4 conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, 800cdde: 2021 movs r0, #33 @ 0x21 800cde0: e7f7 b.n 800cdd2 conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), DEFAULT_SOCKET_EVENTCB); 800cde2: 4a0b ldr r2, [pc, #44] @ (800ce10 ) 800cde4: 2100 movs r1, #0 800cde6: 2010 movs r0, #16 800cde8: f7f9 fc64 bl 80066b4 800cdec: 4605 mov r5, r0 break; 800cdee: e7e1 b.n 800cdb4 set_errno(ENOBUFS); 800cdf0: 4b06 ldr r3, [pc, #24] @ (800ce0c ) 800cdf2: 2269 movs r2, #105 @ 0x69 800cdf4: 601a str r2, [r3, #0] return -1; 800cdf6: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 800cdfa: e7e5 b.n 800cdc8 netconn_delete(conn); 800cdfc: 4628 mov r0, r5 800cdfe: f7f9 fcc7 bl 8006790 set_errno(ENFILE); 800ce02: 4b02 ldr r3, [pc, #8] @ (800ce0c ) 800ce04: 2217 movs r2, #23 800ce06: 601a str r2, [r3, #0] return -1; 800ce08: e7de b.n 800cdc8 800ce0a: bf00 nop 800ce0c: 24019d8c .word 0x24019d8c 800ce10: 0800c939 .word 0x0800c939 0800ce14 : return err; } int lwip_ioctl(int s, long cmd, void *argp) { 800ce14: b570 push {r4, r5, r6, lr} 800ce16: 460c mov r4, r1 800ce18: 4615 mov r5, r2 struct lwip_sock *sock = get_socket(s); 800ce1a: f7ff fac7 bl 800c3ac u8_t val; #if LWIP_SO_RCVBUF int recv_avail; #endif /* LWIP_SO_RCVBUF */ if (!sock) { 800ce1e: 2800 cmp r0, #0 800ce20: d045 beq.n 800ceae 800ce22: 4606 mov r6, r0 return -1; } switch (cmd) { 800ce24: 4b23 ldr r3, [pc, #140] @ (800ceb4 ) 800ce26: 429c cmp r4, r3 800ce28: d026 beq.n 800ce78 800ce2a: f103 4340 add.w r3, r3, #3221225472 @ 0xc0000000 800ce2e: 3301 adds r3, #1 800ce30: 429c cmp r4, r3 800ce32: d136 bne.n 800cea2 #if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE case FIONREAD: if (!argp) { 800ce34: b1ad cbz r5, 800ce62 } #endif /* LWIP_FIONREAD_LINUXMODE */ #if LWIP_SO_RCVBUF /* we come here if either LWIP_FIONREAD_LINUXMODE==0 or this is a TCP socket */ SYS_ARCH_GET(sock->conn->recv_avail, recv_avail); 800ce36: f000 f91b bl 800d070 800ce3a: 6833 ldr r3, [r6, #0] 800ce3c: 6a5c ldr r4, [r3, #36] @ 0x24 800ce3e: f000 f923 bl 800d088 if (recv_avail < 0) { 800ce42: 2c00 cmp r4, #0 800ce44: db13 blt.n 800ce6e recv_avail = 0; } /* Check if there is data left from the last recv operation. /maq 041215 */ if (sock->lastdata.netbuf) { 800ce46: 6872 ldr r2, [r6, #4] 800ce48: b142 cbz r2, 800ce5c if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 800ce4a: 6833 ldr r3, [r6, #0] 800ce4c: 781b ldrb r3, [r3, #0] 800ce4e: f003 03f0 and.w r3, r3, #240 @ 0xf0 800ce52: 2b10 cmp r3, #16 800ce54: d00d beq.n 800ce72 recv_avail += sock->lastdata.pbuf->tot_len; } else { recv_avail += sock->lastdata.netbuf->p->tot_len; 800ce56: 6813 ldr r3, [r2, #0] 800ce58: 891b ldrh r3, [r3, #8] 800ce5a: 441c add r4, r3 } } *((int *)argp) = recv_avail; 800ce5c: 602c str r4, [r5, #0] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t *)argp))); sock_set_errno(sock, 0); done_socket(sock); return 0; 800ce5e: 2000 movs r0, #0 800ce60: e024 b.n 800ceac sock_set_errno(sock, EINVAL); 800ce62: 4b15 ldr r3, [pc, #84] @ (800ceb8 ) 800ce64: 2216 movs r2, #22 800ce66: 601a str r2, [r3, #0] return -1; 800ce68: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ce6c: e01e b.n 800ceac recv_avail = 0; 800ce6e: 2400 movs r4, #0 800ce70: e7e9 b.n 800ce46 recv_avail += sock->lastdata.pbuf->tot_len; 800ce72: 8913 ldrh r3, [r2, #8] 800ce74: 441c add r4, r3 800ce76: e7f1 b.n 800ce5c #endif /* LWIP_SO_RCVBUF */ #endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */ case (long)FIONBIO: val = 0; if (argp && *(int *)argp) { 800ce78: b155 cbz r5, 800ce90 800ce7a: 682b ldr r3, [r5, #0] 800ce7c: b143 cbz r3, 800ce90 val = 1; } netconn_set_nonblocking(sock->conn, val); 800ce7e: 6802 ldr r2, [r0, #0] 800ce80: f892 3028 ldrb.w r3, [r2, #40] @ 0x28 800ce84: f043 0302 orr.w r3, r3, #2 800ce88: f882 3028 strb.w r3, [r2, #40] @ 0x28 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONBIO, %d)\n", s, val)); sock_set_errno(sock, 0); done_socket(sock); return 0; 800ce8c: 2000 movs r0, #0 800ce8e: e00d b.n 800ceac netconn_set_nonblocking(sock->conn, val); 800ce90: 6832 ldr r2, [r6, #0] 800ce92: f892 3028 ldrb.w r3, [r2, #40] @ 0x28 800ce96: f003 03fd and.w r3, r3, #253 @ 0xfd 800ce9a: f882 3028 strb.w r3, [r2, #40] @ 0x28 return 0; 800ce9e: 2000 movs r0, #0 800cea0: e004 b.n 800ceac default: break; } /* switch (cmd) */ LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, UNIMPL: 0x%lx, %p)\n", s, cmd, argp)); sock_set_errno(sock, ENOSYS); /* not yet implemented */ 800cea2: 4b05 ldr r3, [pc, #20] @ (800ceb8 ) 800cea4: 2226 movs r2, #38 @ 0x26 800cea6: 601a str r2, [r3, #0] done_socket(sock); return -1; 800cea8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff } 800ceac: bd70 pop {r4, r5, r6, pc} return -1; 800ceae: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ceb2: e7fb b.n 800ceac 800ceb4: 8004667e .word 0x8004667e 800ceb8: 24019d8c .word 0x24019d8c 0800cebc : #endif /*-----------------------------------------------------------------------------------*/ // Creates an empty mailbox. err_t sys_mbox_new(sys_mbox_t *mbox, int size) { 800cebc: b510 push {r4, lr} 800cebe: 4604 mov r4, r0 800cec0: 4608 mov r0, r1 #if (osCMSIS < 0x20000U) osMessageQDef(QUEUE, size, void *); *mbox = osMessageCreate(osMessageQ(QUEUE), NULL); #else *mbox = osMessageQueueNew(size, sizeof(void *), NULL); 800cec2: 2200 movs r2, #0 800cec4: 2104 movs r1, #4 800cec6: f7f7 f96d bl 80041a4 800ceca: 6020 str r0, [r4, #0] if(lwip_stats.sys.mbox.max < lwip_stats.sys.mbox.used) { lwip_stats.sys.mbox.max = lwip_stats.sys.mbox.used; } #endif /* SYS_STATS */ if(*mbox == NULL) 800cecc: b108 cbz r0, 800ced2 return ERR_MEM; return ERR_OK; 800cece: 2000 movs r0, #0 } 800ced0: bd10 pop {r4, pc} return ERR_MEM; 800ced2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800ced6: e7fb b.n 800ced0 0800ced8 : Deallocates a mailbox. If there are messages still present in the mailbox when the mailbox is deallocated, it is an indication of a programming error in lwIP and the developer should be notified. */ void sys_mbox_free(sys_mbox_t *mbox) { 800ced8: b510 push {r4, lr} 800ceda: 4604 mov r4, r0 #if (osCMSIS < 0x20000U) if(osMessageWaiting(*mbox)) #else if(osMessageQueueGetCount(*mbox)) 800cedc: 6800 ldr r0, [r0, #0] 800cede: f7f7 fa2c bl 800433a } #if (osCMSIS < 0x20000U) osMessageDelete(*mbox); #else osMessageQueueDelete(*mbox); 800cee2: 6820 ldr r0, [r4, #0] 800cee4: f7f7 fa36 bl 8004354 #endif #if SYS_STATS --lwip_stats.sys.mbox.used; #endif /* SYS_STATS */ } 800cee8: bd10 pop {r4, pc} 0800ceea : /*-----------------------------------------------------------------------------------*/ // Try to post the "msg" to the mailbox. err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg) { 800ceea: b500 push {lr} 800ceec: b083 sub sp, #12 800ceee: 9101 str r1, [sp, #4] err_t result; #if (osCMSIS < 0x20000U) if(osMessagePut(*mbox, (uint32_t)msg, 0) == osOK) #else if(osMessageQueuePut(*mbox, &msg, 0, 0) == osOK) 800cef0: 2300 movs r3, #0 800cef2: 461a mov r2, r3 800cef4: a901 add r1, sp, #4 800cef6: 6800 ldr r0, [r0, #0] 800cef8: f7f7 f9a0 bl 800423c 800cefc: b910 cbnz r0, 800cf04 lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ } return result; } 800cefe: b003 add sp, #12 800cf00: f85d fb04 ldr.w pc, [sp], #4 result = ERR_MEM; 800cf04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cf08: e7f9 b.n 800cefe 0800cf0a : Note that a function with a similar name, sys_mbox_fetch(), is implemented by lwIP. */ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout) { 800cf0a: b5f8 push {r3, r4, r5, r6, r7, lr} 800cf0c: 4606 mov r6, r0 800cf0e: 460f mov r7, r1 800cf10: 4615 mov r5, r2 #if (osCMSIS < 0x20000U) osEvent event; uint32_t starttime = osKernelSysTick(); #else osStatus_t status; uint32_t starttime = osKernelGetTickCount(); 800cf12: f7f6 ff57 bl 8003dc4 800cf16: 4604 mov r4, r0 #endif if(timeout != 0) 800cf18: b16d cbz r5, 800cf36 { *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); } #else status = osMessageQueueGet(*mbox, msg, 0, timeout); 800cf1a: 462b mov r3, r5 800cf1c: 2200 movs r2, #0 800cf1e: 4639 mov r1, r7 800cf20: 6830 ldr r0, [r6, #0] 800cf22: f7f7 f9cb bl 80042bc if (status == osOK) 800cf26: b110 cbz r0, 800cf2e return (osKernelGetTickCount() - starttime); } #endif else { return SYS_ARCH_TIMEOUT; 800cf28: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff #else osMessageQueueGet(*mbox, msg, 0, osWaitForever ); return (osKernelGetTickCount() - starttime); #endif } } 800cf2c: bdf8 pop {r3, r4, r5, r6, r7, pc} return (osKernelGetTickCount() - starttime); 800cf2e: f7f6 ff49 bl 8003dc4 800cf32: 1b00 subs r0, r0, r4 800cf34: e7fa b.n 800cf2c osMessageQueueGet(*mbox, msg, 0, osWaitForever ); 800cf36: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 800cf3a: 2200 movs r2, #0 800cf3c: 4639 mov r1, r7 800cf3e: 6830 ldr r0, [r6, #0] 800cf40: f7f7 f9bc bl 80042bc return (osKernelGetTickCount() - starttime); 800cf44: f7f6 ff3e bl 8003dc4 800cf48: 1b00 subs r0, r0, r4 800cf4a: e7ef b.n 800cf2c 0800cf4c : /* Similar to sys_arch_mbox_fetch, but if message is not ready immediately, we'll return with SYS_MBOX_EMPTY. On success, 0 is returned. */ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg) { 800cf4c: b508 push {r3, lr} if(event.status == osEventMessage) { *msg = (void *)event.value.v; #else if (osMessageQueueGet(*mbox, msg, 0, 0) == osOK) 800cf4e: 2300 movs r3, #0 800cf50: 461a mov r2, r3 800cf52: 6800 ldr r0, [r0, #0] 800cf54: f7f7 f9b2 bl 80042bc 800cf58: b900 cbnz r0, 800cf5c } else { return SYS_MBOX_EMPTY; } } 800cf5a: bd08 pop {r3, pc} return SYS_MBOX_EMPTY; 800cf5c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cf60: e7fb b.n 800cf5a 0800cf62 : /*----------------------------------------------------------------------------------*/ int sys_mbox_valid(sys_mbox_t *mbox) { if (*mbox == SYS_MBOX_NULL) 800cf62: 6803 ldr r3, [r0, #0] 800cf64: b10b cbz r3, 800cf6a return 0; else return 1; 800cf66: 2001 movs r0, #1 } 800cf68: 4770 bx lr return 0; 800cf6a: 2000 movs r0, #0 800cf6c: 4770 bx lr 0800cf6e : /*-----------------------------------------------------------------------------------*/ void sys_mbox_set_invalid(sys_mbox_t *mbox) { *mbox = SYS_MBOX_NULL; 800cf6e: 2300 movs r3, #0 800cf70: 6003 str r3, [r0, #0] } 800cf72: 4770 bx lr 0800cf74 : /*-----------------------------------------------------------------------------------*/ // Creates a new semaphore. The "count" argument specifies // the initial state of the semaphore. err_t sys_sem_new(sys_sem_t *sem, u8_t count) { 800cf74: b538 push {r3, r4, r5, lr} 800cf76: 4604 mov r4, r0 800cf78: 460d mov r5, r1 #if (osCMSIS < 0x20000U) osSemaphoreDef(SEM); *sem = osSemaphoreCreate (osSemaphore(SEM), 1); #else *sem = osSemaphoreNew(UINT16_MAX, count, NULL); 800cf7a: 2200 movs r2, #0 800cf7c: f64f 70ff movw r0, #65535 @ 0xffff 800cf80: f7f7 f83e bl 8004000 800cf84: 6020 str r0, [r4, #0] #endif if(*sem == NULL) 800cf86: b138 cbz r0, 800cf98 ++lwip_stats.sys.sem.err; #endif /* SYS_STATS */ return ERR_MEM; } if(count == 0) // Means it can't be taken 800cf88: b10d cbz r5, 800cf8e if (lwip_stats.sys.sem.max < lwip_stats.sys.sem.used) { lwip_stats.sys.sem.max = lwip_stats.sys.sem.used; } #endif /* SYS_STATS */ return ERR_OK; 800cf8a: 2000 movs r0, #0 } 800cf8c: bd38 pop {r3, r4, r5, pc} osSemaphoreAcquire(*sem, 0); 800cf8e: 2100 movs r1, #0 800cf90: f7f7 f892 bl 80040b8 return ERR_OK; 800cf94: 2000 movs r0, #0 800cf96: e7f9 b.n 800cf8c return ERR_MEM; 800cf98: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cf9c: e7f6 b.n 800cf8c 0800cf9e : Notice that lwIP implements a function with a similar name, sys_sem_wait(), that uses the sys_arch_sem_wait() function. */ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) { 800cf9e: b570 push {r4, r5, r6, lr} 800cfa0: 4604 mov r4, r0 800cfa2: 460e mov r6, r1 #if (osCMSIS < 0x20000U) uint32_t starttime = osKernelSysTick(); #else uint32_t starttime = osKernelGetTickCount(); 800cfa4: f7f6 ff0e bl 8003dc4 800cfa8: 4605 mov r5, r0 #endif if(timeout != 0) 800cfaa: b956 cbnz r6, 800cfc2 { #if (osCMSIS < 0x20000U) while(osSemaphoreWait (*sem, osWaitForever) != osOK); return (osKernelSysTick() - starttime); #else while(osSemaphoreAcquire(*sem, osWaitForever) != osOK); 800cfac: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 800cfb0: 6820 ldr r0, [r4, #0] 800cfb2: f7f7 f881 bl 80040b8 800cfb6: 2800 cmp r0, #0 800cfb8: d1f8 bne.n 800cfac return (osKernelGetTickCount() - starttime); 800cfba: f7f6 ff03 bl 8003dc4 800cfbe: 1b40 subs r0, r0, r5 #endif } } 800cfc0: bd70 pop {r4, r5, r6, pc} if(osSemaphoreAcquire(*sem, timeout) == osOK) 800cfc2: 4631 mov r1, r6 800cfc4: 6820 ldr r0, [r4, #0] 800cfc6: f7f7 f877 bl 80040b8 800cfca: b110 cbz r0, 800cfd2 return SYS_ARCH_TIMEOUT; 800cfcc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800cfd0: e7f6 b.n 800cfc0 return (osKernelGetTickCount() - starttime); 800cfd2: f7f6 fef7 bl 8003dc4 800cfd6: 1b40 subs r0, r0, r5 800cfd8: e7f2 b.n 800cfc0 0800cfda : /*-----------------------------------------------------------------------------------*/ // Signals a semaphore void sys_sem_signal(sys_sem_t *sem) { 800cfda: b508 push {r3, lr} osSemaphoreRelease(*sem); 800cfdc: 6800 ldr r0, [r0, #0] 800cfde: f7f7 f89f bl 8004120 } 800cfe2: bd08 pop {r3, pc} 0800cfe4 : /*-----------------------------------------------------------------------------------*/ // Deallocates a semaphore void sys_sem_free(sys_sem_t *sem) { 800cfe4: b508 push {r3, lr} #if SYS_STATS --lwip_stats.sys.sem.used; #endif /* SYS_STATS */ osSemaphoreDelete(*sem); 800cfe6: 6800 ldr r0, [r0, #0] 800cfe8: f7f7 f8c9 bl 800417e } 800cfec: bd08 pop {r3, pc} 0800cfee : /*-----------------------------------------------------------------------------------*/ int sys_sem_valid(sys_sem_t *sem) { if (*sem == SYS_SEM_NULL) 800cfee: 6803 ldr r3, [r0, #0] 800cff0: b10b cbz r3, 800cff6 return 0; else return 1; 800cff2: 2001 movs r0, #1 } 800cff4: 4770 bx lr return 0; 800cff6: 2000 movs r0, #0 800cff8: 4770 bx lr 0800cffa : /*-----------------------------------------------------------------------------------*/ void sys_sem_set_invalid(sys_sem_t *sem) { *sem = SYS_SEM_NULL; 800cffa: 2300 movs r3, #0 800cffc: 6003 str r3, [r0, #0] } 800cffe: 4770 bx lr 0800d000 : #else osMutexId_t lwip_sys_mutex; #endif // Initialize sys arch void sys_init(void) { 800d000: b508 push {r3, lr} #if (osCMSIS < 0x20000U) lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex)); #else lwip_sys_mutex = osMutexNew(NULL); 800d002: 2000 movs r0, #0 800d004: f7f6 ff58 bl 8003eb8 800d008: 4b01 ldr r3, [pc, #4] @ (800d010 ) 800d00a: 6018 str r0, [r3, #0] #endif } 800d00c: bd08 pop {r3, pc} 800d00e: bf00 nop 800d010: 24019bcc .word 0x24019bcc 0800d014 : /* Mutexes*/ /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ #if LWIP_COMPAT_MUTEX == 0 /* Create a new mutex*/ err_t sys_mutex_new(sys_mutex_t *mutex) { 800d014: b510 push {r4, lr} 800d016: 4604 mov r4, r0 #if (osCMSIS < 0x20000U) osMutexDef(MUTEX); *mutex = osMutexCreate(osMutex(MUTEX)); #else *mutex = osMutexNew(NULL); 800d018: 2000 movs r0, #0 800d01a: f7f6 ff4d bl 8003eb8 800d01e: 6020 str r0, [r4, #0] #endif if(*mutex == NULL) 800d020: b108 cbz r0, 800d026 ++lwip_stats.sys.mutex.used; if (lwip_stats.sys.mutex.max < lwip_stats.sys.mutex.used) { lwip_stats.sys.mutex.max = lwip_stats.sys.mutex.used; } #endif /* SYS_STATS */ return ERR_OK; 800d022: 2000 movs r0, #0 } 800d024: bd10 pop {r4, pc} return ERR_MEM; 800d026: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800d02a: e7fb b.n 800d024 0800d02c : osMutexDelete(*mutex); } /*-----------------------------------------------------------------------------------*/ /* Lock a mutex*/ void sys_mutex_lock(sys_mutex_t *mutex) { 800d02c: b508 push {r3, lr} #if (osCMSIS < 0x20000U) osMutexWait(*mutex, osWaitForever); #else osMutexAcquire(*mutex, osWaitForever); 800d02e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 800d032: 6800 ldr r0, [r0, #0] 800d034: f7f6 ff8e bl 8003f54 #endif } 800d038: bd08 pop {r3, pc} 0800d03a : /*-----------------------------------------------------------------------------------*/ /* Unlock a mutex*/ void sys_mutex_unlock(sys_mutex_t *mutex) { 800d03a: b508 push {r3, lr} osMutexRelease(*mutex); 800d03c: 6800 ldr r0, [r0, #0] 800d03e: f7f6 ffb8 bl 8003fb2 } 800d042: bd08 pop {r3, pc} 0800d044 : function "thread()". The "arg" argument will be passed as an argument to the thread() function. The id of the new thread is returned. Both the id and the priority are system dependent. */ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread , void *arg, int stacksize, int prio) { 800d044: b5f0 push {r4, r5, r6, r7, lr} 800d046: b08b sub sp, #44 @ 0x2c 800d048: 4607 mov r7, r0 800d04a: 460c mov r4, r1 800d04c: 4615 mov r5, r2 800d04e: 461e mov r6, r3 #if (osCMSIS < 0x20000U) const osThreadDef_t os_thread_def = { (char *)name, (os_pthread)thread, (osPriority)prio, 0, stacksize}; return osThreadCreate(&os_thread_def, arg); #else const osThreadAttr_t attributes = { 800d050: 2224 movs r2, #36 @ 0x24 800d052: 2100 movs r1, #0 800d054: a801 add r0, sp, #4 800d056: f006 fb2f bl 80136b8 800d05a: 9701 str r7, [sp, #4] 800d05c: 9606 str r6, [sp, #24] 800d05e: 9b10 ldr r3, [sp, #64] @ 0x40 800d060: 9307 str r3, [sp, #28] .name = name, .stack_size = stacksize, .priority = (osPriority_t)prio, }; return osThreadNew(thread, arg, &attributes); 800d062: aa01 add r2, sp, #4 800d064: 4629 mov r1, r5 800d066: 4620 mov r0, r4 800d068: f7f6 feb6 bl 8003dd8 #endif } 800d06c: b00b add sp, #44 @ 0x2c 800d06e: bdf0 pop {r4, r5, r6, r7, pc} 0800d070 : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ sys_prot_t sys_arch_protect(void) { 800d070: b508 push {r3, lr} #if (osCMSIS < 0x20000U) osMutexWait(lwip_sys_mutex, osWaitForever); #else osMutexAcquire(lwip_sys_mutex, osWaitForever); 800d072: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 800d076: 4b03 ldr r3, [pc, #12] @ (800d084 ) 800d078: 6818 ldr r0, [r3, #0] 800d07a: f7f6 ff6b bl 8003f54 #endif return (sys_prot_t)1; } 800d07e: 2001 movs r0, #1 800d080: bd08 pop {r3, pc} 800d082: bf00 nop 800d084: 24019bcc .word 0x24019bcc 0800d088 : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ void sys_arch_unprotect(sys_prot_t pval) { 800d088: b508 push {r3, lr} ( void ) pval; osMutexRelease(lwip_sys_mutex); 800d08a: 4b02 ldr r3, [pc, #8] @ (800d094 ) 800d08c: 6818 ldr r0, [r3, #0] 800d08e: f7f6 ff90 bl 8003fb2 } 800d092: bd08 pop {r3, pc} 800d094: 24019bcc .word 0x24019bcc 0800d098 : */ static u16_t tcp_new_port(void) { u8_t i; u16_t n = 0; 800d098: f04f 0c00 mov.w ip, #0 800d09c: e00b b.n 800d0b6 struct tcp_pcb *pcb; again: tcp_port++; if (tcp_port == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; 800d09e: 4b16 ldr r3, [pc, #88] @ (800d0f8 ) 800d0a0: f44f 4240 mov.w r2, #49152 @ 0xc000 800d0a4: 801a strh r2, [r3, #0] 800d0a6: e00f b.n 800d0c8 } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { if (pcb->local_port == tcp_port) { n++; 800d0a8: f10c 0c01 add.w ip, ip, #1 800d0ac: fa1f fc8c uxth.w ip, ip if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 800d0b0: f5bc 4f80 cmp.w ip, #16384 @ 0x4000 800d0b4: d21d bcs.n 800d0f2 tcp_port++; 800d0b6: 4a10 ldr r2, [pc, #64] @ (800d0f8 ) 800d0b8: 8813 ldrh r3, [r2, #0] 800d0ba: 3301 adds r3, #1 800d0bc: b29b uxth r3, r3 800d0be: 8013 strh r3, [r2, #0] if (tcp_port == TCP_LOCAL_PORT_RANGE_END) { 800d0c0: f64f 72ff movw r2, #65535 @ 0xffff 800d0c4: 4293 cmp r3, r2 800d0c6: d0ea beq.n 800d09e for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 800d0c8: 2000 movs r0, #0 800d0ca: 2803 cmp r0, #3 800d0cc: d80e bhi.n 800d0ec for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 800d0ce: 4b0b ldr r3, [pc, #44] @ (800d0fc ) 800d0d0: f853 3020 ldr.w r3, [r3, r0, lsl #2] 800d0d4: 681b ldr r3, [r3, #0] 800d0d6: b133 cbz r3, 800d0e6 if (pcb->local_port == tcp_port) { 800d0d8: 8ad9 ldrh r1, [r3, #22] 800d0da: 4a07 ldr r2, [pc, #28] @ (800d0f8 ) 800d0dc: 8812 ldrh r2, [r2, #0] 800d0de: 4291 cmp r1, r2 800d0e0: d0e2 beq.n 800d0a8 for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 800d0e2: 68db ldr r3, [r3, #12] 800d0e4: e7f7 b.n 800d0d6 for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 800d0e6: 3001 adds r0, #1 800d0e8: b2c0 uxtb r0, r0 800d0ea: e7ee b.n 800d0ca } goto again; } } } return tcp_port; 800d0ec: 4b02 ldr r3, [pc, #8] @ (800d0f8 ) 800d0ee: 8818 ldrh r0, [r3, #0] 800d0f0: 4770 bx lr return 0; 800d0f2: 2000 movs r0, #0 } 800d0f4: 4770 bx lr 800d0f6: bf00 nop 800d0f8: 2400002c .word 0x2400002c 800d0fc: 08016c3c .word 0x08016c3c 0800d100 : { 800d100: b538 push {r3, r4, r5, lr} 800d102: 4604 mov r4, r0 LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL); 800d104: 460d mov r5, r1 800d106: b939 cbnz r1, 800d118 800d108: 4b07 ldr r3, [pc, #28] @ (800d128 ) 800d10a: 22ff movs r2, #255 @ 0xff 800d10c: 4907 ldr r1, [pc, #28] @ (800d12c ) 800d10e: 4808 ldr r0, [pc, #32] @ (800d130 ) 800d110: f006 f97a bl 8013408 800d114: e000 b.n 800d118 for (pcb = list; pcb != NULL; pcb = pcb->next) { 800d116: 68e4 ldr r4, [r4, #12] 800d118: b12c cbz r4, 800d126 if (pcb->listener == lpcb) { 800d11a: 6fe3 ldr r3, [r4, #124] @ 0x7c 800d11c: 42ab cmp r3, r5 800d11e: d1fa bne.n 800d116 pcb->listener = NULL; 800d120: 2300 movs r3, #0 800d122: 67e3 str r3, [r4, #124] @ 0x7c 800d124: e7f7 b.n 800d116 } 800d126: bd38 pop {r3, r4, r5, pc} 800d128: 080165b0 .word 0x080165b0 800d12c: 08016610 .word 0x08016610 800d130: 080144e8 .word 0x080144e8 0800d134 : { 800d134: b538 push {r3, r4, r5, lr} LWIP_ASSERT("pcb != NULL", pcb != NULL); 800d136: 4605 mov r5, r0 800d138: b120 cbz r0, 800d144 LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); 800d13a: 7d2b ldrb r3, [r5, #20] 800d13c: 2b01 cmp r3, #1 800d13e: d109 bne.n 800d154 { 800d140: 2401 movs r4, #1 800d142: e017 b.n 800d174 LWIP_ASSERT("pcb != NULL", pcb != NULL); 800d144: 4b0d ldr r3, [pc, #52] @ (800d17c ) 800d146: f240 1211 movw r2, #273 @ 0x111 800d14a: 490d ldr r1, [pc, #52] @ (800d180 ) 800d14c: 480d ldr r0, [pc, #52] @ (800d184 ) 800d14e: f006 f95b bl 8013408 800d152: e7f2 b.n 800d13a LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); 800d154: 4b09 ldr r3, [pc, #36] @ (800d17c ) 800d156: f44f 7289 mov.w r2, #274 @ 0x112 800d15a: 490b ldr r1, [pc, #44] @ (800d188 ) 800d15c: 4809 ldr r0, [pc, #36] @ (800d184 ) 800d15e: f006 f953 bl 8013408 800d162: e7ed b.n 800d140 tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb); 800d164: 4b09 ldr r3, [pc, #36] @ (800d18c ) 800d166: f853 3024 ldr.w r3, [r3, r4, lsl #2] 800d16a: 4629 mov r1, r5 800d16c: 6818 ldr r0, [r3, #0] 800d16e: f7ff ffc7 bl 800d100 for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 800d172: 3401 adds r4, #1 800d174: 2c03 cmp r4, #3 800d176: d9f5 bls.n 800d164 } 800d178: bd38 pop {r3, r4, r5, pc} 800d17a: bf00 nop 800d17c: 080165b0 .word 0x080165b0 800d180: 08016638 .word 0x08016638 800d184: 080144e8 .word 0x080144e8 800d188: 08016644 .word 0x08016644 800d18c: 08016c3c .word 0x08016c3c 0800d190 : { 800d190: b510 push {r4, lr} 800d192: 4604 mov r4, r0 LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); 800d194: 7d03 ldrb r3, [r0, #20] 800d196: 2b01 cmp r3, #1 800d198: d004 beq.n 800d1a4 memp_free(MEMP_TCP_PCB_LISTEN, pcb); 800d19a: 4621 mov r1, r4 800d19c: 2002 movs r0, #2 800d19e: f7fe fa67 bl 800b670 } 800d1a2: bd10 pop {r4, pc} LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); 800d1a4: 4b03 ldr r3, [pc, #12] @ (800d1b4 ) 800d1a6: 22df movs r2, #223 @ 0xdf 800d1a8: 4903 ldr r1, [pc, #12] @ (800d1b8 ) 800d1aa: 4804 ldr r0, [pc, #16] @ (800d1bc ) 800d1ac: f006 f92c bl 8013408 800d1b0: e7f3 b.n 800d19a 800d1b2: bf00 nop 800d1b4: 080165b0 .word 0x080165b0 800d1b8: 0801665c .word 0x0801665c 800d1bc: 080144e8 .word 0x080144e8 0800d1c0 : { 800d1c0: b538 push {r3, r4, r5, lr} LWIP_ASSERT("pcb != NULL", pcb != NULL); 800d1c2: 4604 mov r4, r0 800d1c4: b148 cbz r0, 800d1da switch (pcb->state) { 800d1c6: 7d23 ldrb r3, [r4, #20] 800d1c8: 2b04 cmp r3, #4 800d1ca: d019 beq.n 800d200 800d1cc: 2b07 cmp r3, #7 800d1ce: d01f beq.n 800d210 800d1d0: 2b03 cmp r3, #3 800d1d2: d00a beq.n 800d1ea 800d1d4: 2500 movs r5, #0 } 800d1d6: 4628 mov r0, r5 800d1d8: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("pcb != NULL", pcb != NULL); 800d1da: 4b16 ldr r3, [pc, #88] @ (800d234 ) 800d1dc: f44f 72ce mov.w r2, #412 @ 0x19c 800d1e0: 4915 ldr r1, [pc, #84] @ (800d238 ) 800d1e2: 4816 ldr r0, [pc, #88] @ (800d23c ) 800d1e4: f006 f910 bl 8013408 800d1e8: e7ed b.n 800d1c6 err = tcp_send_fin(pcb); 800d1ea: 4620 mov r0, r4 800d1ec: f003 fcb4 bl 8010b58 if (err == ERR_OK) { 800d1f0: 4605 mov r5, r0 800d1f2: b9a8 cbnz r0, 800d220 pcb->state = FIN_WAIT_1; 800d1f4: 2305 movs r3, #5 800d1f6: 7523 strb r3, [r4, #20] tcp_output(pcb); 800d1f8: 4620 mov r0, r4 800d1fa: f003 fe33 bl 8010e64 800d1fe: e7ea b.n 800d1d6 err = tcp_send_fin(pcb); 800d200: 4620 mov r0, r4 800d202: f003 fca9 bl 8010b58 if (err == ERR_OK) { 800d206: 4605 mov r5, r0 800d208: b950 cbnz r0, 800d220 pcb->state = FIN_WAIT_1; 800d20a: 2305 movs r3, #5 800d20c: 7523 strb r3, [r4, #20] if (err == ERR_OK) { 800d20e: e7f3 b.n 800d1f8 err = tcp_send_fin(pcb); 800d210: 4620 mov r0, r4 800d212: f003 fca1 bl 8010b58 if (err == ERR_OK) { 800d216: 4605 mov r5, r0 800d218: b910 cbnz r0, 800d220 pcb->state = LAST_ACK; 800d21a: 2309 movs r3, #9 800d21c: 7523 strb r3, [r4, #20] if (err == ERR_OK) { 800d21e: e7eb b.n 800d1f8 } else if (err == ERR_MEM) { 800d220: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff 800d224: d1d7 bne.n 800d1d6 tcp_set_flags(pcb, TF_CLOSEPEND); 800d226: 8b63 ldrh r3, [r4, #26] 800d228: f043 0308 orr.w r3, r3, #8 800d22c: 8363 strh r3, [r4, #26] return ERR_OK; 800d22e: 2500 movs r5, #0 800d230: e7d1 b.n 800d1d6 800d232: bf00 nop 800d234: 080165b0 .word 0x080165b0 800d238: 08016638 .word 0x08016638 800d23c: 080144e8 .word 0x080144e8 0800d240 : * OK for us to now free it. */ static void tcp_handle_closepend(void) { struct tcp_pcb *pcb = tcp_active_pcbs; 800d240: 4b09 ldr r3, [pc, #36] @ (800d268 ) 800d242: 6818 ldr r0, [r3, #0] while (pcb != NULL) { 800d244: b178 cbz r0, 800d266 { 800d246: b510 push {r4, lr} 800d248: e001 b.n 800d24e 800d24a: 4620 mov r0, r4 while (pcb != NULL) { 800d24c: b154 cbz r4, 800d264 struct tcp_pcb *next = pcb->next; 800d24e: 68c4 ldr r4, [r0, #12] /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 800d250: 8b43 ldrh r3, [r0, #26] 800d252: f013 0f08 tst.w r3, #8 800d256: d0f8 beq.n 800d24a LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 800d258: f023 0308 bic.w r3, r3, #8 800d25c: 8343 strh r3, [r0, #26] tcp_close_shutdown_fin(pcb); 800d25e: f7ff ffaf bl 800d1c0 800d262: e7f2 b.n 800d24a } pcb = next; } } 800d264: bd10 pop {r4, pc} 800d266: 4770 bx lr 800d268: 24019bd8 .word 0x24019bd8 0800d26c : { 800d26c: b508 push {r3, lr} tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 800d26e: f005 ff1f bl 80130b0 800d272: 4b02 ldr r3, [pc, #8] @ (800d27c ) 800d274: 4303 orrs r3, r0 800d276: 4a02 ldr r2, [pc, #8] @ (800d280 ) 800d278: 8013 strh r3, [r2, #0] } 800d27a: bd08 pop {r3, pc} 800d27c: ffffc000 .word 0xffffc000 800d280: 2400002c .word 0x2400002c 0800d284 : { 800d284: b510 push {r4, lr} 800d286: 4604 mov r4, r0 LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); 800d288: 7d03 ldrb r3, [r0, #20] 800d28a: 2b01 cmp r3, #1 800d28c: d004 beq.n 800d298 memp_free(MEMP_TCP_PCB, pcb); 800d28e: 4621 mov r1, r4 800d290: 2001 movs r0, #1 800d292: f7fe f9ed bl 800b670 } 800d296: bd10 pop {r4, pc} LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); 800d298: 4b03 ldr r3, [pc, #12] @ (800d2a8 ) 800d29a: 22d4 movs r2, #212 @ 0xd4 800d29c: 4903 ldr r1, [pc, #12] @ (800d2ac ) 800d29e: 4804 ldr r0, [pc, #16] @ (800d2b0 ) 800d2a0: f006 f8b2 bl 8013408 800d2a4: e7f3 b.n 800d28e 800d2a6: bf00 nop 800d2a8: 080165b0 .word 0x080165b0 800d2ac: 08016678 .word 0x08016678 800d2b0: 080144e8 .word 0x080144e8 0800d2b4 : { 800d2b4: b538 push {r3, r4, r5, lr} LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL); 800d2b6: 4604 mov r4, r0 800d2b8: b198 cbz r0, 800d2e2 new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 800d2ba: 6a65 ldr r5, [r4, #36] @ 0x24 800d2bc: 8d21 ldrh r1, [r4, #40] @ 0x28 800d2be: 1868 adds r0, r5, r1 if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 800d2c0: 6ae2 ldr r2, [r4, #44] @ 0x2c 800d2c2: f8b4 e032 ldrh.w lr, [r4, #50] @ 0x32 800d2c6: f640 3c68 movw ip, #2920 @ 0xb68 800d2ca: 45e6 cmp lr, ip 800d2cc: bf94 ite ls 800d2ce: eb02 030e addls.w r3, r2, lr 800d2d2: eb02 030c addhi.w r3, r2, ip 800d2d6: 1ac3 subs r3, r0, r3 800d2d8: 2b00 cmp r3, #0 800d2da: db0a blt.n 800d2f2 pcb->rcv_ann_wnd = pcb->rcv_wnd; 800d2dc: 8561 strh r1, [r4, #42] @ 0x2a return new_right_edge - pcb->rcv_ann_right_edge; 800d2de: 1a80 subs r0, r0, r2 } 800d2e0: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL); 800d2e2: 4b0e ldr r3, [pc, #56] @ (800d31c ) 800d2e4: f240 32a6 movw r2, #934 @ 0x3a6 800d2e8: 490d ldr r1, [pc, #52] @ (800d320 ) 800d2ea: 480e ldr r0, [pc, #56] @ (800d324 ) 800d2ec: f006 f88c bl 8013408 800d2f0: e7e3 b.n 800d2ba if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 800d2f2: 1aab subs r3, r5, r2 800d2f4: 2b00 cmp r3, #0 800d2f6: dd03 ble.n 800d300 pcb->rcv_ann_wnd = 0; 800d2f8: 2300 movs r3, #0 800d2fa: 8563 strh r3, [r4, #42] @ 0x2a return 0; 800d2fc: 2000 movs r0, #0 800d2fe: e7ef b.n 800d2e0 u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; 800d300: 1b55 subs r5, r2, r5 LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); 800d302: f5b5 3f80 cmp.w r5, #65536 @ 0x10000 800d306: d201 bcs.n 800d30c pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; 800d308: 8565 strh r5, [r4, #42] @ 0x2a 800d30a: e7f7 b.n 800d2fc LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); 800d30c: 4b03 ldr r3, [pc, #12] @ (800d31c ) 800d30e: f240 32b6 movw r2, #950 @ 0x3b6 800d312: 4905 ldr r1, [pc, #20] @ (800d328 ) 800d314: 4803 ldr r0, [pc, #12] @ (800d324 ) 800d316: f006 f877 bl 8013408 800d31a: e7f5 b.n 800d308 800d31c: 080165b0 .word 0x080165b0 800d320: 0801668c .word 0x0801668c 800d324: 080144e8 .word 0x080144e8 800d328: 080166b0 .word 0x080166b0 0800d32c : { 800d32c: b538 push {r3, r4, r5, lr} 800d32e: 4604 mov r4, r0 800d330: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800d332: f7f6 fbeb bl 8003b0c LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return); 800d336: b1b4 cbz r4, 800d366 LWIP_ASSERT("don't call tcp_recved for listen-pcbs", 800d338: 7d23 ldrb r3, [r4, #20] 800d33a: 2b01 cmp r3, #1 800d33c: d01b beq.n 800d376 rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len); 800d33e: 8d23 ldrh r3, [r4, #40] @ 0x28 800d340: 1959 adds r1, r3, r5 800d342: b289 uxth r1, r1 if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) { 800d344: f241 62d0 movw r2, #5840 @ 0x16d0 800d348: 4291 cmp r1, r2 800d34a: d801 bhi.n 800d350 800d34c: 428b cmp r3, r1 800d34e: d91a bls.n 800d386 pcb->rcv_wnd = TCP_WND_MAX(pcb); 800d350: f241 63d0 movw r3, #5840 @ 0x16d0 800d354: 8523 strh r3, [r4, #40] @ 0x28 wnd_inflation = tcp_update_rcv_ann_wnd(pcb); 800d356: 4620 mov r0, r4 800d358: f7ff ffac bl 800d2b4 if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { 800d35c: f240 53b3 movw r3, #1459 @ 0x5b3 800d360: 4298 cmp r0, r3 800d362: d812 bhi.n 800d38a } 800d364: bd38 pop {r3, r4, r5, pc} LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return); 800d366: 4b0d ldr r3, [pc, #52] @ (800d39c ) 800d368: f240 32cf movw r2, #975 @ 0x3cf 800d36c: 490c ldr r1, [pc, #48] @ (800d3a0 ) 800d36e: 480d ldr r0, [pc, #52] @ (800d3a4 ) 800d370: f006 f84a bl 8013408 800d374: e7f6 b.n 800d364 LWIP_ASSERT("don't call tcp_recved for listen-pcbs", 800d376: 4b09 ldr r3, [pc, #36] @ (800d39c ) 800d378: f240 32d2 movw r2, #978 @ 0x3d2 800d37c: 490a ldr r1, [pc, #40] @ (800d3a8 ) 800d37e: 4809 ldr r0, [pc, #36] @ (800d3a4 ) 800d380: f006 f842 bl 8013408 800d384: e7db b.n 800d33e pcb->rcv_wnd = rcv_wnd; 800d386: 8521 strh r1, [r4, #40] @ 0x28 800d388: e7e5 b.n 800d356 tcp_ack_now(pcb); 800d38a: 8b63 ldrh r3, [r4, #26] 800d38c: f043 0302 orr.w r3, r3, #2 800d390: 8363 strh r3, [r4, #26] tcp_output(pcb); 800d392: 4620 mov r0, r4 800d394: f003 fd66 bl 8010e64 LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: received %"U16_F" bytes, wnd %"TCPWNDSIZE_F" (%"TCPWNDSIZE_F").\n", 800d398: e7e4 b.n 800d364 800d39a: bf00 nop 800d39c: 080165b0 .word 0x080165b0 800d3a0: 080166cc .word 0x080166cc 800d3a4: 080144e8 .word 0x080144e8 800d3a8: 080166e4 .word 0x080166e4 0800d3ac : if (seg != NULL) { 800d3ac: b150 cbz r0, 800d3c4 { 800d3ae: b510 push {r4, lr} 800d3b0: 4604 mov r4, r0 if (seg->p != NULL) { 800d3b2: 6840 ldr r0, [r0, #4] 800d3b4: b108 cbz r0, 800d3ba pbuf_free(seg->p); 800d3b6: f7fe fcf3 bl 800bda0 memp_free(MEMP_TCP_SEG, seg); 800d3ba: 4621 mov r1, r4 800d3bc: 2003 movs r0, #3 800d3be: f7fe f957 bl 800b670 } 800d3c2: bd10 pop {r4, pc} 800d3c4: 4770 bx lr 0800d3c6 : while (seg != NULL) { 800d3c6: b138 cbz r0, 800d3d8 { 800d3c8: b510 push {r4, lr} struct tcp_seg *next = seg->next; 800d3ca: 6804 ldr r4, [r0, #0] tcp_seg_free(seg); 800d3cc: f7ff ffee bl 800d3ac seg = next; 800d3d0: 4620 mov r0, r4 while (seg != NULL) { 800d3d2: 2c00 cmp r4, #0 800d3d4: d1f9 bne.n 800d3ca } 800d3d6: bd10 pop {r4, pc} 800d3d8: 4770 bx lr ... 0800d3dc : { 800d3dc: b538 push {r3, r4, r5, lr} LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL); 800d3de: 4605 mov r5, r0 800d3e0: b198 cbz r0, 800d40a cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); 800d3e2: 2003 movs r0, #3 800d3e4: f7fe f90e bl 800b604 if (cseg == NULL) { 800d3e8: 4604 mov r4, r0 800d3ea: b160 cbz r0, 800d406 SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); 800d3ec: 682b ldr r3, [r5, #0] 800d3ee: 6868 ldr r0, [r5, #4] 800d3f0: 68a9 ldr r1, [r5, #8] 800d3f2: 68ea ldr r2, [r5, #12] 800d3f4: 6023 str r3, [r4, #0] 800d3f6: 6060 str r0, [r4, #4] 800d3f8: 60a1 str r1, [r4, #8] 800d3fa: 60e2 str r2, [r4, #12] 800d3fc: 692b ldr r3, [r5, #16] 800d3fe: 6123 str r3, [r4, #16] pbuf_ref(cseg->p); 800d400: 6860 ldr r0, [r4, #4] 800d402: f7fe fe5b bl 800c0bc } 800d406: 4620 mov r0, r4 800d408: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL); 800d40a: 4b04 ldr r3, [pc, #16] @ (800d41c ) 800d40c: f240 6282 movw r2, #1666 @ 0x682 800d410: 4903 ldr r1, [pc, #12] @ (800d420 ) 800d412: 4804 ldr r0, [pc, #16] @ (800d424 ) 800d414: f005 fff8 bl 8013408 800d418: e7e3 b.n 800d3e2 800d41a: bf00 nop 800d41c: 080165b0 .word 0x080165b0 800d420: 0801670c .word 0x0801670c 800d424: 080144e8 .word 0x080144e8 0800d428 : * @param pcb tcp_pcb to set the callback argument * @param arg void pointer argument to pass to callback functions */ void tcp_arg(struct tcp_pcb *pcb, void *arg) { 800d428: b538 push {r3, r4, r5, lr} 800d42a: 4604 mov r4, r0 800d42c: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800d42e: f7f6 fb6d bl 8003b0c /* This function is allowed to be called for both listen pcbs and connection pcbs. */ if (pcb != NULL) { 800d432: b104 cbz r4, 800d436 pcb->callback_arg = arg; 800d434: 6125 str r5, [r4, #16] } } 800d436: bd38 pop {r3, r4, r5, pc} 0800d438 : * @param pcb tcp_pcb to set the recv callback * @param recv callback function to call for this pcb when data is received */ void tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) { 800d438: b538 push {r3, r4, r5, lr} 800d43a: 4604 mov r4, r0 800d43c: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800d43e: f7f6 fb65 bl 8003b0c if (pcb != NULL) { 800d442: b124 cbz r4, 800d44e LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); 800d444: 7d23 ldrb r3, [r4, #20] 800d446: 2b01 cmp r3, #1 800d448: d002 beq.n 800d450 pcb->recv = recv; 800d44a: f8c4 5084 str.w r5, [r4, #132] @ 0x84 } } 800d44e: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); 800d450: 4b03 ldr r3, [pc, #12] @ (800d460 ) 800d452: f240 72df movw r2, #2015 @ 0x7df 800d456: 4903 ldr r1, [pc, #12] @ (800d464 ) 800d458: 4803 ldr r0, [pc, #12] @ (800d468 ) 800d45a: f005 ffd5 bl 8013408 800d45e: e7f4 b.n 800d44a 800d460: 080165b0 .word 0x080165b0 800d464: 08016728 .word 0x08016728 800d468: 080144e8 .word 0x080144e8 0800d46c : * @param pcb tcp_pcb to set the sent callback * @param sent callback function to call for this pcb when data is successfully sent */ void tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) { 800d46c: b538 push {r3, r4, r5, lr} 800d46e: 4604 mov r4, r0 800d470: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800d472: f7f6 fb4b bl 8003b0c if (pcb != NULL) { 800d476: b124 cbz r4, 800d482 LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); 800d478: 7d23 ldrb r3, [r4, #20] 800d47a: 2b01 cmp r3, #1 800d47c: d002 beq.n 800d484 pcb->sent = sent; 800d47e: f8c4 5080 str.w r5, [r4, #128] @ 0x80 } } 800d482: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); 800d484: 4b03 ldr r3, [pc, #12] @ (800d494 ) 800d486: f240 72f3 movw r2, #2035 @ 0x7f3 800d48a: 4903 ldr r1, [pc, #12] @ (800d498 ) 800d48c: 4803 ldr r0, [pc, #12] @ (800d49c ) 800d48e: f005 ffbb bl 8013408 800d492: e7f4 b.n 800d47e 800d494: 080165b0 .word 0x080165b0 800d498: 08016750 .word 0x08016750 800d49c: 080144e8 .word 0x080144e8 0800d4a0 : * @param err callback function to call for this pcb when a fatal error * has occurred on the connection */ void tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) { 800d4a0: b538 push {r3, r4, r5, lr} 800d4a2: 4604 mov r4, r0 800d4a4: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800d4a6: f7f6 fb31 bl 8003b0c if (pcb != NULL) { 800d4aa: b124 cbz r4, 800d4b6 LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); 800d4ac: 7d23 ldrb r3, [r4, #20] 800d4ae: 2b01 cmp r3, #1 800d4b0: d002 beq.n 800d4b8 pcb->errf = err; 800d4b2: f8c4 5090 str.w r5, [r4, #144] @ 0x90 } } 800d4b6: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); 800d4b8: 4b03 ldr r3, [pc, #12] @ (800d4c8 ) 800d4ba: f640 020d movw r2, #2061 @ 0x80d 800d4be: 4903 ldr r1, [pc, #12] @ (800d4cc ) 800d4c0: 4803 ldr r0, [pc, #12] @ (800d4d0 ) 800d4c2: f005 ffa1 bl 8013408 800d4c6: e7f4 b.n 800d4b2 800d4c8: 080165b0 .word 0x080165b0 800d4cc: 08016778 .word 0x08016778 800d4d0: 080144e8 .word 0x080144e8 0800d4d4 : * @param accept callback function to call for this pcb when LISTENing * connection has been connected to another host */ void tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept) { 800d4d4: b538 push {r3, r4, r5, lr} 800d4d6: 4604 mov r4, r0 800d4d8: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800d4da: f7f6 fb17 bl 8003b0c if ((pcb != NULL) && (pcb->state == LISTEN)) { 800d4de: b114 cbz r4, 800d4e6 800d4e0: 7d23 ldrb r3, [r4, #20] 800d4e2: 2b01 cmp r3, #1 800d4e4: d000 beq.n 800d4e8 struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen *)pcb; lpcb->accept = accept; } } 800d4e6: bd38 pop {r3, r4, r5, pc} lpcb->accept = accept; 800d4e8: 61a5 str r5, [r4, #24] } 800d4ea: e7fc b.n 800d4e6 0800d4ec : * the application may use the polling functionality to call tcp_write() * again when the connection has been idle for a while. */ void tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) { 800d4ec: b570 push {r4, r5, r6, lr} 800d4ee: 4604 mov r4, r0 800d4f0: 460e mov r6, r1 800d4f2: 4615 mov r5, r2 LWIP_ASSERT_CORE_LOCKED(); 800d4f4: f7f6 fb0a bl 8003b0c LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return); 800d4f8: b134 cbz r4, 800d508 LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); 800d4fa: 7d23 ldrb r3, [r4, #20] 800d4fc: 2b01 cmp r3, #1 800d4fe: d00b beq.n 800d518 #if LWIP_CALLBACK_API pcb->poll = poll; 800d500: f8c4 608c str.w r6, [r4, #140] @ 0x8c #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 800d504: 7765 strb r5, [r4, #29] } 800d506: bd70 pop {r4, r5, r6, pc} LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return); 800d508: 4b07 ldr r3, [pc, #28] @ (800d528 ) 800d50a: f640 023d movw r2, #2109 @ 0x83d 800d50e: 4907 ldr r1, [pc, #28] @ (800d52c ) 800d510: 4807 ldr r0, [pc, #28] @ (800d530 ) 800d512: f005 ff79 bl 8013408 800d516: e7f6 b.n 800d506 LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); 800d518: 4b03 ldr r3, [pc, #12] @ (800d528 ) 800d51a: f640 023e movw r2, #2110 @ 0x83e 800d51e: 4905 ldr r1, [pc, #20] @ (800d534 ) 800d520: 4803 ldr r0, [pc, #12] @ (800d530 ) 800d522: f005 ff71 bl 8013408 800d526: e7eb b.n 800d500 800d528: 080165b0 .word 0x080165b0 800d52c: 080167a0 .word 0x080167a0 800d530: 080144e8 .word 0x080144e8 800d534: 080167b8 .word 0x080167b8 0800d538 : * * @return u32_t pseudo random sequence number */ u32_t tcp_next_iss(struct tcp_pcb *pcb) { 800d538: b508 push {r3, lr} LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL); return LWIP_HOOK_TCP_ISN(&pcb->local_ip, pcb->local_port, &pcb->remote_ip, pcb->remote_port); #else /* LWIP_HOOK_TCP_ISN */ static u32_t iss = 6510; LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL); 800d53a: b130 cbz r0, 800d54a LWIP_UNUSED_ARG(pcb); iss += tcp_ticks; /* XXX */ 800d53c: 4b07 ldr r3, [pc, #28] @ (800d55c ) 800d53e: 6818 ldr r0, [r3, #0] 800d540: 4a07 ldr r2, [pc, #28] @ (800d560 ) 800d542: 6812 ldr r2, [r2, #0] 800d544: 4410 add r0, r2 800d546: 6018 str r0, [r3, #0] return iss; #endif /* LWIP_HOOK_TCP_ISN */ } 800d548: bd08 pop {r3, pc} LWIP_ASSERT("tcp_next_iss: invalid pcb", pcb != NULL); 800d54a: 4b06 ldr r3, [pc, #24] @ (800d564 ) 800d54c: f640 02af movw r2, #2223 @ 0x8af 800d550: 4905 ldr r1, [pc, #20] @ (800d568 ) 800d552: 4806 ldr r0, [pc, #24] @ (800d56c ) 800d554: f005 ff58 bl 8013408 800d558: e7f0 b.n 800d53c 800d55a: bf00 nop 800d55c: 24000028 .word 0x24000028 800d560: 24019be4 .word 0x24019be4 800d564: 080165b0 .word 0x080165b0 800d568: 080167d8 .word 0x080167d8 800d56c: 080144e8 .word 0x080144e8 0800d570 : * by calculating the minimum of TCP_MSS and the mtu (if set) of the target * netif (if not NULL). */ u16_t tcp_eff_send_mss_netif(u16_t sendmss, struct netif *outif, const ip_addr_t *dest) { 800d570: b538 push {r3, r4, r5, lr} 800d572: 4605 mov r5, r0 800d574: 460c mov r4, r1 u16_t mss_s; u16_t mtu; LWIP_UNUSED_ARG(dest); /* in case IPv6 is disabled */ LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL); 800d576: b15a cbz r2, 800d590 else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { if (outif == NULL) { 800d578: b144 cbz r4, 800d58c return sendmss; } mtu = outif->mtu; 800d57a: 8d23 ldrh r3, [r4, #40] @ 0x28 } #endif /* LWIP_IPV4 */ if (mtu != 0) { 800d57c: b133 cbz r3, 800d58c #if LWIP_IPV4 { offset = IP_HLEN + TCP_HLEN; } #endif /* LWIP_IPV4 */ mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0; 800d57e: 2b28 cmp r3, #40 @ 0x28 800d580: d90e bls.n 800d5a0 800d582: 3b28 subs r3, #40 @ 0x28 800d584: b29b uxth r3, r3 /* RFC 1122, chap 4.2.2.6: * Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize * We correct for TCP options in tcp_write(), and don't support IP options. */ sendmss = LWIP_MIN(sendmss, mss_s); 800d586: 429d cmp r5, r3 800d588: bf28 it cs 800d58a: 461d movcs r5, r3 } return sendmss; } 800d58c: 4628 mov r0, r5 800d58e: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("tcp_eff_send_mss_netif: invalid dst_ip", dest != NULL); 800d590: 4b04 ldr r3, [pc, #16] @ (800d5a4 ) 800d592: f640 02c5 movw r2, #2245 @ 0x8c5 800d596: 4904 ldr r1, [pc, #16] @ (800d5a8 ) 800d598: 4804 ldr r0, [pc, #16] @ (800d5ac ) 800d59a: f005 ff35 bl 8013408 800d59e: e7eb b.n 800d578 mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0; 800d5a0: 2300 movs r3, #0 800d5a2: e7f0 b.n 800d586 800d5a4: 080165b0 .word 0x080165b0 800d5a8: 080167f4 .word 0x080167f4 800d5ac: 080144e8 .word 0x080144e8 0800d5b0 : { 800d5b0: b5f8 push {r3, r4, r5, r6, r7, lr} 800d5b2: 4604 mov r4, r0 800d5b4: 460d mov r5, r1 800d5b6: 4616 mov r6, r2 800d5b8: 461f mov r7, r3 LWIP_ASSERT_CORE_LOCKED(); 800d5ba: f7f6 faa7 bl 8003b0c LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 800d5be: 2c00 cmp r4, #0 800d5c0: d04e beq.n 800d660 LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 800d5c2: 2d00 cmp r5, #0 800d5c4: d056 beq.n 800d674 LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 800d5c6: 7d23 ldrb r3, [r4, #20] 800d5c8: 2b00 cmp r3, #0 800d5ca: d15d bne.n 800d688 ip_addr_set(&pcb->remote_ip, ipaddr); 800d5cc: 682b ldr r3, [r5, #0] 800d5ce: 6063 str r3, [r4, #4] pcb->remote_port = port; 800d5d0: 8326 strh r6, [r4, #24] if (pcb->netif_idx != NETIF_NO_INDEX) { 800d5d2: 7a20 ldrb r0, [r4, #8] 800d5d4: 2800 cmp r0, #0 800d5d6: d061 beq.n 800d69c netif = netif_get_by_index(pcb->netif_idx); 800d5d8: f7fe fab2 bl 800bb40 800d5dc: 4605 mov r5, r0 if (netif == NULL) { 800d5de: 2d00 cmp r5, #0 800d5e0: d077 beq.n 800d6d2 if (ip_addr_isany(&pcb->local_ip)) { 800d5e2: b10c cbz r4, 800d5e8 800d5e4: 6823 ldr r3, [r4, #0] 800d5e6: b90b cbnz r3, 800d5ec ip_addr_copy(pcb->local_ip, *local_ip); 800d5e8: 686b ldr r3, [r5, #4] 800d5ea: 6023 str r3, [r4, #0] old_local_port = pcb->local_port; 800d5ec: 8ae6 ldrh r6, [r4, #22] if (pcb->local_port == 0) { 800d5ee: b926 cbnz r6, 800d5fa pcb->local_port = tcp_new_port(); 800d5f0: f7ff fd52 bl 800d098 800d5f4: 82e0 strh r0, [r4, #22] if (pcb->local_port == 0) { 800d5f6: 2800 cmp r0, #0 800d5f8: d06e beq.n 800d6d8 iss = tcp_next_iss(pcb); 800d5fa: 4620 mov r0, r4 800d5fc: f7ff ff9c bl 800d538 pcb->rcv_nxt = 0; 800d600: 2100 movs r1, #0 800d602: 6261 str r1, [r4, #36] @ 0x24 pcb->snd_nxt = iss; 800d604: 6520 str r0, [r4, #80] @ 0x50 pcb->lastack = iss - 1; 800d606: 3801 subs r0, #1 800d608: 6460 str r0, [r4, #68] @ 0x44 pcb->snd_wl2 = iss - 1; 800d60a: 65a0 str r0, [r4, #88] @ 0x58 pcb->snd_lbb = iss - 1; 800d60c: 65e0 str r0, [r4, #92] @ 0x5c pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); 800d60e: f241 63d0 movw r3, #5840 @ 0x16d0 800d612: 8563 strh r3, [r4, #42] @ 0x2a 800d614: 8523 strh r3, [r4, #40] @ 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 800d616: 62e1 str r1, [r4, #44] @ 0x2c pcb->snd_wnd = TCP_WND; 800d618: f8a4 3060 strh.w r3, [r4, #96] @ 0x60 pcb->mss = INITIAL_MSS; 800d61c: f44f 7006 mov.w r0, #536 @ 0x218 800d620: 8660 strh r0, [r4, #50] @ 0x32 pcb->mss = tcp_eff_send_mss_netif(pcb->mss, netif, &pcb->remote_ip); 800d622: 1d22 adds r2, r4, #4 800d624: 4629 mov r1, r5 800d626: f7ff ffa3 bl 800d570 800d62a: 8660 strh r0, [r4, #50] @ 0x32 pcb->cwnd = 1; 800d62c: 2301 movs r3, #1 800d62e: f8a4 3048 strh.w r3, [r4, #72] @ 0x48 pcb->connected = connected; 800d632: f8c4 7088 str.w r7, [r4, #136] @ 0x88 ret = tcp_enqueue_flags(pcb, TCP_SYN); 800d636: 2102 movs r1, #2 800d638: 4620 mov r0, r4 800d63a: f003 f9dd bl 80109f8 if (ret == ERR_OK) { 800d63e: 4605 mov r5, r0 800d640: 2800 cmp r0, #0 800d642: d144 bne.n 800d6ce pcb->state = SYN_SENT; 800d644: 2302 movs r3, #2 800d646: 7523 strb r3, [r4, #20] if (old_local_port != 0) { 800d648: 2e00 cmp r6, #0 800d64a: d034 beq.n 800d6b6 TCP_RMV(&tcp_bound_pcbs, pcb); 800d64c: 4b24 ldr r3, [pc, #144] @ (800d6e0 ) 800d64e: 681b ldr r3, [r3, #0] 800d650: 42a3 cmp r3, r4 800d652: d028 beq.n 800d6a6 800d654: b36b cbz r3, 800d6b2 800d656: 68da ldr r2, [r3, #12] 800d658: 42a2 cmp r2, r4 800d65a: d028 beq.n 800d6ae 800d65c: 4613 mov r3, r2 800d65e: e7f9 b.n 800d654 LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 800d660: 4b20 ldr r3, [pc, #128] @ (800d6e4 ) 800d662: f240 4235 movw r2, #1077 @ 0x435 800d666: 4920 ldr r1, [pc, #128] @ (800d6e8 ) 800d668: 4820 ldr r0, [pc, #128] @ (800d6ec ) 800d66a: f005 fecd bl 8013408 800d66e: f06f 050f mvn.w r5, #15 800d672: e02c b.n 800d6ce LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 800d674: 4b1b ldr r3, [pc, #108] @ (800d6e4 ) 800d676: f240 4236 movw r2, #1078 @ 0x436 800d67a: 491d ldr r1, [pc, #116] @ (800d6f0 ) 800d67c: 481b ldr r0, [pc, #108] @ (800d6ec ) 800d67e: f005 fec3 bl 8013408 800d682: f06f 050f mvn.w r5, #15 800d686: e022 b.n 800d6ce LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 800d688: 4b16 ldr r3, [pc, #88] @ (800d6e4 ) 800d68a: f44f 6287 mov.w r2, #1080 @ 0x438 800d68e: 4919 ldr r1, [pc, #100] @ (800d6f4 ) 800d690: 4816 ldr r0, [pc, #88] @ (800d6ec ) 800d692: f005 feb9 bl 8013408 800d696: f06f 0509 mvn.w r5, #9 800d69a: e018 b.n 800d6ce netif = ip_route(&pcb->local_ip, &pcb->remote_ip); 800d69c: 1d20 adds r0, r4, #4 800d69e: f7fc fd2f bl 800a100 800d6a2: 4605 mov r5, r0 800d6a4: e79b b.n 800d5de TCP_RMV(&tcp_bound_pcbs, pcb); 800d6a6: 68da ldr r2, [r3, #12] 800d6a8: 4b0d ldr r3, [pc, #52] @ (800d6e0 ) 800d6aa: 601a str r2, [r3, #0] 800d6ac: e001 b.n 800d6b2 800d6ae: 68e2 ldr r2, [r4, #12] 800d6b0: 60da str r2, [r3, #12] 800d6b2: 2300 movs r3, #0 800d6b4: 60e3 str r3, [r4, #12] TCP_REG_ACTIVE(pcb); 800d6b6: 4b10 ldr r3, [pc, #64] @ (800d6f8 ) 800d6b8: 681a ldr r2, [r3, #0] 800d6ba: 60e2 str r2, [r4, #12] 800d6bc: 601c str r4, [r3, #0] 800d6be: f003 ffb7 bl 8011630 800d6c2: 4b0e ldr r3, [pc, #56] @ (800d6fc ) 800d6c4: 2201 movs r2, #1 800d6c6: 701a strb r2, [r3, #0] tcp_output(pcb); 800d6c8: 4620 mov r0, r4 800d6ca: f003 fbcb bl 8010e64 } 800d6ce: 4628 mov r0, r5 800d6d0: bdf8 pop {r3, r4, r5, r6, r7, pc} return ERR_RTE; 800d6d2: f06f 0503 mvn.w r5, #3 800d6d6: e7fa b.n 800d6ce return ERR_BUF; 800d6d8: f06f 0501 mvn.w r5, #1 800d6dc: e7f7 b.n 800d6ce 800d6de: bf00 nop 800d6e0: 24019be0 .word 0x24019be0 800d6e4: 080165b0 .word 0x080165b0 800d6e8: 0801681c .word 0x0801681c 800d6ec: 080144e8 .word 0x080144e8 800d6f0: 08016838 .word 0x08016838 800d6f4: 08016854 .word 0x08016854 800d6f8: 24019bd8 .word 0x24019bd8 800d6fc: 24019bd2 .word 0x24019bd2 0800d700 : #if TCP_QUEUE_OOSEQ /* Free all ooseq pbufs (and possibly reset SACK state) */ void tcp_free_ooseq(struct tcp_pcb *pcb) { 800d700: b510 push {r4, lr} 800d702: 4604 mov r4, r0 if (pcb->ooseq) { 800d704: 6f40 ldr r0, [r0, #116] @ 0x74 800d706: b118 cbz r0, 800d710 tcp_segs_free(pcb->ooseq); 800d708: f7ff fe5d bl 800d3c6 pcb->ooseq = NULL; 800d70c: 2300 movs r3, #0 800d70e: 6763 str r3, [r4, #116] @ 0x74 #if LWIP_TCP_SACK_OUT memset(pcb->rcv_sacks, 0, sizeof(pcb->rcv_sacks)); #endif /* LWIP_TCP_SACK_OUT */ } } 800d710: bd10 pop {r4, pc} ... 0800d714 : { 800d714: b510 push {r4, lr} LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return); 800d716: b308 cbz r0, 800d75c 800d718: 4604 mov r4, r0 if (pcb->state != CLOSED && 800d71a: 7d03 ldrb r3, [r0, #20] 800d71c: 2b00 cmp r3, #0 800d71e: bf18 it ne 800d720: 2b0a cmpne r3, #10 800d722: d01a beq.n 800d75a pcb->state != TIME_WAIT && 800d724: 2b01 cmp r3, #1 800d726: d018 beq.n 800d75a if (pcb->refused_data != NULL) { 800d728: 6f80 ldr r0, [r0, #120] @ 0x78 800d72a: b118 cbz r0, 800d734 pbuf_free(pcb->refused_data); 800d72c: f7fe fb38 bl 800bda0 pcb->refused_data = NULL; 800d730: 2300 movs r3, #0 800d732: 67a3 str r3, [r4, #120] @ 0x78 if (pcb->ooseq != NULL) { 800d734: 6f63 ldr r3, [r4, #116] @ 0x74 800d736: b113 cbz r3, 800d73e tcp_free_ooseq(pcb); 800d738: 4620 mov r0, r4 800d73a: f7ff ffe1 bl 800d700 pcb->rtime = -1; 800d73e: f64f 73ff movw r3, #65535 @ 0xffff 800d742: 8623 strh r3, [r4, #48] @ 0x30 tcp_segs_free(pcb->unsent); 800d744: 6ee0 ldr r0, [r4, #108] @ 0x6c 800d746: f7ff fe3e bl 800d3c6 tcp_segs_free(pcb->unacked); 800d74a: 6f20 ldr r0, [r4, #112] @ 0x70 800d74c: f7ff fe3b bl 800d3c6 pcb->unacked = pcb->unsent = NULL; 800d750: 2300 movs r3, #0 800d752: 66e3 str r3, [r4, #108] @ 0x6c 800d754: 6723 str r3, [r4, #112] @ 0x70 pcb->unsent_oversize = 0; 800d756: f8a4 3068 strh.w r3, [r4, #104] @ 0x68 } 800d75a: bd10 pop {r4, pc} LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return); 800d75c: 4b03 ldr r3, [pc, #12] @ (800d76c ) 800d75e: f640 0251 movw r2, #2129 @ 0x851 800d762: 4903 ldr r1, [pc, #12] @ (800d770 ) 800d764: 4803 ldr r0, [pc, #12] @ (800d774 ) 800d766: f005 fe4f bl 8013408 800d76a: e7f6 b.n 800d75a 800d76c: 080165b0 .word 0x080165b0 800d770: 08016884 .word 0x08016884 800d774: 080144e8 .word 0x080144e8 0800d778 : { 800d778: b538 push {r3, r4, r5, lr} 800d77a: 4605 mov r5, r0 LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL); 800d77c: 460c mov r4, r1 800d77e: b149 cbz r1, 800d794 LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL); 800d780: b185 cbz r5, 800d7a4 TCP_RMV(pcblist, pcb); 800d782: 682b ldr r3, [r5, #0] 800d784: 42a3 cmp r3, r4 800d786: d015 beq.n 800d7b4 800d788: b1cb cbz r3, 800d7be 800d78a: 68da ldr r2, [r3, #12] 800d78c: 42a2 cmp r2, r4 800d78e: d014 beq.n 800d7ba 800d790: 4613 mov r3, r2 800d792: e7f9 b.n 800d788 LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL); 800d794: 4b25 ldr r3, [pc, #148] @ (800d82c ) 800d796: f640 0283 movw r2, #2179 @ 0x883 800d79a: 4925 ldr r1, [pc, #148] @ (800d830 ) 800d79c: 4825 ldr r0, [pc, #148] @ (800d834 ) 800d79e: f005 fe33 bl 8013408 800d7a2: e7ed b.n 800d780 LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL); 800d7a4: 4b21 ldr r3, [pc, #132] @ (800d82c ) 800d7a6: f640 0284 movw r2, #2180 @ 0x884 800d7aa: 4923 ldr r1, [pc, #140] @ (800d838 ) 800d7ac: 4821 ldr r0, [pc, #132] @ (800d834 ) 800d7ae: f005 fe2b bl 8013408 800d7b2: e7e6 b.n 800d782 TCP_RMV(pcblist, pcb); 800d7b4: 68db ldr r3, [r3, #12] 800d7b6: 602b str r3, [r5, #0] 800d7b8: e001 b.n 800d7be 800d7ba: 68e2 ldr r2, [r4, #12] 800d7bc: 60da str r2, [r3, #12] 800d7be: 2300 movs r3, #0 800d7c0: 60e3 str r3, [r4, #12] tcp_pcb_purge(pcb); 800d7c2: 4620 mov r0, r4 800d7c4: f7ff ffa6 bl 800d714 if ((pcb->state != TIME_WAIT) && 800d7c8: 7d23 ldrb r3, [r4, #20] 800d7ca: 2b0a cmp r3, #10 800d7cc: bf18 it ne 800d7ce: 2b01 cmpne r3, #1 800d7d0: d003 beq.n 800d7da (pcb->flags & TF_ACK_DELAY)) { 800d7d2: 8b63 ldrh r3, [r4, #26] (pcb->state != LISTEN) && 800d7d4: f013 0f01 tst.w r3, #1 800d7d8: d121 bne.n 800d81e if (pcb->state != LISTEN) { 800d7da: 7d23 ldrb r3, [r4, #20] 800d7dc: 2b01 cmp r3, #1 800d7de: d01a beq.n 800d816 LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); 800d7e0: 6ee3 ldr r3, [r4, #108] @ 0x6c 800d7e2: b133 cbz r3, 800d7f2 800d7e4: 4b11 ldr r3, [pc, #68] @ (800d82c ) 800d7e6: f640 0293 movw r2, #2195 @ 0x893 800d7ea: 4914 ldr r1, [pc, #80] @ (800d83c ) 800d7ec: 4811 ldr r0, [pc, #68] @ (800d834 ) 800d7ee: f005 fe0b bl 8013408 LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); 800d7f2: 6f23 ldr r3, [r4, #112] @ 0x70 800d7f4: b133 cbz r3, 800d804 800d7f6: 4b0d ldr r3, [pc, #52] @ (800d82c ) 800d7f8: f640 0294 movw r2, #2196 @ 0x894 800d7fc: 4910 ldr r1, [pc, #64] @ (800d840 ) 800d7fe: 480d ldr r0, [pc, #52] @ (800d834 ) 800d800: f005 fe02 bl 8013408 LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); 800d804: 6f63 ldr r3, [r4, #116] @ 0x74 800d806: b133 cbz r3, 800d816 800d808: 4b08 ldr r3, [pc, #32] @ (800d82c ) 800d80a: f640 0296 movw r2, #2198 @ 0x896 800d80e: 490d ldr r1, [pc, #52] @ (800d844 ) 800d810: 4808 ldr r0, [pc, #32] @ (800d834 ) 800d812: f005 fdf9 bl 8013408 pcb->state = CLOSED; 800d816: 2300 movs r3, #0 800d818: 7523 strb r3, [r4, #20] pcb->local_port = 0; 800d81a: 82e3 strh r3, [r4, #22] } 800d81c: bd38 pop {r3, r4, r5, pc} tcp_ack_now(pcb); 800d81e: f043 0302 orr.w r3, r3, #2 800d822: 8363 strh r3, [r4, #26] tcp_output(pcb); 800d824: 4620 mov r0, r4 800d826: f003 fb1d bl 8010e64 800d82a: e7d6 b.n 800d7da 800d82c: 080165b0 .word 0x080165b0 800d830: 080168a0 .word 0x080168a0 800d834: 080144e8 .word 0x080144e8 800d838: 080168bc .word 0x080168bc 800d83c: 080168dc .word 0x080168dc 800d840: 080168f4 .word 0x080168f4 800d844: 08016910 .word 0x08016910 0800d848 : { 800d848: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 800d84c: b084 sub sp, #16 800d84e: 4604 mov r4, r0 800d850: 460d mov r5, r1 LWIP_ASSERT_CORE_LOCKED(); 800d852: f7f6 f95b bl 8003b0c LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return); 800d856: b1ec cbz r4, 800d894 LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", 800d858: 7d23 ldrb r3, [r4, #20] 800d85a: 2b01 cmp r3, #1 800d85c: d022 beq.n 800d8a4 if (pcb->state == TIME_WAIT) { 800d85e: 7d23 ldrb r3, [r4, #20] 800d860: 2b0a cmp r3, #10 800d862: d027 beq.n 800d8b4 seqno = pcb->snd_nxt; 800d864: f8d4 8050 ldr.w r8, [r4, #80] @ 0x50 ackno = pcb->rcv_nxt; 800d868: f8d4 9024 ldr.w r9, [r4, #36] @ 0x24 errf = pcb->errf; 800d86c: f8d4 6090 ldr.w r6, [r4, #144] @ 0x90 errf_arg = pcb->callback_arg; 800d870: 6927 ldr r7, [r4, #16] if (pcb->state == CLOSED) { 800d872: 2b00 cmp r3, #0 800d874: d147 bne.n 800d906 if (pcb->local_port != 0) { 800d876: f8b4 a016 ldrh.w sl, [r4, #22] 800d87a: f1ba 0f00 cmp.w sl, #0 800d87e: d04c beq.n 800d91a TCP_RMV(&tcp_bound_pcbs, pcb); 800d880: 4b2d ldr r3, [pc, #180] @ (800d938 ) 800d882: 681b ldr r3, [r3, #0] 800d884: 42a3 cmp r3, r4 800d886: d01d beq.n 800d8c4 800d888: b313 cbz r3, 800d8d0 800d88a: 68da ldr r2, [r3, #12] 800d88c: 42a2 cmp r2, r4 800d88e: d01d beq.n 800d8cc 800d890: 4613 mov r3, r2 800d892: e7f9 b.n 800d888 LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return); 800d894: 4b29 ldr r3, [pc, #164] @ (800d93c ) 800d896: f240 223d movw r2, #573 @ 0x23d 800d89a: 4929 ldr r1, [pc, #164] @ (800d940 ) 800d89c: 4829 ldr r0, [pc, #164] @ (800d944 ) 800d89e: f005 fdb3 bl 8013408 800d8a2: e02d b.n 800d900 LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", 800d8a4: 4b25 ldr r3, [pc, #148] @ (800d93c ) 800d8a6: f44f 7210 mov.w r2, #576 @ 0x240 800d8aa: 4927 ldr r1, [pc, #156] @ (800d948 ) 800d8ac: 4825 ldr r0, [pc, #148] @ (800d944 ) 800d8ae: f005 fdab bl 8013408 800d8b2: e7d4 b.n 800d85e tcp_pcb_remove(&tcp_tw_pcbs, pcb); 800d8b4: 4621 mov r1, r4 800d8b6: 4825 ldr r0, [pc, #148] @ (800d94c ) 800d8b8: f7ff ff5e bl 800d778 tcp_free(pcb); 800d8bc: 4620 mov r0, r4 800d8be: f7ff fce1 bl 800d284 800d8c2: e01d b.n 800d900 TCP_RMV(&tcp_bound_pcbs, pcb); 800d8c4: 68da ldr r2, [r3, #12] 800d8c6: 4b1c ldr r3, [pc, #112] @ (800d938 ) 800d8c8: 601a str r2, [r3, #0] 800d8ca: e001 b.n 800d8d0 800d8cc: 68e2 ldr r2, [r4, #12] 800d8ce: 60da str r2, [r3, #12] 800d8d0: 2500 movs r5, #0 800d8d2: 60e5 str r5, [r4, #12] u16_t local_port = 0; 800d8d4: 46aa mov sl, r5 if (pcb->unacked != NULL) { 800d8d6: 6f20 ldr r0, [r4, #112] @ 0x70 800d8d8: b108 cbz r0, 800d8de tcp_segs_free(pcb->unacked); 800d8da: f7ff fd74 bl 800d3c6 if (pcb->unsent != NULL) { 800d8de: 6ee0 ldr r0, [r4, #108] @ 0x6c 800d8e0: b108 cbz r0, 800d8e6 tcp_segs_free(pcb->unsent); 800d8e2: f7ff fd70 bl 800d3c6 if (pcb->ooseq != NULL) { 800d8e6: 6f60 ldr r0, [r4, #116] @ 0x74 800d8e8: b108 cbz r0, 800d8ee tcp_segs_free(pcb->ooseq); 800d8ea: f7ff fd6c bl 800d3c6 if (send_rst) { 800d8ee: b9b5 cbnz r5, 800d91e tcp_free(pcb); 800d8f0: 4620 mov r0, r4 800d8f2: f7ff fcc7 bl 800d284 TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); 800d8f6: b11e cbz r6, 800d900 800d8f8: f06f 010c mvn.w r1, #12 800d8fc: 4638 mov r0, r7 800d8fe: 47b0 blx r6 } 800d900: b004 add sp, #16 800d902: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} local_port = pcb->local_port; 800d906: f8b4 a016 ldrh.w sl, [r4, #22] TCP_PCB_REMOVE_ACTIVE(pcb); 800d90a: 4621 mov r1, r4 800d90c: 4810 ldr r0, [pc, #64] @ (800d950 ) 800d90e: f7ff ff33 bl 800d778 800d912: 4b10 ldr r3, [pc, #64] @ (800d954 ) 800d914: 2201 movs r2, #1 800d916: 701a strb r2, [r3, #0] 800d918: e7dd b.n 800d8d6 int send_rst = 0; 800d91a: 2500 movs r5, #0 800d91c: e7db b.n 800d8d6 tcp_rst(pcb, seqno, ackno, &pcb->local_ip, &pcb->remote_ip, local_port, pcb->remote_port); 800d91e: 1d23 adds r3, r4, #4 800d920: 8b22 ldrh r2, [r4, #24] 800d922: 9202 str r2, [sp, #8] 800d924: f8cd a004 str.w sl, [sp, #4] 800d928: 9300 str r3, [sp, #0] 800d92a: 4623 mov r3, r4 800d92c: 464a mov r2, r9 800d92e: 4641 mov r1, r8 800d930: 4620 mov r0, r4 800d932: f003 fa15 bl 8010d60 800d936: e7db b.n 800d8f0 800d938: 24019be0 .word 0x24019be0 800d93c: 080165b0 .word 0x080165b0 800d940: 08016928 .word 0x08016928 800d944: 080144e8 .word 0x080144e8 800d948: 08016944 .word 0x08016944 800d94c: 24019bd4 .word 0x24019bd4 800d950: 24019bd8 .word 0x24019bd8 800d954: 24019bd2 .word 0x24019bd2 0800d958 : { 800d958: b508 push {r3, lr} tcp_abandon(pcb, 1); 800d95a: 2101 movs r1, #1 800d95c: f7ff ff74 bl 800d848 } 800d960: bd08 pop {r3, pc} ... 0800d964 : { 800d964: b508 push {r3, lr} for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 800d966: 4b0a ldr r3, [pc, #40] @ (800d990 ) 800d968: 681b ldr r3, [r3, #0] inactivity = 0; 800d96a: f04f 0c00 mov.w ip, #0 inactive = NULL; 800d96e: 4660 mov r0, ip for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 800d970: e000 b.n 800d974 800d972: 68db ldr r3, [r3, #12] 800d974: b143 cbz r3, 800d988 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 800d976: 6a19 ldr r1, [r3, #32] 800d978: 4a06 ldr r2, [pc, #24] @ (800d994 ) 800d97a: 6812 ldr r2, [r2, #0] 800d97c: 1a52 subs r2, r2, r1 800d97e: 4562 cmp r2, ip 800d980: d3f7 bcc.n 800d972 inactivity = tcp_ticks - pcb->tmr; 800d982: 4694 mov ip, r2 inactive = pcb; 800d984: 4618 mov r0, r3 800d986: e7f4 b.n 800d972 if (inactive != NULL) { 800d988: b108 cbz r0, 800d98e tcp_abort(inactive); 800d98a: f7ff ffe5 bl 800d958 } 800d98e: bd08 pop {r3, pc} 800d990: 24019bd4 .word 0x24019bd4 800d994: 24019be4 .word 0x24019be4 0800d998 : mprio = LWIP_MIN(TCP_PRIO_MAX, prio); 800d998: f010 0f80 tst.w r0, #128 @ 0x80 800d99c: d101 bne.n 800d9a2 if (mprio == 0) { 800d99e: b908 cbnz r0, 800d9a4 800d9a0: 4770 bx lr mprio = LWIP_MIN(TCP_PRIO_MAX, prio); 800d9a2: 207f movs r0, #127 @ 0x7f { 800d9a4: b538 push {r3, r4, r5, lr} mprio--; 800d9a6: 3801 subs r0, #1 800d9a8: b2c2 uxtb r2, r0 for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800d9aa: 4b0f ldr r3, [pc, #60] @ (800d9e8 ) 800d9ac: 681b ldr r3, [r3, #0] inactivity = 0; 800d9ae: f04f 0c00 mov.w ip, #0 inactive = NULL; 800d9b2: 4660 mov r0, ip for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800d9b4: e007 b.n 800d9c6 inactivity = tcp_ticks - pcb->tmr; 800d9b6: 4a0d ldr r2, [pc, #52] @ (800d9ec ) 800d9b8: 6812 ldr r2, [r2, #0] 800d9ba: 6a18 ldr r0, [r3, #32] 800d9bc: eba2 0c00 sub.w ip, r2, r0 mprio = pcb->prio; 800d9c0: 460a mov r2, r1 inactive = pcb; 800d9c2: 4618 mov r0, r3 for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800d9c4: 68db ldr r3, [r3, #12] 800d9c6: b15b cbz r3, 800d9e0 if ((pcb->prio < mprio) || 800d9c8: 7d59 ldrb r1, [r3, #21] 800d9ca: 4291 cmp r1, r2 800d9cc: d3f3 bcc.n 800d9b6 800d9ce: d1f9 bne.n 800d9c4 ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 800d9d0: 4c06 ldr r4, [pc, #24] @ (800d9ec ) 800d9d2: 6824 ldr r4, [r4, #0] 800d9d4: 6a1d ldr r5, [r3, #32] 800d9d6: eba4 0e05 sub.w lr, r4, r5 800d9da: 45e6 cmp lr, ip 800d9dc: d3f2 bcc.n 800d9c4 800d9de: e7ea b.n 800d9b6 if (inactive != NULL) { 800d9e0: b108 cbz r0, 800d9e6 tcp_abort(inactive); 800d9e2: f7ff ffb9 bl 800d958 } 800d9e6: bd38 pop {r3, r4, r5, pc} 800d9e8: 24019bd8 .word 0x24019bd8 800d9ec: 24019be4 .word 0x24019be4 0800d9f0 : { 800d9f0: b570 push {r4, r5, r6, lr} 800d9f2: 460c mov r4, r1 LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL); 800d9f4: 4605 mov r5, r0 800d9f6: b960 cbnz r0, 800da12 800d9f8: 4b0a ldr r3, [pc, #40] @ (800da24 ) 800d9fa: f44f 6210 mov.w r2, #2304 @ 0x900 800d9fe: 490a ldr r1, [pc, #40] @ (800da28 ) 800da00: 480a ldr r0, [pc, #40] @ (800da2c ) 800da02: f005 fd01 bl 8013408 800da06: e004 b.n 800da12 struct tcp_pcb *next = pcb->next; 800da08: 68e6 ldr r6, [r4, #12] tcp_abort(pcb); 800da0a: 4620 mov r0, r4 800da0c: f7ff ffa4 bl 800d958 pcb = next; 800da10: 4634 mov r4, r6 while (pcb != NULL) { 800da12: b12c cbz r4, 800da20 if (ip_addr_cmp(&pcb->local_ip, old_addr) 800da14: 6822 ldr r2, [r4, #0] 800da16: 682b ldr r3, [r5, #0] 800da18: 429a cmp r2, r3 800da1a: d0f5 beq.n 800da08 pcb = pcb->next; 800da1c: 68e4 ldr r4, [r4, #12] 800da1e: e7f8 b.n 800da12 } 800da20: bd70 pop {r4, r5, r6, pc} 800da22: bf00 nop 800da24: 080165b0 .word 0x080165b0 800da28: 08016978 .word 0x08016978 800da2c: 080144e8 .word 0x080144e8 0800da30 : if (!ip_addr_isany(old_addr)) { 800da30: b300 cbz r0, 800da74 { 800da32: b538 push {r3, r4, r5, lr} 800da34: 460d mov r5, r1 800da36: 4604 mov r4, r0 if (!ip_addr_isany(old_addr)) { 800da38: 6803 ldr r3, [r0, #0] 800da3a: b903 cbnz r3, 800da3e } 800da3c: bd38 pop {r3, r4, r5, pc} tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); 800da3e: 4b0e ldr r3, [pc, #56] @ (800da78 ) 800da40: 6819 ldr r1, [r3, #0] 800da42: f7ff ffd5 bl 800d9f0 tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); 800da46: 4b0d ldr r3, [pc, #52] @ (800da7c ) 800da48: 6819 ldr r1, [r3, #0] 800da4a: 4620 mov r0, r4 800da4c: f7ff ffd0 bl 800d9f0 if (!ip_addr_isany(new_addr)) { 800da50: 2d00 cmp r5, #0 800da52: d0f3 beq.n 800da3c 800da54: 682b ldr r3, [r5, #0] 800da56: 2b00 cmp r3, #0 800da58: d0f0 beq.n 800da3c for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 800da5a: 4b09 ldr r3, [pc, #36] @ (800da80 ) 800da5c: 681b ldr r3, [r3, #0] 800da5e: e000 b.n 800da62 800da60: 68db ldr r3, [r3, #12] 800da62: 2b00 cmp r3, #0 800da64: d0ea beq.n 800da3c if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { 800da66: 6819 ldr r1, [r3, #0] 800da68: 6822 ldr r2, [r4, #0] 800da6a: 4291 cmp r1, r2 800da6c: d1f8 bne.n 800da60 ip_addr_copy(lpcb->local_ip, *new_addr); 800da6e: 682a ldr r2, [r5, #0] 800da70: 601a str r2, [r3, #0] 800da72: e7f5 b.n 800da60 800da74: 4770 bx lr 800da76: bf00 nop 800da78: 24019bd8 .word 0x24019bd8 800da7c: 24019be0 .word 0x24019be0 800da80: 24019bdc .word 0x24019bdc 0800da84 : { 800da84: b538 push {r3, r4, r5, lr} 800da86: 4604 mov r4, r0 LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); 800da88: f1a0 0308 sub.w r3, r0, #8 800da8c: b2db uxtb r3, r3 800da8e: 2b01 cmp r3, #1 800da90: d804 bhi.n 800da9c for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800da92: 4b10 ldr r3, [pc, #64] @ (800dad4 ) 800da94: 681b ldr r3, [r3, #0] inactivity = 0; 800da96: 2100 movs r1, #0 inactive = NULL; 800da98: 4608 mov r0, r1 for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800da9a: e008 b.n 800daae LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); 800da9c: 4b0e ldr r3, [pc, #56] @ (800dad8 ) 800da9e: f240 62dd movw r2, #1757 @ 0x6dd 800daa2: 490e ldr r1, [pc, #56] @ (800dadc ) 800daa4: 480e ldr r0, [pc, #56] @ (800dae0 ) 800daa6: f005 fcaf bl 8013408 800daaa: e7f2 b.n 800da92 for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800daac: 68db ldr r3, [r3, #12] 800daae: b15b cbz r3, 800dac8 if (pcb->state == state) { 800dab0: 7d1a ldrb r2, [r3, #20] 800dab2: 42a2 cmp r2, r4 800dab4: d1fa bne.n 800daac if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 800dab6: 4a0b ldr r2, [pc, #44] @ (800dae4 ) 800dab8: 6812 ldr r2, [r2, #0] 800daba: 6a1d ldr r5, [r3, #32] 800dabc: 1b52 subs r2, r2, r5 800dabe: 428a cmp r2, r1 800dac0: d3f4 bcc.n 800daac inactivity = tcp_ticks - pcb->tmr; 800dac2: 4611 mov r1, r2 inactive = pcb; 800dac4: 4618 mov r0, r3 800dac6: e7f1 b.n 800daac if (inactive != NULL) { 800dac8: b110 cbz r0, 800dad0 tcp_abandon(inactive, 0); 800daca: 2100 movs r1, #0 800dacc: f7ff febc bl 800d848 } 800dad0: bd38 pop {r3, r4, r5, pc} 800dad2: bf00 nop 800dad4: 24019bd8 .word 0x24019bd8 800dad8: 080165b0 .word 0x080165b0 800dadc: 080169ac .word 0x080169ac 800dae0: 080144e8 .word 0x080144e8 800dae4: 24019be4 .word 0x24019be4 0800dae8 : { 800dae8: b538 push {r3, r4, r5, lr} 800daea: 4605 mov r5, r0 LWIP_ASSERT_CORE_LOCKED(); 800daec: f7f6 f80e bl 8003b0c pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 800daf0: 2001 movs r0, #1 800daf2: f7fd fd87 bl 800b604 if (pcb == NULL) { 800daf6: 4604 mov r4, r0 800daf8: b350 cbz r0, 800db50 memset(pcb, 0, sizeof(struct tcp_pcb)); 800dafa: 229c movs r2, #156 @ 0x9c 800dafc: 2100 movs r1, #0 800dafe: 4620 mov r0, r4 800db00: f005 fdda bl 80136b8 pcb->prio = prio; 800db04: 7565 strb r5, [r4, #21] pcb->snd_buf = TCP_SND_BUF; 800db06: f241 63d0 movw r3, #5840 @ 0x16d0 800db0a: f8a4 3064 strh.w r3, [r4, #100] @ 0x64 pcb->rcv_wnd = pcb->rcv_ann_wnd = TCPWND_MIN16(TCP_WND); 800db0e: 8563 strh r3, [r4, #42] @ 0x2a 800db10: 8523 strh r3, [r4, #40] @ 0x28 pcb->ttl = TCP_TTL; 800db12: 22ff movs r2, #255 @ 0xff 800db14: 72e2 strb r2, [r4, #11] pcb->mss = INITIAL_MSS; 800db16: f44f 7206 mov.w r2, #536 @ 0x218 800db1a: 8662 strh r2, [r4, #50] @ 0x32 pcb->rto = 3000 / TCP_SLOW_INTERVAL; 800db1c: 2206 movs r2, #6 800db1e: f8a4 2040 strh.w r2, [r4, #64] @ 0x40 pcb->sv = 3000 / TCP_SLOW_INTERVAL; 800db22: 87e2 strh r2, [r4, #62] @ 0x3e pcb->rtime = -1; 800db24: f64f 72ff movw r2, #65535 @ 0xffff 800db28: 8622 strh r2, [r4, #48] @ 0x30 pcb->cwnd = 1; 800db2a: 2201 movs r2, #1 800db2c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48 pcb->tmr = tcp_ticks; 800db30: 4a1a ldr r2, [pc, #104] @ (800db9c ) 800db32: 6812 ldr r2, [r2, #0] 800db34: 6222 str r2, [r4, #32] pcb->last_timer = tcp_timer_ctr; 800db36: 4a1a ldr r2, [pc, #104] @ (800dba0 ) 800db38: 7812 ldrb r2, [r2, #0] 800db3a: 77a2 strb r2, [r4, #30] pcb->ssthresh = TCP_SND_BUF; 800db3c: f8a4 304a strh.w r3, [r4, #74] @ 0x4a pcb->recv = tcp_recv_null; 800db40: 4b18 ldr r3, [pc, #96] @ (800dba4 ) 800db42: f8c4 3084 str.w r3, [r4, #132] @ 0x84 pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 800db46: 4b18 ldr r3, [pc, #96] @ (800dba8 ) 800db48: f8c4 3094 str.w r3, [r4, #148] @ 0x94 } 800db4c: 4620 mov r0, r4 800db4e: bd38 pop {r3, r4, r5, pc} tcp_handle_closepend(); 800db50: f7ff fb76 bl 800d240 tcp_kill_timewait(); 800db54: f7ff ff06 bl 800d964 pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 800db58: 2001 movs r0, #1 800db5a: f7fd fd53 bl 800b604 if (pcb == NULL) { 800db5e: 4604 mov r4, r0 800db60: 2800 cmp r0, #0 800db62: d1ca bne.n 800dafa tcp_kill_state(LAST_ACK); 800db64: 2009 movs r0, #9 800db66: f7ff ff8d bl 800da84 pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 800db6a: 2001 movs r0, #1 800db6c: f7fd fd4a bl 800b604 if (pcb == NULL) { 800db70: 4604 mov r4, r0 800db72: 2800 cmp r0, #0 800db74: d1c1 bne.n 800dafa tcp_kill_state(CLOSING); 800db76: 2008 movs r0, #8 800db78: f7ff ff84 bl 800da84 pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 800db7c: 2001 movs r0, #1 800db7e: f7fd fd41 bl 800b604 if (pcb == NULL) { 800db82: 4604 mov r4, r0 800db84: 2800 cmp r0, #0 800db86: d1b8 bne.n 800dafa tcp_kill_prio(prio); 800db88: 4628 mov r0, r5 800db8a: f7ff ff05 bl 800d998 pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 800db8e: 2001 movs r0, #1 800db90: f7fd fd38 bl 800b604 if (pcb != NULL) { 800db94: 4604 mov r4, r0 800db96: 2800 cmp r0, #0 800db98: d1af bne.n 800dafa 800db9a: e7d7 b.n 800db4c 800db9c: 24019be4 .word 0x24019be4 800dba0: 24019bd0 .word 0x24019bd0 800dba4: 0800dd49 .word 0x0800dd49 800dba8: 006ddd00 .word 0x006ddd00 0800dbac : { 800dbac: b508 push {r3, lr} pcb = tcp_alloc(TCP_PRIO_NORMAL); 800dbae: 2040 movs r0, #64 @ 0x40 800dbb0: f7ff ff9a bl 800dae8 } 800dbb4: bd08 pop {r3, pc} ... 0800dbb8 : { 800dbb8: b530 push {r4, r5, lr} 800dbba: b085 sub sp, #20 800dbbc: 460d mov r5, r1 LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL); 800dbbe: 4604 mov r4, r0 800dbc0: b328 cbz r0, 800dc0e if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 800dbc2: 2d00 cmp r5, #0 800dbc4: d030 beq.n 800dc28 800dbc6: 7d23 ldrb r3, [r4, #20] 800dbc8: 2b07 cmp r3, #7 800dbca: bf18 it ne 800dbcc: 2b04 cmpne r3, #4 800dbce: d12b bne.n 800dc28 if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { 800dbd0: 6fa3 ldr r3, [r4, #120] @ 0x78 800dbd2: b323 cbz r3, 800dc1e LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); 800dbd4: 8b63 ldrh r3, [r4, #26] 800dbd6: f013 0f10 tst.w r3, #16 800dbda: d02f beq.n 800dc3c tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 800dbdc: 1d23 adds r3, r4, #4 800dbde: 8b22 ldrh r2, [r4, #24] 800dbe0: 9202 str r2, [sp, #8] 800dbe2: 8ae2 ldrh r2, [r4, #22] 800dbe4: 9201 str r2, [sp, #4] 800dbe6: 9300 str r3, [sp, #0] 800dbe8: 4623 mov r3, r4 800dbea: 6a62 ldr r2, [r4, #36] @ 0x24 800dbec: 6d21 ldr r1, [r4, #80] @ 0x50 800dbee: 4620 mov r0, r4 800dbf0: f003 f8b6 bl 8010d60 tcp_pcb_purge(pcb); 800dbf4: 4620 mov r0, r4 800dbf6: f7ff fd8d bl 800d714 TCP_RMV_ACTIVE(pcb); 800dbfa: 4b39 ldr r3, [pc, #228] @ (800dce0 ) 800dbfc: 681b ldr r3, [r3, #0] 800dbfe: 42a3 cmp r3, r4 800dc00: d024 beq.n 800dc4c 800dc02: b34b cbz r3, 800dc58 800dc04: 68da ldr r2, [r3, #12] 800dc06: 42a2 cmp r2, r4 800dc08: d024 beq.n 800dc54 800dc0a: 4613 mov r3, r2 800dc0c: e7f9 b.n 800dc02 LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL); 800dc0e: 4b35 ldr r3, [pc, #212] @ (800dce4 ) 800dc10: f44f 72af mov.w r2, #350 @ 0x15e 800dc14: 4934 ldr r1, [pc, #208] @ (800dce8 ) 800dc16: 4835 ldr r0, [pc, #212] @ (800dcec ) 800dc18: f005 fbf6 bl 8013408 800dc1c: e7d1 b.n 800dbc2 if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { 800dc1e: 8d22 ldrh r2, [r4, #40] @ 0x28 800dc20: f241 63d0 movw r3, #5840 @ 0x16d0 800dc24: 429a cmp r2, r3 800dc26: d1d5 bne.n 800dbd4 switch (pcb->state) { 800dc28: 7d23 ldrb r3, [r4, #20] 800dc2a: 2b01 cmp r3, #1 800dc2c: d03f beq.n 800dcae 800dc2e: 2b02 cmp r3, #2 800dc30: d049 beq.n 800dcc6 800dc32: b313 cbz r3, 800dc7a return tcp_close_shutdown_fin(pcb); 800dc34: 4620 mov r0, r4 800dc36: f7ff fac3 bl 800d1c0 800dc3a: e036 b.n 800dcaa LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); 800dc3c: 4b29 ldr r3, [pc, #164] @ (800dce4 ) 800dc3e: f44f 72b2 mov.w r2, #356 @ 0x164 800dc42: 492b ldr r1, [pc, #172] @ (800dcf0 ) 800dc44: 4829 ldr r0, [pc, #164] @ (800dcec ) 800dc46: f005 fbdf bl 8013408 800dc4a: e7c7 b.n 800dbdc TCP_RMV_ACTIVE(pcb); 800dc4c: 68da ldr r2, [r3, #12] 800dc4e: 4b24 ldr r3, [pc, #144] @ (800dce0 ) 800dc50: 601a str r2, [r3, #0] 800dc52: e001 b.n 800dc58 800dc54: 68e2 ldr r2, [r4, #12] 800dc56: 60da str r2, [r3, #12] 800dc58: 2300 movs r3, #0 800dc5a: 60e3 str r3, [r4, #12] 800dc5c: 4b25 ldr r3, [pc, #148] @ (800dcf4 ) 800dc5e: 2201 movs r2, #1 800dc60: 701a strb r2, [r3, #0] if (tcp_input_pcb == pcb) { 800dc62: 4b25 ldr r3, [pc, #148] @ (800dcf8 ) 800dc64: 681b ldr r3, [r3, #0] 800dc66: 42a3 cmp r3, r4 800dc68: d004 beq.n 800dc74 tcp_free(pcb); 800dc6a: 4620 mov r0, r4 800dc6c: f7ff fb0a bl 800d284 return ERR_OK; 800dc70: 2000 movs r0, #0 800dc72: e01a b.n 800dcaa tcp_trigger_input_pcb_close(); 800dc74: f002 f83e bl 800fcf4 800dc78: e7fa b.n 800dc70 if (pcb->local_port != 0) { 800dc7a: 8ae3 ldrh r3, [r4, #22] 800dc7c: b18b cbz r3, 800dca2 TCP_RMV(&tcp_bound_pcbs, pcb); 800dc7e: 4b1f ldr r3, [pc, #124] @ (800dcfc ) 800dc80: 681b ldr r3, [r3, #0] 800dc82: 42a3 cmp r3, r4 800dc84: d005 beq.n 800dc92 800dc86: b153 cbz r3, 800dc9e 800dc88: 68da ldr r2, [r3, #12] 800dc8a: 42a2 cmp r2, r4 800dc8c: d005 beq.n 800dc9a 800dc8e: 4613 mov r3, r2 800dc90: e7f9 b.n 800dc86 800dc92: 68da ldr r2, [r3, #12] 800dc94: 4b19 ldr r3, [pc, #100] @ (800dcfc ) 800dc96: 601a str r2, [r3, #0] 800dc98: e001 b.n 800dc9e 800dc9a: 68e2 ldr r2, [r4, #12] 800dc9c: 60da str r2, [r3, #12] 800dc9e: 2300 movs r3, #0 800dca0: 60e3 str r3, [r4, #12] tcp_free(pcb); 800dca2: 4620 mov r0, r4 800dca4: f7ff faee bl 800d284 return ERR_OK; 800dca8: 2000 movs r0, #0 } 800dcaa: b005 add sp, #20 800dcac: bd30 pop {r4, r5, pc} tcp_listen_closed(pcb); 800dcae: 4620 mov r0, r4 800dcb0: f7ff fa40 bl 800d134 tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 800dcb4: 4621 mov r1, r4 800dcb6: 4812 ldr r0, [pc, #72] @ (800dd00 ) 800dcb8: f7ff fd5e bl 800d778 tcp_free_listen(pcb); 800dcbc: 4620 mov r0, r4 800dcbe: f7ff fa67 bl 800d190 return ERR_OK; 800dcc2: 2000 movs r0, #0 break; 800dcc4: e7f1 b.n 800dcaa TCP_PCB_REMOVE_ACTIVE(pcb); 800dcc6: 4621 mov r1, r4 800dcc8: 4805 ldr r0, [pc, #20] @ (800dce0 ) 800dcca: f7ff fd55 bl 800d778 800dcce: 4b09 ldr r3, [pc, #36] @ (800dcf4 ) 800dcd0: 2201 movs r2, #1 800dcd2: 701a strb r2, [r3, #0] tcp_free(pcb); 800dcd4: 4620 mov r0, r4 800dcd6: f7ff fad5 bl 800d284 return ERR_OK; 800dcda: 2000 movs r0, #0 break; 800dcdc: e7e5 b.n 800dcaa 800dcde: bf00 nop 800dce0: 24019bd8 .word 0x24019bd8 800dce4: 080165b0 .word 0x080165b0 800dce8: 080169bc .word 0x080169bc 800dcec: 080144e8 .word 0x080144e8 800dcf0: 080169dc .word 0x080169dc 800dcf4: 24019bd2 .word 0x24019bd2 800dcf8: 24019be8 .word 0x24019be8 800dcfc: 24019be0 .word 0x24019be0 800dd00: 24019bdc .word 0x24019bdc 0800dd04 : { 800dd04: b510 push {r4, lr} 800dd06: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 800dd08: f7f5 ff00 bl 8003b0c LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG); 800dd0c: b15c cbz r4, 800dd26 if (pcb->state != LISTEN) { 800dd0e: 7d23 ldrb r3, [r4, #20] 800dd10: 2b01 cmp r3, #1 800dd12: d003 beq.n 800dd1c tcp_set_flags(pcb, TF_RXCLOSED); 800dd14: 8b63 ldrh r3, [r4, #26] 800dd16: f043 0310 orr.w r3, r3, #16 800dd1a: 8363 strh r3, [r4, #26] return tcp_close_shutdown(pcb, 1); 800dd1c: 2101 movs r1, #1 800dd1e: 4620 mov r0, r4 800dd20: f7ff ff4a bl 800dbb8 } 800dd24: bd10 pop {r4, pc} LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG); 800dd26: 4b05 ldr r3, [pc, #20] @ (800dd3c ) 800dd28: f44f 72f4 mov.w r2, #488 @ 0x1e8 800dd2c: 4904 ldr r1, [pc, #16] @ (800dd40 ) 800dd2e: 4805 ldr r0, [pc, #20] @ (800dd44 ) 800dd30: f005 fb6a bl 8013408 800dd34: f06f 000f mvn.w r0, #15 800dd38: e7f4 b.n 800dd24 800dd3a: bf00 nop 800dd3c: 080165b0 .word 0x080165b0 800dd40: 080169f8 .word 0x080169f8 800dd44: 080144e8 .word 0x080144e8 0800dd48 : { 800dd48: b510 push {r4, lr} LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG); 800dd4a: b151 cbz r1, 800dd62 800dd4c: 4614 mov r4, r2 800dd4e: 4608 mov r0, r1 if (p != NULL) { 800dd50: b18a cbz r2, 800dd76 tcp_recved(pcb, p->tot_len); 800dd52: 8911 ldrh r1, [r2, #8] 800dd54: f7ff faea bl 800d32c pbuf_free(p); 800dd58: 4620 mov r0, r4 800dd5a: f7fe f821 bl 800bda0 return ERR_OK; 800dd5e: 2000 movs r0, #0 } 800dd60: bd10 pop {r4, pc} LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG); 800dd62: 4b08 ldr r3, [pc, #32] @ (800dd84 ) 800dd64: f44f 62d3 mov.w r2, #1688 @ 0x698 800dd68: 4907 ldr r1, [pc, #28] @ (800dd88 ) 800dd6a: 4808 ldr r0, [pc, #32] @ (800dd8c ) 800dd6c: f005 fb4c bl 8013408 800dd70: f06f 000f mvn.w r0, #15 800dd74: e7f4 b.n 800dd60 } else if (err == ERR_OK) { 800dd76: b10b cbz r3, 800dd7c return ERR_OK; 800dd78: 2000 movs r0, #0 800dd7a: e7f1 b.n 800dd60 return tcp_close(pcb); 800dd7c: f7ff ffc2 bl 800dd04 800dd80: e7ee b.n 800dd60 800dd82: bf00 nop 800dd84: 080165b0 .word 0x080165b0 800dd88: 08016a10 .word 0x08016a10 800dd8c: 080144e8 .word 0x080144e8 0800dd90 : { 800dd90: b5f8 push {r3, r4, r5, r6, r7, lr} LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG); 800dd92: b320 cbz r0, 800ddde 800dd94: 4604 mov r4, r0 u8_t refused_flags = pcb->refused_data->flags; 800dd96: 6f86 ldr r6, [r0, #120] @ 0x78 800dd98: 7b77 ldrb r7, [r6, #13] pcb->refused_data = NULL; 800dd9a: 2300 movs r3, #0 800dd9c: 6783 str r3, [r0, #120] @ 0x78 TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); 800dd9e: f8d0 5084 ldr.w r5, [r0, #132] @ 0x84 800dda2: b335 cbz r5, 800ddf2 800dda4: 4632 mov r2, r6 800dda6: 4601 mov r1, r0 800dda8: 6900 ldr r0, [r0, #16] 800ddaa: 47a8 blx r5 800ddac: 4605 mov r5, r0 if (err == ERR_OK) { 800ddae: bb45 cbnz r5, 800de02 if ((refused_flags & PBUF_FLAG_TCP_FIN) 800ddb0: f017 0f20 tst.w r7, #32 800ddb4: d02b beq.n 800de0e if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { 800ddb6: 8d23 ldrh r3, [r4, #40] @ 0x28 800ddb8: f241 62d0 movw r2, #5840 @ 0x16d0 800ddbc: 4293 cmp r3, r2 800ddbe: d001 beq.n 800ddc4 pcb->rcv_wnd++; 800ddc0: 3301 adds r3, #1 800ddc2: 8523 strh r3, [r4, #40] @ 0x28 TCP_EVENT_CLOSED(pcb, err); 800ddc4: f8d4 6084 ldr.w r6, [r4, #132] @ 0x84 800ddc8: b30e cbz r6, 800de0e 800ddca: 2300 movs r3, #0 800ddcc: 461a mov r2, r3 800ddce: 4621 mov r1, r4 800ddd0: 6920 ldr r0, [r4, #16] 800ddd2: 47b0 blx r6 if (err == ERR_ABRT) { 800ddd4: f110 0f0d cmn.w r0, #13 800ddd8: d119 bne.n 800de0e return ERR_ABRT; 800ddda: 4605 mov r5, r0 800dddc: e017 b.n 800de0e LWIP_ERROR("tcp_process_refused_data: invalid pcb", pcb != NULL, return ERR_ARG); 800ddde: 4b0d ldr r3, [pc, #52] @ (800de14 ) 800dde0: f240 6209 movw r2, #1545 @ 0x609 800dde4: 490c ldr r1, [pc, #48] @ (800de18 ) 800dde6: 480d ldr r0, [pc, #52] @ (800de1c ) 800dde8: f005 fb0e bl 8013408 800ddec: f06f 050f mvn.w r5, #15 800ddf0: e00d b.n 800de0e TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); 800ddf2: 2300 movs r3, #0 800ddf4: 4632 mov r2, r6 800ddf6: 4601 mov r1, r0 800ddf8: 4618 mov r0, r3 800ddfa: f7ff ffa5 bl 800dd48 800ddfe: 4605 mov r5, r0 800de00: e7d5 b.n 800ddae } else if (err == ERR_ABRT) { 800de02: f115 0f0d cmn.w r5, #13 800de06: d002 beq.n 800de0e pcb->refused_data = refused_data; 800de08: 67a6 str r6, [r4, #120] @ 0x78 return ERR_INPROGRESS; 800de0a: f06f 0504 mvn.w r5, #4 } 800de0e: 4628 mov r0, r5 800de10: bdf8 pop {r3, r4, r5, r6, r7, pc} 800de12: bf00 nop 800de14: 080165b0 .word 0x080165b0 800de18: 08016a2c .word 0x08016a2c 800de1c: 080144e8 .word 0x080144e8 0800de20 : { 800de20: b570 push {r4, r5, r6, lr} ++tcp_timer_ctr; 800de22: 4a1c ldr r2, [pc, #112] @ (800de94 ) 800de24: 7813 ldrb r3, [r2, #0] 800de26: 3301 adds r3, #1 800de28: 7013 strb r3, [r2, #0] pcb = tcp_active_pcbs; 800de2a: 4b1b ldr r3, [pc, #108] @ (800de98 ) 800de2c: 681c ldr r4, [r3, #0] while (pcb != NULL) { 800de2e: e013 b.n 800de58 tcp_ack_now(pcb); 800de30: f043 0302 orr.w r3, r3, #2 800de34: 8363 strh r3, [r4, #26] tcp_output(pcb); 800de36: 4620 mov r0, r4 800de38: f003 f814 bl 8010e64 tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 800de3c: 8b63 ldrh r3, [r4, #26] 800de3e: f023 0303 bic.w r3, r3, #3 800de42: 8363 strh r3, [r4, #26] 800de44: e013 b.n 800de6e tcp_clear_flags(pcb, TF_CLOSEPEND); 800de46: f023 0308 bic.w r3, r3, #8 800de4a: 8363 strh r3, [r4, #26] tcp_close_shutdown_fin(pcb); 800de4c: 4620 mov r0, r4 800de4e: f7ff f9b7 bl 800d1c0 800de52: e010 b.n 800de76 pcb = pcb->next; 800de54: 68e5 ldr r5, [r4, #12] { 800de56: 462c mov r4, r5 while (pcb != NULL) { 800de58: b1dc cbz r4, 800de92 if (pcb->last_timer != tcp_timer_ctr) { 800de5a: 7fa2 ldrb r2, [r4, #30] 800de5c: 4b0d ldr r3, [pc, #52] @ (800de94 ) 800de5e: 781b ldrb r3, [r3, #0] 800de60: 429a cmp r2, r3 800de62: d0f7 beq.n 800de54 pcb->last_timer = tcp_timer_ctr; 800de64: 77a3 strb r3, [r4, #30] if (pcb->flags & TF_ACK_DELAY) { 800de66: 8b63 ldrh r3, [r4, #26] 800de68: f013 0f01 tst.w r3, #1 800de6c: d1e0 bne.n 800de30 if (pcb->flags & TF_CLOSEPEND) { 800de6e: 8b63 ldrh r3, [r4, #26] 800de70: f013 0f08 tst.w r3, #8 800de74: d1e7 bne.n 800de46 next = pcb->next; 800de76: 68e5 ldr r5, [r4, #12] if (pcb->refused_data != NULL) { 800de78: 6fa3 ldr r3, [r4, #120] @ 0x78 800de7a: 2b00 cmp r3, #0 800de7c: d0eb beq.n 800de56 tcp_active_pcbs_changed = 0; 800de7e: 4e07 ldr r6, [pc, #28] @ (800de9c ) 800de80: 2300 movs r3, #0 800de82: 7033 strb r3, [r6, #0] tcp_process_refused_data(pcb); 800de84: 4620 mov r0, r4 800de86: f7ff ff83 bl 800dd90 if (tcp_active_pcbs_changed) { 800de8a: 7833 ldrb r3, [r6, #0] 800de8c: 2b00 cmp r3, #0 800de8e: d0e2 beq.n 800de56 800de90: e7cb b.n 800de2a } 800de92: bd70 pop {r4, r5, r6, pc} 800de94: 24019bd0 .word 0x24019bd0 800de98: 24019bd8 .word 0x24019bd8 800de9c: 24019bd2 .word 0x24019bd2 0800dea0 : { 800dea0: b570 push {r4, r5, r6, lr} 800dea2: 4604 mov r4, r0 800dea4: 460d mov r5, r1 800dea6: 4616 mov r6, r2 LWIP_ASSERT_CORE_LOCKED(); 800dea8: f7f5 fe30 bl 8003b0c LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG); 800deac: b1bc cbz r4, 800dede if (pcb->state == LISTEN) { 800deae: 7d23 ldrb r3, [r4, #20] 800deb0: 2b01 cmp r3, #1 800deb2: d02a beq.n 800df0a if (shut_rx) { 800deb4: b155 cbz r5, 800decc tcp_set_flags(pcb, TF_RXCLOSED); 800deb6: 8b63 ldrh r3, [r4, #26] 800deb8: f043 0310 orr.w r3, r3, #16 800debc: 8363 strh r3, [r4, #26] if (shut_tx) { 800debe: b9c6 cbnz r6, 800def2 if (pcb->refused_data != NULL) { 800dec0: 6fa0 ldr r0, [r4, #120] @ 0x78 800dec2: b118 cbz r0, 800decc pbuf_free(pcb->refused_data); 800dec4: f7fd ff6c bl 800bda0 pcb->refused_data = NULL; 800dec8: 2300 movs r3, #0 800deca: 67a3 str r3, [r4, #120] @ 0x78 if (shut_tx) { 800decc: b306 cbz r6, 800df10 switch (pcb->state) { 800dece: 7d23 ldrb r3, [r4, #20] 800ded0: 2b04 cmp r3, #4 800ded2: d813 bhi.n 800defc 800ded4: 2b03 cmp r3, #3 800ded6: d213 bcs.n 800df00 800ded8: f06f 000a mvn.w r0, #10 800dedc: e019 b.n 800df12 LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG); 800dede: 4b0f ldr r3, [pc, #60] @ (800df1c ) 800dee0: f240 2207 movw r2, #519 @ 0x207 800dee4: 490e ldr r1, [pc, #56] @ (800df20 ) 800dee6: 480f ldr r0, [pc, #60] @ (800df24 ) 800dee8: f005 fa8e bl 8013408 800deec: f06f 000f mvn.w r0, #15 800def0: e00f b.n 800df12 return tcp_close_shutdown(pcb, 1); 800def2: 2101 movs r1, #1 800def4: 4620 mov r0, r4 800def6: f7ff fe5f bl 800dbb8 800defa: e00a b.n 800df12 switch (pcb->state) { 800defc: 2b07 cmp r3, #7 800defe: d109 bne.n 800df14 return tcp_close_shutdown(pcb, (u8_t)shut_rx); 800df00: b2e9 uxtb r1, r5 800df02: 4620 mov r0, r4 800df04: f7ff fe58 bl 800dbb8 800df08: e003 b.n 800df12 return ERR_CONN; 800df0a: f06f 000a mvn.w r0, #10 800df0e: e000 b.n 800df12 return ERR_OK; 800df10: 2000 movs r0, #0 } 800df12: bd70 pop {r4, r5, r6, pc} switch (pcb->state) { 800df14: f06f 000a mvn.w r0, #10 800df18: e7fb b.n 800df12 800df1a: bf00 nop 800df1c: 080165b0 .word 0x080165b0 800df20: 08016a54 .word 0x08016a54 800df24: 080144e8 .word 0x080144e8 0800df28 : { 800df28: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800df2c: b084 sub sp, #16 ++tcp_ticks; 800df2e: 4a99 ldr r2, [pc, #612] @ (800e194 ) 800df30: 6813 ldr r3, [r2, #0] 800df32: 3301 adds r3, #1 800df34: 6013 str r3, [r2, #0] ++tcp_timer_ctr; 800df36: 4a98 ldr r2, [pc, #608] @ (800e198 ) 800df38: 7813 ldrb r3, [r2, #0] 800df3a: 3301 adds r3, #1 800df3c: 7013 strb r3, [r2, #0] pcb = tcp_active_pcbs; 800df3e: 4b97 ldr r3, [pc, #604] @ (800e19c ) 800df40: 681c ldr r4, [r3, #0] prev = NULL; 800df42: 2500 movs r5, #0 800df44: e193 b.n 800e26e LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); 800df46: 4b96 ldr r3, [pc, #600] @ (800e1a0 ) 800df48: f240 42be movw r2, #1214 @ 0x4be 800df4c: 4995 ldr r1, [pc, #596] @ (800e1a4 ) 800df4e: 4896 ldr r0, [pc, #600] @ (800e1a8 ) 800df50: f005 fa5a bl 8013408 800df54: e191 b.n 800e27a LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); 800df56: 4b92 ldr r3, [pc, #584] @ (800e1a0 ) 800df58: f240 42bf movw r2, #1215 @ 0x4bf 800df5c: 4993 ldr r1, [pc, #588] @ (800e1ac ) 800df5e: 4892 ldr r0, [pc, #584] @ (800e1a8 ) 800df60: f005 fa52 bl 8013408 800df64: e18d b.n 800e282 LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); 800df66: 4b8e ldr r3, [pc, #568] @ (800e1a0 ) 800df68: f44f 6298 mov.w r2, #1216 @ 0x4c0 800df6c: 4990 ldr r1, [pc, #576] @ (800e1b0 ) 800df6e: 488e ldr r0, [pc, #568] @ (800e1a8 ) 800df70: f005 fa4a bl 8013408 800df74: e189 b.n 800e28a prev = pcb; 800df76: 4625 mov r5, r4 pcb = pcb->next; 800df78: 68e4 ldr r4, [r4, #12] continue; 800df7a: e178 b.n 800e26e if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { 800df7c: f894 3042 ldrb.w r3, [r4, #66] @ 0x42 800df80: 2b05 cmp r3, #5 800df82: f240 818d bls.w 800e2a0 ++pcb_remove; 800df86: 2601 movs r6, #1 800df88: e06e b.n 800e068 LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL); 800df8a: 4b85 ldr r3, [pc, #532] @ (800e1a0 ) 800df8c: f240 42d5 movw r2, #1237 @ 0x4d5 800df90: 4988 ldr r1, [pc, #544] @ (800e1b4 ) 800df92: 4885 ldr r0, [pc, #532] @ (800e1a8 ) 800df94: f005 fa38 bl 8013408 800df98: e199 b.n 800e2ce if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) { 800df9a: 4620 mov r0, r4 800df9c: f002 fc4e bl 801083c 800dfa0: b158 cbz r0, 800dfba pcb->persist_cnt = 0; 800dfa2: 2300 movs r3, #0 800dfa4: f884 3098 strb.w r3, [r4, #152] @ 0x98 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 800dfa8: f894 3099 ldrb.w r3, [r4, #153] @ 0x99 800dfac: 2b06 cmp r3, #6 800dfae: d87c bhi.n 800e0aa pcb->persist_backoff++; 800dfb0: 3301 adds r3, #1 800dfb2: f884 3099 strb.w r3, [r4, #153] @ 0x99 pcb_remove = 0; 800dfb6: 2600 movs r6, #0 800dfb8: e056 b.n 800e068 if (tcp_output(pcb) == ERR_OK) { 800dfba: 4620 mov r0, r4 800dfbc: f002 ff52 bl 8010e64 800dfc0: 2800 cmp r0, #0 800dfc2: d1ee bne.n 800dfa2 pcb_remove = 0; 800dfc4: 2600 movs r6, #0 800dfc6: e04f b.n 800e068 if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) { 800dfc8: f9b4 3030 ldrsh.w r3, [r4, #48] @ 0x30 800dfcc: b29b uxth r3, r3 800dfce: f647 72fe movw r2, #32766 @ 0x7ffe 800dfd2: 4293 cmp r3, r2 800dfd4: d801 bhi.n 800dfda ++pcb->rtime; 800dfd6: 3301 adds r3, #1 800dfd8: 8623 strh r3, [r4, #48] @ 0x30 if (pcb->rtime >= pcb->rto) { 800dfda: f9b4 2030 ldrsh.w r2, [r4, #48] @ 0x30 800dfde: f9b4 3040 ldrsh.w r3, [r4, #64] @ 0x40 800dfe2: 429a cmp r2, r3 800dfe4: db40 blt.n 800e068 if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) { 800dfe6: 4620 mov r0, r4 800dfe8: f002 fde8 bl 8010bbc 800dfec: b120 cbz r0, 800dff8 800dfee: 6f23 ldr r3, [r4, #112] @ 0x70 800dff0: 2b00 cmp r3, #0 800dff2: d139 bne.n 800e068 800dff4: 6ee3 ldr r3, [r4, #108] @ 0x6c 800dff6: b3bb cbz r3, 800e068 if (pcb->state != SYN_SENT) { 800dff8: 7d23 ldrb r3, [r4, #20] 800dffa: 2b02 cmp r3, #2 800dffc: d014 beq.n 800e028 u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1); 800dffe: f894 2042 ldrb.w r2, [r4, #66] @ 0x42 800e002: 2a0c cmp r2, #12 800e004: bf28 it cs 800e006: 220c movcs r2, #12 int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; 800e008: f9b4 103c ldrsh.w r1, [r4, #60] @ 0x3c 800e00c: f9b4 303e ldrsh.w r3, [r4, #62] @ 0x3e 800e010: eb03 03e1 add.w r3, r3, r1, asr #3 800e014: 4968 ldr r1, [pc, #416] @ (800e1b8 ) 800e016: 5c8a ldrb r2, [r1, r2] 800e018: 4093 lsls r3, r2 pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF); 800e01a: f647 72fe movw r2, #32766 @ 0x7ffe 800e01e: 4293 cmp r3, r2 800e020: dc1e bgt.n 800e060 800e022: b21b sxth r3, r3 800e024: f8a4 3040 strh.w r3, [r4, #64] @ 0x40 pcb->rtime = 0; 800e028: 2300 movs r3, #0 800e02a: 8623 strh r3, [r4, #48] @ 0x30 eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 800e02c: f8b4 3060 ldrh.w r3, [r4, #96] @ 0x60 800e030: f8b4 2048 ldrh.w r2, [r4, #72] @ 0x48 800e034: 4293 cmp r3, r2 800e036: bf28 it cs 800e038: 4613 movcs r3, r2 pcb->ssthresh = eff_wnd >> 1; 800e03a: 085b lsrs r3, r3, #1 800e03c: f8a4 304a strh.w r3, [r4, #74] @ 0x4a if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { 800e040: 8e61 ldrh r1, [r4, #50] @ 0x32 800e042: 004a lsls r2, r1, #1 800e044: b292 uxth r2, r2 800e046: 4293 cmp r3, r2 800e048: d201 bcs.n 800e04e pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1); 800e04a: f8a4 204a strh.w r2, [r4, #74] @ 0x4a pcb->cwnd = pcb->mss; 800e04e: f8a4 1048 strh.w r1, [r4, #72] @ 0x48 pcb->bytes_acked = 0; 800e052: 2300 movs r3, #0 800e054: f8a4 306a strh.w r3, [r4, #106] @ 0x6a tcp_rexmit_rto_commit(pcb); 800e058: 4620 mov r0, r4 800e05a: f003 f859 bl 8011110 800e05e: e003 b.n 800e068 pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF); 800e060: f647 73ff movw r3, #32767 @ 0x7fff 800e064: e7de b.n 800e024 ++pcb_remove; 800e066: 2601 movs r6, #1 if (pcb->state == FIN_WAIT_2) { 800e068: 7d23 ldrb r3, [r4, #20] 800e06a: 2b06 cmp r3, #6 800e06c: d01f beq.n 800e0ae if (ip_get_option(pcb, SOF_KEEPALIVE) && 800e06e: 7a62 ldrb r2, [r4, #9] 800e070: f012 0708 ands.w r7, r2, #8 800e074: d042 beq.n 800e0fc 800e076: 2b07 cmp r3, #7 800e078: bf18 it ne 800e07a: 2b04 cmpne r3, #4 800e07c: d13d bne.n 800e0fa if ((u32_t)(tcp_ticks - pcb->tmr) > 800e07e: 4b45 ldr r3, [pc, #276] @ (800e194 ) 800e080: 681a ldr r2, [r3, #0] 800e082: 6a23 ldr r3, [r4, #32] 800e084: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) { 800e086: f8d4 1094 ldr.w r1, [r4, #148] @ 0x94 800e08a: 4b4c ldr r3, [pc, #304] @ (800e1bc ) 800e08c: 440b add r3, r1 800e08e: 484c ldr r0, [pc, #304] @ (800e1c0 ) 800e090: fba0 0303 umull r0, r3, r0, r3 if ((u32_t)(tcp_ticks - pcb->tmr) > 800e094: ebb2 1f53 cmp.w r2, r3, lsr #5 800e098: d916 bls.n 800e0c8 ++pcb_remove; 800e09a: 3601 adds r6, #1 800e09c: b2f6 uxtb r6, r6 ++pcb_reset; 800e09e: 2701 movs r7, #1 800e0a0: e02c b.n 800e0fc ++pcb_remove; /* max probes reached */ 800e0a2: 2601 movs r6, #1 800e0a4: e7e0 b.n 800e068 pcb_remove = 0; 800e0a6: 2600 movs r6, #0 800e0a8: e7de b.n 800e068 800e0aa: 2600 movs r6, #0 800e0ac: e7dc b.n 800e068 if (pcb->flags & TF_RXCLOSED) { 800e0ae: 8b62 ldrh r2, [r4, #26] 800e0b0: f012 0f10 tst.w r2, #16 800e0b4: d0db beq.n 800e06e if ((u32_t)(tcp_ticks - pcb->tmr) > 800e0b6: 6a21 ldr r1, [r4, #32] 800e0b8: 4a36 ldr r2, [pc, #216] @ (800e194 ) 800e0ba: 6812 ldr r2, [r2, #0] 800e0bc: 1a52 subs r2, r2, r1 800e0be: 2a28 cmp r2, #40 @ 0x28 800e0c0: d9d5 bls.n 800e06e ++pcb_remove; 800e0c2: 3601 adds r6, #1 800e0c4: b2f6 uxtb r6, r6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in FIN-WAIT-2\n")); 800e0c6: e7d2 b.n 800e06e (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 800e0c8: f894 309b ldrb.w r3, [r4, #155] @ 0x9b 800e0cc: 483d ldr r0, [pc, #244] @ (800e1c4 ) 800e0ce: fb00 1103 mla r1, r0, r3, r1 / TCP_SLOW_INTERVAL) { 800e0d2: 4b3b ldr r3, [pc, #236] @ (800e1c0 ) 800e0d4: fba3 3101 umull r3, r1, r3, r1 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 800e0d8: ebb2 1f51 cmp.w r2, r1, lsr #5 800e0dc: d801 bhi.n 800e0e2 pcb_reset = 0; 800e0de: 2700 movs r7, #0 800e0e0: e00c b.n 800e0fc err = tcp_keepalive(pcb); 800e0e2: 4620 mov r0, r4 800e0e4: f003 f84a bl 801117c if (err == ERR_OK) { 800e0e8: 2800 cmp r0, #0 800e0ea: d13b bne.n 800e164 pcb->keep_cnt_sent++; 800e0ec: f894 309b ldrb.w r3, [r4, #155] @ 0x9b 800e0f0: 3301 adds r3, #1 800e0f2: f884 309b strb.w r3, [r4, #155] @ 0x9b pcb_reset = 0; 800e0f6: 2700 movs r7, #0 800e0f8: e000 b.n 800e0fc 800e0fa: 2700 movs r7, #0 if (pcb->ooseq != NULL && 800e0fc: 6f63 ldr r3, [r4, #116] @ 0x74 800e0fe: b153 cbz r3, 800e116 (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) { 800e100: 6a23 ldr r3, [r4, #32] 800e102: 4a24 ldr r2, [pc, #144] @ (800e194 ) 800e104: 6812 ldr r2, [r2, #0] 800e106: 1ad2 subs r2, r2, r3 800e108: f9b4 3040 ldrsh.w r3, [r4, #64] @ 0x40 800e10c: eb03 0343 add.w r3, r3, r3, lsl #1 if (pcb->ooseq != NULL && 800e110: ebb2 0f43 cmp.w r2, r3, lsl #1 800e114: d228 bcs.n 800e168 if (pcb->state == SYN_RCVD) { 800e116: 7d23 ldrb r3, [r4, #20] 800e118: 2b03 cmp r3, #3 800e11a: d029 beq.n 800e170 if (pcb->state == LAST_ACK) { 800e11c: 2b09 cmp r3, #9 800e11e: d030 beq.n 800e182 if (pcb_remove) { 800e120: 2e00 cmp r6, #0 800e122: d153 bne.n 800e1cc pcb = pcb->next; 800e124: 68e6 ldr r6, [r4, #12] ++prev->polltmr; 800e126: 7f23 ldrb r3, [r4, #28] 800e128: 3301 adds r3, #1 800e12a: b2db uxtb r3, r3 800e12c: 7723 strb r3, [r4, #28] if (prev->polltmr >= prev->pollinterval) { 800e12e: 7f62 ldrb r2, [r4, #29] 800e130: 4293 cmp r3, r2 800e132: f0c0 809a bcc.w 800e26a prev->polltmr = 0; 800e136: 2300 movs r3, #0 800e138: 7723 strb r3, [r4, #28] tcp_active_pcbs_changed = 0; 800e13a: 4a23 ldr r2, [pc, #140] @ (800e1c8 ) 800e13c: 7013 strb r3, [r2, #0] TCP_EVENT_POLL(prev, err); 800e13e: f8d4 308c ldr.w r3, [r4, #140] @ 0x8c 800e142: 2b00 cmp r3, #0 800e144: f000 8089 beq.w 800e25a 800e148: 4621 mov r1, r4 800e14a: 6920 ldr r0, [r4, #16] 800e14c: 4798 blx r3 if (tcp_active_pcbs_changed) { 800e14e: 4b1e ldr r3, [pc, #120] @ (800e1c8 ) 800e150: 781b ldrb r3, [r3, #0] 800e152: 2b00 cmp r3, #0 800e154: f47f aef3 bne.w 800df3e if (err == ERR_OK) { 800e158: 2800 cmp r0, #0 800e15a: f000 8080 beq.w 800e25e prev = pcb; 800e15e: 4625 mov r5, r4 pcb = pcb->next; 800e160: 4634 mov r4, r6 800e162: e084 b.n 800e26e pcb_reset = 0; 800e164: 2700 movs r7, #0 800e166: e7c9 b.n 800e0fc tcp_free_ooseq(pcb); 800e168: 4620 mov r0, r4 800e16a: f7ff fac9 bl 800d700 800e16e: e7d2 b.n 800e116 if ((u32_t)(tcp_ticks - pcb->tmr) > 800e170: 6a21 ldr r1, [r4, #32] 800e172: 4a08 ldr r2, [pc, #32] @ (800e194 ) 800e174: 6812 ldr r2, [r2, #0] 800e176: 1a52 subs r2, r2, r1 800e178: 2a28 cmp r2, #40 @ 0x28 800e17a: d9cf bls.n 800e11c ++pcb_remove; 800e17c: 3601 adds r6, #1 800e17e: b2f6 uxtb r6, r6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n")); 800e180: e7cc b.n 800e11c if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 800e182: 6a22 ldr r2, [r4, #32] 800e184: 4b03 ldr r3, [pc, #12] @ (800e194 ) 800e186: 681b ldr r3, [r3, #0] 800e188: 1a9b subs r3, r3, r2 800e18a: 2bf0 cmp r3, #240 @ 0xf0 800e18c: d9c8 bls.n 800e120 ++pcb_remove; 800e18e: 3601 adds r6, #1 800e190: b2f6 uxtb r6, r6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); 800e192: e7c5 b.n 800e120 800e194: 24019be4 .word 0x24019be4 800e198: 24019bd0 .word 0x24019bd0 800e19c: 24019bd8 .word 0x24019bd8 800e1a0: 080165b0 .word 0x080165b0 800e1a4: 08016a70 .word 0x08016a70 800e1a8: 080144e8 .word 0x080144e8 800e1ac: 08016a9c .word 0x08016a9c 800e1b0: 08016ac8 .word 0x08016ac8 800e1b4: 08016b2c .word 0x08016b2c 800e1b8: 08016c54 .word 0x08016c54 800e1bc: 000a4cb8 .word 0x000a4cb8 800e1c0: 10624dd3 .word 0x10624dd3 800e1c4: 000124f8 .word 0x000124f8 800e1c8: 24019bd2 .word 0x24019bd2 tcp_err_fn err_fn = pcb->errf; 800e1cc: f8d4 8090 ldr.w r8, [r4, #144] @ 0x90 tcp_pcb_purge(pcb); 800e1d0: 4620 mov r0, r4 800e1d2: f7ff fa9f bl 800d714 if (prev != NULL) { 800e1d6: b325 cbz r5, 800e222 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); 800e1d8: 4b6f ldr r3, [pc, #444] @ (800e398 ) 800e1da: 681b ldr r3, [r3, #0] 800e1dc: 429c cmp r4, r3 800e1de: d018 beq.n 800e212 prev->next = pcb->next; 800e1e0: 68e3 ldr r3, [r4, #12] 800e1e2: 60eb str r3, [r5, #12] if (pcb_reset) { 800e1e4: bb67 cbnz r7, 800e240 err_arg = pcb->callback_arg; 800e1e6: 6926 ldr r6, [r4, #16] pcb = pcb->next; 800e1e8: 68e7 ldr r7, [r4, #12] tcp_free(pcb2); 800e1ea: 4620 mov r0, r4 800e1ec: f7ff f84a bl 800d284 tcp_active_pcbs_changed = 0; 800e1f0: 4b6a ldr r3, [pc, #424] @ (800e39c ) 800e1f2: 2200 movs r2, #0 800e1f4: 701a strb r2, [r3, #0] TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); 800e1f6: f1b8 0f00 cmp.w r8, #0 800e1fa: d003 beq.n 800e204 800e1fc: f06f 010c mvn.w r1, #12 800e200: 4630 mov r0, r6 800e202: 47c0 blx r8 if (tcp_active_pcbs_changed) { 800e204: 4b65 ldr r3, [pc, #404] @ (800e39c ) 800e206: 781b ldrb r3, [r3, #0] 800e208: 2b00 cmp r3, #0 800e20a: f47f ae98 bne.w 800df3e pcb = pcb->next; 800e20e: 463c mov r4, r7 800e210: e02d b.n 800e26e LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); 800e212: 4b63 ldr r3, [pc, #396] @ (800e3a0 ) 800e214: f240 526d movw r2, #1389 @ 0x56d 800e218: 4962 ldr r1, [pc, #392] @ (800e3a4 ) 800e21a: 4863 ldr r0, [pc, #396] @ (800e3a8 ) 800e21c: f005 f8f4 bl 8013408 800e220: e7de b.n 800e1e0 LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); 800e222: 4b5d ldr r3, [pc, #372] @ (800e398 ) 800e224: 681b ldr r3, [r3, #0] 800e226: 429c cmp r4, r3 800e228: d006 beq.n 800e238 800e22a: 4b5d ldr r3, [pc, #372] @ (800e3a0 ) 800e22c: f240 5271 movw r2, #1393 @ 0x571 800e230: 495e ldr r1, [pc, #376] @ (800e3ac ) 800e232: 485d ldr r0, [pc, #372] @ (800e3a8 ) 800e234: f005 f8e8 bl 8013408 tcp_active_pcbs = pcb->next; 800e238: 68e2 ldr r2, [r4, #12] 800e23a: 4b57 ldr r3, [pc, #348] @ (800e398 ) 800e23c: 601a str r2, [r3, #0] 800e23e: e7d1 b.n 800e1e4 tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 800e240: 1d23 adds r3, r4, #4 800e242: 6a62 ldr r2, [r4, #36] @ 0x24 800e244: 6d21 ldr r1, [r4, #80] @ 0x50 800e246: 8b20 ldrh r0, [r4, #24] 800e248: 9002 str r0, [sp, #8] 800e24a: 8ae0 ldrh r0, [r4, #22] 800e24c: 9001 str r0, [sp, #4] 800e24e: 9300 str r3, [sp, #0] 800e250: 4623 mov r3, r4 800e252: 4620 mov r0, r4 800e254: f002 fd84 bl 8010d60 800e258: e7c5 b.n 800e1e6 TCP_EVENT_POLL(prev, err); 800e25a: 2000 movs r0, #0 800e25c: e777 b.n 800e14e tcp_output(prev); 800e25e: 4620 mov r0, r4 800e260: f002 fe00 bl 8010e64 prev = pcb; 800e264: 4625 mov r5, r4 pcb = pcb->next; 800e266: 4634 mov r4, r6 800e268: e001 b.n 800e26e prev = pcb; 800e26a: 4625 mov r5, r4 pcb = pcb->next; 800e26c: 4634 mov r4, r6 while (pcb != NULL) { 800e26e: 2c00 cmp r4, #0 800e270: d050 beq.n 800e314 LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); 800e272: 7d23 ldrb r3, [r4, #20] 800e274: 2b00 cmp r3, #0 800e276: f43f ae66 beq.w 800df46 LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); 800e27a: 7d23 ldrb r3, [r4, #20] 800e27c: 2b01 cmp r3, #1 800e27e: f43f ae6a beq.w 800df56 LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); 800e282: 7d23 ldrb r3, [r4, #20] 800e284: 2b0a cmp r3, #10 800e286: f43f ae6e beq.w 800df66 if (pcb->last_timer == tcp_timer_ctr) { 800e28a: 7fa2 ldrb r2, [r4, #30] 800e28c: 4b48 ldr r3, [pc, #288] @ (800e3b0 ) 800e28e: 781b ldrb r3, [r3, #0] 800e290: 429a cmp r2, r3 800e292: f43f ae70 beq.w 800df76 pcb->last_timer = tcp_timer_ctr; 800e296: 77a3 strb r3, [r4, #30] if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { 800e298: 7d23 ldrb r3, [r4, #20] 800e29a: 2b02 cmp r3, #2 800e29c: f43f ae6e beq.w 800df7c } else if (pcb->nrtx >= TCP_MAXRTX) { 800e2a0: f894 3042 ldrb.w r3, [r4, #66] @ 0x42 800e2a4: 2b0b cmp r3, #11 800e2a6: f63f aede bhi.w 800e066 if (pcb->persist_backoff > 0) { 800e2aa: f894 6099 ldrb.w r6, [r4, #153] @ 0x99 800e2ae: 2e00 cmp r6, #0 800e2b0: f43f ae8a beq.w 800dfc8 LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL); 800e2b4: 6f23 ldr r3, [r4, #112] @ 0x70 800e2b6: b133 cbz r3, 800e2c6 800e2b8: 4b39 ldr r3, [pc, #228] @ (800e3a0 ) 800e2ba: f240 42d4 movw r2, #1236 @ 0x4d4 800e2be: 493d ldr r1, [pc, #244] @ (800e3b4 ) 800e2c0: 4839 ldr r0, [pc, #228] @ (800e3a8 ) 800e2c2: f005 f8a1 bl 8013408 LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL); 800e2c6: 6ee3 ldr r3, [r4, #108] @ 0x6c 800e2c8: 2b00 cmp r3, #0 800e2ca: f43f ae5e beq.w 800df8a if (pcb->persist_probe >= TCP_MAXRTX) { 800e2ce: f894 309a ldrb.w r3, [r4, #154] @ 0x9a 800e2d2: 2b0b cmp r3, #11 800e2d4: f63f aee5 bhi.w 800e0a2 u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1]; 800e2d8: f894 3099 ldrb.w r3, [r4, #153] @ 0x99 800e2dc: 3b01 subs r3, #1 800e2de: 4a36 ldr r2, [pc, #216] @ (800e3b8 ) 800e2e0: 5cd2 ldrb r2, [r2, r3] if (pcb->persist_cnt < backoff_cnt) { 800e2e2: f894 3098 ldrb.w r3, [r4, #152] @ 0x98 800e2e6: 4293 cmp r3, r2 800e2e8: d202 bcs.n 800e2f0 pcb->persist_cnt++; 800e2ea: 3301 adds r3, #1 800e2ec: f884 3098 strb.w r3, [r4, #152] @ 0x98 if (pcb->persist_cnt >= backoff_cnt) { 800e2f0: f894 3098 ldrb.w r3, [r4, #152] @ 0x98 800e2f4: 4293 cmp r3, r2 800e2f6: f4ff aed6 bcc.w 800e0a6 if (pcb->snd_wnd == 0) { 800e2fa: f8b4 1060 ldrh.w r1, [r4, #96] @ 0x60 800e2fe: 2900 cmp r1, #0 800e300: f47f ae4b bne.w 800df9a if (tcp_zero_window_probe(pcb) != ERR_OK) { 800e304: 4620 mov r0, r4 800e306: f002 ff67 bl 80111d8 800e30a: 2800 cmp r0, #0 800e30c: f43f ae49 beq.w 800dfa2 pcb_remove = 0; 800e310: 2600 movs r6, #0 800e312: e6a9 b.n 800e068 pcb = tcp_tw_pcbs; 800e314: 4b29 ldr r3, [pc, #164] @ (800e3bc ) 800e316: 681d ldr r5, [r3, #0] while (pcb != NULL) { 800e318: e007 b.n 800e32a if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 800e31a: 6a2a ldr r2, [r5, #32] 800e31c: 4b28 ldr r3, [pc, #160] @ (800e3c0 ) 800e31e: 681b ldr r3, [r3, #0] 800e320: 1a9b subs r3, r3, r2 800e322: 2bf0 cmp r3, #240 @ 0xf0 800e324: d80e bhi.n 800e344 prev = pcb; 800e326: 462c mov r4, r5 pcb = pcb->next; 800e328: 68ed ldr r5, [r5, #12] while (pcb != NULL) { 800e32a: 2d00 cmp r5, #0 800e32c: d031 beq.n 800e392 LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 800e32e: 7d2b ldrb r3, [r5, #20] 800e330: 2b0a cmp r3, #10 800e332: d0f2 beq.n 800e31a 800e334: 4b1a ldr r3, [pc, #104] @ (800e3a0 ) 800e336: f240 52a1 movw r2, #1441 @ 0x5a1 800e33a: 4922 ldr r1, [pc, #136] @ (800e3c4 ) 800e33c: 481a ldr r0, [pc, #104] @ (800e3a8 ) 800e33e: f005 f863 bl 8013408 800e342: e7ea b.n 800e31a tcp_pcb_purge(pcb); 800e344: 4628 mov r0, r5 800e346: f7ff f9e5 bl 800d714 if (prev != NULL) { 800e34a: b19c cbz r4, 800e374 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); 800e34c: 4b1b ldr r3, [pc, #108] @ (800e3bc ) 800e34e: 681b ldr r3, [r3, #0] 800e350: 429d cmp r5, r3 800e352: d007 beq.n 800e364 prev->next = pcb->next; 800e354: 68eb ldr r3, [r5, #12] 800e356: 60e3 str r3, [r4, #12] pcb = pcb->next; 800e358: 68ee ldr r6, [r5, #12] tcp_free(pcb2); 800e35a: 4628 mov r0, r5 800e35c: f7fe ff92 bl 800d284 pcb = pcb->next; 800e360: 4635 mov r5, r6 800e362: e7e2 b.n 800e32a LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); 800e364: 4b0e ldr r3, [pc, #56] @ (800e3a0 ) 800e366: f240 52af movw r2, #1455 @ 0x5af 800e36a: 4917 ldr r1, [pc, #92] @ (800e3c8 ) 800e36c: 480e ldr r0, [pc, #56] @ (800e3a8 ) 800e36e: f005 f84b bl 8013408 800e372: e7ef b.n 800e354 LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); 800e374: 4b11 ldr r3, [pc, #68] @ (800e3bc ) 800e376: 681b ldr r3, [r3, #0] 800e378: 429d cmp r5, r3 800e37a: d006 beq.n 800e38a 800e37c: 4b08 ldr r3, [pc, #32] @ (800e3a0 ) 800e37e: f240 52b3 movw r2, #1459 @ 0x5b3 800e382: 4912 ldr r1, [pc, #72] @ (800e3cc ) 800e384: 4808 ldr r0, [pc, #32] @ (800e3a8 ) 800e386: f005 f83f bl 8013408 tcp_tw_pcbs = pcb->next; 800e38a: 68ea ldr r2, [r5, #12] 800e38c: 4b0b ldr r3, [pc, #44] @ (800e3bc ) 800e38e: 601a str r2, [r3, #0] 800e390: e7e2 b.n 800e358 } 800e392: b004 add sp, #16 800e394: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 800e398: 24019bd8 .word 0x24019bd8 800e39c: 24019bd2 .word 0x24019bd2 800e3a0: 080165b0 .word 0x080165b0 800e3a4: 08016b64 .word 0x08016b64 800e3a8: 080144e8 .word 0x080144e8 800e3ac: 08016b90 .word 0x08016b90 800e3b0: 24019bd0 .word 0x24019bd0 800e3b4: 08016af8 .word 0x08016af8 800e3b8: 08016c4c .word 0x08016c4c 800e3bc: 24019bd4 .word 0x24019bd4 800e3c0: 24019be4 .word 0x24019be4 800e3c4: 08016bbc .word 0x08016bbc 800e3c8: 08016bec .word 0x08016bec 800e3cc: 08016c14 .word 0x08016c14 0800e3d0 : { 800e3d0: b508 push {r3, lr} tcp_fasttmr(); 800e3d2: f7ff fd25 bl 800de20 if (++tcp_timer & 1) { 800e3d6: 4a06 ldr r2, [pc, #24] @ (800e3f0 ) 800e3d8: 7813 ldrb r3, [r2, #0] 800e3da: 3301 adds r3, #1 800e3dc: b2db uxtb r3, r3 800e3de: 7013 strb r3, [r2, #0] 800e3e0: f013 0f01 tst.w r3, #1 800e3e4: d100 bne.n 800e3e8 } 800e3e6: bd08 pop {r3, pc} tcp_slowtmr(); 800e3e8: f7ff fd9e bl 800df28 } 800e3ec: e7fb b.n 800e3e6 800e3ee: bf00 nop 800e3f0: 24019bd1 .word 0x24019bd1 0800e3f4 : } static u8_t tcp_get_next_optbyte(void) { u16_t optidx = tcp_optidx++; 800e3f4: 4a0a ldr r2, [pc, #40] @ (800e420 ) 800e3f6: 8813 ldrh r3, [r2, #0] 800e3f8: 1c59 adds r1, r3, #1 800e3fa: 8011 strh r1, [r2, #0] if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) { 800e3fc: 4a09 ldr r2, [pc, #36] @ (800e424 ) 800e3fe: 6811 ldr r1, [r2, #0] 800e400: b119 cbz r1, 800e40a 800e402: 4a09 ldr r2, [pc, #36] @ (800e428 ) 800e404: 8812 ldrh r2, [r2, #0] 800e406: 4293 cmp r3, r2 800e408: d204 bcs.n 800e414 u8_t *opts = (u8_t *)tcphdr + TCP_HLEN; 800e40a: 4a08 ldr r2, [pc, #32] @ (800e42c ) 800e40c: 6812 ldr r2, [r2, #0] return opts[optidx]; 800e40e: 4413 add r3, r2 800e410: 7d18 ldrb r0, [r3, #20] 800e412: 4770 bx lr } else { u8_t idx = (u8_t)(optidx - tcphdr_opt1len); 800e414: b2db uxtb r3, r3 800e416: b2d2 uxtb r2, r2 800e418: 1a9b subs r3, r3, r2 800e41a: b2db uxtb r3, r3 return tcphdr_opt2[idx]; 800e41c: 5cc8 ldrb r0, [r1, r3] } } 800e41e: 4770 bx lr 800e420: 24019c00 .word 0x24019c00 800e424: 24019c04 .word 0x24019c04 800e428: 24019c08 .word 0x24019c08 800e42c: 24019c0c .word 0x24019c0c 0800e430 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 800e430: b538 push {r3, r4, r5, lr} u16_t mss; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL); 800e432: 4604 mov r4, r0 800e434: b1e8 cbz r0, 800e472 /* Parse the TCP MSS option, if present. */ if (tcphdr_optlen != 0) { 800e436: 4b22 ldr r3, [pc, #136] @ (800e4c0 ) 800e438: 881b ldrh r3, [r3, #0] 800e43a: 2b00 cmp r3, #0 800e43c: d03e beq.n 800e4bc for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 800e43e: 4b21 ldr r3, [pc, #132] @ (800e4c4 ) 800e440: 2200 movs r2, #0 800e442: 801a strh r2, [r3, #0] 800e444: 4b1f ldr r3, [pc, #124] @ (800e4c4 ) 800e446: 881a ldrh r2, [r3, #0] 800e448: 4b1d ldr r3, [pc, #116] @ (800e4c0 ) 800e44a: 881b ldrh r3, [r3, #0] 800e44c: 429a cmp r2, r3 800e44e: d235 bcs.n 800e4bc u8_t opt = tcp_get_next_optbyte(); 800e450: f7ff ffd0 bl 800e3f4 switch (opt) { 800e454: 2801 cmp r0, #1 800e456: d0f5 beq.n 800e444 800e458: 2802 cmp r0, #2 800e45a: d012 beq.n 800e482 800e45c: b370 cbz r0, 800e4bc } break; #endif /* LWIP_TCP_SACK_OUT */ default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); data = tcp_get_next_optbyte(); 800e45e: f7ff ffc9 bl 800e3f4 if (data < 2) { 800e462: 2801 cmp r0, #1 800e464: d92a bls.n 800e4bc and we don't process them further. */ return; } /* All other options have a length field, so that we easily can skip past them. */ tcp_optidx += data - 2; 800e466: 4b17 ldr r3, [pc, #92] @ (800e4c4 ) 800e468: 881a ldrh r2, [r3, #0] 800e46a: 4410 add r0, r2 800e46c: 3802 subs r0, #2 800e46e: 8018 strh r0, [r3, #0] 800e470: e7e8 b.n 800e444 LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL); 800e472: 4b15 ldr r3, [pc, #84] @ (800e4c8 ) 800e474: f240 727d movw r2, #1917 @ 0x77d 800e478: 4914 ldr r1, [pc, #80] @ (800e4cc ) 800e47a: 4815 ldr r0, [pc, #84] @ (800e4d0 ) 800e47c: f004 ffc4 bl 8013408 800e480: e7d9 b.n 800e436 if (tcp_get_next_optbyte() != LWIP_TCP_OPT_LEN_MSS || (tcp_optidx - 2 + LWIP_TCP_OPT_LEN_MSS) > tcphdr_optlen) { 800e482: f7ff ffb7 bl 800e3f4 800e486: 2804 cmp r0, #4 800e488: d118 bne.n 800e4bc 800e48a: 4b0e ldr r3, [pc, #56] @ (800e4c4 ) 800e48c: 881b ldrh r3, [r3, #0] 800e48e: 3301 adds r3, #1 800e490: 4a0b ldr r2, [pc, #44] @ (800e4c0 ) 800e492: 8812 ldrh r2, [r2, #0] 800e494: 4293 cmp r3, r2 800e496: da11 bge.n 800e4bc mss = (u16_t)(tcp_get_next_optbyte() << 8); 800e498: f7ff ffac bl 800e3f4 800e49c: 0205 lsls r5, r0, #8 800e49e: b2ad uxth r5, r5 mss |= tcp_get_next_optbyte(); 800e4a0: f7ff ffa8 bl 800e3f4 800e4a4: 4328 orrs r0, r5 800e4a6: b280 uxth r0, r0 pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; 800e4a8: 1e43 subs r3, r0, #1 800e4aa: b29b uxth r3, r3 800e4ac: f240 52b3 movw r2, #1459 @ 0x5b3 800e4b0: 4293 cmp r3, r2 800e4b2: d901 bls.n 800e4b8 800e4b4: f240 50b4 movw r0, #1460 @ 0x5b4 800e4b8: 8660 strh r0, [r4, #50] @ 0x32 break; 800e4ba: e7c3 b.n 800e444 } } } } 800e4bc: bd38 pop {r3, r4, r5, pc} 800e4be: bf00 nop 800e4c0: 24019c0a .word 0x24019c0a 800e4c4: 24019c00 .word 0x24019c00 800e4c8: 08016c64 .word 0x08016c64 800e4cc: 08016cc8 .word 0x08016cc8 800e4d0: 080144e8 .word 0x080144e8 0800e4d4 : { 800e4d4: b510 push {r4, lr} LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL); 800e4d6: 4604 mov r4, r0 800e4d8: b130 cbz r0, 800e4e8 if (recv_flags & TF_CLOSED) { 800e4da: 4b11 ldr r3, [pc, #68] @ (800e520 ) 800e4dc: 781b ldrb r3, [r3, #0] 800e4de: f013 0f10 tst.w r3, #16 800e4e2: d109 bne.n 800e4f8 return 0; 800e4e4: 2000 movs r0, #0 } 800e4e6: bd10 pop {r4, pc} LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL); 800e4e8: 4b0e ldr r3, [pc, #56] @ (800e524 ) 800e4ea: f240 225a movw r2, #602 @ 0x25a 800e4ee: 490e ldr r1, [pc, #56] @ (800e528 ) 800e4f0: 480e ldr r0, [pc, #56] @ (800e52c ) 800e4f2: f004 ff89 bl 8013408 800e4f6: e7f0 b.n 800e4da if (!(pcb->flags & TF_RXCLOSED)) { 800e4f8: 8b63 ldrh r3, [r4, #26] 800e4fa: f013 0f10 tst.w r3, #16 800e4fe: d106 bne.n 800e50e TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_CLSD); 800e500: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90 800e504: b11b cbz r3, 800e50e 800e506: f06f 010e mvn.w r1, #14 800e50a: 6920 ldr r0, [r4, #16] 800e50c: 4798 blx r3 tcp_pcb_remove(&tcp_active_pcbs, pcb); 800e50e: 4621 mov r1, r4 800e510: 4807 ldr r0, [pc, #28] @ (800e530 ) 800e512: f7ff f931 bl 800d778 tcp_free(pcb); 800e516: 4620 mov r0, r4 800e518: f7fe feb4 bl 800d284 return 1; 800e51c: 2001 movs r0, #1 800e51e: e7e2 b.n 800e4e6 800e520: 24019bf0 .word 0x24019bf0 800e524: 08016c64 .word 0x08016c64 800e528: 08016ce4 .word 0x08016ce4 800e52c: 080144e8 .word 0x080144e8 800e530: 24019bd8 .word 0x24019bd8 0800e534 : if (flags & TCP_RST) { 800e534: 4b23 ldr r3, [pc, #140] @ (800e5c4 ) 800e536: 781b ldrb r3, [r3, #0] 800e538: f013 0f04 tst.w r3, #4 800e53c: d141 bne.n 800e5c2 { 800e53e: b530 push {r4, r5, lr} 800e540: b085 sub sp, #20 800e542: 4604 mov r4, r0 LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL); 800e544: b1a0 cbz r0, 800e570 if (flags & TCP_SYN) { 800e546: 4b1f ldr r3, [pc, #124] @ (800e5c4 ) 800e548: 781b ldrb r3, [r3, #0] 800e54a: f013 0f02 tst.w r3, #2 800e54e: d029 beq.n 800e5a4 if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd)) { 800e550: 4b1d ldr r3, [pc, #116] @ (800e5c8 ) 800e552: 681a ldr r2, [r3, #0] 800e554: 6a63 ldr r3, [r4, #36] @ 0x24 800e556: 1ad1 subs r1, r2, r3 800e558: 2900 cmp r1, #0 800e55a: db04 blt.n 800e566 800e55c: 8d21 ldrh r1, [r4, #40] @ 0x28 800e55e: 440b add r3, r1 800e560: 1ad3 subs r3, r2, r3 800e562: 2b00 cmp r3, #0 800e564: dd0c ble.n 800e580 if ((tcplen > 0)) { 800e566: 4b19 ldr r3, [pc, #100] @ (800e5cc ) 800e568: 881b ldrh r3, [r3, #0] 800e56a: bb13 cbnz r3, 800e5b2 } 800e56c: b005 add sp, #20 800e56e: bd30 pop {r4, r5, pc} LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL); 800e570: 4b17 ldr r3, [pc, #92] @ (800e5d0 ) 800e572: f240 22ee movw r2, #750 @ 0x2ee 800e576: 4917 ldr r1, [pc, #92] @ (800e5d4 ) 800e578: 4817 ldr r0, [pc, #92] @ (800e5d8 ) 800e57a: f004 ff45 bl 8013408 800e57e: e7e2 b.n 800e546 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800e580: 4b16 ldr r3, [pc, #88] @ (800e5dc ) 800e582: 6819 ldr r1, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 800e584: 4b16 ldr r3, [pc, #88] @ (800e5e0 ) 800e586: 4811 ldr r0, [pc, #68] @ (800e5cc ) 800e588: 8800 ldrh r0, [r0, #0] 800e58a: 880d ldrh r5, [r1, #0] 800e58c: 9502 str r5, [sp, #8] 800e58e: 8849 ldrh r1, [r1, #2] 800e590: 9101 str r1, [sp, #4] 800e592: 1f19 subs r1, r3, #4 800e594: 9100 str r1, [sp, #0] 800e596: 4402 add r2, r0 800e598: 4912 ldr r1, [pc, #72] @ (800e5e4 ) 800e59a: 6809 ldr r1, [r1, #0] 800e59c: 4620 mov r0, r4 800e59e: f002 fbdf bl 8010d60 return; 800e5a2: e7e3 b.n 800e56c } else if (flags & TCP_FIN) { 800e5a4: f013 0f01 tst.w r3, #1 800e5a8: d0dd beq.n 800e566 pcb->tmr = tcp_ticks; 800e5aa: 4b0f ldr r3, [pc, #60] @ (800e5e8 ) 800e5ac: 681b ldr r3, [r3, #0] 800e5ae: 6223 str r3, [r4, #32] 800e5b0: e7d9 b.n 800e566 tcp_ack_now(pcb); 800e5b2: 8b63 ldrh r3, [r4, #26] 800e5b4: f043 0302 orr.w r3, r3, #2 800e5b8: 8363 strh r3, [r4, #26] tcp_output(pcb); 800e5ba: 4620 mov r0, r4 800e5bc: f002 fc52 bl 8010e64 800e5c0: e7d4 b.n 800e56c 800e5c2: 4770 bx lr 800e5c4: 24019bf1 .word 0x24019bf1 800e5c8: 24019bfc .word 0x24019bfc 800e5cc: 24019bf2 .word 0x24019bf2 800e5d0: 08016c64 .word 0x08016c64 800e5d4: 08016d0c .word 0x08016d0c 800e5d8: 080144e8 .word 0x080144e8 800e5dc: 24019c0c .word 0x24019c0c 800e5e0: 24013030 .word 0x24013030 800e5e4: 24019bf8 .word 0x24019bf8 800e5e8: 24019be4 .word 0x24019be4 0800e5ec : if (flags & TCP_RST) { 800e5ec: 4b47 ldr r3, [pc, #284] @ (800e70c ) 800e5ee: 781b ldrb r3, [r3, #0] 800e5f0: f013 0f04 tst.w r3, #4 800e5f4: f040 8088 bne.w 800e708 { 800e5f8: b5f0 push {r4, r5, r6, r7, lr} 800e5fa: b085 sub sp, #20 800e5fc: 4604 mov r4, r0 LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL); 800e5fe: b148 cbz r0, 800e614 if (flags & TCP_ACK) { 800e600: 4b42 ldr r3, [pc, #264] @ (800e70c ) 800e602: 781b ldrb r3, [r3, #0] 800e604: f013 0f10 tst.w r3, #16 800e608: d10c bne.n 800e624 } else if (flags & TCP_SYN) { 800e60a: f013 0f02 tst.w r3, #2 800e60e: d11d bne.n 800e64c } 800e610: b005 add sp, #20 800e612: bdf0 pop {r4, r5, r6, r7, pc} LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL); 800e614: 4b3e ldr r3, [pc, #248] @ (800e710 ) 800e616: f240 2281 movw r2, #641 @ 0x281 800e61a: 493e ldr r1, [pc, #248] @ (800e714 ) 800e61c: 483e ldr r0, [pc, #248] @ (800e718 ) 800e61e: f004 fef3 bl 8013408 800e622: e7ed b.n 800e600 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800e624: 4b3d ldr r3, [pc, #244] @ (800e71c ) 800e626: 6819 ldr r1, [r3, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 800e628: 4b3d ldr r3, [pc, #244] @ (800e720 ) 800e62a: 4a3e ldr r2, [pc, #248] @ (800e724 ) 800e62c: 8810 ldrh r0, [r2, #0] 800e62e: 4a3e ldr r2, [pc, #248] @ (800e728 ) 800e630: 6812 ldr r2, [r2, #0] 800e632: 880d ldrh r5, [r1, #0] 800e634: 9502 str r5, [sp, #8] 800e636: 8849 ldrh r1, [r1, #2] 800e638: 9101 str r1, [sp, #4] 800e63a: 1f19 subs r1, r3, #4 800e63c: 9100 str r1, [sp, #0] 800e63e: 4402 add r2, r0 800e640: 493a ldr r1, [pc, #232] @ (800e72c ) 800e642: 6809 ldr r1, [r1, #0] 800e644: 4620 mov r0, r4 800e646: f002 fb8b bl 8010d60 800e64a: e7e1 b.n 800e610 npcb = tcp_alloc(pcb->prio); 800e64c: 7d60 ldrb r0, [r4, #21] 800e64e: f7ff fa4b bl 800dae8 if (npcb == NULL) { 800e652: 4605 mov r5, r0 800e654: 2800 cmp r0, #0 800e656: d049 beq.n 800e6ec ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); 800e658: 4b35 ldr r3, [pc, #212] @ (800e730 ) 800e65a: 695a ldr r2, [r3, #20] 800e65c: 6002 str r2, [r0, #0] ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); 800e65e: 691b ldr r3, [r3, #16] 800e660: 6043 str r3, [r0, #4] npcb->local_port = pcb->local_port; 800e662: 8ae3 ldrh r3, [r4, #22] 800e664: 82c3 strh r3, [r0, #22] npcb->remote_port = tcphdr->src; 800e666: 4e2d ldr r6, [pc, #180] @ (800e71c ) 800e668: 6833 ldr r3, [r6, #0] 800e66a: 881b ldrh r3, [r3, #0] 800e66c: 8303 strh r3, [r0, #24] npcb->state = SYN_RCVD; 800e66e: 2303 movs r3, #3 800e670: 7503 strb r3, [r0, #20] npcb->rcv_nxt = seqno + 1; 800e672: 4f2d ldr r7, [pc, #180] @ (800e728 ) 800e674: 683b ldr r3, [r7, #0] 800e676: 3301 adds r3, #1 800e678: 6243 str r3, [r0, #36] @ 0x24 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 800e67a: 62c3 str r3, [r0, #44] @ 0x2c iss = tcp_next_iss(npcb); 800e67c: f7fe ff5c bl 800d538 npcb->snd_wl2 = iss; 800e680: 65a8 str r0, [r5, #88] @ 0x58 npcb->snd_nxt = iss; 800e682: 6528 str r0, [r5, #80] @ 0x50 npcb->lastack = iss; 800e684: 6468 str r0, [r5, #68] @ 0x44 npcb->snd_lbb = iss; 800e686: 65e8 str r0, [r5, #92] @ 0x5c npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ 800e688: 683b ldr r3, [r7, #0] 800e68a: 3b01 subs r3, #1 800e68c: 656b str r3, [r5, #84] @ 0x54 npcb->callback_arg = pcb->callback_arg; 800e68e: 6923 ldr r3, [r4, #16] 800e690: 612b str r3, [r5, #16] npcb->listener = pcb; 800e692: 67ec str r4, [r5, #124] @ 0x7c npcb->so_options = pcb->so_options & SOF_INHERITED; 800e694: 7a63 ldrb r3, [r4, #9] 800e696: f003 030c and.w r3, r3, #12 800e69a: 726b strb r3, [r5, #9] npcb->netif_idx = pcb->netif_idx; 800e69c: 7a23 ldrb r3, [r4, #8] 800e69e: 722b strb r3, [r5, #8] TCP_REG_ACTIVE(npcb); 800e6a0: 4b24 ldr r3, [pc, #144] @ (800e734 ) 800e6a2: 681a ldr r2, [r3, #0] 800e6a4: 60ea str r2, [r5, #12] 800e6a6: 601d str r5, [r3, #0] 800e6a8: f002 ffc2 bl 8011630 800e6ac: 4b22 ldr r3, [pc, #136] @ (800e738 ) 800e6ae: 2201 movs r2, #1 800e6b0: 701a strb r2, [r3, #0] tcp_parseopt(npcb); 800e6b2: 4628 mov r0, r5 800e6b4: f7ff febc bl 800e430 npcb->snd_wnd = tcphdr->wnd; 800e6b8: 6833 ldr r3, [r6, #0] 800e6ba: 89db ldrh r3, [r3, #14] 800e6bc: f8a5 3060 strh.w r3, [r5, #96] @ 0x60 npcb->snd_wnd_max = npcb->snd_wnd; 800e6c0: f8a5 3062 strh.w r3, [r5, #98] @ 0x62 npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); 800e6c4: 8e6e ldrh r6, [r5, #50] @ 0x32 800e6c6: 1d2c adds r4, r5, #4 800e6c8: 4620 mov r0, r4 800e6ca: f7fb fd19 bl 800a100 800e6ce: 4601 mov r1, r0 800e6d0: 4622 mov r2, r4 800e6d2: 4630 mov r0, r6 800e6d4: f7fe ff4c bl 800d570 800e6d8: 8668 strh r0, [r5, #50] @ 0x32 rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 800e6da: 2112 movs r1, #18 800e6dc: 4628 mov r0, r5 800e6de: f002 f98b bl 80109f8 if (rc != ERR_OK) { 800e6e2: b960 cbnz r0, 800e6fe tcp_output(npcb); 800e6e4: 4628 mov r0, r5 800e6e6: f002 fbbd bl 8010e64 800e6ea: e791 b.n 800e610 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 800e6ec: 69a3 ldr r3, [r4, #24] 800e6ee: 2b00 cmp r3, #0 800e6f0: d08e beq.n 800e610 800e6f2: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 800e6f6: 2100 movs r1, #0 800e6f8: 6920 ldr r0, [r4, #16] 800e6fa: 4798 blx r3 return; 800e6fc: e788 b.n 800e610 tcp_abandon(npcb, 0); 800e6fe: 2100 movs r1, #0 800e700: 4628 mov r0, r5 800e702: f7ff f8a1 bl 800d848 return; 800e706: e783 b.n 800e610 800e708: 4770 bx lr 800e70a: bf00 nop 800e70c: 24019bf1 .word 0x24019bf1 800e710: 08016c64 .word 0x08016c64 800e714: 08016d2c .word 0x08016d2c 800e718: 080144e8 .word 0x080144e8 800e71c: 24019c0c .word 0x24019c0c 800e720: 24013030 .word 0x24013030 800e724: 24019bf2 .word 0x24019bf2 800e728: 24019bfc .word 0x24019bfc 800e72c: 24019bf8 .word 0x24019bf8 800e730: 2401301c .word 0x2401301c 800e734: 24019bd8 .word 0x24019bd8 800e738: 24019bd2 .word 0x24019bd2 0800e73c : { 800e73c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800e740: 4606 mov r6, r0 800e742: 460c mov r4, r1 800e744: 461f mov r7, r3 while (seg_list != NULL && 800e746: e008 b.n 800e75a LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen)); 800e748: 4b26 ldr r3, [pc, #152] @ (800e7e4 ) 800e74a: f240 4257 movw r2, #1111 @ 0x457 800e74e: 4926 ldr r1, [pc, #152] @ (800e7e8 ) 800e750: 4826 ldr r0, [pc, #152] @ (800e7ec ) 800e752: f004 fe59 bl 8013408 800e756: e022 b.n 800e79e { 800e758: 4644 mov r4, r8 while (seg_list != NULL && 800e75a: 2c00 cmp r4, #0 800e75c: d03f beq.n 800e7de TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) + 800e75e: 6923 ldr r3, [r4, #16] 800e760: 6858 ldr r0, [r3, #4] 800e762: f7f9 fb90 bl 8007e86 800e766: 4605 mov r5, r0 800e768: f8b4 8008 ldrh.w r8, [r4, #8] 800e76c: 6923 ldr r3, [r4, #16] 800e76e: 8998 ldrh r0, [r3, #12] 800e770: f7f9 fb84 bl 8007e7c 800e774: f010 0f03 tst.w r0, #3 800e778: d02f beq.n 800e7da 800e77a: 2301 movs r3, #1 800e77c: 4443 add r3, r8 800e77e: 441d add r5, r3 800e780: 4b1b ldr r3, [pc, #108] @ (800e7f0 ) 800e782: 681b ldr r3, [r3, #0] 800e784: 1aed subs r5, r5, r3 while (seg_list != NULL && 800e786: 2d00 cmp r5, #0 800e788: dc29 bgt.n 800e7de seg_list = seg_list->next; 800e78a: f8d4 8000 ldr.w r8, [r4] clen = pbuf_clen(next->p); 800e78e: 6860 ldr r0, [r4, #4] 800e790: f7fd fc8b bl 800c0aa 800e794: 4605 mov r5, r0 LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= clen)); 800e796: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66 800e79a: 4298 cmp r0, r3 800e79c: d8d4 bhi.n 800e748 pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen); 800e79e: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66 800e7a2: 1b5b subs r3, r3, r5 800e7a4: f8a6 3066 strh.w r3, [r6, #102] @ 0x66 recv_acked = (tcpwnd_size_t)(recv_acked + next->len); 800e7a8: 8923 ldrh r3, [r4, #8] 800e7aa: 4a12 ldr r2, [pc, #72] @ (800e7f4 ) 800e7ac: 8811 ldrh r1, [r2, #0] 800e7ae: 440b add r3, r1 800e7b0: 8013 strh r3, [r2, #0] tcp_seg_free(next); 800e7b2: 4620 mov r0, r4 800e7b4: f7fe fdfa bl 800d3ac if (pcb->snd_queuelen != 0) { 800e7b8: f8b6 3066 ldrh.w r3, [r6, #102] @ 0x66 800e7bc: 2b00 cmp r3, #0 800e7be: d0cb beq.n 800e758 LWIP_ASSERT("tcp_receive: valid queue length", 800e7c0: f1b8 0f00 cmp.w r8, #0 800e7c4: bf08 it eq 800e7c6: 2f00 cmpeq r7, #0 800e7c8: d1c6 bne.n 800e758 800e7ca: 4b06 ldr r3, [pc, #24] @ (800e7e4 ) 800e7cc: f240 4261 movw r2, #1121 @ 0x461 800e7d0: 4909 ldr r1, [pc, #36] @ (800e7f8 ) 800e7d2: 4806 ldr r0, [pc, #24] @ (800e7ec ) 800e7d4: f004 fe18 bl 8013408 800e7d8: e7be b.n 800e758 TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) + 800e7da: 2300 movs r3, #0 800e7dc: e7ce b.n 800e77c } 800e7de: 4620 mov r0, r4 800e7e0: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 800e7e4: 08016c64 .word 0x08016c64 800e7e8: 08016d4c .word 0x08016d4c 800e7ec: 080144e8 .word 0x080144e8 800e7f0: 24019bf8 .word 0x24019bf8 800e7f4: 24019bf4 .word 0x24019bf4 800e7f8: 08016d74 .word 0x08016d74 0800e7fc : { 800e7fc: b570 push {r4, r5, r6, lr} 800e7fe: 460c mov r4, r1 LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL); 800e800: 4605 mov r5, r0 800e802: b160 cbz r0, 800e81e if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 800e804: 692b ldr r3, [r5, #16] 800e806: 8998 ldrh r0, [r3, #12] 800e808: f7f9 fb38 bl 8007e7c 800e80c: f010 0f01 tst.w r0, #1 800e810: d012 beq.n 800e838 tcp_segs_free(next); 800e812: 4620 mov r0, r4 800e814: f7fe fdd7 bl 800d3c6 next = NULL; 800e818: 2400 movs r4, #0 cseg->next = next; 800e81a: 602c str r4, [r5, #0] } 800e81c: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL); 800e81e: 4b1d ldr r3, [pc, #116] @ (800e894 ) 800e820: f240 421f movw r2, #1055 @ 0x41f 800e824: 491c ldr r1, [pc, #112] @ (800e898 ) 800e826: 481d ldr r0, [pc, #116] @ (800e89c ) 800e828: f004 fdee bl 8013408 800e82c: e7ea b.n 800e804 next = next->next; 800e82e: 6826 ldr r6, [r4, #0] tcp_seg_free(old_seg); 800e830: 4620 mov r0, r4 800e832: f7fe fdbb bl 800d3ac next = next->next; 800e836: 4634 mov r4, r6 while (next && 800e838: b1cc cbz r4, 800e86e TCP_SEQ_GEQ((seqno + cseg->len), 800e83a: 892b ldrh r3, [r5, #8] 800e83c: 4a18 ldr r2, [pc, #96] @ (800e8a0 ) 800e83e: 6812 ldr r2, [r2, #0] 800e840: 4413 add r3, r2 800e842: 6921 ldr r1, [r4, #16] 800e844: 684a ldr r2, [r1, #4] 800e846: 8920 ldrh r0, [r4, #8] 800e848: 4402 add r2, r0 800e84a: 1a9b subs r3, r3, r2 while (next && 800e84c: 2b00 cmp r3, #0 800e84e: db0e blt.n 800e86e if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { 800e850: 8988 ldrh r0, [r1, #12] 800e852: f7f9 fb13 bl 8007e7c 800e856: f010 0f01 tst.w r0, #1 800e85a: d0e8 beq.n 800e82e TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); 800e85c: 692b ldr r3, [r5, #16] 800e85e: 899e ldrh r6, [r3, #12] 800e860: 2001 movs r0, #1 800e862: f7f9 fb0b bl 8007e7c 800e866: 692b ldr r3, [r5, #16] 800e868: 4306 orrs r6, r0 800e86a: 819e strh r6, [r3, #12] 800e86c: e7df b.n 800e82e if (next && 800e86e: 2c00 cmp r4, #0 800e870: d0d3 beq.n 800e81a TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { 800e872: 892b ldrh r3, [r5, #8] 800e874: 4a0a ldr r2, [pc, #40] @ (800e8a0 ) 800e876: 6811 ldr r1, [r2, #0] 800e878: 440b add r3, r1 800e87a: 6922 ldr r2, [r4, #16] 800e87c: 6852 ldr r2, [r2, #4] 800e87e: 1a9b subs r3, r3, r2 if (next && 800e880: 2b00 cmp r3, #0 800e882: ddca ble.n 800e81a cseg->len = (u16_t)(next->tcphdr->seqno - seqno); 800e884: 1a52 subs r2, r2, r1 800e886: b291 uxth r1, r2 800e888: 8129 strh r1, [r5, #8] pbuf_realloc(cseg->p, cseg->len); 800e88a: 6868 ldr r0, [r5, #4] 800e88c: f7fd fb9e bl 800bfcc 800e890: e7c3 b.n 800e81a 800e892: bf00 nop 800e894: 08016c64 .word 0x08016c64 800e898: 08016d94 .word 0x08016d94 800e89c: 080144e8 .word 0x080144e8 800e8a0: 24019bfc .word 0x24019bfc 0800e8a4 : { 800e8a4: b5f8 push {r3, r4, r5, r6, r7, lr} LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL); 800e8a6: 4604 mov r4, r0 800e8a8: 2800 cmp r0, #0 800e8aa: d06f beq.n 800e98c LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); 800e8ac: 7d23 ldrb r3, [r4, #20] 800e8ae: 2b03 cmp r3, #3 800e8b0: d974 bls.n 800e99c if (flags & TCP_ACK) { 800e8b2: 4ba8 ldr r3, [pc, #672] @ (800eb54 ) 800e8b4: 781b ldrb r3, [r3, #0] 800e8b6: f013 0f10 tst.w r3, #16 800e8ba: d03c beq.n 800e936 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 800e8bc: f8b4 0060 ldrh.w r0, [r4, #96] @ 0x60 800e8c0: 6da2 ldr r2, [r4, #88] @ 0x58 800e8c2: 1886 adds r6, r0, r2 if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 800e8c4: 6d61 ldr r1, [r4, #84] @ 0x54 800e8c6: 4ba4 ldr r3, [pc, #656] @ (800eb58 ) 800e8c8: 681b ldr r3, [r3, #0] 800e8ca: 1acd subs r5, r1, r3 800e8cc: 2d00 cmp r5, #0 800e8ce: db0a blt.n 800e8e6 800e8d0: 4299 cmp r1, r3 800e8d2: d06b beq.n 800e9ac (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 800e8d4: 49a1 ldr r1, [pc, #644] @ (800eb5c ) 800e8d6: 6809 ldr r1, [r1, #0] (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 800e8d8: 428a cmp r2, r1 800e8da: d114 bne.n 800e906 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 800e8dc: 4aa0 ldr r2, [pc, #640] @ (800eb60 ) 800e8de: 6812 ldr r2, [r2, #0] 800e8e0: 89d2 ldrh r2, [r2, #14] 800e8e2: 4290 cmp r0, r2 800e8e4: d20f bcs.n 800e906 pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); 800e8e6: 4a9e ldr r2, [pc, #632] @ (800eb60 ) 800e8e8: 6812 ldr r2, [r2, #0] 800e8ea: 89d2 ldrh r2, [r2, #14] 800e8ec: b290 uxth r0, r2 800e8ee: f8a4 2060 strh.w r2, [r4, #96] @ 0x60 if (pcb->snd_wnd_max < pcb->snd_wnd) { 800e8f2: f8b4 1062 ldrh.w r1, [r4, #98] @ 0x62 800e8f6: 4288 cmp r0, r1 800e8f8: d901 bls.n 800e8fe pcb->snd_wnd_max = pcb->snd_wnd; 800e8fa: f8a4 2062 strh.w r2, [r4, #98] @ 0x62 pcb->snd_wl1 = seqno; 800e8fe: 6563 str r3, [r4, #84] @ 0x54 pcb->snd_wl2 = ackno; 800e900: 4b96 ldr r3, [pc, #600] @ (800eb5c ) 800e902: 681b ldr r3, [r3, #0] 800e904: 65a3 str r3, [r4, #88] @ 0x58 if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { 800e906: 4b95 ldr r3, [pc, #596] @ (800eb5c ) 800e908: 681b ldr r3, [r3, #0] 800e90a: 6c61 ldr r1, [r4, #68] @ 0x44 800e90c: 1a5a subs r2, r3, r1 800e90e: 2a00 cmp r2, #0 800e910: dd52 ble.n 800e9b8 } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 800e912: 2a01 cmp r2, #1 800e914: d403 bmi.n 800e91e 800e916: 6d22 ldr r2, [r4, #80] @ 0x50 800e918: 1a9a subs r2, r3, r2 800e91a: 2a00 cmp r2, #0 800e91c: dd7e ble.n 800ea1c tcp_send_empty_ack(pcb); 800e91e: 4620 mov r0, r4 800e920: f002 fa66 bl 8010df0 if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { 800e924: 6b63 ldr r3, [r4, #52] @ 0x34 800e926: b133 cbz r3, 800e936 800e928: 6ba2 ldr r2, [r4, #56] @ 0x38 800e92a: 498c ldr r1, [pc, #560] @ (800eb5c ) 800e92c: 6809 ldr r1, [r1, #0] 800e92e: 1a52 subs r2, r2, r1 800e930: 2a00 cmp r2, #0 800e932: f2c0 8136 blt.w 800eba2 if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) { 800e936: 4b8b ldr r3, [pc, #556] @ (800eb64 ) 800e938: 881b ldrh r3, [r3, #0] 800e93a: 2b00 cmp r3, #0 800e93c: f000 8435 beq.w 800f1aa 800e940: 7d22 ldrb r2, [r4, #20] 800e942: 2a06 cmp r2, #6 800e944: f200 8431 bhi.w 800f1aa if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { 800e948: 6a61 ldr r1, [r4, #36] @ 0x24 800e94a: 4a83 ldr r2, [pc, #524] @ (800eb58 ) 800e94c: 6812 ldr r2, [r2, #0] 800e94e: 1a8e subs r6, r1, r2 800e950: 2e01 cmp r6, #1 800e952: d405 bmi.n 800e960 800e954: 4413 add r3, r2 800e956: 1acb subs r3, r1, r3 800e958: 3301 adds r3, #1 800e95a: 2b00 cmp r3, #0 800e95c: f340 8147 ble.w 800ebee if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { 800e960: 1a52 subs r2, r2, r1 800e962: 2a00 cmp r2, #0 800e964: f2c0 8185 blt.w 800ec72 if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 800e968: 4b7b ldr r3, [pc, #492] @ (800eb58 ) 800e96a: 681b ldr r3, [r3, #0] 800e96c: 6a61 ldr r1, [r4, #36] @ 0x24 800e96e: 1a5a subs r2, r3, r1 800e970: 2a00 cmp r2, #0 800e972: db06 blt.n 800e982 800e974: 8d22 ldrh r2, [r4, #40] @ 0x28 800e976: 440a add r2, r1 800e978: 1a9a subs r2, r3, r2 800e97a: 3201 adds r2, #1 800e97c: 2a00 cmp r2, #0 800e97e: f340 817d ble.w 800ec7c tcp_send_empty_ack(pcb); 800e982: 4620 mov r0, r4 800e984: f002 fa34 bl 8010df0 800e988: f000 bc1f b.w 800f1ca LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL); 800e98c: 4b76 ldr r3, [pc, #472] @ (800eb68 ) 800e98e: f240 427b movw r2, #1147 @ 0x47b 800e992: 4976 ldr r1, [pc, #472] @ (800eb6c ) 800e994: 4876 ldr r0, [pc, #472] @ (800eb70 ) 800e996: f004 fd37 bl 8013408 800e99a: e787 b.n 800e8ac LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); 800e99c: 4b72 ldr r3, [pc, #456] @ (800eb68 ) 800e99e: f240 427c movw r2, #1148 @ 0x47c 800e9a2: 4974 ldr r1, [pc, #464] @ (800eb74 ) 800e9a4: 4872 ldr r0, [pc, #456] @ (800eb70 ) 800e9a6: f004 fd2f bl 8013408 800e9aa: e782 b.n 800e8b2 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 800e9ac: 496b ldr r1, [pc, #428] @ (800eb5c ) 800e9ae: 6809 ldr r1, [r1, #0] 800e9b0: 1a51 subs r1, r2, r1 800e9b2: 2900 cmp r1, #0 800e9b4: da8e bge.n 800e8d4 800e9b6: e796 b.n 800e8e6 if (tcplen == 0) { 800e9b8: 4a6a ldr r2, [pc, #424] @ (800eb64 ) 800e9ba: 8812 ldrh r2, [r2, #0] 800e9bc: b92a cbnz r2, 800e9ca if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { 800e9be: 6da2 ldr r2, [r4, #88] @ 0x58 800e9c0: f8b4 0060 ldrh.w r0, [r4, #96] @ 0x60 800e9c4: 4402 add r2, r0 800e9c6: 42b2 cmp r2, r6 800e9c8: d003 beq.n 800e9d2 pcb->dupacks = 0; 800e9ca: 2300 movs r3, #0 800e9cc: f884 3043 strb.w r3, [r4, #67] @ 0x43 800e9d0: e7a8 b.n 800e924 if (pcb->rtime >= 0) { 800e9d2: f9b4 2030 ldrsh.w r2, [r4, #48] @ 0x30 800e9d6: 2a00 cmp r2, #0 800e9d8: dbf7 blt.n 800e9ca if (pcb->lastack == ackno) { 800e9da: 428b cmp r3, r1 800e9dc: d1f5 bne.n 800e9ca if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 800e9de: f894 3043 ldrb.w r3, [r4, #67] @ 0x43 800e9e2: 2bff cmp r3, #255 @ 0xff 800e9e4: d002 beq.n 800e9ec ++pcb->dupacks; 800e9e6: 3301 adds r3, #1 800e9e8: f884 3043 strb.w r3, [r4, #67] @ 0x43 if (pcb->dupacks > 3) { 800e9ec: f894 3043 ldrb.w r3, [r4, #67] @ 0x43 800e9f0: 2b03 cmp r3, #3 800e9f2: d908 bls.n 800ea06 TCP_WND_INC(pcb->cwnd, pcb->mss); 800e9f4: f8b4 1048 ldrh.w r1, [r4, #72] @ 0x48 800e9f8: 8e62 ldrh r2, [r4, #50] @ 0x32 800e9fa: 440a add r2, r1 800e9fc: b292 uxth r2, r2 800e9fe: 4291 cmp r1, r2 800ea00: d807 bhi.n 800ea12 800ea02: f8a4 2048 strh.w r2, [r4, #72] @ 0x48 if (pcb->dupacks >= 3) { 800ea06: 2b02 cmp r3, #2 800ea08: d98c bls.n 800e924 tcp_rexmit_fast(pcb); 800ea0a: 4620 mov r0, r4 800ea0c: f002 f96a bl 8010ce4 if (!found_dupack) { 800ea10: e788 b.n 800e924 TCP_WND_INC(pcb->cwnd, pcb->mss); 800ea12: f64f 72ff movw r2, #65535 @ 0xffff 800ea16: f8a4 2048 strh.w r2, [r4, #72] @ 0x48 800ea1a: e7f4 b.n 800ea06 if (pcb->flags & TF_INFR) { 800ea1c: 8b62 ldrh r2, [r4, #26] 800ea1e: f012 0f04 tst.w r2, #4 800ea22: d009 beq.n 800ea38 tcp_clear_flags(pcb, TF_INFR); 800ea24: f022 0204 bic.w r2, r2, #4 800ea28: 8362 strh r2, [r4, #26] pcb->cwnd = pcb->ssthresh; 800ea2a: f8b4 204a ldrh.w r2, [r4, #74] @ 0x4a 800ea2e: f8a4 2048 strh.w r2, [r4, #72] @ 0x48 pcb->bytes_acked = 0; 800ea32: 2200 movs r2, #0 800ea34: f8a4 206a strh.w r2, [r4, #106] @ 0x6a pcb->nrtx = 0; 800ea38: 2000 movs r0, #0 800ea3a: f884 0042 strb.w r0, [r4, #66] @ 0x42 pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 800ea3e: f9b4 503c ldrsh.w r5, [r4, #60] @ 0x3c 800ea42: 8fe2 ldrh r2, [r4, #62] @ 0x3e 800ea44: eb02 02e5 add.w r2, r2, r5, asr #3 800ea48: f8a4 2040 strh.w r2, [r4, #64] @ 0x40 acked = (tcpwnd_size_t)(ackno - pcb->lastack); 800ea4c: b29a uxth r2, r3 800ea4e: b289 uxth r1, r1 800ea50: 1a52 subs r2, r2, r1 800ea52: b292 uxth r2, r2 pcb->dupacks = 0; 800ea54: f884 0043 strb.w r0, [r4, #67] @ 0x43 pcb->lastack = ackno; 800ea58: 6463 str r3, [r4, #68] @ 0x44 if (pcb->state >= ESTABLISHED) { 800ea5a: 7d23 ldrb r3, [r4, #20] 800ea5c: 2b03 cmp r3, #3 800ea5e: d917 bls.n 800ea90 if (pcb->cwnd < pcb->ssthresh) { 800ea60: f8b4 3048 ldrh.w r3, [r4, #72] @ 0x48 800ea64: f8b4 104a ldrh.w r1, [r4, #74] @ 0x4a 800ea68: 428b cmp r3, r1 800ea6a: d24b bcs.n 800eb04 u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2; 800ea6c: 8b61 ldrh r1, [r4, #26] 800ea6e: f411 6f00 tst.w r1, #2048 @ 0x800 800ea72: d040 beq.n 800eaf6 800ea74: 2101 movs r1, #1 increase = LWIP_MIN(acked, (tcpwnd_size_t)(num_seg * pcb->mss)); 800ea76: 8e60 ldrh r0, [r4, #50] @ 0x32 800ea78: fb11 f100 smulbb r1, r1, r0 800ea7c: b289 uxth r1, r1 TCP_WND_INC(pcb->cwnd, increase); 800ea7e: 4291 cmp r1, r2 800ea80: bf94 ite ls 800ea82: 1858 addls r0, r3, r1 800ea84: 1898 addhi r0, r3, r2 800ea86: b282 uxth r2, r0 800ea88: 4293 cmp r3, r2 800ea8a: d836 bhi.n 800eafa 800ea8c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48 pcb->unacked = tcp_free_acked_segments(pcb, pcb->unacked, "unacked", pcb->unsent); 800ea90: 6ee3 ldr r3, [r4, #108] @ 0x6c 800ea92: 4a39 ldr r2, [pc, #228] @ (800eb78 ) 800ea94: 6f21 ldr r1, [r4, #112] @ 0x70 800ea96: 4620 mov r0, r4 800ea98: f7ff fe50 bl 800e73c 800ea9c: 4603 mov r3, r0 800ea9e: 6720 str r0, [r4, #112] @ 0x70 pcb->unsent = tcp_free_acked_segments(pcb, pcb->unsent, "unsent", pcb->unacked); 800eaa0: 4a36 ldr r2, [pc, #216] @ (800eb7c ) 800eaa2: 6ee1 ldr r1, [r4, #108] @ 0x6c 800eaa4: 4620 mov r0, r4 800eaa6: f7ff fe49 bl 800e73c 800eaaa: 66e0 str r0, [r4, #108] @ 0x6c if (pcb->unacked == NULL) { 800eaac: 6f22 ldr r2, [r4, #112] @ 0x70 800eaae: 2a00 cmp r2, #0 800eab0: d049 beq.n 800eb46 pcb->rtime = 0; 800eab2: 2300 movs r3, #0 800eab4: 8623 strh r3, [r4, #48] @ 0x30 pcb->polltmr = 0; 800eab6: 2300 movs r3, #0 800eab8: 7723 strb r3, [r4, #28] if (pcb->unsent == NULL) { 800eaba: 2800 cmp r0, #0 800eabc: d047 beq.n 800eb4e pcb->snd_buf = (tcpwnd_size_t)(pcb->snd_buf + recv_acked); 800eabe: f8b4 3064 ldrh.w r3, [r4, #100] @ 0x64 800eac2: 492f ldr r1, [pc, #188] @ (800eb80 ) 800eac4: 8809 ldrh r1, [r1, #0] 800eac6: 440b add r3, r1 800eac8: f8a4 3064 strh.w r3, [r4, #100] @ 0x64 if (pcb->flags & TF_RTO) { 800eacc: 8b63 ldrh r3, [r4, #26] 800eace: f413 6f00 tst.w r3, #2048 @ 0x800 800ead2: f43f af27 beq.w 800e924 if (pcb->unacked == NULL) { 800ead6: 2a00 cmp r2, #0 800ead8: d054 beq.n 800eb84 } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) { 800eada: 6ce5 ldr r5, [r4, #76] @ 0x4c 800eadc: 6913 ldr r3, [r2, #16] 800eade: 6858 ldr r0, [r3, #4] 800eae0: f7f9 f9d1 bl 8007e86 800eae4: 1a2d subs r5, r5, r0 800eae6: 2d00 cmp r5, #0 800eae8: f73f af1c bgt.w 800e924 tcp_clear_flags(pcb, TF_RTO); 800eaec: 8b63 ldrh r3, [r4, #26] 800eaee: f423 6300 bic.w r3, r3, #2048 @ 0x800 800eaf2: 8363 strh r3, [r4, #26] 800eaf4: e716 b.n 800e924 u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2; 800eaf6: 2102 movs r1, #2 800eaf8: e7bd b.n 800ea76 TCP_WND_INC(pcb->cwnd, increase); 800eafa: f64f 73ff movw r3, #65535 @ 0xffff 800eafe: f8a4 3048 strh.w r3, [r4, #72] @ 0x48 800eb02: e7c5 b.n 800ea90 TCP_WND_INC(pcb->bytes_acked, acked); 800eb04: f8b4 106a ldrh.w r1, [r4, #106] @ 0x6a 800eb08: 440a add r2, r1 800eb0a: b292 uxth r2, r2 800eb0c: 4291 cmp r1, r2 800eb0e: d810 bhi.n 800eb32 800eb10: f8a4 206a strh.w r2, [r4, #106] @ 0x6a if (pcb->bytes_acked >= pcb->cwnd) { 800eb14: f8b4 206a ldrh.w r2, [r4, #106] @ 0x6a 800eb18: 4293 cmp r3, r2 800eb1a: d8b9 bhi.n 800ea90 pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd); 800eb1c: 1ad2 subs r2, r2, r3 800eb1e: f8a4 206a strh.w r2, [r4, #106] @ 0x6a TCP_WND_INC(pcb->cwnd, pcb->mss); 800eb22: 8e62 ldrh r2, [r4, #50] @ 0x32 800eb24: 441a add r2, r3 800eb26: b292 uxth r2, r2 800eb28: 4293 cmp r3, r2 800eb2a: d807 bhi.n 800eb3c 800eb2c: f8a4 2048 strh.w r2, [r4, #72] @ 0x48 800eb30: e7ae b.n 800ea90 TCP_WND_INC(pcb->bytes_acked, acked); 800eb32: f64f 72ff movw r2, #65535 @ 0xffff 800eb36: f8a4 206a strh.w r2, [r4, #106] @ 0x6a 800eb3a: e7eb b.n 800eb14 TCP_WND_INC(pcb->cwnd, pcb->mss); 800eb3c: f64f 73ff movw r3, #65535 @ 0xffff 800eb40: f8a4 3048 strh.w r3, [r4, #72] @ 0x48 800eb44: e7a4 b.n 800ea90 pcb->rtime = -1; 800eb46: f64f 73ff movw r3, #65535 @ 0xffff 800eb4a: 8623 strh r3, [r4, #48] @ 0x30 800eb4c: e7b3 b.n 800eab6 pcb->unsent_oversize = 0; 800eb4e: f8a4 3068 strh.w r3, [r4, #104] @ 0x68 800eb52: e7b4 b.n 800eabe 800eb54: 24019bf1 .word 0x24019bf1 800eb58: 24019bfc .word 0x24019bfc 800eb5c: 24019bf8 .word 0x24019bf8 800eb60: 24019c0c .word 0x24019c0c 800eb64: 24019bf2 .word 0x24019bf2 800eb68: 08016c64 .word 0x08016c64 800eb6c: 08016dbc .word 0x08016dbc 800eb70: 080144e8 .word 0x080144e8 800eb74: 08016dd8 .word 0x08016dd8 800eb78: 08016df4 .word 0x08016df4 800eb7c: 08016dfc .word 0x08016dfc 800eb80: 24019bf4 .word 0x24019bf4 if ((pcb->unsent == NULL) || 800eb84: b140 cbz r0, 800eb98 (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) { 800eb86: 6ce5 ldr r5, [r4, #76] @ 0x4c 800eb88: 6903 ldr r3, [r0, #16] 800eb8a: 6858 ldr r0, [r3, #4] 800eb8c: f7f9 f97b bl 8007e86 800eb90: 1a2d subs r5, r5, r0 if ((pcb->unsent == NULL) || 800eb92: 2d00 cmp r5, #0 800eb94: f73f aec6 bgt.w 800e924 tcp_clear_flags(pcb, TF_RTO); 800eb98: 8b63 ldrh r3, [r4, #26] 800eb9a: f423 6300 bic.w r3, r3, #2048 @ 0x800 800eb9e: 8363 strh r3, [r4, #26] 800eba0: e6c0 b.n 800e924 m = (s16_t)(tcp_ticks - pcb->rttest); 800eba2: 4a88 ldr r2, [pc, #544] @ (800edc4 ) 800eba4: 8816 ldrh r6, [r2, #0] 800eba6: b29b uxth r3, r3 800eba8: 1af2 subs r2, r6, r3 800ebaa: b292 uxth r2, r2 m = (s16_t)(m - (pcb->sa >> 3)); 800ebac: f9b4 003c ldrsh.w r0, [r4, #60] @ 0x3c 800ebb0: f3c0 05cf ubfx r5, r0, #3, #16 800ebb4: 1b52 subs r2, r2, r5 800ebb6: b211 sxth r1, r2 pcb->sa = (s16_t)(pcb->sa + m); 800ebb8: b280 uxth r0, r0 800ebba: fa10 f282 uxtah r2, r0, r2 800ebbe: b212 sxth r2, r2 800ebc0: 87a2 strh r2, [r4, #60] @ 0x3c if (m < 0) { 800ebc2: 2900 cmp r1, #0 800ebc4: db0f blt.n 800ebe6 m = (s16_t)(m - (pcb->sv >> 2)); 800ebc6: f9b4 303e ldrsh.w r3, [r4, #62] @ 0x3e 800ebca: eba1 01a3 sub.w r1, r1, r3, asr #2 pcb->sv = (s16_t)(pcb->sv + m); 800ebce: b29b uxth r3, r3 800ebd0: fa13 f181 uxtah r1, r3, r1 800ebd4: 87e1 strh r1, [r4, #62] @ 0x3e pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 800ebd6: 10d2 asrs r2, r2, #3 800ebd8: fa12 f181 uxtah r1, r2, r1 800ebdc: f8a4 1040 strh.w r1, [r4, #64] @ 0x40 pcb->rttest = 0; 800ebe0: 2300 movs r3, #0 800ebe2: 6363 str r3, [r4, #52] @ 0x34 800ebe4: e6a7 b.n 800e936 m = (s16_t) - m; 800ebe6: 1b9b subs r3, r3, r6 800ebe8: 441d add r5, r3 800ebea: b229 sxth r1, r5 800ebec: e7eb b.n 800ebc6 struct pbuf *p = inseg.p; 800ebee: 4b76 ldr r3, [pc, #472] @ (800edc8 ) 800ebf0: 685d ldr r5, [r3, #4] LWIP_ASSERT("inseg.p != NULL", inseg.p); 800ebf2: b1dd cbz r5, 800ec2c LWIP_ASSERT("insane offset!", (off32 < 0xffff)); 800ebf4: f64f 73fe movw r3, #65534 @ 0xfffe 800ebf8: 429e cmp r6, r3 800ebfa: d81f bhi.n 800ec3c off = (u16_t)off32; 800ebfc: b2b6 uxth r6, r6 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); 800ebfe: 4b72 ldr r3, [pc, #456] @ (800edc8 ) 800ec00: 685b ldr r3, [r3, #4] 800ec02: 891b ldrh r3, [r3, #8] 800ec04: 42b3 cmp r3, r6 800ec06: d321 bcc.n 800ec4c inseg.len -= off; 800ec08: 4b6f ldr r3, [pc, #444] @ (800edc8 ) 800ec0a: 891a ldrh r2, [r3, #8] 800ec0c: 1b92 subs r2, r2, r6 800ec0e: 811a strh r2, [r3, #8] new_tot_len = (u16_t)(inseg.p->tot_len - off); 800ec10: 685b ldr r3, [r3, #4] 800ec12: 891a ldrh r2, [r3, #8] 800ec14: 1b92 subs r2, r2, r6 800ec16: b292 uxth r2, r2 while (p->len < off) { 800ec18: 896b ldrh r3, [r5, #10] 800ec1a: 42b3 cmp r3, r6 800ec1c: d21e bcs.n 800ec5c off -= p->len; 800ec1e: 1af3 subs r3, r6, r3 800ec20: b29e uxth r6, r3 p->tot_len = new_tot_len; 800ec22: 812a strh r2, [r5, #8] p->len = 0; 800ec24: 2300 movs r3, #0 800ec26: 816b strh r3, [r5, #10] p = p->next; 800ec28: 682d ldr r5, [r5, #0] 800ec2a: e7f5 b.n 800ec18 LWIP_ASSERT("inseg.p != NULL", inseg.p); 800ec2c: 4b67 ldr r3, [pc, #412] @ (800edcc ) 800ec2e: f240 5294 movw r2, #1428 @ 0x594 800ec32: 4967 ldr r1, [pc, #412] @ (800edd0 ) 800ec34: 4867 ldr r0, [pc, #412] @ (800edd4 ) 800ec36: f004 fbe7 bl 8013408 800ec3a: e7db b.n 800ebf4 LWIP_ASSERT("insane offset!", (off32 < 0xffff)); 800ec3c: 4b63 ldr r3, [pc, #396] @ (800edcc ) 800ec3e: f240 5295 movw r2, #1429 @ 0x595 800ec42: 4965 ldr r1, [pc, #404] @ (800edd8 ) 800ec44: 4863 ldr r0, [pc, #396] @ (800edd4 ) 800ec46: f004 fbdf bl 8013408 800ec4a: e7d7 b.n 800ebfc LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); 800ec4c: 4b5f ldr r3, [pc, #380] @ (800edcc ) 800ec4e: f240 5297 movw r2, #1431 @ 0x597 800ec52: 4962 ldr r1, [pc, #392] @ (800eddc ) 800ec54: 485f ldr r0, [pc, #380] @ (800edd4 ) 800ec56: f004 fbd7 bl 8013408 800ec5a: e7d5 b.n 800ec08 pbuf_remove_header(p, off); 800ec5c: 4631 mov r1, r6 800ec5e: 4628 mov r0, r5 800ec60: f7fd f858 bl 800bd14 inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 800ec64: 6a63 ldr r3, [r4, #36] @ 0x24 800ec66: 4a5e ldr r2, [pc, #376] @ (800ede0 ) 800ec68: 6013 str r3, [r2, #0] 800ec6a: 4a57 ldr r2, [pc, #348] @ (800edc8 ) 800ec6c: 6912 ldr r2, [r2, #16] 800ec6e: 6053 str r3, [r2, #4] if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { 800ec70: e67a b.n 800e968 tcp_ack_now(pcb); 800ec72: 8b63 ldrh r3, [r4, #26] 800ec74: f043 0302 orr.w r3, r3, #2 800ec78: 8363 strh r3, [r4, #26] 800ec7a: e675 b.n 800e968 if (pcb->rcv_nxt == seqno) { 800ec7c: 428b cmp r3, r1 800ec7e: d005 beq.n 800ec8c if (pcb->ooseq == NULL) { 800ec80: 6f65 ldr r5, [r4, #116] @ 0x74 800ec82: 2d00 cmp r5, #0 800ec84: f000 81aa beq.w 800efdc struct tcp_seg *next, *prev = NULL; 800ec88: 2600 movs r6, #0 800ec8a: e1cc b.n 800f026 tcplen = TCP_TCPLEN(&inseg); 800ec8c: 4b4e ldr r3, [pc, #312] @ (800edc8 ) 800ec8e: 891d ldrh r5, [r3, #8] 800ec90: 691b ldr r3, [r3, #16] 800ec92: 8998 ldrh r0, [r3, #12] 800ec94: f7f9 f8f2 bl 8007e7c 800ec98: f010 0f03 tst.w r0, #3 800ec9c: d014 beq.n 800ecc8 800ec9e: 2301 movs r3, #1 800eca0: 442b add r3, r5 800eca2: b29b uxth r3, r3 800eca4: 4a4f ldr r2, [pc, #316] @ (800ede4 ) 800eca6: 8013 strh r3, [r2, #0] if (tcplen > pcb->rcv_wnd) { 800eca8: 8d22 ldrh r2, [r4, #40] @ 0x28 800ecaa: 4293 cmp r3, r2 800ecac: d80e bhi.n 800eccc if (pcb->ooseq != NULL) { 800ecae: 6f63 ldr r3, [r4, #116] @ 0x74 800ecb0: 2b00 cmp r3, #0 800ecb2: d05d beq.n 800ed70 if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 800ecb4: 4b44 ldr r3, [pc, #272] @ (800edc8 ) 800ecb6: 691b ldr r3, [r3, #16] 800ecb8: 8998 ldrh r0, [r3, #12] 800ecba: f7f9 f8df bl 8007e7c 800ecbe: f010 0f01 tst.w r0, #1 800ecc2: d152 bne.n 800ed6a struct tcp_seg *next = pcb->ooseq; 800ecc4: 6f65 ldr r5, [r4, #116] @ 0x74 while (next && 800ecc6: e09e b.n 800ee06 tcplen = TCP_TCPLEN(&inseg); 800ecc8: 2300 movs r3, #0 800ecca: e7e9 b.n 800eca0 if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 800eccc: 4b3e ldr r3, [pc, #248] @ (800edc8 ) 800ecce: 691b ldr r3, [r3, #16] 800ecd0: 8998 ldrh r0, [r3, #12] 800ecd2: f7f9 f8d3 bl 8007e7c 800ecd6: f010 0f01 tst.w r0, #1 800ecda: d12f bne.n 800ed3c inseg.len = (u16_t)pcb->rcv_wnd; 800ecdc: 8d22 ldrh r2, [r4, #40] @ 0x28 800ecde: 4b3a ldr r3, [pc, #232] @ (800edc8 ) 800ece0: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 800ece2: 691b ldr r3, [r3, #16] 800ece4: 8998 ldrh r0, [r3, #12] 800ece6: f7f9 f8c9 bl 8007e7c 800ecea: f010 0f02 tst.w r0, #2 800ecee: d003 beq.n 800ecf8 inseg.len -= 1; 800ecf0: 4a35 ldr r2, [pc, #212] @ (800edc8 ) 800ecf2: 8913 ldrh r3, [r2, #8] 800ecf4: 3b01 subs r3, #1 800ecf6: 8113 strh r3, [r2, #8] pbuf_realloc(inseg.p, inseg.len); 800ecf8: 4d33 ldr r5, [pc, #204] @ (800edc8 ) 800ecfa: 8929 ldrh r1, [r5, #8] 800ecfc: 6868 ldr r0, [r5, #4] 800ecfe: f7fd f965 bl 800bfcc tcplen = TCP_TCPLEN(&inseg); 800ed02: 892e ldrh r6, [r5, #8] 800ed04: 692b ldr r3, [r5, #16] 800ed06: 8998 ldrh r0, [r3, #12] 800ed08: f7f9 f8b8 bl 8007e7c 800ed0c: f010 0f03 tst.w r0, #3 800ed10: d025 beq.n 800ed5e 800ed12: 2301 movs r3, #1 800ed14: 4433 add r3, r6 800ed16: b29b uxth r3, r3 800ed18: 4a32 ldr r2, [pc, #200] @ (800ede4 ) 800ed1a: 8013 strh r3, [r2, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 800ed1c: 4a30 ldr r2, [pc, #192] @ (800ede0 ) 800ed1e: 6812 ldr r2, [r2, #0] 800ed20: 4413 add r3, r2 800ed22: 6a62 ldr r2, [r4, #36] @ 0x24 800ed24: 8d21 ldrh r1, [r4, #40] @ 0x28 800ed26: 440a add r2, r1 800ed28: 4293 cmp r3, r2 800ed2a: d0c0 beq.n 800ecae 800ed2c: 4b27 ldr r3, [pc, #156] @ (800edcc ) 800ed2e: f240 52cb movw r2, #1483 @ 0x5cb 800ed32: 492d ldr r1, [pc, #180] @ (800ede8 ) 800ed34: 4827 ldr r0, [pc, #156] @ (800edd4 ) 800ed36: f004 fb67 bl 8013408 800ed3a: e7b8 b.n 800ecae TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) & ~(unsigned int)TCP_FIN); 800ed3c: 4e22 ldr r6, [pc, #136] @ (800edc8 ) 800ed3e: 6933 ldr r3, [r6, #16] 800ed40: 899d ldrh r5, [r3, #12] 800ed42: 4628 mov r0, r5 800ed44: f7f9 f89a bl 8007e7c 800ed48: f000 003e and.w r0, r0, #62 @ 0x3e 800ed4c: f7f9 f896 bl 8007e7c 800ed50: 6932 ldr r2, [r6, #16] 800ed52: f425 557c bic.w r5, r5, #16128 @ 0x3f00 800ed56: ea40 0305 orr.w r3, r0, r5 800ed5a: 8193 strh r3, [r2, #12] 800ed5c: e7be b.n 800ecdc tcplen = TCP_TCPLEN(&inseg); 800ed5e: 2300 movs r3, #0 800ed60: e7d8 b.n 800ed14 pcb->ooseq = pcb->ooseq->next; 800ed62: 6803 ldr r3, [r0, #0] 800ed64: 6763 str r3, [r4, #116] @ 0x74 tcp_seg_free(old_ooseq); 800ed66: f7fe fb21 bl 800d3ac while (pcb->ooseq != NULL) { 800ed6a: 6f60 ldr r0, [r4, #116] @ 0x74 800ed6c: 2800 cmp r0, #0 800ed6e: d1f8 bne.n 800ed62 pcb->rcv_nxt = seqno + tcplen; 800ed70: 4b1c ldr r3, [pc, #112] @ (800ede4 ) 800ed72: 881a ldrh r2, [r3, #0] 800ed74: 4b1a ldr r3, [pc, #104] @ (800ede0 ) 800ed76: 681b ldr r3, [r3, #0] 800ed78: 4413 add r3, r2 800ed7a: 6263 str r3, [r4, #36] @ 0x24 LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); 800ed7c: 8d23 ldrh r3, [r4, #40] @ 0x28 800ed7e: 429a cmp r2, r3 800ed80: f200 80ad bhi.w 800eede pcb->rcv_wnd -= tcplen; 800ed84: 8d23 ldrh r3, [r4, #40] @ 0x28 800ed86: 4a17 ldr r2, [pc, #92] @ (800ede4 ) 800ed88: 8812 ldrh r2, [r2, #0] 800ed8a: 1a9b subs r3, r3, r2 800ed8c: 8523 strh r3, [r4, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 800ed8e: 4620 mov r0, r4 800ed90: f7fe fa90 bl 800d2b4 if (inseg.p->tot_len > 0) { 800ed94: 4b0c ldr r3, [pc, #48] @ (800edc8 ) 800ed96: 685b ldr r3, [r3, #4] 800ed98: 891a ldrh r2, [r3, #8] 800ed9a: b122 cbz r2, 800eda6 recv_data = inseg.p; 800ed9c: 4a13 ldr r2, [pc, #76] @ (800edec ) 800ed9e: 6013 str r3, [r2, #0] inseg.p = NULL; 800eda0: 4b09 ldr r3, [pc, #36] @ (800edc8 ) 800eda2: 2200 movs r2, #0 800eda4: 605a str r2, [r3, #4] if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 800eda6: 4b08 ldr r3, [pc, #32] @ (800edc8 ) 800eda8: 691b ldr r3, [r3, #16] 800edaa: 8998 ldrh r0, [r3, #12] 800edac: f7f9 f866 bl 8007e7c 800edb0: f010 0f01 tst.w r0, #1 800edb4: f000 80c1 beq.w 800ef3a recv_flags |= TF_GOT_FIN; 800edb8: 4a0d ldr r2, [pc, #52] @ (800edf0 ) 800edba: 7813 ldrb r3, [r2, #0] 800edbc: f043 0320 orr.w r3, r3, #32 800edc0: 7013 strb r3, [r2, #0] 800edc2: e0ba b.n 800ef3a 800edc4: 24019be4 .word 0x24019be4 800edc8: 24019c10 .word 0x24019c10 800edcc: 08016c64 .word 0x08016c64 800edd0: 08016e04 .word 0x08016e04 800edd4: 080144e8 .word 0x080144e8 800edd8: 08016e14 .word 0x08016e14 800eddc: 08016e24 .word 0x08016e24 800ede0: 24019bfc .word 0x24019bfc 800ede4: 24019bf2 .word 0x24019bf2 800ede8: 08016e34 .word 0x08016e34 800edec: 24019bec .word 0x24019bec 800edf0: 24019bf0 .word 0x24019bf0 tcplen = TCP_TCPLEN(&inseg); 800edf4: 2300 movs r3, #0 800edf6: 443b add r3, r7 800edf8: 4a9e ldr r2, [pc, #632] @ (800f074 ) 800edfa: 8013 strh r3, [r2, #0] next = next->next; 800edfc: 682e ldr r6, [r5, #0] tcp_seg_free(tmp); 800edfe: 4628 mov r0, r5 800ee00: f7fe fad4 bl 800d3ac next = next->next; 800ee04: 4635 mov r5, r6 while (next && 800ee06: b365 cbz r5, 800ee62 TCP_SEQ_GEQ(seqno + tcplen, 800ee08: 4b9a ldr r3, [pc, #616] @ (800f074 ) 800ee0a: 881b ldrh r3, [r3, #0] 800ee0c: 4a9a ldr r2, [pc, #616] @ (800f078 ) 800ee0e: 6812 ldr r2, [r2, #0] 800ee10: 4413 add r3, r2 800ee12: 6929 ldr r1, [r5, #16] 800ee14: 684a ldr r2, [r1, #4] 800ee16: 8928 ldrh r0, [r5, #8] 800ee18: 4402 add r2, r0 800ee1a: 1a9b subs r3, r3, r2 while (next && 800ee1c: 2b00 cmp r3, #0 800ee1e: db20 blt.n 800ee62 if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && 800ee20: 8988 ldrh r0, [r1, #12] 800ee22: f7f9 f82b bl 8007e7c 800ee26: f010 0f01 tst.w r0, #1 800ee2a: d0e7 beq.n 800edfc (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { 800ee2c: 4b93 ldr r3, [pc, #588] @ (800f07c ) 800ee2e: 691b ldr r3, [r3, #16] 800ee30: 8998 ldrh r0, [r3, #12] 800ee32: f7f9 f823 bl 8007e7c if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && 800ee36: f010 0f02 tst.w r0, #2 800ee3a: d1df bne.n 800edfc TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); 800ee3c: 4e8f ldr r6, [pc, #572] @ (800f07c ) 800ee3e: 6933 ldr r3, [r6, #16] 800ee40: 899f ldrh r7, [r3, #12] 800ee42: 2001 movs r0, #1 800ee44: f7f9 f81a bl 8007e7c 800ee48: 6933 ldr r3, [r6, #16] 800ee4a: 4307 orrs r7, r0 800ee4c: 819f strh r7, [r3, #12] tcplen = TCP_TCPLEN(&inseg); 800ee4e: 8937 ldrh r7, [r6, #8] 800ee50: 6933 ldr r3, [r6, #16] 800ee52: 8998 ldrh r0, [r3, #12] 800ee54: f7f9 f812 bl 8007e7c 800ee58: f010 0f03 tst.w r0, #3 800ee5c: d0ca beq.n 800edf4 800ee5e: 2301 movs r3, #1 800ee60: e7c9 b.n 800edf6 if (next && 800ee62: b14d cbz r5, 800ee78 TCP_SEQ_GT(seqno + tcplen, 800ee64: 4b84 ldr r3, [pc, #528] @ (800f078 ) 800ee66: 6819 ldr r1, [r3, #0] 800ee68: 4b82 ldr r3, [pc, #520] @ (800f074 ) 800ee6a: 881b ldrh r3, [r3, #0] 800ee6c: 440b add r3, r1 800ee6e: 692a ldr r2, [r5, #16] 800ee70: 6852 ldr r2, [r2, #4] 800ee72: 1a9b subs r3, r3, r2 if (next && 800ee74: 2b00 cmp r3, #0 800ee76: dc01 bgt.n 800ee7c pcb->ooseq = next; 800ee78: 6765 str r5, [r4, #116] @ 0x74 800ee7a: e779 b.n 800ed70 inseg.len = (u16_t)(next->tcphdr->seqno - seqno); 800ee7c: 1a52 subs r2, r2, r1 800ee7e: 4b7f ldr r3, [pc, #508] @ (800f07c ) 800ee80: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 800ee82: 691b ldr r3, [r3, #16] 800ee84: 8998 ldrh r0, [r3, #12] 800ee86: f7f8 fff9 bl 8007e7c 800ee8a: f010 0f02 tst.w r0, #2 800ee8e: d003 beq.n 800ee98 inseg.len -= 1; 800ee90: 4a7a ldr r2, [pc, #488] @ (800f07c ) 800ee92: 8913 ldrh r3, [r2, #8] 800ee94: 3b01 subs r3, #1 800ee96: 8113 strh r3, [r2, #8] pbuf_realloc(inseg.p, inseg.len); 800ee98: 4e78 ldr r6, [pc, #480] @ (800f07c ) 800ee9a: 8931 ldrh r1, [r6, #8] 800ee9c: 6870 ldr r0, [r6, #4] 800ee9e: f7fd f895 bl 800bfcc tcplen = TCP_TCPLEN(&inseg); 800eea2: 8937 ldrh r7, [r6, #8] 800eea4: 6933 ldr r3, [r6, #16] 800eea6: 8998 ldrh r0, [r3, #12] 800eea8: f7f8 ffe8 bl 8007e7c 800eeac: f010 0f03 tst.w r0, #3 800eeb0: d013 beq.n 800eeda 800eeb2: 2301 movs r3, #1 800eeb4: 443b add r3, r7 800eeb6: b29b uxth r3, r3 800eeb8: 4a6e ldr r2, [pc, #440] @ (800f074 ) 800eeba: 8013 strh r3, [r2, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", 800eebc: 4a6e ldr r2, [pc, #440] @ (800f078 ) 800eebe: 6812 ldr r2, [r2, #0] 800eec0: 4413 add r3, r2 800eec2: 692a ldr r2, [r5, #16] 800eec4: 6852 ldr r2, [r2, #4] 800eec6: 4293 cmp r3, r2 800eec8: d0d6 beq.n 800ee78 800eeca: 4b6d ldr r3, [pc, #436] @ (800f080 ) 800eecc: f240 52fc movw r2, #1532 @ 0x5fc 800eed0: 496c ldr r1, [pc, #432] @ (800f084 ) 800eed2: 486d ldr r0, [pc, #436] @ (800f088 ) 800eed4: f004 fa98 bl 8013408 800eed8: e7ce b.n 800ee78 tcplen = TCP_TCPLEN(&inseg); 800eeda: 2300 movs r3, #0 800eedc: e7ea b.n 800eeb4 LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); 800eede: 4b68 ldr r3, [pc, #416] @ (800f080 ) 800eee0: f240 6207 movw r2, #1543 @ 0x607 800eee4: 4969 ldr r1, [pc, #420] @ (800f08c ) 800eee6: 4868 ldr r0, [pc, #416] @ (800f088 ) 800eee8: f004 fa8e bl 8013408 800eeec: e74a b.n 800ed84 pcb->rcv_nxt += TCP_TCPLEN(cseg); 800eeee: 2200 movs r2, #0 800eef0: e035 b.n 800ef5e LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", 800eef2: 2300 movs r3, #0 800eef4: e041 b.n 800ef7a 800eef6: 4b62 ldr r3, [pc, #392] @ (800f080 ) 800eef8: f240 622b movw r2, #1579 @ 0x62b 800eefc: 4964 ldr r1, [pc, #400] @ (800f090 ) 800eefe: 4862 ldr r0, [pc, #392] @ (800f088 ) 800ef00: f004 fa82 bl 8013408 800ef04: e03c b.n 800ef80 pcb->rcv_wnd -= TCP_TCPLEN(cseg); 800ef06: 2200 movs r2, #0 800ef08: e043 b.n 800ef92 recv_data = cseg->p; 800ef0a: 4b62 ldr r3, [pc, #392] @ (800f094 ) 800ef0c: 6019 str r1, [r3, #0] cseg->p = NULL; 800ef0e: 2300 movs r3, #0 800ef10: 606b str r3, [r5, #4] if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 800ef12: 692b ldr r3, [r5, #16] 800ef14: 8998 ldrh r0, [r3, #12] 800ef16: f7f8 ffb1 bl 8007e7c 800ef1a: f010 0f01 tst.w r0, #1 800ef1e: d007 beq.n 800ef30 recv_flags |= TF_GOT_FIN; 800ef20: 4a5d ldr r2, [pc, #372] @ (800f098 ) 800ef22: 7813 ldrb r3, [r2, #0] 800ef24: f043 0320 orr.w r3, r3, #32 800ef28: 7013 strb r3, [r2, #0] if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ 800ef2a: 7d23 ldrb r3, [r4, #20] 800ef2c: 2b04 cmp r3, #4 800ef2e: d042 beq.n 800efb6 pcb->ooseq = cseg->next; 800ef30: 682b ldr r3, [r5, #0] 800ef32: 6763 str r3, [r4, #116] @ 0x74 tcp_seg_free(cseg); 800ef34: 4628 mov r0, r5 800ef36: f7fe fa39 bl 800d3ac while (pcb->ooseq != NULL && 800ef3a: 6f65 ldr r5, [r4, #116] @ 0x74 800ef3c: 2d00 cmp r5, #0 800ef3e: d03d beq.n 800efbc pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { 800ef40: 692a ldr r2, [r5, #16] 800ef42: 6853 ldr r3, [r2, #4] 800ef44: 6a61 ldr r1, [r4, #36] @ 0x24 while (pcb->ooseq != NULL && 800ef46: 428b cmp r3, r1 800ef48: d138 bne.n 800efbc seqno = pcb->ooseq->tcphdr->seqno; 800ef4a: 494b ldr r1, [pc, #300] @ (800f078 ) 800ef4c: 600b str r3, [r1, #0] pcb->rcv_nxt += TCP_TCPLEN(cseg); 800ef4e: 892e ldrh r6, [r5, #8] 800ef50: 8990 ldrh r0, [r2, #12] 800ef52: f7f8 ff93 bl 8007e7c 800ef56: f010 0f03 tst.w r0, #3 800ef5a: d0c8 beq.n 800eeee 800ef5c: 2201 movs r2, #1 800ef5e: 4432 add r2, r6 800ef60: 6a63 ldr r3, [r4, #36] @ 0x24 800ef62: 4413 add r3, r2 800ef64: 6263 str r3, [r4, #36] @ 0x24 LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", 800ef66: 8d26 ldrh r6, [r4, #40] @ 0x28 800ef68: 892f ldrh r7, [r5, #8] 800ef6a: 692b ldr r3, [r5, #16] 800ef6c: 8998 ldrh r0, [r3, #12] 800ef6e: f7f8 ff85 bl 8007e7c 800ef72: f010 0f03 tst.w r0, #3 800ef76: d0bc beq.n 800eef2 800ef78: 2301 movs r3, #1 800ef7a: 443b add r3, r7 800ef7c: 429e cmp r6, r3 800ef7e: d3ba bcc.n 800eef6 pcb->rcv_wnd -= TCP_TCPLEN(cseg); 800ef80: 892e ldrh r6, [r5, #8] 800ef82: 692b ldr r3, [r5, #16] 800ef84: 8998 ldrh r0, [r3, #12] 800ef86: f7f8 ff79 bl 8007e7c 800ef8a: f010 0f03 tst.w r0, #3 800ef8e: d0ba beq.n 800ef06 800ef90: 2201 movs r2, #1 800ef92: 4432 add r2, r6 800ef94: 8d23 ldrh r3, [r4, #40] @ 0x28 800ef96: 1a9b subs r3, r3, r2 800ef98: 8523 strh r3, [r4, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 800ef9a: 4620 mov r0, r4 800ef9c: f7fe f98a bl 800d2b4 if (cseg->p->tot_len > 0) { 800efa0: 6869 ldr r1, [r5, #4] 800efa2: 890b ldrh r3, [r1, #8] 800efa4: 2b00 cmp r3, #0 800efa6: d0b4 beq.n 800ef12 if (recv_data) { 800efa8: 4b3a ldr r3, [pc, #232] @ (800f094 ) 800efaa: 6818 ldr r0, [r3, #0] 800efac: 2800 cmp r0, #0 800efae: d0ac beq.n 800ef0a pbuf_cat(recv_data, cseg->p); 800efb0: f7fd f8a0 bl 800c0f4 800efb4: e7ab b.n 800ef0e pcb->state = CLOSE_WAIT; 800efb6: 2307 movs r3, #7 800efb8: 7523 strb r3, [r4, #20] 800efba: e7b9 b.n 800ef30 tcp_ack(pcb); 800efbc: 8b63 ldrh r3, [r4, #26] 800efbe: f013 0f01 tst.w r3, #1 800efc2: d007 beq.n 800efd4 800efc4: f023 0301 bic.w r3, r3, #1 800efc8: b29b uxth r3, r3 800efca: 8363 strh r3, [r4, #26] 800efcc: f043 0302 orr.w r3, r3, #2 800efd0: 8363 strh r3, [r4, #26] 800efd2: e0fa b.n 800f1ca 800efd4: f043 0301 orr.w r3, r3, #1 800efd8: 8363 strh r3, [r4, #26] 800efda: e0f6 b.n 800f1ca pcb->ooseq = tcp_seg_copy(&inseg); 800efdc: 4827 ldr r0, [pc, #156] @ (800f07c ) 800efde: f7fe f9fd bl 800d3dc 800efe2: 6760 str r0, [r4, #116] @ 0x74 800efe4: e004 b.n 800eff0 if (inseg.len > next->len) { 800efe6: 4b25 ldr r3, [pc, #148] @ (800f07c ) 800efe8: 891a ldrh r2, [r3, #8] 800efea: 892b ldrh r3, [r5, #8] 800efec: 429a cmp r2, r3 800efee: d803 bhi.n 800eff8 tcp_send_empty_ack(pcb); 800eff0: 4620 mov r0, r4 800eff2: f001 fefd bl 8010df0 800eff6: e0e8 b.n 800f1ca struct tcp_seg *cseg = tcp_seg_copy(&inseg); 800eff8: 4820 ldr r0, [pc, #128] @ (800f07c ) 800effa: f7fe f9ef bl 800d3dc if (cseg != NULL) { 800effe: 4603 mov r3, r0 800f000: 2800 cmp r0, #0 800f002: d0f5 beq.n 800eff0 if (prev != NULL) { 800f004: b12e cbz r6, 800f012 prev->next = cseg; 800f006: 6030 str r0, [r6, #0] tcp_oos_insert_segment(cseg, next); 800f008: 4629 mov r1, r5 800f00a: 4618 mov r0, r3 800f00c: f7ff fbf6 bl 800e7fc 800f010: e7ee b.n 800eff0 pcb->ooseq = cseg; 800f012: 6760 str r0, [r4, #116] @ 0x74 800f014: e7f8 b.n 800f008 if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { 800f016: 1a99 subs r1, r3, r2 800f018: 2900 cmp r1, #0 800f01a: db3f blt.n 800f09c if (next->next == NULL && 800f01c: 6829 ldr r1, [r5, #0] 800f01e: 462e mov r6, r5 800f020: 2900 cmp r1, #0 800f022: d04c beq.n 800f0be 800f024: 460d mov r5, r1 for (next = pcb->ooseq; next != NULL; next = next->next) { 800f026: 2d00 cmp r5, #0 800f028: d0e2 beq.n 800eff0 if (seqno == next->tcphdr->seqno) { 800f02a: 6928 ldr r0, [r5, #16] 800f02c: 6842 ldr r2, [r0, #4] 800f02e: 4293 cmp r3, r2 800f030: d0d9 beq.n 800efe6 if (prev == NULL) { 800f032: 2e00 cmp r6, #0 800f034: d0ef beq.n 800f016 if (TCP_SEQ_BETWEEN(seqno, prev->tcphdr->seqno + 1, next->tcphdr->seqno - 1)) { 800f036: 6931 ldr r1, [r6, #16] 800f038: 6849 ldr r1, [r1, #4] 800f03a: 1a59 subs r1, r3, r1 800f03c: 2901 cmp r1, #1 800f03e: d4ed bmi.n 800f01c 800f040: 1a99 subs r1, r3, r2 800f042: 3101 adds r1, #1 800f044: 2900 cmp r1, #0 800f046: dce9 bgt.n 800f01c struct tcp_seg *cseg = tcp_seg_copy(&inseg); 800f048: 480c ldr r0, [pc, #48] @ (800f07c ) 800f04a: f7fe f9c7 bl 800d3dc if (cseg != NULL) { 800f04e: 4607 mov r7, r0 800f050: 2800 cmp r0, #0 800f052: d0cd beq.n 800eff0 if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { 800f054: 6933 ldr r3, [r6, #16] 800f056: 6859 ldr r1, [r3, #4] 800f058: 8933 ldrh r3, [r6, #8] 800f05a: 440b add r3, r1 800f05c: 4a06 ldr r2, [pc, #24] @ (800f078 ) 800f05e: 6812 ldr r2, [r2, #0] 800f060: 1a9b subs r3, r3, r2 800f062: 2b00 cmp r3, #0 800f064: dc24 bgt.n 800f0b0 prev->next = cseg; 800f066: 6037 str r7, [r6, #0] tcp_oos_insert_segment(cseg, next); 800f068: 4629 mov r1, r5 800f06a: 4638 mov r0, r7 800f06c: f7ff fbc6 bl 800e7fc 800f070: e7be b.n 800eff0 800f072: bf00 nop 800f074: 24019bf2 .word 0x24019bf2 800f078: 24019bfc .word 0x24019bfc 800f07c: 24019c10 .word 0x24019c10 800f080: 08016c64 .word 0x08016c64 800f084: 08016e6c .word 0x08016e6c 800f088: 080144e8 .word 0x080144e8 800f08c: 08016ea8 .word 0x08016ea8 800f090: 08016ec8 .word 0x08016ec8 800f094: 24019bec .word 0x24019bec 800f098: 24019bf0 .word 0x24019bf0 struct tcp_seg *cseg = tcp_seg_copy(&inseg); 800f09c: 484b ldr r0, [pc, #300] @ (800f1cc ) 800f09e: f7fe f99d bl 800d3dc if (cseg != NULL) { 800f0a2: 2800 cmp r0, #0 800f0a4: d0a4 beq.n 800eff0 pcb->ooseq = cseg; 800f0a6: 6760 str r0, [r4, #116] @ 0x74 tcp_oos_insert_segment(cseg, next); 800f0a8: 4629 mov r1, r5 800f0aa: f7ff fba7 bl 800e7fc 800f0ae: e79f b.n 800eff0 prev->len = (u16_t)(seqno - prev->tcphdr->seqno); 800f0b0: 1a52 subs r2, r2, r1 800f0b2: b291 uxth r1, r2 800f0b4: 8131 strh r1, [r6, #8] pbuf_realloc(prev->p, prev->len); 800f0b6: 6870 ldr r0, [r6, #4] 800f0b8: f7fc ff88 bl 800bfcc 800f0bc: e7d3 b.n 800f066 TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { 800f0be: 1a9a subs r2, r3, r2 if (next->next == NULL && 800f0c0: 2a00 cmp r2, #0 800f0c2: dc01 bgt.n 800f0c8 800f0c4: 460d mov r5, r1 800f0c6: e7ae b.n 800f026 if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { 800f0c8: 8980 ldrh r0, [r0, #12] 800f0ca: f7f8 fed7 bl 8007e7c 800f0ce: f010 0f01 tst.w r0, #1 800f0d2: d18d bne.n 800eff0 next->next = tcp_seg_copy(&inseg); 800f0d4: 483d ldr r0, [pc, #244] @ (800f1cc ) 800f0d6: f7fe f981 bl 800d3dc 800f0da: 6028 str r0, [r5, #0] if (next->next != NULL) { 800f0dc: 2800 cmp r0, #0 800f0de: d087 beq.n 800eff0 if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { 800f0e0: 692b ldr r3, [r5, #16] 800f0e2: 6859 ldr r1, [r3, #4] 800f0e4: 892a ldrh r2, [r5, #8] 800f0e6: 440a add r2, r1 800f0e8: 4b39 ldr r3, [pc, #228] @ (800f1d0 ) 800f0ea: 681b ldr r3, [r3, #0] 800f0ec: 1ad2 subs r2, r2, r3 800f0ee: 2a00 cmp r2, #0 800f0f0: dc40 bgt.n 800f174 if (TCP_SEQ_GT((u32_t)tcplen + seqno, pcb->rcv_nxt + (u32_t)pcb->rcv_wnd)) { 800f0f2: 4b38 ldr r3, [pc, #224] @ (800f1d4 ) 800f0f4: 881b ldrh r3, [r3, #0] 800f0f6: 4a36 ldr r2, [pc, #216] @ (800f1d0 ) 800f0f8: 6812 ldr r2, [r2, #0] 800f0fa: 4413 add r3, r2 800f0fc: 6a62 ldr r2, [r4, #36] @ 0x24 800f0fe: 8d21 ldrh r1, [r4, #40] @ 0x28 800f100: 440a add r2, r1 800f102: 1a9b subs r3, r3, r2 800f104: 2b00 cmp r3, #0 800f106: f77f af73 ble.w 800eff0 if (TCPH_FLAGS(next->next->tcphdr) & TCP_FIN) { 800f10a: 682b ldr r3, [r5, #0] 800f10c: 691b ldr r3, [r3, #16] 800f10e: 8998 ldrh r0, [r3, #12] 800f110: f7f8 feb4 bl 8007e7c 800f114: f010 0f01 tst.w r0, #1 800f118: d133 bne.n 800f182 next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno); 800f11a: 6a62 ldr r2, [r4, #36] @ 0x24 800f11c: 8d23 ldrh r3, [r4, #40] @ 0x28 800f11e: 4413 add r3, r2 800f120: b29b uxth r3, r3 800f122: 682a ldr r2, [r5, #0] 800f124: 492a ldr r1, [pc, #168] @ (800f1d0 ) 800f126: 6809 ldr r1, [r1, #0] 800f128: 1a5b subs r3, r3, r1 800f12a: 8113 strh r3, [r2, #8] pbuf_realloc(next->next->p, next->next->len); 800f12c: 682b ldr r3, [r5, #0] 800f12e: 8919 ldrh r1, [r3, #8] 800f130: 6858 ldr r0, [r3, #4] 800f132: f7fc ff4b bl 800bfcc tcplen = TCP_TCPLEN(next->next); 800f136: 682b ldr r3, [r5, #0] 800f138: 891d ldrh r5, [r3, #8] 800f13a: 691b ldr r3, [r3, #16] 800f13c: 8998 ldrh r0, [r3, #12] 800f13e: f7f8 fe9d bl 8007e7c 800f142: f010 0f03 tst.w r0, #3 800f146: d02e beq.n 800f1a6 800f148: 2301 movs r3, #1 800f14a: 442b add r3, r5 800f14c: b29b uxth r3, r3 800f14e: 4a21 ldr r2, [pc, #132] @ (800f1d4 ) 800f150: 8013 strh r3, [r2, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 800f152: 4a1f ldr r2, [pc, #124] @ (800f1d0 ) 800f154: 6812 ldr r2, [r2, #0] 800f156: 4413 add r3, r2 800f158: 6a62 ldr r2, [r4, #36] @ 0x24 800f15a: 8d21 ldrh r1, [r4, #40] @ 0x28 800f15c: 440a add r2, r1 800f15e: 4293 cmp r3, r2 800f160: f43f af46 beq.w 800eff0 800f164: 4b1c ldr r3, [pc, #112] @ (800f1d8 ) 800f166: f44f 62df mov.w r2, #1784 @ 0x6f8 800f16a: 491c ldr r1, [pc, #112] @ (800f1dc ) 800f16c: 481c ldr r0, [pc, #112] @ (800f1e0 ) 800f16e: f004 f94b bl 8013408 800f172: e73d b.n 800eff0 next->len = (u16_t)(seqno - next->tcphdr->seqno); 800f174: 1a5b subs r3, r3, r1 800f176: b299 uxth r1, r3 800f178: 8129 strh r1, [r5, #8] pbuf_realloc(next->p, next->len); 800f17a: 6868 ldr r0, [r5, #4] 800f17c: f7fc ff26 bl 800bfcc 800f180: e7b7 b.n 800f0f2 TCPH_FLAGS_SET(next->next->tcphdr, TCPH_FLAGS(next->next->tcphdr) & ~TCP_FIN); 800f182: 682b ldr r3, [r5, #0] 800f184: 691b ldr r3, [r3, #16] 800f186: 899e ldrh r6, [r3, #12] 800f188: 4630 mov r0, r6 800f18a: f7f8 fe77 bl 8007e7c 800f18e: f000 003e and.w r0, r0, #62 @ 0x3e 800f192: f7f8 fe73 bl 8007e7c 800f196: 682b ldr r3, [r5, #0] 800f198: 691a ldr r2, [r3, #16] 800f19a: f426 567c bic.w r6, r6, #16128 @ 0x3f00 800f19e: ea40 0306 orr.w r3, r0, r6 800f1a2: 8193 strh r3, [r2, #12] 800f1a4: e7b9 b.n 800f11a tcplen = TCP_TCPLEN(next->next); 800f1a6: 2300 movs r3, #0 800f1a8: e7cf b.n 800f14a if (!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd - 1)) { 800f1aa: 4b09 ldr r3, [pc, #36] @ (800f1d0 ) 800f1ac: 681b ldr r3, [r3, #0] 800f1ae: 6a62 ldr r2, [r4, #36] @ 0x24 800f1b0: 1a99 subs r1, r3, r2 800f1b2: 2900 cmp r1, #0 800f1b4: db05 blt.n 800f1c2 800f1b6: 8d21 ldrh r1, [r4, #40] @ 0x28 800f1b8: 440a add r2, r1 800f1ba: 1a9b subs r3, r3, r2 800f1bc: 3301 adds r3, #1 800f1be: 2b00 cmp r3, #0 800f1c0: dd03 ble.n 800f1ca tcp_ack_now(pcb); 800f1c2: 8b63 ldrh r3, [r4, #26] 800f1c4: f043 0302 orr.w r3, r3, #2 800f1c8: 8363 strh r3, [r4, #26] } 800f1ca: bdf8 pop {r3, r4, r5, r6, r7, pc} 800f1cc: 24019c10 .word 0x24019c10 800f1d0: 24019bfc .word 0x24019bfc 800f1d4: 24019bf2 .word 0x24019bf2 800f1d8: 08016c64 .word 0x08016c64 800f1dc: 08016e34 .word 0x08016e34 800f1e0: 080144e8 .word 0x080144e8 0800f1e4 : { 800f1e4: b570 push {r4, r5, r6, lr} 800f1e6: b084 sub sp, #16 LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL); 800f1e8: 4604 mov r4, r0 800f1ea: b1c8 cbz r0, 800f220 if (flags & TCP_RST) { 800f1ec: 4b99 ldr r3, [pc, #612] @ (800f454 ) 800f1ee: 781b ldrb r3, [r3, #0] 800f1f0: f013 0f04 tst.w r3, #4 800f1f4: d03a beq.n 800f26c if (pcb->state == SYN_SENT) { 800f1f6: 7d21 ldrb r1, [r4, #20] 800f1f8: 2902 cmp r1, #2 800f1fa: d019 beq.n 800f230 if (seqno == pcb->rcv_nxt) { 800f1fc: 6a62 ldr r2, [r4, #36] @ 0x24 800f1fe: 4b96 ldr r3, [pc, #600] @ (800f458 ) 800f200: 681b ldr r3, [r3, #0] 800f202: 429a cmp r2, r3 800f204: d01d beq.n 800f242 } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 800f206: 1a99 subs r1, r3, r2 800f208: 2900 cmp r1, #0 800f20a: db16 blt.n 800f23a 800f20c: 8d21 ldrh r1, [r4, #40] @ 0x28 800f20e: 440a add r2, r1 800f210: 1a9b subs r3, r3, r2 800f212: 2b00 cmp r3, #0 800f214: dc11 bgt.n 800f23a tcp_ack_now(pcb); 800f216: 8b63 ldrh r3, [r4, #26] 800f218: f043 0302 orr.w r3, r3, #2 800f21c: 8363 strh r3, [r4, #26] if (acceptable) { 800f21e: e00c b.n 800f23a LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL); 800f220: 4b8e ldr r3, [pc, #568] @ (800f45c ) 800f222: f44f 7247 mov.w r2, #796 @ 0x31c 800f226: 498e ldr r1, [pc, #568] @ (800f460 ) 800f228: 488e ldr r0, [pc, #568] @ (800f464 ) 800f22a: f004 f8ed bl 8013408 800f22e: e7dd b.n 800f1ec if (ackno == pcb->snd_nxt) { 800f230: 6d22 ldr r2, [r4, #80] @ 0x50 800f232: 4b8d ldr r3, [pc, #564] @ (800f468 ) 800f234: 681b ldr r3, [r3, #0] 800f236: 429a cmp r2, r3 800f238: d003 beq.n 800f242 return ERR_OK; 800f23a: 2500 movs r5, #0 } 800f23c: 4628 mov r0, r5 800f23e: b004 add sp, #16 800f240: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); 800f242: b159 cbz r1, 800f25c recv_flags |= TF_RESET; 800f244: 4a89 ldr r2, [pc, #548] @ (800f46c ) 800f246: 7813 ldrb r3, [r2, #0] 800f248: f043 0308 orr.w r3, r3, #8 800f24c: 7013 strb r3, [r2, #0] tcp_clear_flags(pcb, TF_ACK_DELAY); 800f24e: 8b63 ldrh r3, [r4, #26] 800f250: f023 0301 bic.w r3, r3, #1 800f254: 8363 strh r3, [r4, #26] return ERR_RST; 800f256: f06f 050d mvn.w r5, #13 800f25a: e7ef b.n 800f23c LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); 800f25c: 4b7f ldr r3, [pc, #508] @ (800f45c ) 800f25e: f44f 724e mov.w r2, #824 @ 0x338 800f262: 4983 ldr r1, [pc, #524] @ (800f470 ) 800f264: 487f ldr r0, [pc, #508] @ (800f464 ) 800f266: f004 f8cf bl 8013408 800f26a: e7eb b.n 800f244 if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 800f26c: f013 0f02 tst.w r3, #2 800f270: d004 beq.n 800f27c 800f272: 7d23 ldrb r3, [r4, #20] 800f274: 3b02 subs r3, #2 800f276: b2db uxtb r3, r3 800f278: 2b01 cmp r3, #1 800f27a: d81d bhi.n 800f2b8 if ((pcb->flags & TF_RXCLOSED) == 0) { 800f27c: 8b63 ldrh r3, [r4, #26] 800f27e: f013 0f10 tst.w r3, #16 800f282: d102 bne.n 800f28a pcb->tmr = tcp_ticks; 800f284: 4b7b ldr r3, [pc, #492] @ (800f474 ) 800f286: 681b ldr r3, [r3, #0] 800f288: 6223 str r3, [r4, #32] pcb->keep_cnt_sent = 0; 800f28a: 2300 movs r3, #0 800f28c: f884 309b strb.w r3, [r4, #155] @ 0x9b pcb->persist_probe = 0; 800f290: f884 309a strb.w r3, [r4, #154] @ 0x9a tcp_parseopt(pcb); 800f294: 4620 mov r0, r4 800f296: f7ff f8cb bl 800e430 switch (pcb->state) { 800f29a: 7d23 ldrb r3, [r4, #20] 800f29c: 3b02 subs r3, #2 800f29e: 2b07 cmp r3, #7 800f2a0: f200 8240 bhi.w 800f724 800f2a4: e8df f013 tbh [pc, r3, lsl #1] 800f2a8: 00b2000e .word 0x00b2000e 800f2ac: 016a0159 .word 0x016a0159 800f2b0: 015901c1 .word 0x015901c1 800f2b4: 022401f0 .word 0x022401f0 tcp_ack_now(pcb); 800f2b8: 8b63 ldrh r3, [r4, #26] 800f2ba: f043 0302 orr.w r3, r3, #2 800f2be: 8363 strh r3, [r4, #26] return ERR_OK; 800f2c0: 2500 movs r5, #0 800f2c2: e7bb b.n 800f23c if ((flags & TCP_ACK) && (flags & TCP_SYN) 800f2c4: 4b63 ldr r3, [pc, #396] @ (800f454 ) 800f2c6: 781b ldrb r3, [r3, #0] 800f2c8: f003 0212 and.w r2, r3, #18 800f2cc: 2a12 cmp r2, #18 800f2ce: d004 beq.n 800f2da else if (flags & TCP_ACK) { 800f2d0: f013 0f10 tst.w r3, #16 800f2d4: d17b bne.n 800f3ce return ERR_OK; 800f2d6: 2500 movs r5, #0 800f2d8: e7b0 b.n 800f23c && (ackno == pcb->lastack + 1)) { 800f2da: 6c62 ldr r2, [r4, #68] @ 0x44 800f2dc: 3201 adds r2, #1 800f2de: 4962 ldr r1, [pc, #392] @ (800f468 ) 800f2e0: 6809 ldr r1, [r1, #0] 800f2e2: 428a cmp r2, r1 800f2e4: d1f4 bne.n 800f2d0 pcb->rcv_nxt = seqno + 1; 800f2e6: 4b5c ldr r3, [pc, #368] @ (800f458 ) 800f2e8: 681b ldr r3, [r3, #0] 800f2ea: 1c5a adds r2, r3, #1 800f2ec: 6262 str r2, [r4, #36] @ 0x24 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 800f2ee: 62e2 str r2, [r4, #44] @ 0x2c pcb->lastack = ackno; 800f2f0: 6461 str r1, [r4, #68] @ 0x44 pcb->snd_wnd = tcphdr->wnd; 800f2f2: 4a61 ldr r2, [pc, #388] @ (800f478 ) 800f2f4: 6812 ldr r2, [r2, #0] 800f2f6: 89d2 ldrh r2, [r2, #14] 800f2f8: f8a4 2060 strh.w r2, [r4, #96] @ 0x60 pcb->snd_wnd_max = pcb->snd_wnd; 800f2fc: f8a4 2062 strh.w r2, [r4, #98] @ 0x62 pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 800f300: 3b01 subs r3, #1 800f302: 6563 str r3, [r4, #84] @ 0x54 pcb->state = ESTABLISHED; 800f304: 2304 movs r3, #4 800f306: 7523 strb r3, [r4, #20] pcb->mss = tcp_eff_send_mss(pcb->mss, &pcb->local_ip, &pcb->remote_ip); 800f308: 8e66 ldrh r6, [r4, #50] @ 0x32 800f30a: 18e5 adds r5, r4, r3 800f30c: 4628 mov r0, r5 800f30e: f7fa fef7 bl 800a100 800f312: 4601 mov r1, r0 800f314: 462a mov r2, r5 800f316: 4630 mov r0, r6 800f318: f7fe f92a bl 800d570 800f31c: 8660 strh r0, [r4, #50] @ 0x32 pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 800f31e: 0042 lsls r2, r0, #1 800f320: f241 131c movw r3, #4380 @ 0x111c 800f324: 4293 cmp r3, r2 800f326: bf38 it cc 800f328: 4613 movcc r3, r2 800f32a: ebb3 0f80 cmp.w r3, r0, lsl #2 800f32e: d92b bls.n 800f388 800f330: 0083 lsls r3, r0, #2 800f332: b29b uxth r3, r3 800f334: f8a4 3048 strh.w r3, [r4, #72] @ 0x48 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); 800f338: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66 800f33c: b373 cbz r3, 800f39c --pcb->snd_queuelen; 800f33e: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66 800f342: 3b01 subs r3, #1 800f344: f8a4 3066 strh.w r3, [r4, #102] @ 0x66 rseg = pcb->unacked; 800f348: 6f25 ldr r5, [r4, #112] @ 0x70 if (rseg == NULL) { 800f34a: b37d cbz r5, 800f3ac pcb->unacked = rseg->next; 800f34c: 682b ldr r3, [r5, #0] 800f34e: 6723 str r3, [r4, #112] @ 0x70 tcp_seg_free(rseg); 800f350: 4628 mov r0, r5 800f352: f7fe f82b bl 800d3ac if (pcb->unacked == NULL) { 800f356: 6f23 ldr r3, [r4, #112] @ 0x70 800f358: 2b00 cmp r3, #0 800f35a: d034 beq.n 800f3c6 pcb->rtime = 0; 800f35c: 2300 movs r3, #0 800f35e: 8623 strh r3, [r4, #48] @ 0x30 pcb->nrtx = 0; 800f360: f884 3042 strb.w r3, [r4, #66] @ 0x42 TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 800f364: f8d4 3088 ldr.w r3, [r4, #136] @ 0x88 800f368: b143 cbz r3, 800f37c 800f36a: 2200 movs r2, #0 800f36c: 4621 mov r1, r4 800f36e: 6920 ldr r0, [r4, #16] 800f370: 4798 blx r3 800f372: 4605 mov r5, r0 if (err == ERR_ABRT) { 800f374: f110 0f0d cmn.w r0, #13 800f378: f43f af60 beq.w 800f23c tcp_ack_now(pcb); 800f37c: 8b63 ldrh r3, [r4, #26] 800f37e: f043 0302 orr.w r3, r3, #2 800f382: 8363 strh r3, [r4, #26] return ERR_OK; 800f384: 2500 movs r5, #0 tcp_ack_now(pcb); 800f386: e759 b.n 800f23c pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 800f388: f241 131c movw r3, #4380 @ 0x111c 800f38c: 429a cmp r2, r3 800f38e: d902 bls.n 800f396 800f390: 0043 lsls r3, r0, #1 800f392: b29b uxth r3, r3 800f394: e7ce b.n 800f334 800f396: f241 131c movw r3, #4380 @ 0x111c 800f39a: e7cb b.n 800f334 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); 800f39c: 4b2f ldr r3, [pc, #188] @ (800f45c ) 800f39e: f44f 725b mov.w r2, #876 @ 0x36c 800f3a2: 4936 ldr r1, [pc, #216] @ (800f47c ) 800f3a4: 482f ldr r0, [pc, #188] @ (800f464 ) 800f3a6: f004 f82f bl 8013408 800f3aa: e7c8 b.n 800f33e rseg = pcb->unsent; 800f3ac: 6ee5 ldr r5, [r4, #108] @ 0x6c LWIP_ASSERT("no segment to free", rseg != NULL); 800f3ae: b115 cbz r5, 800f3b6 pcb->unsent = rseg->next; 800f3b0: 682b ldr r3, [r5, #0] 800f3b2: 66e3 str r3, [r4, #108] @ 0x6c 800f3b4: e7cc b.n 800f350 LWIP_ASSERT("no segment to free", rseg != NULL); 800f3b6: 4b29 ldr r3, [pc, #164] @ (800f45c ) 800f3b8: f44f 725d mov.w r2, #884 @ 0x374 800f3bc: 4930 ldr r1, [pc, #192] @ (800f480 ) 800f3be: 4829 ldr r0, [pc, #164] @ (800f464 ) 800f3c0: f004 f822 bl 8013408 800f3c4: e7f4 b.n 800f3b0 pcb->rtime = -1; 800f3c6: f64f 73ff movw r3, #65535 @ 0xffff 800f3ca: 8623 strh r3, [r4, #48] @ 0x30 800f3cc: e7ca b.n 800f364 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800f3ce: 4b2a ldr r3, [pc, #168] @ (800f478 ) 800f3d0: 6819 ldr r1, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 800f3d2: 4b2c ldr r3, [pc, #176] @ (800f484 ) 800f3d4: 4a2c ldr r2, [pc, #176] @ (800f488 ) 800f3d6: 8810 ldrh r0, [r2, #0] 800f3d8: 4a1f ldr r2, [pc, #124] @ (800f458 ) 800f3da: 6812 ldr r2, [r2, #0] 800f3dc: 880d ldrh r5, [r1, #0] 800f3de: 9502 str r5, [sp, #8] 800f3e0: 8849 ldrh r1, [r1, #2] 800f3e2: 9101 str r1, [sp, #4] 800f3e4: 1f19 subs r1, r3, #4 800f3e6: 9100 str r1, [sp, #0] 800f3e8: 4402 add r2, r0 800f3ea: 491f ldr r1, [pc, #124] @ (800f468 ) 800f3ec: 6809 ldr r1, [r1, #0] 800f3ee: 4620 mov r0, r4 800f3f0: f001 fcb6 bl 8010d60 if (pcb->nrtx < TCP_SYNMAXRTX) { 800f3f4: f894 3042 ldrb.w r3, [r4, #66] @ 0x42 800f3f8: 2b05 cmp r3, #5 800f3fa: d901 bls.n 800f400 return ERR_OK; 800f3fc: 2500 movs r5, #0 800f3fe: e71d b.n 800f23c pcb->rtime = 0; 800f400: 2500 movs r5, #0 800f402: 8625 strh r5, [r4, #48] @ 0x30 tcp_rexmit_rto(pcb); 800f404: 4620 mov r0, r4 800f406: f001 fe9f bl 8011148 800f40a: e717 b.n 800f23c if (flags & TCP_ACK) { 800f40c: 4b11 ldr r3, [pc, #68] @ (800f454 ) 800f40e: 781b ldrb r3, [r3, #0] 800f410: f013 0f10 tst.w r3, #16 800f414: f000 8090 beq.w 800f538 if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 800f418: 4b13 ldr r3, [pc, #76] @ (800f468 ) 800f41a: 6819 ldr r1, [r3, #0] 800f41c: 6c63 ldr r3, [r4, #68] @ 0x44 800f41e: 1acb subs r3, r1, r3 800f420: 2b01 cmp r3, #1 800f422: d403 bmi.n 800f42c 800f424: 6d23 ldr r3, [r4, #80] @ 0x50 800f426: 1acb subs r3, r1, r3 800f428: 2b00 cmp r3, #0 800f42a: dd2f ble.n 800f48c ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800f42c: 4b12 ldr r3, [pc, #72] @ (800f478 ) 800f42e: 6818 ldr r0, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 800f430: 4b14 ldr r3, [pc, #80] @ (800f484 ) 800f432: 4a15 ldr r2, [pc, #84] @ (800f488 ) 800f434: 8815 ldrh r5, [r2, #0] 800f436: 4a08 ldr r2, [pc, #32] @ (800f458 ) 800f438: 6812 ldr r2, [r2, #0] 800f43a: 8806 ldrh r6, [r0, #0] 800f43c: 9602 str r6, [sp, #8] 800f43e: 8840 ldrh r0, [r0, #2] 800f440: 9001 str r0, [sp, #4] 800f442: 1f18 subs r0, r3, #4 800f444: 9000 str r0, [sp, #0] 800f446: 442a add r2, r5 800f448: 4620 mov r0, r4 800f44a: f001 fc89 bl 8010d60 return ERR_OK; 800f44e: 2500 movs r5, #0 800f450: e6f4 b.n 800f23c 800f452: bf00 nop 800f454: 24019bf1 .word 0x24019bf1 800f458: 24019bfc .word 0x24019bfc 800f45c: 08016c64 .word 0x08016c64 800f460: 08016ef0 .word 0x08016ef0 800f464: 080144e8 .word 0x080144e8 800f468: 24019bf8 .word 0x24019bf8 800f46c: 24019bf0 .word 0x24019bf0 800f470: 08016f0c .word 0x08016f0c 800f474: 24019be4 .word 0x24019be4 800f478: 24019c0c .word 0x24019c0c 800f47c: 08016f2c .word 0x08016f2c 800f480: 08016f44 .word 0x08016f44 800f484: 24013030 .word 0x24013030 800f488: 24019bf2 .word 0x24019bf2 pcb->state = ESTABLISHED; 800f48c: 2304 movs r3, #4 800f48e: 7523 strb r3, [r4, #20] if (pcb->listener == NULL) { 800f490: 6fe3 ldr r3, [r4, #124] @ 0x7c 800f492: 2b00 cmp r3, #0 800f494: d037 beq.n 800f506 LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL); 800f496: 699b ldr r3, [r3, #24] 800f498: b36b cbz r3, 800f4f6 TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); 800f49a: 6fe3 ldr r3, [r4, #124] @ 0x7c 800f49c: 699b ldr r3, [r3, #24] 800f49e: 2b00 cmp r3, #0 800f4a0: d039 beq.n 800f516 800f4a2: 2200 movs r2, #0 800f4a4: 4621 mov r1, r4 800f4a6: 6920 ldr r0, [r4, #16] 800f4a8: 4798 blx r3 if (err != ERR_OK) { 800f4aa: 4605 mov r5, r0 800f4ac: bb68 cbnz r0, 800f50a tcp_receive(pcb); 800f4ae: 4620 mov r0, r4 800f4b0: f7ff f9f8 bl 800e8a4 if (recv_acked != 0) { 800f4b4: 4b9c ldr r3, [pc, #624] @ (800f728 ) 800f4b6: 881b ldrh r3, [r3, #0] 800f4b8: b113 cbz r3, 800f4c0 recv_acked--; 800f4ba: 3b01 subs r3, #1 800f4bc: 4a9a ldr r2, [pc, #616] @ (800f728 ) 800f4be: 8013 strh r3, [r2, #0] pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 800f4c0: 8e63 ldrh r3, [r4, #50] @ 0x32 800f4c2: 0059 lsls r1, r3, #1 800f4c4: f241 121c movw r2, #4380 @ 0x111c 800f4c8: 428a cmp r2, r1 800f4ca: bf38 it cc 800f4cc: 460a movcc r2, r1 800f4ce: ebb2 0f83 cmp.w r2, r3, lsl #2 800f4d2: d927 bls.n 800f524 800f4d4: 009b lsls r3, r3, #2 800f4d6: b29b uxth r3, r3 800f4d8: f8a4 3048 strh.w r3, [r4, #72] @ 0x48 if (recv_flags & TF_GOT_FIN) { 800f4dc: 4b93 ldr r3, [pc, #588] @ (800f72c ) 800f4de: 781b ldrb r3, [r3, #0] 800f4e0: f013 0f20 tst.w r3, #32 800f4e4: f43f aeaa beq.w 800f23c tcp_ack_now(pcb); 800f4e8: 8b63 ldrh r3, [r4, #26] 800f4ea: f043 0302 orr.w r3, r3, #2 800f4ee: 8363 strh r3, [r4, #26] pcb->state = CLOSE_WAIT; 800f4f0: 2307 movs r3, #7 800f4f2: 7523 strb r3, [r4, #20] 800f4f4: e6a2 b.n 800f23c LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL); 800f4f6: 4b8e ldr r3, [pc, #568] @ (800f730 ) 800f4f8: f44f 726a mov.w r2, #936 @ 0x3a8 800f4fc: 498d ldr r1, [pc, #564] @ (800f734 ) 800f4fe: 488e ldr r0, [pc, #568] @ (800f738 ) 800f500: f003 ff82 bl 8013408 800f504: e7c9 b.n 800f49a err = ERR_VAL; 800f506: f06f 0505 mvn.w r5, #5 if (err != ERR_ABRT) { 800f50a: f115 0f0d cmn.w r5, #13 800f50e: d105 bne.n 800f51c return ERR_ABRT; 800f510: f06f 050c mvn.w r5, #12 800f514: e692 b.n 800f23c TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); 800f516: f06f 050f mvn.w r5, #15 800f51a: e7f6 b.n 800f50a tcp_abort(pcb); 800f51c: 4620 mov r0, r4 800f51e: f7fe fa1b bl 800d958 800f522: e7f5 b.n 800f510 pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 800f524: f241 121c movw r2, #4380 @ 0x111c 800f528: 4291 cmp r1, r2 800f52a: d902 bls.n 800f532 800f52c: 005b lsls r3, r3, #1 800f52e: b29b uxth r3, r3 800f530: e7d2 b.n 800f4d8 800f532: f241 131c movw r3, #4380 @ 0x111c 800f536: e7cf b.n 800f4d8 } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 800f538: f013 0f02 tst.w r3, #2 800f53c: f000 810a beq.w 800f754 800f540: 6a63 ldr r3, [r4, #36] @ 0x24 800f542: 3b01 subs r3, #1 800f544: 4a7d ldr r2, [pc, #500] @ (800f73c ) 800f546: 6812 ldr r2, [r2, #0] 800f548: 4293 cmp r3, r2 800f54a: d001 beq.n 800f550 return ERR_OK; 800f54c: 2500 movs r5, #0 800f54e: e675 b.n 800f23c tcp_rexmit(pcb); 800f550: 4620 mov r0, r4 800f552: f001 fb83 bl 8010c5c return ERR_OK; 800f556: 2500 movs r5, #0 800f558: e670 b.n 800f23c tcp_receive(pcb); 800f55a: 4620 mov r0, r4 800f55c: f7ff f9a2 bl 800e8a4 if (recv_flags & TF_GOT_FIN) { /* passive close */ 800f560: 4b72 ldr r3, [pc, #456] @ (800f72c ) 800f562: 781b ldrb r3, [r3, #0] 800f564: f013 0f20 tst.w r3, #32 800f568: f000 80f6 beq.w 800f758 tcp_ack_now(pcb); 800f56c: 8b63 ldrh r3, [r4, #26] 800f56e: f043 0302 orr.w r3, r3, #2 800f572: 8363 strh r3, [r4, #26] pcb->state = CLOSE_WAIT; 800f574: 2307 movs r3, #7 800f576: 7523 strb r3, [r4, #20] return ERR_OK; 800f578: 2500 movs r5, #0 800f57a: e65f b.n 800f23c tcp_receive(pcb); 800f57c: 4620 mov r0, r4 800f57e: f7ff f991 bl 800e8a4 if (recv_flags & TF_GOT_FIN) { 800f582: 4b6a ldr r3, [pc, #424] @ (800f72c ) 800f584: 781b ldrb r3, [r3, #0] 800f586: f013 0f20 tst.w r3, #32 800f58a: d039 beq.n 800f600 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800f58c: 4b6c ldr r3, [pc, #432] @ (800f740 ) 800f58e: 781b ldrb r3, [r3, #0] 800f590: f013 0f10 tst.w r3, #16 800f594: d004 beq.n 800f5a0 800f596: 6d22 ldr r2, [r4, #80] @ 0x50 800f598: 4b6a ldr r3, [pc, #424] @ (800f744 ) 800f59a: 681b ldr r3, [r3, #0] 800f59c: 429a cmp r2, r3 800f59e: d007 beq.n 800f5b0 tcp_ack_now(pcb); 800f5a0: 8b63 ldrh r3, [r4, #26] 800f5a2: f043 0302 orr.w r3, r3, #2 800f5a6: 8363 strh r3, [r4, #26] pcb->state = CLOSING; 800f5a8: 2308 movs r3, #8 800f5aa: 7523 strb r3, [r4, #20] return ERR_OK; 800f5ac: 2500 movs r5, #0 800f5ae: e645 b.n 800f23c pcb->unsent == NULL) { 800f5b0: 6ee3 ldr r3, [r4, #108] @ 0x6c if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800f5b2: 2b00 cmp r3, #0 800f5b4: d1f4 bne.n 800f5a0 tcp_ack_now(pcb); 800f5b6: 8b63 ldrh r3, [r4, #26] 800f5b8: f043 0302 orr.w r3, r3, #2 800f5bc: 8363 strh r3, [r4, #26] tcp_pcb_purge(pcb); 800f5be: 4620 mov r0, r4 800f5c0: f7fe f8a8 bl 800d714 TCP_RMV_ACTIVE(pcb); 800f5c4: 4b60 ldr r3, [pc, #384] @ (800f748 ) 800f5c6: 681b ldr r3, [r3, #0] 800f5c8: 429c cmp r4, r3 800f5ca: d005 beq.n 800f5d8 800f5cc: b153 cbz r3, 800f5e4 800f5ce: 68da ldr r2, [r3, #12] 800f5d0: 4294 cmp r4, r2 800f5d2: d005 beq.n 800f5e0 800f5d4: 4613 mov r3, r2 800f5d6: e7f9 b.n 800f5cc 800f5d8: 68da ldr r2, [r3, #12] 800f5da: 4b5b ldr r3, [pc, #364] @ (800f748 ) 800f5dc: 601a str r2, [r3, #0] 800f5de: e001 b.n 800f5e4 800f5e0: 68e2 ldr r2, [r4, #12] 800f5e2: 60da str r2, [r3, #12] 800f5e4: 2500 movs r5, #0 800f5e6: 60e5 str r5, [r4, #12] 800f5e8: 4b58 ldr r3, [pc, #352] @ (800f74c ) 800f5ea: 2201 movs r2, #1 800f5ec: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 800f5ee: 230a movs r3, #10 800f5f0: 7523 strb r3, [r4, #20] TCP_REG(&tcp_tw_pcbs, pcb); 800f5f2: 4b57 ldr r3, [pc, #348] @ (800f750 ) 800f5f4: 681a ldr r2, [r3, #0] 800f5f6: 60e2 str r2, [r4, #12] 800f5f8: 601c str r4, [r3, #0] 800f5fa: f002 f819 bl 8011630 800f5fe: e61d b.n 800f23c } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800f600: 4b4f ldr r3, [pc, #316] @ (800f740 ) 800f602: 781b ldrb r3, [r3, #0] 800f604: f013 0f10 tst.w r3, #16 800f608: f000 80a8 beq.w 800f75c 800f60c: 6d22 ldr r2, [r4, #80] @ 0x50 800f60e: 4b4d ldr r3, [pc, #308] @ (800f744 ) 800f610: 681b ldr r3, [r3, #0] 800f612: 429a cmp r2, r3 800f614: d001 beq.n 800f61a return ERR_OK; 800f616: 2500 movs r5, #0 800f618: e610 b.n 800f23c pcb->unsent == NULL) { 800f61a: 6ee3 ldr r3, [r4, #108] @ 0x6c } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 800f61c: b10b cbz r3, 800f622 return ERR_OK; 800f61e: 2500 movs r5, #0 800f620: e60c b.n 800f23c pcb->state = FIN_WAIT_2; 800f622: 2306 movs r3, #6 800f624: 7523 strb r3, [r4, #20] return ERR_OK; 800f626: 2500 movs r5, #0 800f628: e608 b.n 800f23c tcp_receive(pcb); 800f62a: 4620 mov r0, r4 800f62c: f7ff f93a bl 800e8a4 if (recv_flags & TF_GOT_FIN) { 800f630: 4b3e ldr r3, [pc, #248] @ (800f72c ) 800f632: 781b ldrb r3, [r3, #0] 800f634: f013 0f20 tst.w r3, #32 800f638: d101 bne.n 800f63e return ERR_OK; 800f63a: 2500 movs r5, #0 800f63c: e5fe b.n 800f23c tcp_ack_now(pcb); 800f63e: 8b63 ldrh r3, [r4, #26] 800f640: f043 0302 orr.w r3, r3, #2 800f644: 8363 strh r3, [r4, #26] tcp_pcb_purge(pcb); 800f646: 4620 mov r0, r4 800f648: f7fe f864 bl 800d714 TCP_RMV_ACTIVE(pcb); 800f64c: 4b3e ldr r3, [pc, #248] @ (800f748 ) 800f64e: 681b ldr r3, [r3, #0] 800f650: 429c cmp r4, r3 800f652: d005 beq.n 800f660 800f654: b153 cbz r3, 800f66c 800f656: 68da ldr r2, [r3, #12] 800f658: 4294 cmp r4, r2 800f65a: d005 beq.n 800f668 800f65c: 4613 mov r3, r2 800f65e: e7f9 b.n 800f654 800f660: 68da ldr r2, [r3, #12] 800f662: 4b39 ldr r3, [pc, #228] @ (800f748 ) 800f664: 601a str r2, [r3, #0] 800f666: e001 b.n 800f66c 800f668: 68e2 ldr r2, [r4, #12] 800f66a: 60da str r2, [r3, #12] 800f66c: 2500 movs r5, #0 800f66e: 60e5 str r5, [r4, #12] 800f670: 4b36 ldr r3, [pc, #216] @ (800f74c ) 800f672: 2201 movs r2, #1 800f674: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 800f676: 230a movs r3, #10 800f678: 7523 strb r3, [r4, #20] TCP_REG(&tcp_tw_pcbs, pcb); 800f67a: 4b35 ldr r3, [pc, #212] @ (800f750 ) 800f67c: 681a ldr r2, [r3, #0] 800f67e: 60e2 str r2, [r4, #12] 800f680: 601c str r4, [r3, #0] 800f682: f001 ffd5 bl 8011630 800f686: e5d9 b.n 800f23c tcp_receive(pcb); 800f688: 4620 mov r0, r4 800f68a: f7ff f90b bl 800e8a4 if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 800f68e: 4b2c ldr r3, [pc, #176] @ (800f740 ) 800f690: 781b ldrb r3, [r3, #0] 800f692: f013 0f10 tst.w r3, #16 800f696: d063 beq.n 800f760 800f698: 6d22 ldr r2, [r4, #80] @ 0x50 800f69a: 4b2a ldr r3, [pc, #168] @ (800f744 ) 800f69c: 681b ldr r3, [r3, #0] 800f69e: 429a cmp r2, r3 800f6a0: d001 beq.n 800f6a6 return ERR_OK; 800f6a2: 2500 movs r5, #0 800f6a4: e5ca b.n 800f23c if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 800f6a6: 6ee3 ldr r3, [r4, #108] @ 0x6c 800f6a8: b10b cbz r3, 800f6ae return ERR_OK; 800f6aa: 2500 movs r5, #0 800f6ac: e5c6 b.n 800f23c tcp_pcb_purge(pcb); 800f6ae: 4620 mov r0, r4 800f6b0: f7fe f830 bl 800d714 TCP_RMV_ACTIVE(pcb); 800f6b4: 4b24 ldr r3, [pc, #144] @ (800f748 ) 800f6b6: 681b ldr r3, [r3, #0] 800f6b8: 429c cmp r4, r3 800f6ba: d005 beq.n 800f6c8 800f6bc: b153 cbz r3, 800f6d4 800f6be: 68da ldr r2, [r3, #12] 800f6c0: 4294 cmp r4, r2 800f6c2: d005 beq.n 800f6d0 800f6c4: 4613 mov r3, r2 800f6c6: e7f9 b.n 800f6bc 800f6c8: 68da ldr r2, [r3, #12] 800f6ca: 4b1f ldr r3, [pc, #124] @ (800f748 ) 800f6cc: 601a str r2, [r3, #0] 800f6ce: e001 b.n 800f6d4 800f6d0: 68e2 ldr r2, [r4, #12] 800f6d2: 60da str r2, [r3, #12] 800f6d4: 2500 movs r5, #0 800f6d6: 60e5 str r5, [r4, #12] 800f6d8: 4b1c ldr r3, [pc, #112] @ (800f74c ) 800f6da: 2201 movs r2, #1 800f6dc: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 800f6de: 230a movs r3, #10 800f6e0: 7523 strb r3, [r4, #20] TCP_REG(&tcp_tw_pcbs, pcb); 800f6e2: 4b1b ldr r3, [pc, #108] @ (800f750 ) 800f6e4: 681a ldr r2, [r3, #0] 800f6e6: 60e2 str r2, [r4, #12] 800f6e8: 601c str r4, [r3, #0] 800f6ea: f001 ffa1 bl 8011630 800f6ee: e5a5 b.n 800f23c tcp_receive(pcb); 800f6f0: 4620 mov r0, r4 800f6f2: f7ff f8d7 bl 800e8a4 if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 800f6f6: 4b12 ldr r3, [pc, #72] @ (800f740 ) 800f6f8: 781b ldrb r3, [r3, #0] 800f6fa: f013 0f10 tst.w r3, #16 800f6fe: d031 beq.n 800f764 800f700: 6d22 ldr r2, [r4, #80] @ 0x50 800f702: 4b10 ldr r3, [pc, #64] @ (800f744 ) 800f704: 681b ldr r3, [r3, #0] 800f706: 429a cmp r2, r3 800f708: d001 beq.n 800f70e return ERR_OK; 800f70a: 2500 movs r5, #0 800f70c: e596 b.n 800f23c if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 800f70e: 6ee3 ldr r3, [r4, #108] @ 0x6c 800f710: b10b cbz r3, 800f716 return ERR_OK; 800f712: 2500 movs r5, #0 800f714: e592 b.n 800f23c recv_flags |= TF_CLOSED; 800f716: 4a05 ldr r2, [pc, #20] @ (800f72c ) 800f718: 7813 ldrb r3, [r2, #0] 800f71a: f043 0310 orr.w r3, r3, #16 800f71e: 7013 strb r3, [r2, #0] return ERR_OK; 800f720: 2500 movs r5, #0 800f722: e58b b.n 800f23c switch (pcb->state) { 800f724: 2500 movs r5, #0 800f726: e589 b.n 800f23c 800f728: 24019bf4 .word 0x24019bf4 800f72c: 24019bf0 .word 0x24019bf0 800f730: 08016c64 .word 0x08016c64 800f734: 08016f58 .word 0x08016f58 800f738: 080144e8 .word 0x080144e8 800f73c: 24019bfc .word 0x24019bfc 800f740: 24019bf1 .word 0x24019bf1 800f744: 24019bf8 .word 0x24019bf8 800f748: 24019bd8 .word 0x24019bd8 800f74c: 24019bd2 .word 0x24019bd2 800f750: 24019bd4 .word 0x24019bd4 return ERR_OK; 800f754: 2500 movs r5, #0 800f756: e571 b.n 800f23c 800f758: 2500 movs r5, #0 800f75a: e56f b.n 800f23c 800f75c: 2500 movs r5, #0 800f75e: e56d b.n 800f23c 800f760: 2500 movs r5, #0 800f762: e56b b.n 800f23c 800f764: 2500 movs r5, #0 800f766: e569 b.n 800f23c 0800f768 : { 800f768: b5f0 push {r4, r5, r6, r7, lr} 800f76a: b085 sub sp, #20 800f76c: 4605 mov r5, r0 LWIP_ASSERT_CORE_LOCKED(); 800f76e: f7f4 f9cd bl 8003b0c LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL); 800f772: b155 cbz r5, 800f78a tcphdr = (struct tcp_hdr *)p->payload; 800f774: 686a ldr r2, [r5, #4] 800f776: 4b8b ldr r3, [pc, #556] @ (800f9a4 ) 800f778: 601a str r2, [r3, #0] if (p->len < TCP_HLEN) { 800f77a: 896b ldrh r3, [r5, #10] 800f77c: 2b13 cmp r3, #19 800f77e: d80b bhi.n 800f798 pbuf_free(p); 800f780: 4628 mov r0, r5 800f782: f7fc fb0d bl 800bda0 } 800f786: b005 add sp, #20 800f788: bdf0 pop {r4, r5, r6, r7, pc} LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL); 800f78a: 4b87 ldr r3, [pc, #540] @ (800f9a8 ) 800f78c: 2283 movs r2, #131 @ 0x83 800f78e: 4987 ldr r1, [pc, #540] @ (800f9ac ) 800f790: 4887 ldr r0, [pc, #540] @ (800f9b0 ) 800f792: f003 fe39 bl 8013408 800f796: e7ed b.n 800f774 if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || 800f798: 4b86 ldr r3, [pc, #536] @ (800f9b4 ) 800f79a: 6819 ldr r1, [r3, #0] 800f79c: 6958 ldr r0, [r3, #20] 800f79e: f7fa fe58 bl 800a452 800f7a2: 2800 cmp r0, #0 800f7a4: d1ec bne.n 800f780 ip_addr_ismulticast(ip_current_dest_addr())) { 800f7a6: 4b83 ldr r3, [pc, #524] @ (800f9b4 ) 800f7a8: 695b ldr r3, [r3, #20] 800f7aa: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || 800f7ae: 2be0 cmp r3, #224 @ 0xe0 800f7b0: d0e6 beq.n 800f780 hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr); 800f7b2: 4b7c ldr r3, [pc, #496] @ (800f9a4 ) 800f7b4: 681b ldr r3, [r3, #0] 800f7b6: 8998 ldrh r0, [r3, #12] 800f7b8: f7f8 fb60 bl 8007e7c 800f7bc: f3c0 3107 ubfx r1, r0, #12, #8 800f7c0: 0089 lsls r1, r1, #2 800f7c2: b2c9 uxtb r1, r1 if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { 800f7c4: 2913 cmp r1, #19 800f7c6: d9db bls.n 800f780 800f7c8: 892b ldrh r3, [r5, #8] 800f7ca: 4299 cmp r1, r3 800f7cc: d8d8 bhi.n 800f780 tcphdr_optlen = (u16_t)(hdrlen_bytes - TCP_HLEN); 800f7ce: f1a1 0314 sub.w r3, r1, #20 800f7d2: b29b uxth r3, r3 800f7d4: 4a78 ldr r2, [pc, #480] @ (800f9b8 ) 800f7d6: 8013 strh r3, [r2, #0] tcphdr_opt2 = NULL; 800f7d8: 4a78 ldr r2, [pc, #480] @ (800f9bc ) 800f7da: 2000 movs r0, #0 800f7dc: 6010 str r0, [r2, #0] if (p->len >= hdrlen_bytes) { 800f7de: 896a ldrh r2, [r5, #10] 800f7e0: 4291 cmp r1, r2 800f7e2: d92e bls.n 800f842 LWIP_ASSERT("p->next != NULL", p->next != NULL); 800f7e4: 682b ldr r3, [r5, #0] 800f7e6: 2b00 cmp r3, #0 800f7e8: d067 beq.n 800f8ba pbuf_remove_header(p, TCP_HLEN); 800f7ea: 2114 movs r1, #20 800f7ec: 4628 mov r0, r5 800f7ee: f7fc fa91 bl 800bd14 tcphdr_opt1len = p->len; 800f7f2: 896c ldrh r4, [r5, #10] 800f7f4: 4b72 ldr r3, [pc, #456] @ (800f9c0 ) 800f7f6: 801c strh r4, [r3, #0] opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len); 800f7f8: 4b6f ldr r3, [pc, #444] @ (800f9b8 ) 800f7fa: 881f ldrh r7, [r3, #0] 800f7fc: 1b3e subs r6, r7, r4 800f7fe: b2b6 uxth r6, r6 pbuf_remove_header(p, tcphdr_opt1len); 800f800: 4621 mov r1, r4 800f802: 4628 mov r0, r5 800f804: f7fc fa86 bl 800bd14 if (opt2len > p->next->len) { 800f808: 6828 ldr r0, [r5, #0] 800f80a: 8943 ldrh r3, [r0, #10] 800f80c: 42b3 cmp r3, r6 800f80e: d3b7 bcc.n 800f780 tcphdr_opt2 = (u8_t *)p->next->payload; 800f810: 6842 ldr r2, [r0, #4] 800f812: 4b6a ldr r3, [pc, #424] @ (800f9bc ) 800f814: 601a str r2, [r3, #0] pbuf_remove_header(p->next, opt2len); 800f816: 4631 mov r1, r6 800f818: f7fc fa7c bl 800bd14 p->tot_len = (u16_t)(p->tot_len - opt2len); 800f81c: 892b ldrh r3, [r5, #8] 800f81e: 1be4 subs r4, r4, r7 800f820: 4423 add r3, r4 800f822: 812b strh r3, [r5, #8] LWIP_ASSERT("p->len == 0", p->len == 0); 800f824: 896b ldrh r3, [r5, #10] 800f826: 2b00 cmp r3, #0 800f828: d14e bne.n 800f8c8 LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); 800f82a: 892a ldrh r2, [r5, #8] 800f82c: 682b ldr r3, [r5, #0] 800f82e: 891b ldrh r3, [r3, #8] 800f830: 429a cmp r2, r3 800f832: d00b beq.n 800f84c 800f834: 4b5c ldr r3, [pc, #368] @ (800f9a8 ) 800f836: 22e0 movs r2, #224 @ 0xe0 800f838: 4962 ldr r1, [pc, #392] @ (800f9c4 ) 800f83a: 485d ldr r0, [pc, #372] @ (800f9b0 ) 800f83c: f003 fde4 bl 8013408 800f840: e004 b.n 800f84c tcphdr_opt1len = tcphdr_optlen; 800f842: 4a5f ldr r2, [pc, #380] @ (800f9c0 ) 800f844: 8013 strh r3, [r2, #0] pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */ 800f846: 4628 mov r0, r5 800f848: f7fc fa64 bl 800bd14 tcphdr->src = lwip_ntohs(tcphdr->src); 800f84c: 4c55 ldr r4, [pc, #340] @ (800f9a4 ) 800f84e: 6826 ldr r6, [r4, #0] 800f850: 8830 ldrh r0, [r6, #0] 800f852: f7f8 fb13 bl 8007e7c 800f856: 8030 strh r0, [r6, #0] tcphdr->dest = lwip_ntohs(tcphdr->dest); 800f858: 6826 ldr r6, [r4, #0] 800f85a: 8870 ldrh r0, [r6, #2] 800f85c: f7f8 fb0e bl 8007e7c 800f860: 8070 strh r0, [r6, #2] seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); 800f862: 6826 ldr r6, [r4, #0] 800f864: 6870 ldr r0, [r6, #4] 800f866: f7f8 fb0e bl 8007e86 800f86a: 6070 str r0, [r6, #4] 800f86c: 4b56 ldr r3, [pc, #344] @ (800f9c8 ) 800f86e: 6018 str r0, [r3, #0] ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); 800f870: 6826 ldr r6, [r4, #0] 800f872: 68b0 ldr r0, [r6, #8] 800f874: f7f8 fb07 bl 8007e86 800f878: 60b0 str r0, [r6, #8] 800f87a: 4b54 ldr r3, [pc, #336] @ (800f9cc ) 800f87c: 6018 str r0, [r3, #0] tcphdr->wnd = lwip_ntohs(tcphdr->wnd); 800f87e: 6826 ldr r6, [r4, #0] 800f880: 89f0 ldrh r0, [r6, #14] 800f882: f7f8 fafb bl 8007e7c 800f886: 81f0 strh r0, [r6, #14] flags = TCPH_FLAGS(tcphdr); 800f888: 6823 ldr r3, [r4, #0] 800f88a: 8998 ldrh r0, [r3, #12] 800f88c: f7f8 faf6 bl 8007e7c 800f890: f000 023f and.w r2, r0, #63 @ 0x3f 800f894: 4b4e ldr r3, [pc, #312] @ (800f9d0 ) 800f896: 701a strb r2, [r3, #0] tcplen = p->tot_len; 800f898: 892b ldrh r3, [r5, #8] 800f89a: 4a4e ldr r2, [pc, #312] @ (800f9d4 ) 800f89c: 8013 strh r3, [r2, #0] if (flags & (TCP_FIN | TCP_SYN)) { 800f89e: f010 0f03 tst.w r0, #3 800f8a2: d006 beq.n 800f8b2 tcplen++; 800f8a4: 1c5a adds r2, r3, #1 800f8a6: b292 uxth r2, r2 800f8a8: 494a ldr r1, [pc, #296] @ (800f9d4 ) 800f8aa: 800a strh r2, [r1, #0] if (tcplen < p->tot_len) { 800f8ac: 4293 cmp r3, r2 800f8ae: f63f af67 bhi.w 800f780 for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800f8b2: 4b49 ldr r3, [pc, #292] @ (800f9d8 ) 800f8b4: 681c ldr r4, [r3, #0] prev = NULL; 800f8b6: 2600 movs r6, #0 for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800f8b8: e02a b.n 800f910 LWIP_ASSERT("p->next != NULL", p->next != NULL); 800f8ba: 4b3b ldr r3, [pc, #236] @ (800f9a8 ) 800f8bc: 22c2 movs r2, #194 @ 0xc2 800f8be: 4947 ldr r1, [pc, #284] @ (800f9dc ) 800f8c0: 483b ldr r0, [pc, #236] @ (800f9b0 ) 800f8c2: f003 fda1 bl 8013408 800f8c6: e790 b.n 800f7ea LWIP_ASSERT("p->len == 0", p->len == 0); 800f8c8: 4b37 ldr r3, [pc, #220] @ (800f9a8 ) 800f8ca: 22df movs r2, #223 @ 0xdf 800f8cc: 4944 ldr r1, [pc, #272] @ (800f9e0 ) 800f8ce: 4838 ldr r0, [pc, #224] @ (800f9b0 ) 800f8d0: f003 fd9a bl 8013408 800f8d4: e7a9 b.n 800f82a LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); 800f8d6: 4b34 ldr r3, [pc, #208] @ (800f9a8 ) 800f8d8: 22fb movs r2, #251 @ 0xfb 800f8da: 4942 ldr r1, [pc, #264] @ (800f9e4 ) 800f8dc: 4834 ldr r0, [pc, #208] @ (800f9b0 ) 800f8de: f003 fd93 bl 8013408 800f8e2: e01a b.n 800f91a LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); 800f8e4: 4b30 ldr r3, [pc, #192] @ (800f9a8 ) 800f8e6: 22fc movs r2, #252 @ 0xfc 800f8e8: 493f ldr r1, [pc, #252] @ (800f9e8 ) 800f8ea: 4831 ldr r0, [pc, #196] @ (800f9b0 ) 800f8ec: f003 fd8c bl 8013408 800f8f0: e016 b.n 800f920 LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); 800f8f2: 4b2d ldr r3, [pc, #180] @ (800f9a8 ) 800f8f4: 22fd movs r2, #253 @ 0xfd 800f8f6: 493d ldr r1, [pc, #244] @ (800f9ec ) 800f8f8: 482d ldr r0, [pc, #180] @ (800f9b0 ) 800f8fa: f003 fd85 bl 8013408 800f8fe: e012 b.n 800f926 if (pcb->remote_port == tcphdr->src && 800f900: 8b21 ldrh r1, [r4, #24] 800f902: 4b28 ldr r3, [pc, #160] @ (800f9a4 ) 800f904: 681b ldr r3, [r3, #0] 800f906: 881a ldrh r2, [r3, #0] 800f908: 4291 cmp r1, r2 800f90a: d018 beq.n 800f93e for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 800f90c: 4626 mov r6, r4 800f90e: 68e4 ldr r4, [r4, #12] 800f910: 2c00 cmp r4, #0 800f912: d076 beq.n 800fa02 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); 800f914: 7d23 ldrb r3, [r4, #20] 800f916: 2b00 cmp r3, #0 800f918: d0dd beq.n 800f8d6 LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); 800f91a: 7d23 ldrb r3, [r4, #20] 800f91c: 2b0a cmp r3, #10 800f91e: d0e1 beq.n 800f8e4 LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); 800f920: 7d23 ldrb r3, [r4, #20] 800f922: 2b01 cmp r3, #1 800f924: d0e5 beq.n 800f8f2 if ((pcb->netif_idx != NETIF_NO_INDEX) && 800f926: 7a22 ldrb r2, [r4, #8] 800f928: 2a00 cmp r2, #0 800f92a: d0e9 beq.n 800f900 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 800f92c: 4b21 ldr r3, [pc, #132] @ (800f9b4 ) 800f92e: 685b ldr r3, [r3, #4] 800f930: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 800f934: 3301 adds r3, #1 800f936: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 800f938: 429a cmp r2, r3 800f93a: d0e1 beq.n 800f900 800f93c: e7e6 b.n 800f90c pcb->local_port == tcphdr->dest && 800f93e: 8ae2 ldrh r2, [r4, #22] 800f940: 885b ldrh r3, [r3, #2] if (pcb->remote_port == tcphdr->src && 800f942: 429a cmp r2, r3 800f944: d1e2 bne.n 800f90c ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 800f946: 6862 ldr r2, [r4, #4] 800f948: 4b1a ldr r3, [pc, #104] @ (800f9b4 ) 800f94a: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 800f94c: 429a cmp r2, r3 800f94e: d1dd bne.n 800f90c ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 800f950: 6822 ldr r2, [r4, #0] 800f952: 4b18 ldr r3, [pc, #96] @ (800f9b4 ) 800f954: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 800f956: 429a cmp r2, r3 800f958: d1d8 bne.n 800f90c LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); 800f95a: 68e3 ldr r3, [r4, #12] 800f95c: 429c cmp r4, r3 800f95e: d018 beq.n 800f992 if (prev != NULL) { 800f960: b12e cbz r6, 800f96e prev->next = pcb->next; 800f962: 68e3 ldr r3, [r4, #12] 800f964: 60f3 str r3, [r6, #12] pcb->next = tcp_active_pcbs; 800f966: 4b1c ldr r3, [pc, #112] @ (800f9d8 ) 800f968: 681a ldr r2, [r3, #0] 800f96a: 60e2 str r2, [r4, #12] tcp_active_pcbs = pcb; 800f96c: 601c str r4, [r3, #0] LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); 800f96e: 68e3 ldr r3, [r4, #12] 800f970: 429c cmp r4, r3 800f972: d03f beq.n 800f9f4 if (pcb != NULL) { 800f974: 2c00 cmp r4, #0 800f976: d146 bne.n 800fa06 if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { 800f978: 4b0a ldr r3, [pc, #40] @ (800f9a4 ) 800f97a: 681b ldr r3, [r3, #0] 800f97c: 8998 ldrh r0, [r3, #12] 800f97e: f7f8 fa7d bl 8007e7c 800f982: f010 0f04 tst.w r0, #4 800f986: f000 8197 beq.w 800fcb8 pbuf_free(p); 800f98a: 4628 mov r0, r5 800f98c: f7fc fa08 bl 800bda0 800f990: e6f9 b.n 800f786 LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); 800f992: 4b05 ldr r3, [pc, #20] @ (800f9a8 ) 800f994: f240 120d movw r2, #269 @ 0x10d 800f998: 4915 ldr r1, [pc, #84] @ (800f9f0 ) 800f99a: 4805 ldr r0, [pc, #20] @ (800f9b0 ) 800f99c: f003 fd34 bl 8013408 800f9a0: e7de b.n 800f960 800f9a2: bf00 nop 800f9a4: 24019c0c .word 0x24019c0c 800f9a8: 08016c64 .word 0x08016c64 800f9ac: 08016f78 .word 0x08016f78 800f9b0: 080144e8 .word 0x080144e8 800f9b4: 2401301c .word 0x2401301c 800f9b8: 24019c0a .word 0x24019c0a 800f9bc: 24019c04 .word 0x24019c04 800f9c0: 24019c08 .word 0x24019c08 800f9c4: 08016fac .word 0x08016fac 800f9c8: 24019bfc .word 0x24019bfc 800f9cc: 24019bf8 .word 0x24019bf8 800f9d0: 24019bf1 .word 0x24019bf1 800f9d4: 24019bf2 .word 0x24019bf2 800f9d8: 24019bd8 .word 0x24019bd8 800f9dc: 08016f90 .word 0x08016f90 800f9e0: 08016fa0 .word 0x08016fa0 800f9e4: 08016fcc .word 0x08016fcc 800f9e8: 08016ff4 .word 0x08016ff4 800f9ec: 08017020 .word 0x08017020 800f9f0: 08017048 .word 0x08017048 LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); 800f9f4: 4b95 ldr r3, [pc, #596] @ (800fc4c ) 800f9f6: f240 1215 movw r2, #277 @ 0x115 800f9fa: 4995 ldr r1, [pc, #596] @ (800fc50 ) 800f9fc: 4895 ldr r0, [pc, #596] @ (800fc54 ) 800f9fe: f003 fd03 bl 8013408 if (pcb == NULL) { 800fa02: 2c00 cmp r4, #0 800fa04: d053 beq.n 800faae inseg.next = NULL; 800fa06: 4a94 ldr r2, [pc, #592] @ (800fc58 ) 800fa08: 2300 movs r3, #0 800fa0a: 6013 str r3, [r2, #0] inseg.len = p->tot_len; 800fa0c: 8929 ldrh r1, [r5, #8] 800fa0e: 8111 strh r1, [r2, #8] inseg.p = p; 800fa10: 6055 str r5, [r2, #4] inseg.tcphdr = tcphdr; 800fa12: 4992 ldr r1, [pc, #584] @ (800fc5c ) 800fa14: 6809 ldr r1, [r1, #0] 800fa16: 6111 str r1, [r2, #16] recv_data = NULL; 800fa18: 4a91 ldr r2, [pc, #580] @ (800fc60 ) 800fa1a: 6013 str r3, [r2, #0] recv_flags = 0; 800fa1c: 4a91 ldr r2, [pc, #580] @ (800fc64 ) 800fa1e: 7013 strb r3, [r2, #0] recv_acked = 0; 800fa20: 4a91 ldr r2, [pc, #580] @ (800fc68 ) 800fa22: 8013 strh r3, [r2, #0] if (flags & TCP_PSH) { 800fa24: 4b91 ldr r3, [pc, #580] @ (800fc6c ) 800fa26: 781b ldrb r3, [r3, #0] 800fa28: f013 0f08 tst.w r3, #8 800fa2c: d003 beq.n 800fa36 p->flags |= PBUF_FLAG_PUSH; 800fa2e: 7b6b ldrb r3, [r5, #13] 800fa30: f043 0301 orr.w r3, r3, #1 800fa34: 736b strb r3, [r5, #13] if (pcb->refused_data != NULL) { 800fa36: 6fa3 ldr r3, [r4, #120] @ 0x78 800fa38: b16b cbz r3, 800fa56 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 800fa3a: 4620 mov r0, r4 800fa3c: f7fe f9a8 bl 800dd90 800fa40: f110 0f0d cmn.w r0, #13 800fa44: f000 809a beq.w 800fb7c ((pcb->refused_data != NULL) && (tcplen > 0))) { 800fa48: 6fa3 ldr r3, [r4, #120] @ 0x78 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 800fa4a: b123 cbz r3, 800fa56 ((pcb->refused_data != NULL) && (tcplen > 0))) { 800fa4c: 4b88 ldr r3, [pc, #544] @ (800fc70 ) 800fa4e: 881b ldrh r3, [r3, #0] 800fa50: 2b00 cmp r3, #0 800fa52: f040 8093 bne.w 800fb7c tcp_input_pcb = pcb; 800fa56: 4b87 ldr r3, [pc, #540] @ (800fc74 ) 800fa58: 601c str r4, [r3, #0] err = tcp_process(pcb); 800fa5a: 4620 mov r0, r4 800fa5c: f7ff fbc2 bl 800f1e4 if (err != ERR_ABRT) { 800fa60: f110 0f0d cmn.w r0, #13 800fa64: d013 beq.n 800fa8e if (recv_flags & TF_RESET) { 800fa66: 4b7f ldr r3, [pc, #508] @ (800fc64 ) 800fa68: 781b ldrb r3, [r3, #0] 800fa6a: f013 0f08 tst.w r3, #8 800fa6e: f000 808c beq.w 800fb8a TCP_EVENT_ERR(pcb->state, pcb->errf, pcb->callback_arg, ERR_RST); 800fa72: f8d4 3090 ldr.w r3, [r4, #144] @ 0x90 800fa76: b11b cbz r3, 800fa80 800fa78: f06f 010d mvn.w r1, #13 800fa7c: 6920 ldr r0, [r4, #16] 800fa7e: 4798 blx r3 tcp_pcb_remove(&tcp_active_pcbs, pcb); 800fa80: 4621 mov r1, r4 800fa82: 487d ldr r0, [pc, #500] @ (800fc78 ) 800fa84: f7fd fe78 bl 800d778 tcp_free(pcb); 800fa88: 4620 mov r0, r4 800fa8a: f7fd fbfb bl 800d284 tcp_input_pcb = NULL; 800fa8e: 2300 movs r3, #0 800fa90: 4a78 ldr r2, [pc, #480] @ (800fc74 ) 800fa92: 6013 str r3, [r2, #0] recv_data = NULL; 800fa94: 4a72 ldr r2, [pc, #456] @ (800fc60 ) 800fa96: 6013 str r3, [r2, #0] if (inseg.p != NULL) { 800fa98: 4b6f ldr r3, [pc, #444] @ (800fc58 ) 800fa9a: 6858 ldr r0, [r3, #4] 800fa9c: 2800 cmp r0, #0 800fa9e: f43f ae72 beq.w 800f786 pbuf_free(inseg.p); 800faa2: f7fc f97d bl 800bda0 inseg.p = NULL; 800faa6: 4b6c ldr r3, [pc, #432] @ (800fc58 ) 800faa8: 2200 movs r2, #0 800faaa: 605a str r2, [r3, #4] 800faac: e66b b.n 800f786 for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 800faae: 4b73 ldr r3, [pc, #460] @ (800fc7c ) 800fab0: 681c ldr r4, [r3, #0] 800fab2: e00e b.n 800fad2 LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 800fab4: 4b65 ldr r3, [pc, #404] @ (800fc4c ) 800fab6: f240 121f movw r2, #287 @ 0x11f 800faba: 4971 ldr r1, [pc, #452] @ (800fc80 ) 800fabc: 4865 ldr r0, [pc, #404] @ (800fc54 ) 800fabe: f003 fca3 bl 8013408 800fac2: e00a b.n 800fada if (pcb->remote_port == tcphdr->src && 800fac4: 8b21 ldrh r1, [r4, #24] 800fac6: 4b65 ldr r3, [pc, #404] @ (800fc5c ) 800fac8: 681b ldr r3, [r3, #0] 800faca: 881a ldrh r2, [r3, #0] 800facc: 4291 cmp r1, r2 800face: d010 beq.n 800faf2 for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 800fad0: 68e4 ldr r4, [r4, #12] 800fad2: b31c cbz r4, 800fb1c LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 800fad4: 7d23 ldrb r3, [r4, #20] 800fad6: 2b0a cmp r3, #10 800fad8: d1ec bne.n 800fab4 if ((pcb->netif_idx != NETIF_NO_INDEX) && 800fada: 7a22 ldrb r2, [r4, #8] 800fadc: 2a00 cmp r2, #0 800fade: d0f1 beq.n 800fac4 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 800fae0: 4b68 ldr r3, [pc, #416] @ (800fc84 ) 800fae2: 685b ldr r3, [r3, #4] 800fae4: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 800fae8: 3301 adds r3, #1 800faea: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 800faec: 429a cmp r2, r3 800faee: d0e9 beq.n 800fac4 800faf0: e7ee b.n 800fad0 pcb->local_port == tcphdr->dest && 800faf2: 8ae2 ldrh r2, [r4, #22] 800faf4: 885b ldrh r3, [r3, #2] if (pcb->remote_port == tcphdr->src && 800faf6: 429a cmp r2, r3 800faf8: d1ea bne.n 800fad0 ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 800fafa: 6862 ldr r2, [r4, #4] 800fafc: 4b61 ldr r3, [pc, #388] @ (800fc84 ) 800fafe: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 800fb00: 429a cmp r2, r3 800fb02: d1e5 bne.n 800fad0 ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 800fb04: 6822 ldr r2, [r4, #0] 800fb06: 4b5f ldr r3, [pc, #380] @ (800fc84 ) 800fb08: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 800fb0a: 429a cmp r2, r3 800fb0c: d1e0 bne.n 800fad0 tcp_timewait_input(pcb); 800fb0e: 4620 mov r0, r4 800fb10: f7fe fd10 bl 800e534 pbuf_free(p); 800fb14: 4628 mov r0, r5 800fb16: f7fc f943 bl 800bda0 return; 800fb1a: e634 b.n 800f786 for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 800fb1c: 4b5a ldr r3, [pc, #360] @ (800fc88 ) 800fb1e: 681e ldr r6, [r3, #0] 800fb20: 4630 mov r0, r6 prev = NULL; 800fb22: 4621 mov r1, r4 for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 800fb24: e007 b.n 800fb36 if (lpcb->local_port == tcphdr->dest) { 800fb26: 8ac2 ldrh r2, [r0, #22] 800fb28: 4b4c ldr r3, [pc, #304] @ (800fc5c ) 800fb2a: 681b ldr r3, [r3, #0] 800fb2c: 885b ldrh r3, [r3, #2] 800fb2e: 429a cmp r2, r3 800fb30: d00e beq.n 800fb50 for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 800fb32: 4601 mov r1, r0 800fb34: 68c0 ldr r0, [r0, #12] 800fb36: b190 cbz r0, 800fb5e if ((lpcb->netif_idx != NETIF_NO_INDEX) && 800fb38: 7a02 ldrb r2, [r0, #8] 800fb3a: 2a00 cmp r2, #0 800fb3c: d0f3 beq.n 800fb26 (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 800fb3e: 4b51 ldr r3, [pc, #324] @ (800fc84 ) 800fb40: 685b ldr r3, [r3, #4] 800fb42: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 800fb46: 3301 adds r3, #1 800fb48: b2db uxtb r3, r3 if ((lpcb->netif_idx != NETIF_NO_INDEX) && 800fb4a: 429a cmp r2, r3 800fb4c: d0eb beq.n 800fb26 800fb4e: e7f0 b.n 800fb32 if (ip_addr_cmp(&lpcb->local_ip, ip_current_dest_addr())) { 800fb50: 6803 ldr r3, [r0, #0] 800fb52: 4a4c ldr r2, [pc, #304] @ (800fc84 ) 800fb54: 6952 ldr r2, [r2, #20] 800fb56: 4293 cmp r3, r2 800fb58: d001 beq.n 800fb5e } else if (ip_addr_isany(&lpcb->local_ip)) { 800fb5a: 2b00 cmp r3, #0 800fb5c: d1e9 bne.n 800fb32 if (lpcb != NULL) { 800fb5e: 2800 cmp r0, #0 800fb60: f43f af08 beq.w 800f974 if (prev != NULL) { 800fb64: b121 cbz r1, 800fb70 ((struct tcp_pcb_listen *)prev)->next = lpcb->next; 800fb66: 68c3 ldr r3, [r0, #12] 800fb68: 60cb str r3, [r1, #12] lpcb->next = tcp_listen_pcbs.listen_pcbs; 800fb6a: 60c6 str r6, [r0, #12] tcp_listen_pcbs.listen_pcbs = lpcb; 800fb6c: 4b46 ldr r3, [pc, #280] @ (800fc88 ) 800fb6e: 6018 str r0, [r3, #0] tcp_listen_input(lpcb); 800fb70: f7fe fd3c bl 800e5ec pbuf_free(p); 800fb74: 4628 mov r0, r5 800fb76: f7fc f913 bl 800bda0 return; 800fb7a: e604 b.n 800f786 if (pcb->rcv_ann_wnd == 0) { 800fb7c: 8d63 ldrh r3, [r4, #42] @ 0x2a 800fb7e: 2b00 cmp r3, #0 800fb80: d185 bne.n 800fa8e tcp_send_empty_ack(pcb); 800fb82: 4620 mov r0, r4 800fb84: f001 f934 bl 8010df0 goto aborted; 800fb88: e781 b.n 800fa8e if (recv_acked > 0) { 800fb8a: 4b37 ldr r3, [pc, #220] @ (800fc68 ) 800fb8c: 881a ldrh r2, [r3, #0] 800fb8e: b162 cbz r2, 800fbaa TCP_EVENT_SENT(pcb, (u16_t)acked16, err); 800fb90: f8d4 3080 ldr.w r3, [r4, #128] @ 0x80 800fb94: b133 cbz r3, 800fba4 800fb96: 4621 mov r1, r4 800fb98: 6920 ldr r0, [r4, #16] 800fb9a: 4798 blx r3 if (err == ERR_ABRT) { 800fb9c: f110 0f0d cmn.w r0, #13 800fba0: f43f af75 beq.w 800fa8e recv_acked = 0; 800fba4: 4b30 ldr r3, [pc, #192] @ (800fc68 ) 800fba6: 2200 movs r2, #0 800fba8: 801a strh r2, [r3, #0] if (tcp_input_delayed_close(pcb)) { 800fbaa: 4620 mov r0, r4 800fbac: f7fe fc92 bl 800e4d4 800fbb0: 2800 cmp r0, #0 800fbb2: f47f af6c bne.w 800fa8e if (recv_data != NULL) { 800fbb6: 4b2a ldr r3, [pc, #168] @ (800fc60 ) 800fbb8: 681b ldr r3, [r3, #0] 800fbba: b1f3 cbz r3, 800fbfa LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); 800fbbc: 6fa3 ldr r3, [r4, #120] @ 0x78 800fbbe: b133 cbz r3, 800fbce 800fbc0: 4b22 ldr r3, [pc, #136] @ (800fc4c ) 800fbc2: f44f 72f3 mov.w r2, #486 @ 0x1e6 800fbc6: 4931 ldr r1, [pc, #196] @ (800fc8c ) 800fbc8: 4822 ldr r0, [pc, #136] @ (800fc54 ) 800fbca: f003 fc1d bl 8013408 if (pcb->flags & TF_RXCLOSED) { 800fbce: 8b63 ldrh r3, [r4, #26] 800fbd0: f013 0f10 tst.w r3, #16 800fbd4: d12a bne.n 800fc2c TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 800fbd6: f8d4 5084 ldr.w r5, [r4, #132] @ 0x84 800fbda: 2d00 cmp r5, #0 800fbdc: d02e beq.n 800fc3c 800fbde: 2300 movs r3, #0 800fbe0: 4a1f ldr r2, [pc, #124] @ (800fc60 ) 800fbe2: 6812 ldr r2, [r2, #0] 800fbe4: 4621 mov r1, r4 800fbe6: 6920 ldr r0, [r4, #16] 800fbe8: 47a8 blx r5 if (err == ERR_ABRT) { 800fbea: f110 0f0d cmn.w r0, #13 800fbee: f43f af4e beq.w 800fa8e if (err != ERR_OK) { 800fbf2: b110 cbz r0, 800fbfa pcb->refused_data = recv_data; 800fbf4: 4b1a ldr r3, [pc, #104] @ (800fc60 ) 800fbf6: 681b ldr r3, [r3, #0] 800fbf8: 67a3 str r3, [r4, #120] @ 0x78 if (recv_flags & TF_GOT_FIN) { 800fbfa: 4b1a ldr r3, [pc, #104] @ (800fc64 ) 800fbfc: 781b ldrb r3, [r3, #0] 800fbfe: f013 0f20 tst.w r3, #32 800fc02: d006 beq.n 800fc12 if (pcb->refused_data != NULL) { 800fc04: 6fa3 ldr r3, [r4, #120] @ 0x78 800fc06: 2b00 cmp r3, #0 800fc08: d042 beq.n 800fc90 pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 800fc0a: 7b5a ldrb r2, [r3, #13] 800fc0c: f042 0220 orr.w r2, r2, #32 800fc10: 735a strb r2, [r3, #13] tcp_input_pcb = NULL; 800fc12: 4b18 ldr r3, [pc, #96] @ (800fc74 ) 800fc14: 2200 movs r2, #0 800fc16: 601a str r2, [r3, #0] if (tcp_input_delayed_close(pcb)) { 800fc18: 4620 mov r0, r4 800fc1a: f7fe fc5b bl 800e4d4 800fc1e: 2800 cmp r0, #0 800fc20: f47f af35 bne.w 800fa8e tcp_output(pcb); 800fc24: 4620 mov r0, r4 800fc26: f001 f91d bl 8010e64 800fc2a: e730 b.n 800fa8e pbuf_free(recv_data); 800fc2c: 4b0c ldr r3, [pc, #48] @ (800fc60 ) 800fc2e: 6818 ldr r0, [r3, #0] 800fc30: f7fc f8b6 bl 800bda0 tcp_abort(pcb); 800fc34: 4620 mov r0, r4 800fc36: f7fd fe8f bl 800d958 goto aborted; 800fc3a: e728 b.n 800fa8e TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 800fc3c: 2300 movs r3, #0 800fc3e: 4a08 ldr r2, [pc, #32] @ (800fc60 ) 800fc40: 6812 ldr r2, [r2, #0] 800fc42: 4621 mov r1, r4 800fc44: 4618 mov r0, r3 800fc46: f7fe f87f bl 800dd48 800fc4a: e7ce b.n 800fbea 800fc4c: 08016c64 .word 0x08016c64 800fc50: 08017074 .word 0x08017074 800fc54: 080144e8 .word 0x080144e8 800fc58: 24019c10 .word 0x24019c10 800fc5c: 24019c0c .word 0x24019c0c 800fc60: 24019bec .word 0x24019bec 800fc64: 24019bf0 .word 0x24019bf0 800fc68: 24019bf4 .word 0x24019bf4 800fc6c: 24019bf1 .word 0x24019bf1 800fc70: 24019bf2 .word 0x24019bf2 800fc74: 24019be8 .word 0x24019be8 800fc78: 24019bd8 .word 0x24019bd8 800fc7c: 24019bd4 .word 0x24019bd4 800fc80: 080170a0 .word 0x080170a0 800fc84: 2401301c .word 0x2401301c 800fc88: 24019bdc .word 0x24019bdc 800fc8c: 080170d0 .word 0x080170d0 if (pcb->rcv_wnd != TCP_WND_MAX(pcb)) { 800fc90: 8d23 ldrh r3, [r4, #40] @ 0x28 800fc92: f241 62d0 movw r2, #5840 @ 0x16d0 800fc96: 4293 cmp r3, r2 800fc98: d001 beq.n 800fc9e pcb->rcv_wnd++; 800fc9a: 3301 adds r3, #1 800fc9c: 8523 strh r3, [r4, #40] @ 0x28 TCP_EVENT_CLOSED(pcb, err); 800fc9e: f8d4 5084 ldr.w r5, [r4, #132] @ 0x84 800fca2: 2d00 cmp r5, #0 800fca4: d0b5 beq.n 800fc12 800fca6: 2300 movs r3, #0 800fca8: 461a mov r2, r3 800fcaa: 4621 mov r1, r4 800fcac: 6920 ldr r0, [r4, #16] 800fcae: 47a8 blx r5 if (err == ERR_ABRT) { 800fcb0: f110 0f0d cmn.w r0, #13 800fcb4: d1ad bne.n 800fc12 800fcb6: e6ea b.n 800fa8e ip_current_src_addr(), tcphdr->dest, tcphdr->src); 800fcb8: 4b09 ldr r3, [pc, #36] @ (800fce0 ) 800fcba: 6819 ldr r1, [r3, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 800fcbc: 4b09 ldr r3, [pc, #36] @ (800fce4 ) 800fcbe: 4a0a ldr r2, [pc, #40] @ (800fce8 ) 800fcc0: 8810 ldrh r0, [r2, #0] 800fcc2: 4a0a ldr r2, [pc, #40] @ (800fcec ) 800fcc4: 6812 ldr r2, [r2, #0] 800fcc6: 880c ldrh r4, [r1, #0] 800fcc8: 9402 str r4, [sp, #8] 800fcca: 8849 ldrh r1, [r1, #2] 800fccc: 9101 str r1, [sp, #4] 800fcce: 1f19 subs r1, r3, #4 800fcd0: 9100 str r1, [sp, #0] 800fcd2: 4402 add r2, r0 800fcd4: 4906 ldr r1, [pc, #24] @ (800fcf0 ) 800fcd6: 6809 ldr r1, [r1, #0] 800fcd8: 2000 movs r0, #0 800fcda: f001 f841 bl 8010d60 800fcde: e654 b.n 800f98a 800fce0: 24019c0c .word 0x24019c0c 800fce4: 24013030 .word 0x24013030 800fce8: 24019bf2 .word 0x24019bf2 800fcec: 24019bfc .word 0x24019bfc 800fcf0: 24019bf8 .word 0x24019bf8 0800fcf4 : void tcp_trigger_input_pcb_close(void) { recv_flags |= TF_CLOSED; 800fcf4: 4a02 ldr r2, [pc, #8] @ (800fd00 ) 800fcf6: 7813 ldrb r3, [r2, #0] 800fcf8: f043 0310 orr.w r3, r3, #16 800fcfc: 7013 strb r3, [r2, #0] } 800fcfe: 4770 bx lr 800fd00: 24019bf0 .word 0x24019bf0 0800fd04 : * @param len length of data to send (checked agains snd_buf) * @return ERR_OK if tcp_write is allowed to proceed, another err_t otherwise */ static err_t tcp_write_checks(struct tcp_pcb *pcb, u16_t len) { 800fd04: b538 push {r3, r4, r5, lr} 800fd06: 460c mov r4, r1 LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL); 800fd08: 4605 mov r5, r0 800fd0a: b1b8 cbz r0, 800fd3c /* connection is in invalid state for data transmission? */ if ((pcb->state != ESTABLISHED) && 800fd0c: 7d2b ldrb r3, [r5, #20] 800fd0e: 2b04 cmp r3, #4 800fd10: bf18 it ne 800fd12: 2b07 cmpne r3, #7 800fd14: d003 beq.n 800fd1e (pcb->state != CLOSE_WAIT) && 800fd16: 2b02 cmp r3, #2 800fd18: d001 beq.n 800fd1e (pcb->state != SYN_SENT) && 800fd1a: 2b03 cmp r3, #3 800fd1c: d141 bne.n 800fda2 (pcb->state != SYN_RCVD)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; } else if (len == 0) { 800fd1e: 2c00 cmp r4, #0 800fd20: d042 beq.n 800fda8 return ERR_OK; } /* fail on too much data */ if (len > pcb->snd_buf) { 800fd22: f8b5 3064 ldrh.w r3, [r5, #100] @ 0x64 800fd26: 42a3 cmp r3, r4 800fd28: d310 bcc.n 800fd4c LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: queuelen: %"TCPWNDSIZE_F"\n", (tcpwnd_size_t)pcb->snd_queuelen)); /* If total number of pbufs on the unsent/unacked queues exceeds the * configured maximum, return an error */ /* check for configured max queuelen and possible overflow */ if (pcb->snd_queuelen >= LWIP_MIN(TCP_SND_QUEUELEN, (TCP_SNDQUEUELEN_OVERFLOW + 1))) { 800fd2a: f8b5 3066 ldrh.w r3, [r5, #102] @ 0x66 800fd2e: 2b0f cmp r3, #15 800fd30: d813 bhi.n 800fd5a pcb->snd_queuelen, (u16_t)TCP_SND_QUEUELEN)); TCP_STATS_INC(tcp.memerr); tcp_set_flags(pcb, TF_NAGLEMEMERR); return ERR_MEM; } if (pcb->snd_queuelen != 0) { 800fd32: b333 cbz r3, 800fd82 LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", 800fd34: 6f2b ldr r3, [r5, #112] @ 0x70 800fd36: b1bb cbz r3, 800fd68 pcb->unacked != NULL || pcb->unsent != NULL); } else { LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", pcb->unacked == NULL && pcb->unsent == NULL); } return ERR_OK; 800fd38: 2000 movs r0, #0 800fd3a: e036 b.n 800fdaa LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL); 800fd3c: 4b1b ldr r3, [pc, #108] @ (800fdac ) 800fd3e: f240 1233 movw r2, #307 @ 0x133 800fd42: 491b ldr r1, [pc, #108] @ (800fdb0 ) 800fd44: 481b ldr r0, [pc, #108] @ (800fdb4 ) 800fd46: f003 fb5f bl 8013408 800fd4a: e7df b.n 800fd0c tcp_set_flags(pcb, TF_NAGLEMEMERR); 800fd4c: 8b6b ldrh r3, [r5, #26] 800fd4e: f043 0380 orr.w r3, r3, #128 @ 0x80 800fd52: 836b strh r3, [r5, #26] return ERR_MEM; 800fd54: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800fd58: e027 b.n 800fdaa tcp_set_flags(pcb, TF_NAGLEMEMERR); 800fd5a: 8b6b ldrh r3, [r5, #26] 800fd5c: f043 0380 orr.w r3, r3, #128 @ 0x80 800fd60: 836b strh r3, [r5, #26] return ERR_MEM; 800fd62: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 800fd66: e020 b.n 800fdaa LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", 800fd68: 6eeb ldr r3, [r5, #108] @ 0x6c 800fd6a: b10b cbz r3, 800fd70 return ERR_OK; 800fd6c: 2000 movs r0, #0 800fd6e: e01c b.n 800fdaa LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", 800fd70: 4b0e ldr r3, [pc, #56] @ (800fdac ) 800fd72: f240 1255 movw r2, #341 @ 0x155 800fd76: 4910 ldr r1, [pc, #64] @ (800fdb8 ) 800fd78: 480e ldr r0, [pc, #56] @ (800fdb4 ) 800fd7a: f003 fb45 bl 8013408 return ERR_OK; 800fd7e: 2000 movs r0, #0 800fd80: e013 b.n 800fdaa LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", 800fd82: 6f2b ldr r3, [r5, #112] @ 0x70 800fd84: b143 cbz r3, 800fd98 800fd86: 4b09 ldr r3, [pc, #36] @ (800fdac ) 800fd88: f44f 72ac mov.w r2, #344 @ 0x158 800fd8c: 490b ldr r1, [pc, #44] @ (800fdbc ) 800fd8e: 4809 ldr r0, [pc, #36] @ (800fdb4 ) 800fd90: f003 fb3a bl 8013408 return ERR_OK; 800fd94: 2000 movs r0, #0 800fd96: e008 b.n 800fdaa LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", 800fd98: 6eeb ldr r3, [r5, #108] @ 0x6c 800fd9a: 2b00 cmp r3, #0 800fd9c: d1f3 bne.n 800fd86 return ERR_OK; 800fd9e: 2000 movs r0, #0 800fda0: e003 b.n 800fdaa return ERR_CONN; 800fda2: f06f 000a mvn.w r0, #10 800fda6: e000 b.n 800fdaa return ERR_OK; 800fda8: 2000 movs r0, #0 } 800fdaa: bd38 pop {r3, r4, r5, pc} 800fdac: 080170ec .word 0x080170ec 800fdb0: 08017150 .word 0x08017150 800fdb4: 080144e8 .word 0x080144e8 800fdb8: 08017170 .word 0x08017170 800fdbc: 080171ac .word 0x080171ac 0800fdc0 : * @arg seg the tcp segment to check * @return 1 if ref != 1, 0 if ref == 1 */ static int tcp_output_segment_busy(const struct tcp_seg *seg) { 800fdc0: b510 push {r4, lr} LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL); 800fdc2: 4604 mov r4, r0 800fdc4: b128 cbz r0, 800fdd2 /* We only need to check the first pbuf here: If a pbuf is queued for transmission, a driver calls pbuf_ref(), which only changes the ref count of the first pbuf */ if (seg->p->ref != 1) { 800fdc6: 6863 ldr r3, [r4, #4] 800fdc8: 7b9b ldrb r3, [r3, #14] 800fdca: 2b01 cmp r3, #1 800fdcc: d109 bne.n 800fde2 /* other reference found */ return 1; } /* no other references found */ return 0; 800fdce: 2000 movs r0, #0 } 800fdd0: bd10 pop {r4, pc} LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL); 800fdd2: 4b05 ldr r3, [pc, #20] @ (800fde8 ) 800fdd4: f240 529a movw r2, #1434 @ 0x59a 800fdd8: 4904 ldr r1, [pc, #16] @ (800fdec ) 800fdda: 4805 ldr r0, [pc, #20] @ (800fdf0 ) 800fddc: f003 fb14 bl 8013408 800fde0: e7f1 b.n 800fdc6 return 1; 800fde2: 2001 movs r0, #1 800fde4: e7f4 b.n 800fdd0 800fde6: bf00 nop 800fde8: 080170ec .word 0x080170ec 800fdec: 080171e0 .word 0x080171e0 800fdf0: 080144e8 .word 0x080144e8 0800fdf4 : } /* Fill in options for control segments */ static void tcp_output_fill_options(const struct tcp_pcb *pcb, struct pbuf *p, u8_t optflags, u8_t num_sacks) { 800fdf4: b538 push {r3, r4, r5, lr} 800fdf6: 4614 mov r4, r2 struct tcp_hdr *tcphdr; u32_t *opts; u16_t sacks_len = 0; LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL); 800fdf8: 460d mov r5, r1 800fdfa: b189 cbz r1, 800fe20 tcphdr = (struct tcp_hdr *)p->payload; 800fdfc: 686b ldr r3, [r5, #4] opts = (u32_t *)(void *)(tcphdr + 1); 800fdfe: f103 0214 add.w r2, r3, #20 opts = LWIP_HOOK_TCP_OUT_ADD_TCPOPTS(p, tcphdr, pcb, opts); #endif LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(sacks_len); LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(tcphdr + 1)) + sacks_len * 4 + LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb)); 800fe02: 00a4 lsls r4, r4, #2 800fe04: f004 0404 and.w r4, r4, #4 800fe08: 3414 adds r4, #20 800fe0a: 4423 add r3, r4 800fe0c: 4293 cmp r3, r2 800fe0e: d006 beq.n 800fe1e 800fe10: 4b07 ldr r3, [pc, #28] @ (800fe30 ) 800fe12: f240 7275 movw r2, #1909 @ 0x775 800fe16: 4907 ldr r1, [pc, #28] @ (800fe34 ) 800fe18: 4807 ldr r0, [pc, #28] @ (800fe38 ) 800fe1a: f003 faf5 bl 8013408 LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */ LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */ } 800fe1e: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL); 800fe20: 4b03 ldr r3, [pc, #12] @ (800fe30 ) 800fe22: f240 7256 movw r2, #1878 @ 0x756 800fe26: 4905 ldr r1, [pc, #20] @ (800fe3c ) 800fe28: 4803 ldr r0, [pc, #12] @ (800fe38 ) 800fe2a: f003 faed bl 8013408 800fe2e: e7e5 b.n 800fdfc 800fe30: 080170ec .word 0x080170ec 800fe34: 08017230 .word 0x08017230 800fe38: 080144e8 .word 0x080144e8 800fe3c: 08017208 .word 0x08017208 0800fe40 : { 800fe40: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 800fe44: 4606 mov r6, r0 800fe46: 460c mov r4, r1 800fe48: 4615 mov r5, r2 800fe4a: 9f08 ldr r7, [sp, #32] 800fe4c: f89d 9028 ldrb.w r9, [sp, #40] @ 0x28 LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL); 800fe50: 4698 mov r8, r3 800fe52: b1cb cbz r3, 800fe88 LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL); 800fe54: b1ff cbz r7, 800fe96 if (length < max_length) { 800fe56: 42ac cmp r4, r5 800fe58: d229 bcs.n 800feae if ((apiflags & TCP_WRITE_FLAG_MORE) || 800fe5a: f89d 3024 ldrb.w r3, [sp, #36] @ 0x24 800fe5e: f013 0f02 tst.w r3, #2 800fe62: d108 bne.n 800fe76 (!(pcb->flags & TF_NODELAY) && 800fe64: 8b7b ldrh r3, [r7, #26] if ((apiflags & TCP_WRITE_FLAG_MORE) || 800fe66: f013 0f40 tst.w r3, #64 @ 0x40 800fe6a: d13a bne.n 800fee2 (!(pcb->flags & TF_NODELAY) && 800fe6c: f1b9 0f00 cmp.w r9, #0 800fe70: d001 beq.n 800fe76 pcb->unsent != NULL || 800fe72: 6efb ldr r3, [r7, #108] @ 0x6c (!first_seg || 800fe74: b1b3 cbz r3, 800fea4 alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); 800fe76: f204 53b7 addw r3, r4, #1463 @ 0x5b7 800fe7a: f023 0303 bic.w r3, r3, #3 800fe7e: 429d cmp r5, r3 800fe80: bf28 it cs 800fe82: 461d movcs r5, r3 800fe84: b2a9 uxth r1, r5 800fe86: e013 b.n 800feb0 LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL); 800fe88: 4b17 ldr r3, [pc, #92] @ (800fee8 ) 800fe8a: 22e8 movs r2, #232 @ 0xe8 800fe8c: 4917 ldr r1, [pc, #92] @ (800feec ) 800fe8e: 4818 ldr r0, [pc, #96] @ (800fef0 ) 800fe90: f003 faba bl 8013408 800fe94: e7de b.n 800fe54 LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL); 800fe96: 4b14 ldr r3, [pc, #80] @ (800fee8 ) 800fe98: 22e9 movs r2, #233 @ 0xe9 800fe9a: 4916 ldr r1, [pc, #88] @ (800fef4 ) 800fe9c: 4814 ldr r0, [pc, #80] @ (800fef0 ) 800fe9e: f003 fab3 bl 8013408 800fea2: e7d8 b.n 800fe56 pcb->unacked != NULL))) { 800fea4: 6f3b ldr r3, [r7, #112] @ 0x70 pcb->unsent != NULL || 800fea6: 2b00 cmp r3, #0 800fea8: d1e5 bne.n 800fe76 u16_t alloc = length; 800feaa: 4621 mov r1, r4 800feac: e000 b.n 800feb0 800feae: 4621 mov r1, r4 p = pbuf_alloc(layer, alloc, PBUF_RAM); 800feb0: f44f 7220 mov.w r2, #640 @ 0x280 800feb4: 4630 mov r0, r6 800feb6: f7fb ffdb bl 800be70 if (p == NULL) { 800feba: 4605 mov r5, r0 800febc: b170 cbz r0, 800fedc LWIP_ASSERT("need unchained pbuf", p->next == NULL); 800febe: 6803 ldr r3, [r0, #0] 800fec0: b133 cbz r3, 800fed0 800fec2: 4b09 ldr r3, [pc, #36] @ (800fee8 ) 800fec4: f240 120b movw r2, #267 @ 0x10b 800fec8: 490b ldr r1, [pc, #44] @ (800fef8 ) 800feca: 4809 ldr r0, [pc, #36] @ (800fef0 ) 800fecc: f003 fa9c bl 8013408 *oversize = p->len - length; 800fed0: 896b ldrh r3, [r5, #10] 800fed2: 1b1b subs r3, r3, r4 800fed4: f8a8 3000 strh.w r3, [r8] p->len = p->tot_len = length; 800fed8: 812c strh r4, [r5, #8] 800feda: 816c strh r4, [r5, #10] } 800fedc: 4628 mov r0, r5 800fede: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} u16_t alloc = length; 800fee2: 4621 mov r1, r4 800fee4: e7e4 b.n 800feb0 800fee6: bf00 nop 800fee8: 080170ec .word 0x080170ec 800feec: 08017244 .word 0x08017244 800fef0: 080144e8 .word 0x080144e8 800fef4: 08017268 .word 0x08017268 800fef8: 08017288 .word 0x08017288 0800fefc : { 800fefc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 800ff00: 460e mov r6, r1 800ff02: 4617 mov r7, r2 800ff04: 4698 mov r8, r3 800ff06: f89d a020 ldrb.w sl, [sp, #32] LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); 800ff0a: 4681 mov r9, r0 800ff0c: 2800 cmp r0, #0 800ff0e: d040 beq.n 800ff92 LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL); 800ff10: 2e00 cmp r6, #0 800ff12: d045 beq.n 800ffa0 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 800ff14: ea4f 058a mov.w r5, sl, lsl #2 800ff18: f005 0504 and.w r5, r5, #4 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 800ff1c: 2003 movs r0, #3 800ff1e: f7fb fb71 bl 800b604 800ff22: 4604 mov r4, r0 800ff24: 2800 cmp r0, #0 800ff26: d042 beq.n 800ffae seg->flags = optflags; 800ff28: f880 a00c strb.w sl, [r0, #12] seg->next = NULL; 800ff2c: 2300 movs r3, #0 800ff2e: 6003 str r3, [r0, #0] seg->p = p; 800ff30: 6046 str r6, [r0, #4] LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); 800ff32: 8933 ldrh r3, [r6, #8] 800ff34: 42ab cmp r3, r5 800ff36: d33e bcc.n 800ffb6 seg->len = p->tot_len - optlen; 800ff38: 8931 ldrh r1, [r6, #8] 800ff3a: 1b49 subs r1, r1, r5 800ff3c: 8121 strh r1, [r4, #8] seg->oversize_left = 0; 800ff3e: 2300 movs r3, #0 800ff40: 8163 strh r3, [r4, #10] if (pbuf_add_header(p, TCP_HLEN)) { 800ff42: 2114 movs r1, #20 800ff44: 4630 mov r0, r6 800ff46: f7fb fee0 bl 800bd0a 800ff4a: 2800 cmp r0, #0 800ff4c: d13a bne.n 800ffc4 seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 800ff4e: 6863 ldr r3, [r4, #4] 800ff50: 685e ldr r6, [r3, #4] 800ff52: 6126 str r6, [r4, #16] seg->tcphdr->src = lwip_htons(pcb->local_port); 800ff54: f8b9 0016 ldrh.w r0, [r9, #22] 800ff58: f7f7 ff90 bl 8007e7c 800ff5c: 8030 strh r0, [r6, #0] seg->tcphdr->dest = lwip_htons(pcb->remote_port); 800ff5e: 6926 ldr r6, [r4, #16] 800ff60: f8b9 0018 ldrh.w r0, [r9, #24] 800ff64: f7f7 ff8a bl 8007e7c 800ff68: 8070 strh r0, [r6, #2] seg->tcphdr->seqno = lwip_htonl(seqno); 800ff6a: 6926 ldr r6, [r4, #16] 800ff6c: 4640 mov r0, r8 800ff6e: f7f7 ff8a bl 8007e86 800ff72: 6070 str r0, [r6, #4] TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); 800ff74: 08a8 lsrs r0, r5, #2 800ff76: 3005 adds r0, #5 800ff78: 6925 ldr r5, [r4, #16] 800ff7a: ea47 3000 orr.w r0, r7, r0, lsl #12 800ff7e: f7f7 ff7d bl 8007e7c 800ff82: 81a8 strh r0, [r5, #12] seg->tcphdr->urgp = 0; 800ff84: 6923 ldr r3, [r4, #16] 800ff86: 2200 movs r2, #0 800ff88: 749a strb r2, [r3, #18] 800ff8a: 74da strb r2, [r3, #19] } 800ff8c: 4620 mov r0, r4 800ff8e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); 800ff92: 4b0f ldr r3, [pc, #60] @ (800ffd0 ) 800ff94: 22a3 movs r2, #163 @ 0xa3 800ff96: 490f ldr r1, [pc, #60] @ (800ffd4 ) 800ff98: 480f ldr r0, [pc, #60] @ (800ffd8 ) 800ff9a: f003 fa35 bl 8013408 800ff9e: e7b7 b.n 800ff10 LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL); 800ffa0: 4b0b ldr r3, [pc, #44] @ (800ffd0 ) 800ffa2: 22a4 movs r2, #164 @ 0xa4 800ffa4: 490d ldr r1, [pc, #52] @ (800ffdc ) 800ffa6: 480c ldr r0, [pc, #48] @ (800ffd8 ) 800ffa8: f003 fa2e bl 8013408 800ffac: e7b2 b.n 800ff14 pbuf_free(p); 800ffae: 4630 mov r0, r6 800ffb0: f7fb fef6 bl 800bda0 return NULL; 800ffb4: e7ea b.n 800ff8c LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); 800ffb6: 4b06 ldr r3, [pc, #24] @ (800ffd0 ) 800ffb8: 22b0 movs r2, #176 @ 0xb0 800ffba: 4909 ldr r1, [pc, #36] @ (800ffe0 ) 800ffbc: 4806 ldr r0, [pc, #24] @ (800ffd8 ) 800ffbe: f003 fa23 bl 8013408 800ffc2: e7b9 b.n 800ff38 tcp_seg_free(seg); 800ffc4: 4620 mov r0, r4 800ffc6: f7fd f9f1 bl 800d3ac return NULL; 800ffca: 2400 movs r4, #0 800ffcc: e7de b.n 800ff8c 800ffce: bf00 nop 800ffd0: 080170ec .word 0x080170ec 800ffd4: 0801729c .word 0x0801729c 800ffd8: 080144e8 .word 0x080144e8 800ffdc: 080172bc .word 0x080172bc 800ffe0: 080172e0 .word 0x080172e0 0800ffe4 : { 800ffe4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 800ffe8: 4606 mov r6, r0 800ffea: 460c mov r4, r1 800ffec: 4698 mov r8, r3 p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 800ffee: 4411 add r1, r2 800fff0: b289 uxth r1, r1 800fff2: 3114 adds r1, #20 800fff4: f44f 7220 mov.w r2, #640 @ 0x280 800fff8: b289 uxth r1, r1 800fffa: 2022 movs r0, #34 @ 0x22 800fffc: f7fb ff38 bl 800be70 if (p != NULL) { 8010000: 4607 mov r7, r0 8010002: b348 cbz r0, 8010058 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", 8010004: f104 0313 add.w r3, r4, #19 8010008: 8942 ldrh r2, [r0, #10] 801000a: 4293 cmp r3, r2 801000c: da27 bge.n 801005e tcphdr = (struct tcp_hdr *)p->payload; 801000e: 687d ldr r5, [r7, #4] tcphdr->src = lwip_htons(src_port); 8010010: f8bd 0018 ldrh.w r0, [sp, #24] 8010014: f7f7 ff32 bl 8007e7c 8010018: 8028 strh r0, [r5, #0] tcphdr->dest = lwip_htons(dst_port); 801001a: f8bd 001c ldrh.w r0, [sp, #28] 801001e: f7f7 ff2d bl 8007e7c 8010022: 8068 strh r0, [r5, #2] tcphdr->seqno = seqno_be; 8010024: f8c5 8004 str.w r8, [r5, #4] tcphdr->ackno = lwip_htonl(ackno); 8010028: 4630 mov r0, r6 801002a: f7f7 ff2c bl 8007e86 801002e: 60a8 str r0, [r5, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags); 8010030: 08a4 lsrs r4, r4, #2 8010032: 3405 adds r4, #5 8010034: 0324 lsls r4, r4, #12 8010036: b2a4 uxth r4, r4 8010038: f89d 0020 ldrb.w r0, [sp, #32] 801003c: 4320 orrs r0, r4 801003e: f7f7 ff1d bl 8007e7c 8010042: 81a8 strh r0, [r5, #12] tcphdr->wnd = lwip_htons(wnd); 8010044: f8bd 0024 ldrh.w r0, [sp, #36] @ 0x24 8010048: f7f7 ff18 bl 8007e7c 801004c: 81e8 strh r0, [r5, #14] tcphdr->chksum = 0; 801004e: 2300 movs r3, #0 8010050: 742b strb r3, [r5, #16] 8010052: 746b strb r3, [r5, #17] tcphdr->urgp = 0; 8010054: 74ab strb r3, [r5, #18] 8010056: 74eb strb r3, [r5, #19] } 8010058: 4638 mov r0, r7 801005a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", 801005e: 4b04 ldr r3, [pc, #16] @ (8010070 ) 8010060: f240 7223 movw r2, #1827 @ 0x723 8010064: 4903 ldr r1, [pc, #12] @ (8010074 ) 8010066: 4804 ldr r0, [pc, #16] @ (8010078 ) 8010068: f003 f9ce bl 8013408 801006c: e7cf b.n 801000e 801006e: bf00 nop 8010070: 080170ec .word 0x080170ec 8010074: 080172f8 .word 0x080172f8 8010078: 080144e8 .word 0x080144e8 0801007c : { 801007c: b5f0 push {r4, r5, r6, r7, lr} 801007e: b085 sub sp, #20 8010080: 460d mov r5, r1 8010082: 4616 mov r6, r2 8010084: 461f mov r7, r3 LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL); 8010086: 4604 mov r4, r0 8010088: b1a0 cbz r0, 80100b4 p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen, 801008a: 8d63 ldrh r3, [r4, #42] @ 0x2a 801008c: 9303 str r3, [sp, #12] 801008e: 2310 movs r3, #16 8010090: 9302 str r3, [sp, #8] 8010092: 8b23 ldrh r3, [r4, #24] 8010094: 9301 str r3, [sp, #4] 8010096: 8ae3 ldrh r3, [r4, #22] 8010098: 9300 str r3, [sp, #0] 801009a: 463b mov r3, r7 801009c: 4632 mov r2, r6 801009e: 4629 mov r1, r5 80100a0: 6a60 ldr r0, [r4, #36] @ 0x24 80100a2: f7ff ff9f bl 800ffe4 if (p != NULL) { 80100a6: b118 cbz r0, 80100b0 pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 80100a8: 6a63 ldr r3, [r4, #36] @ 0x24 80100aa: 8d62 ldrh r2, [r4, #42] @ 0x2a 80100ac: 4413 add r3, r2 80100ae: 62e3 str r3, [r4, #44] @ 0x2c } 80100b0: b005 add sp, #20 80100b2: bdf0 pop {r4, r5, r6, r7, pc} LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL); 80100b4: 4b03 ldr r3, [pc, #12] @ (80100c4 ) 80100b6: f240 7242 movw r2, #1858 @ 0x742 80100ba: 4903 ldr r1, [pc, #12] @ (80100c8 ) 80100bc: 4803 ldr r0, [pc, #12] @ (80100cc ) 80100be: f003 f9a3 bl 8013408 80100c2: e7e2 b.n 801008a 80100c4: 080170ec .word 0x080170ec 80100c8: 08017328 .word 0x08017328 80100cc: 080144e8 .word 0x080144e8 080100d0 : { 80100d0: b508 push {r3, lr} if ((pcb != NULL) && (pcb->netif_idx != NETIF_NO_INDEX)) { 80100d2: b108 cbz r0, 80100d8 80100d4: 7a00 ldrb r0, [r0, #8] 80100d6: b918 cbnz r0, 80100e0 return ip_route(src, dst); 80100d8: 4610 mov r0, r2 80100da: f7fa f811 bl 800a100 } 80100de: bd08 pop {r3, pc} return netif_get_by_index(pcb->netif_idx); 80100e0: f7fb fd2e bl 800bb40 80100e4: e7fb b.n 80100de ... 080100e8 : { 80100e8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80100ec: b084 sub sp, #16 80100ee: 460c mov r4, r1 80100f0: 4616 mov r6, r2 LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL); 80100f2: 4605 mov r5, r0 80100f4: b148 cbz r0, 801010a LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL); 80100f6: b184 cbz r4, 801011a LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL); 80100f8: b1be cbz r6, 801012a if (tcp_output_segment_busy(seg)) { 80100fa: 4628 mov r0, r5 80100fc: f7ff fe60 bl 800fdc0 8010100: b1d8 cbz r0, 801013a return ERR_OK; 8010102: 2000 movs r0, #0 } 8010104: b004 add sp, #16 8010106: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ASSERT("tcp_output_segment: invalid seg", seg != NULL); 801010a: 4b40 ldr r3, [pc, #256] @ (801020c ) 801010c: f44f 62b7 mov.w r2, #1464 @ 0x5b8 8010110: 493f ldr r1, [pc, #252] @ (8010210 ) 8010112: 4840 ldr r0, [pc, #256] @ (8010214 ) 8010114: f003 f978 bl 8013408 8010118: e7ed b.n 80100f6 LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL); 801011a: 4b3c ldr r3, [pc, #240] @ (801020c ) 801011c: f240 52b9 movw r2, #1465 @ 0x5b9 8010120: 493d ldr r1, [pc, #244] @ (8010218 ) 8010122: 483c ldr r0, [pc, #240] @ (8010214 ) 8010124: f003 f970 bl 8013408 8010128: e7e6 b.n 80100f8 LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL); 801012a: 4b38 ldr r3, [pc, #224] @ (801020c ) 801012c: f240 52ba movw r2, #1466 @ 0x5ba 8010130: 493a ldr r1, [pc, #232] @ (801021c ) 8010132: 4838 ldr r0, [pc, #224] @ (8010214 ) 8010134: f003 f968 bl 8013408 8010138: e7df b.n 80100fa seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); 801013a: 692f ldr r7, [r5, #16] 801013c: 6a60 ldr r0, [r4, #36] @ 0x24 801013e: f7f7 fea2 bl 8007e86 8010142: 60b8 str r0, [r7, #8] seg->tcphdr->wnd = lwip_htons(TCPWND_MIN16(RCV_WND_SCALE(pcb, pcb->rcv_ann_wnd))); 8010144: 692f ldr r7, [r5, #16] 8010146: 8d60 ldrh r0, [r4, #42] @ 0x2a 8010148: f7f7 fe98 bl 8007e7c 801014c: 81f8 strh r0, [r7, #14] pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 801014e: 6a63 ldr r3, [r4, #36] @ 0x24 8010150: 8d62 ldrh r2, [r4, #42] @ 0x2a 8010152: 4413 add r3, r2 8010154: 62e3 str r3, [r4, #44] @ 0x2c opts = (u32_t *)(void *)(seg->tcphdr + 1); 8010156: f8d5 8010 ldr.w r8, [r5, #16] 801015a: f108 0714 add.w r7, r8, #20 if (seg->flags & TF_SEG_OPTS_MSS) { 801015e: 7b2b ldrb r3, [r5, #12] 8010160: f013 0f01 tst.w r3, #1 8010164: d134 bne.n 80101d0 if (pcb->rtime < 0) { 8010166: f9b4 3030 ldrsh.w r3, [r4, #48] @ 0x30 801016a: 2b00 cmp r3, #0 801016c: db3f blt.n 80101ee if (pcb->rttest == 0) { 801016e: 6b63 ldr r3, [r4, #52] @ 0x34 8010170: 2b00 cmp r3, #0 8010172: d03f beq.n 80101f4 len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); 8010174: 692b ldr r3, [r5, #16] 8010176: 686a ldr r2, [r5, #4] 8010178: 6851 ldr r1, [r2, #4] 801017a: 1a5b subs r3, r3, r1 801017c: b29b uxth r3, r3 seg->p->len -= len; 801017e: 8951 ldrh r1, [r2, #10] 8010180: 1ac9 subs r1, r1, r3 8010182: 8151 strh r1, [r2, #10] seg->p->tot_len -= len; 8010184: 6869 ldr r1, [r5, #4] 8010186: 890a ldrh r2, [r1, #8] 8010188: 1ad3 subs r3, r2, r3 801018a: 810b strh r3, [r1, #8] seg->p->payload = seg->tcphdr; 801018c: 686a ldr r2, [r5, #4] 801018e: 692b ldr r3, [r5, #16] 8010190: 6053 str r3, [r2, #4] seg->tcphdr->chksum = 0; 8010192: 2200 movs r2, #0 8010194: 741a strb r2, [r3, #16] 8010196: 745a strb r2, [r3, #17] LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb)); 8010198: 692b ldr r3, [r5, #16] 801019a: 7b2a ldrb r2, [r5, #12] 801019c: f012 0f01 tst.w r2, #1 80101a0: d031 beq.n 8010206 80101a2: 2218 movs r2, #24 80101a4: 4413 add r3, r2 80101a6: 429f cmp r7, r3 80101a8: d006 beq.n 80101b8 80101aa: 4b18 ldr r3, [pc, #96] @ (801020c ) 80101ac: f240 621c movw r2, #1564 @ 0x61c 80101b0: 491b ldr r1, [pc, #108] @ (8010220 ) 80101b2: 4818 ldr r0, [pc, #96] @ (8010214 ) 80101b4: f003 f928 bl 8013408 err = ip_output_if(seg->p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 80101b8: 9602 str r6, [sp, #8] 80101ba: 2306 movs r3, #6 80101bc: 9301 str r3, [sp, #4] 80101be: 7aa3 ldrb r3, [r4, #10] 80101c0: 9300 str r3, [sp, #0] 80101c2: 7ae3 ldrb r3, [r4, #11] 80101c4: 1d22 adds r2, r4, #4 80101c6: 4621 mov r1, r4 80101c8: 6868 ldr r0, [r5, #4] 80101ca: f7fa f92d bl 800a428 return err; 80101ce: e799 b.n 8010104 mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip); 80101d0: 1d22 adds r2, r4, #4 80101d2: 4631 mov r1, r6 80101d4: f240 50b4 movw r0, #1460 @ 0x5b4 80101d8: f7fd f9ca bl 800d570 *opts = TCP_BUILD_MSS_OPTION(mss); 80101dc: f040 7001 orr.w r0, r0, #33816576 @ 0x2040000 80101e0: f7f7 fe51 bl 8007e86 80101e4: f8c8 0014 str.w r0, [r8, #20] opts += 1; 80101e8: f108 0718 add.w r7, r8, #24 80101ec: e7bb b.n 8010166 pcb->rtime = 0; 80101ee: 2300 movs r3, #0 80101f0: 8623 strh r3, [r4, #48] @ 0x30 80101f2: e7bc b.n 801016e pcb->rttest = tcp_ticks; 80101f4: 4b0b ldr r3, [pc, #44] @ (8010224 ) 80101f6: 681b ldr r3, [r3, #0] 80101f8: 6363 str r3, [r4, #52] @ 0x34 pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); 80101fa: 692b ldr r3, [r5, #16] 80101fc: 6858 ldr r0, [r3, #4] 80101fe: f7f7 fe42 bl 8007e86 8010202: 63a0 str r0, [r4, #56] @ 0x38 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_output_segment: rtseq %"U32_F"\n", pcb->rtseq)); 8010204: e7b6 b.n 8010174 LWIP_ASSERT("options not filled", (u8_t *)opts == ((u8_t *)(seg->tcphdr + 1)) + LWIP_TCP_OPT_LENGTH_SEGMENT(seg->flags, pcb)); 8010206: 2214 movs r2, #20 8010208: e7cc b.n 80101a4 801020a: bf00 nop 801020c: 080170ec .word 0x080170ec 8010210: 08017350 .word 0x08017350 8010214: 080144e8 .word 0x080144e8 8010218: 08017370 .word 0x08017370 801021c: 08017390 .word 0x08017390 8010220: 08017230 .word 0x08017230 8010224: 24019be4 .word 0x24019be4 08010228 : * header checksum and calling ip_output_if while handling netif hints and stats. */ static err_t tcp_output_control_segment(const struct tcp_pcb *pcb, struct pbuf *p, const ip_addr_t *src, const ip_addr_t *dst) { 8010228: b5f0 push {r4, r5, r6, r7, lr} 801022a: b085 sub sp, #20 801022c: 4604 mov r4, r0 801022e: 4615 mov r5, r2 8010230: 461e mov r6, r3 err_t err; struct netif *netif; LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL); 8010232: 460f mov r7, r1 8010234: b1c9 cbz r1, 801026a netif = tcp_route(pcb, src, dst); 8010236: 4632 mov r2, r6 8010238: 4629 mov r1, r5 801023a: 4620 mov r0, r4 801023c: f7ff ff48 bl 80100d0 if (netif == NULL) { 8010240: 4602 mov r2, r0 8010242: b1e8 cbz r0, 8010280 struct tcp_hdr *tcphdr = (struct tcp_hdr *)p->payload; tcphdr->chksum = ip_chksum_pseudo(p, IP_PROTO_TCP, p->tot_len, src, dst); } #endif if (pcb != NULL) { 8010244: b1cc cbz r4, 801027a NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints))); ttl = pcb->ttl; 8010246: 7ae3 ldrb r3, [r4, #11] tos = pcb->tos; 8010248: 7aa1 ldrb r1, [r4, #10] /* Send output with hardcoded TTL/HL since we have no access to the pcb */ ttl = TCP_TTL; tos = 0; } TCP_STATS_INC(tcp.xmit); err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif); 801024a: 9202 str r2, [sp, #8] 801024c: 2206 movs r2, #6 801024e: 9201 str r2, [sp, #4] 8010250: 9100 str r1, [sp, #0] 8010252: 4632 mov r2, r6 8010254: 4629 mov r1, r5 8010256: 4638 mov r0, r7 8010258: f7fa f8e6 bl 800a428 801025c: 4604 mov r4, r0 NETIF_RESET_HINTS(netif); } pbuf_free(p); 801025e: 4638 mov r0, r7 8010260: f7fb fd9e bl 800bda0 return err; } 8010264: 4620 mov r0, r4 8010266: b005 add sp, #20 8010268: bdf0 pop {r4, r5, r6, r7, pc} LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL); 801026a: 4b07 ldr r3, [pc, #28] @ (8010288 ) 801026c: f240 7287 movw r2, #1927 @ 0x787 8010270: 4906 ldr r1, [pc, #24] @ (801028c ) 8010272: 4807 ldr r0, [pc, #28] @ (8010290 ) 8010274: f003 f8c8 bl 8013408 8010278: e7dd b.n 8010236 tos = 0; 801027a: 2100 movs r1, #0 ttl = TCP_TTL; 801027c: 23ff movs r3, #255 @ 0xff 801027e: e7e4 b.n 801024a err = ERR_RTE; 8010280: f06f 0403 mvn.w r4, #3 8010284: e7eb b.n 801025e 8010286: bf00 nop 8010288: 080170ec .word 0x080170ec 801028c: 080173b4 .word 0x080173b4 8010290: 080144e8 .word 0x080144e8 08010294 : { 8010294: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8010298: b091 sub sp, #68 @ 0x44 801029a: 9107 str r1, [sp, #28] 801029c: 9305 str r3, [sp, #20] u16_t oversize = 0; 801029e: 2300 movs r3, #0 80102a0: f8ad 303e strh.w r3, [sp, #62] @ 0x3e LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG); 80102a4: 2800 cmp r0, #0 80102a6: f000 809c beq.w 80103e2 80102aa: 4692 mov sl, r2 80102ac: 4680 mov r8, r0 mss_local = LWIP_MIN(pcb->mss, TCPWND_MIN16(pcb->snd_wnd_max / 2)); 80102ae: f8b0 3062 ldrh.w r3, [r0, #98] @ 0x62 80102b2: 085b lsrs r3, r3, #1 80102b4: f8b0 b032 ldrh.w fp, [r0, #50] @ 0x32 80102b8: 455b cmp r3, fp 80102ba: bf28 it cs 80102bc: 465b movcs r3, fp mss_local = mss_local ? mss_local : pcb->mss; 80102be: b103 cbz r3, 80102c2 80102c0: 469b mov fp, r3 LWIP_ASSERT_CORE_LOCKED(); 80102c2: f7f3 fc23 bl 8003b0c LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 80102c6: 9b07 ldr r3, [sp, #28] 80102c8: 2b00 cmp r3, #0 80102ca: f000 8094 beq.w 80103f6 err = tcp_write_checks(pcb, len); 80102ce: 4651 mov r1, sl 80102d0: 4640 mov r0, r8 80102d2: f7ff fd17 bl 800fd04 if (err != ERR_OK) { 80102d6: 4681 mov r9, r0 80102d8: 2800 cmp r0, #0 80102da: f040 81a1 bne.w 8010620 queuelen = pcb->snd_queuelen; 80102de: f8b8 6066 ldrh.w r6, [r8, #102] @ 0x66 if (pcb->unsent != NULL) { 80102e2: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c 80102e6: 930a str r3, [sp, #40] @ 0x28 80102e8: 2b00 cmp r3, #0 80102ea: f000 80e5 beq.w 80104b8 for (last_unsent = pcb->unsent; last_unsent->next != NULL; 80102ee: 9308 str r3, [sp, #32] 80102f0: 681b ldr r3, [r3, #0] 80102f2: 2b00 cmp r3, #0 80102f4: d1fb bne.n 80102ee unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb); 80102f6: 930a str r3, [sp, #40] @ 0x28 80102f8: 9b08 ldr r3, [sp, #32] 80102fa: 7b1c ldrb r4, [r3, #12] 80102fc: 00a4 lsls r4, r4, #2 80102fe: f004 0404 and.w r4, r4, #4 LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); 8010302: 891b ldrh r3, [r3, #8] 8010304: 4423 add r3, r4 8010306: 459b cmp fp, r3 8010308: db7f blt.n 801040a space = mss_local - (last_unsent->len + unsent_optlen); 801030a: 9908 ldr r1, [sp, #32] 801030c: 890b ldrh r3, [r1, #8] 801030e: 441c add r4, r3 8010310: b2a4 uxth r4, r4 8010312: ebab 0404 sub.w r4, fp, r4 8010316: b2a4 uxth r4, r4 LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", 8010318: f8b8 2068 ldrh.w r2, [r8, #104] @ 0x68 801031c: 894b ldrh r3, [r1, #10] 801031e: 429a cmp r2, r3 8010320: d17b bne.n 801041a oversize = pcb->unsent_oversize; 8010322: f8b8 3068 ldrh.w r3, [r8, #104] @ 0x68 8010326: 9309 str r3, [sp, #36] @ 0x24 8010328: f8ad 303e strh.w r3, [sp, #62] @ 0x3e if (oversize > 0) { 801032c: 2b00 cmp r3, #0 801032e: f000 8084 beq.w 801043a LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); 8010332: 42a3 cmp r3, r4 8010334: d879 bhi.n 801042a oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); 8010336: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e 801033a: 461a mov r2, r3 801033c: 4553 cmp r3, sl 801033e: bf28 it cs 8010340: 4652 movcs r2, sl 8010342: 42a2 cmp r2, r4 8010344: bf28 it cs 8010346: 4622 movcs r2, r4 8010348: 9209 str r2, [sp, #36] @ 0x24 oversize -= oversize_used; 801034a: 1a9b subs r3, r3, r2 801034c: f8ad 303e strh.w r3, [sp, #62] @ 0x3e space -= oversize_used; 8010350: 1aa4 subs r4, r4, r2 8010352: b2a4 uxth r4, r4 seg = last_unsent; 8010354: 9f08 ldr r7, [sp, #32] LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); 8010356: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e 801035a: 9a09 ldr r2, [sp, #36] @ 0x24 801035c: 2b00 cmp r3, #0 801035e: bf18 it ne 8010360: 4552 cmpne r2, sl 8010362: d16c bne.n 801043e if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 8010364: 9b09 ldr r3, [sp, #36] @ 0x24 8010366: 2c00 cmp r4, #0 8010368: bf18 it ne 801036a: 4553 cmpne r3, sl 801036c: f080 8166 bcs.w 801063c 8010370: 9a08 ldr r2, [sp, #32] 8010372: 8912 ldrh r2, [r2, #8] 8010374: 920b str r2, [sp, #44] @ 0x2c 8010376: 2a00 cmp r2, #0 8010378: f000 8169 beq.w 801064e u16_t seglen = LWIP_MIN(space, len - pos); 801037c: ebaa 0303 sub.w r3, sl, r3 8010380: 42a3 cmp r3, r4 8010382: bfa8 it ge 8010384: 4623 movge r3, r4 8010386: b29f uxth r7, r3 if (apiflags & TCP_WRITE_FLAG_COPY) { 8010388: 9b05 ldr r3, [sp, #20] 801038a: f013 0f01 tst.w r3, #1 801038e: d15e bne.n 801044e for (p = last_unsent->p; p->next != NULL; p = p->next); 8010390: 9b08 ldr r3, [sp, #32] 8010392: 685a ldr r2, [r3, #4] 8010394: 4613 mov r3, r2 8010396: 6812 ldr r2, [r2, #0] 8010398: 2a00 cmp r2, #0 801039a: d1fb bne.n 8010394 if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 801039c: 920a str r2, [sp, #40] @ 0x28 801039e: 7b1a ldrb r2, [r3, #12] 80103a0: 2a3f cmp r2, #63 @ 0x3f 80103a2: d805 bhi.n 80103b0 (const u8_t *)p->payload + p->len == (const u8_t *)arg) { 80103a4: 685a ldr r2, [r3, #4] 80103a6: 895b ldrh r3, [r3, #10] 80103a8: 4413 add r3, r2 if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 80103aa: 9a07 ldr r2, [sp, #28] 80103ac: 4293 cmp r3, r2 80103ae: d072 beq.n 8010496 if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { 80103b0: 2201 movs r2, #1 80103b2: 4639 mov r1, r7 80103b4: 2000 movs r0, #0 80103b6: f7fb fd5b bl 800be70 80103ba: 900a str r0, [sp, #40] @ 0x28 80103bc: 2800 cmp r0, #0 80103be: f000 821e beq.w 80107fe ((struct pbuf_rom *)concat_p)->payload = (const u8_t *)arg + pos; 80103c2: 9b07 ldr r3, [sp, #28] 80103c4: 9909 ldr r1, [sp, #36] @ 0x24 80103c6: 440b add r3, r1 80103c8: 6043 str r3, [r0, #4] queuelen += pbuf_clen(concat_p); 80103ca: f7fb fe6e bl 800c0aa 80103ce: 1833 adds r3, r6, r0 80103d0: b29e uxth r6, r3 u16_t extendlen = 0; 80103d2: 2300 movs r3, #0 80103d4: 930d str r3, [sp, #52] @ 0x34 u16_t oversize_add = 0; 80103d6: 930b str r3, [sp, #44] @ 0x2c pos += seglen; 80103d8: 9b09 ldr r3, [sp, #36] @ 0x24 80103da: 19dc adds r4, r3, r7 80103dc: b2a4 uxth r4, r4 seg = last_unsent; 80103de: 9f08 ldr r7, [sp, #32] 80103e0: e130 b.n 8010644 LWIP_ERROR("tcp_write: invalid pcb", pcb != NULL, return ERR_ARG); 80103e2: 4ba6 ldr r3, [pc, #664] @ (801067c ) 80103e4: f44f 72cf mov.w r2, #414 @ 0x19e 80103e8: 49a5 ldr r1, [pc, #660] @ (8010680 ) 80103ea: 48a6 ldr r0, [pc, #664] @ (8010684 ) 80103ec: f003 f80c bl 8013408 80103f0: f06f 090f mvn.w r9, #15 80103f4: e114 b.n 8010620 LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 80103f6: 4ba1 ldr r3, [pc, #644] @ (801067c ) 80103f8: f240 12ad movw r2, #429 @ 0x1ad 80103fc: 49a2 ldr r1, [pc, #648] @ (8010688 ) 80103fe: 48a1 ldr r0, [pc, #644] @ (8010684 ) 8010400: f003 f802 bl 8013408 8010404: f06f 090f mvn.w r9, #15 8010408: e10a b.n 8010620 LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); 801040a: 4b9c ldr r3, [pc, #624] @ (801067c ) 801040c: f44f 72f3 mov.w r2, #486 @ 0x1e6 8010410: 499e ldr r1, [pc, #632] @ (801068c ) 8010412: 489c ldr r0, [pc, #624] @ (8010684 ) 8010414: f002 fff8 bl 8013408 8010418: e777 b.n 801030a LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", 801041a: 4b98 ldr r3, [pc, #608] @ (801067c ) 801041c: f240 12f3 movw r2, #499 @ 0x1f3 8010420: 499b ldr r1, [pc, #620] @ (8010690 ) 8010422: 4898 ldr r0, [pc, #608] @ (8010684 ) 8010424: f002 fff0 bl 8013408 8010428: e77b b.n 8010322 LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); 801042a: 4b94 ldr r3, [pc, #592] @ (801067c ) 801042c: f44f 72fc mov.w r2, #504 @ 0x1f8 8010430: 4998 ldr r1, [pc, #608] @ (8010694 ) 8010432: 4894 ldr r0, [pc, #592] @ (8010684 ) 8010434: f002 ffe8 bl 8013408 8010438: e77d b.n 8010336 struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 801043a: 9f0a ldr r7, [sp, #40] @ 0x28 801043c: e78b b.n 8010356 LWIP_ASSERT("inconsistent oversize vs. len", (oversize == 0) || (pos == len)); 801043e: 4b8f ldr r3, [pc, #572] @ (801067c ) 8010440: f44f 7200 mov.w r2, #512 @ 0x200 8010444: 4994 ldr r1, [pc, #592] @ (8010698 ) 8010446: 488f ldr r0, [pc, #572] @ (8010684 ) 8010448: f002 ffde bl 8013408 801044c: e78a b.n 8010364 if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 801044e: 2301 movs r3, #1 8010450: 9302 str r3, [sp, #8] 8010452: 9b05 ldr r3, [sp, #20] 8010454: 9301 str r3, [sp, #4] 8010456: f8cd 8000 str.w r8, [sp] 801045a: f10d 033e add.w r3, sp, #62 @ 0x3e 801045e: 4622 mov r2, r4 8010460: 4639 mov r1, r7 8010462: 2000 movs r0, #0 8010464: f7ff fcec bl 800fe40 8010468: 4604 mov r4, r0 801046a: 900a str r0, [sp, #40] @ 0x28 801046c: 2800 cmp r0, #0 801046e: f000 81c4 beq.w 80107fa oversize_add = oversize; 8010472: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e 8010476: 930b str r3, [sp, #44] @ 0x2c TCP_DATA_COPY2(concat_p->payload, (const u8_t *)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); 8010478: 463a mov r2, r7 801047a: 9b07 ldr r3, [sp, #28] 801047c: 9909 ldr r1, [sp, #36] @ 0x24 801047e: 1859 adds r1, r3, r1 8010480: 6840 ldr r0, [r0, #4] 8010482: f003 f9fe bl 8013882 queuelen += pbuf_clen(concat_p); 8010486: 4620 mov r0, r4 8010488: f7fb fe0f bl 800c0aa 801048c: 1833 adds r3, r6, r0 801048e: b29e uxth r6, r3 u16_t extendlen = 0; 8010490: 2300 movs r3, #0 8010492: 930d str r3, [sp, #52] @ 0x34 8010494: e7a0 b.n 80103d8 LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); 8010496: 9b09 ldr r3, [sp, #36] @ 0x24 8010498: b91b cbnz r3, 80104a2 extendlen = seglen; 801049a: 970d str r7, [sp, #52] @ 0x34 u16_t oversize_add = 0; 801049c: 9b09 ldr r3, [sp, #36] @ 0x24 801049e: 930b str r3, [sp, #44] @ 0x2c 80104a0: e79a b.n 80103d8 LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); 80104a2: 4b76 ldr r3, [pc, #472] @ (801067c ) 80104a4: f240 2231 movw r2, #561 @ 0x231 80104a8: 497c ldr r1, [pc, #496] @ (801069c ) 80104aa: 4876 ldr r0, [pc, #472] @ (8010684 ) 80104ac: f002 ffac bl 8013408 extendlen = seglen; 80104b0: 970d str r7, [sp, #52] @ 0x34 u16_t oversize_add = 0; 80104b2: 2300 movs r3, #0 80104b4: 930b str r3, [sp, #44] @ 0x2c 80104b6: e78f b.n 80103d8 LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", 80104b8: f8b8 4068 ldrh.w r4, [r8, #104] @ 0x68 80104bc: b934 cbnz r4, 80104cc u16_t extendlen = 0; 80104be: 940d str r4, [sp, #52] @ 0x34 u16_t oversize_add = 0; 80104c0: 940b str r4, [sp, #44] @ 0x2c u16_t oversize_used = 0; 80104c2: 9409 str r4, [sp, #36] @ 0x24 struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 80104c4: 9b0a ldr r3, [sp, #40] @ 0x28 80104c6: 461f mov r7, r3 80104c8: 9308 str r3, [sp, #32] 80104ca: e0bb b.n 8010644 LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", 80104cc: 4b6b ldr r3, [pc, #428] @ (801067c ) 80104ce: f240 224a movw r2, #586 @ 0x24a 80104d2: 4973 ldr r1, [pc, #460] @ (80106a0 ) 80104d4: 486b ldr r0, [pc, #428] @ (8010684 ) 80104d6: f002 ff97 bl 8013408 struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 80104da: 9b0a ldr r3, [sp, #40] @ 0x28 80104dc: 461f mov r7, r3 80104de: 9308 str r3, [sp, #32] u16_t extendlen = 0; 80104e0: 2400 movs r4, #0 80104e2: 940d str r4, [sp, #52] @ 0x34 u16_t oversize_add = 0; 80104e4: 940b str r4, [sp, #44] @ 0x2c u16_t oversize_used = 0; 80104e6: 9409 str r4, [sp, #36] @ 0x24 80104e8: e0ac b.n 8010644 if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { 80104ea: fab5 f385 clz r3, r5 80104ee: 095b lsrs r3, r3, #5 80104f0: 9302 str r3, [sp, #8] 80104f2: 9b05 ldr r3, [sp, #20] 80104f4: 9301 str r3, [sp, #4] 80104f6: f8cd 8000 str.w r8, [sp] 80104fa: f10d 033e add.w r3, sp, #62 @ 0x3e 80104fe: 465a mov r2, fp 8010500: 4649 mov r1, r9 8010502: 2036 movs r0, #54 @ 0x36 8010504: f7ff fc9c bl 800fe40 8010508: 4607 mov r7, r0 801050a: 2800 cmp r0, #0 801050c: d068 beq.n 80105e0 LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", 801050e: 8943 ldrh r3, [r0, #10] 8010510: 454b cmp r3, r9 8010512: d306 bcc.n 8010522 TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped); 8010514: 464a mov r2, r9 8010516: 9b07 ldr r3, [sp, #28] 8010518: 1919 adds r1, r3, r4 801051a: 6878 ldr r0, [r7, #4] 801051c: f003 f9b1 bl 8013882 8010520: e01e b.n 8010560 LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", 8010522: 4b56 ldr r3, [pc, #344] @ (801067c ) 8010524: f240 2266 movw r2, #614 @ 0x266 8010528: 495e ldr r1, [pc, #376] @ (80106a4 ) 801052a: 4856 ldr r0, [pc, #344] @ (8010684 ) 801052c: f002 ff6c bl 8013408 8010530: e7f0 b.n 8010514 if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { 8010532: 2201 movs r2, #1 8010534: 4649 mov r1, r9 8010536: 2036 movs r0, #54 @ 0x36 8010538: f7fb fc9a bl 800be70 801053c: 9006 str r0, [sp, #24] 801053e: 2800 cmp r0, #0 8010540: d04e beq.n 80105e0 ((struct pbuf_rom *)p2)->payload = (const u8_t *)arg + pos; 8010542: 9b07 ldr r3, [sp, #28] 8010544: 4423 add r3, r4 8010546: 6043 str r3, [r0, #4] if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8010548: f44f 7220 mov.w r2, #640 @ 0x280 801054c: 2100 movs r1, #0 801054e: 2036 movs r0, #54 @ 0x36 8010550: f7fb fc8e bl 800be70 8010554: 4607 mov r7, r0 8010556: 2800 cmp r0, #0 8010558: d03b beq.n 80105d2 pbuf_cat(p/*header*/, p2/*data*/); 801055a: 9906 ldr r1, [sp, #24] 801055c: f7fb fdca bl 800c0f4 queuelen += pbuf_clen(p); 8010560: 4638 mov r0, r7 8010562: f7fb fda2 bl 800c0aa 8010566: 4430 add r0, r6 8010568: b286 uxth r6, r0 if (queuelen > LWIP_MIN(TCP_SND_QUEUELEN, TCP_SNDQUEUELEN_OVERFLOW)) { 801056a: 2e10 cmp r6, #16 801056c: d835 bhi.n 80105da if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 801056e: f8d8 305c ldr.w r3, [r8, #92] @ 0x5c 8010572: 2200 movs r2, #0 8010574: 9200 str r2, [sp, #0] 8010576: 4423 add r3, r4 8010578: 4639 mov r1, r7 801057a: 4640 mov r0, r8 801057c: f7ff fcbe bl 800fefc 8010580: 4607 mov r7, r0 8010582: b368 cbz r0, 80105e0 seg->oversize_left = oversize; 8010584: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e 8010588: 8143 strh r3, [r0, #10] if (queue == NULL) { 801058a: 2d00 cmp r5, #0 801058c: d054 beq.n 8010638 LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); 801058e: 9b04 ldr r3, [sp, #16] 8010590: 2b00 cmp r3, #0 8010592: d049 beq.n 8010628 prev_seg->next = seg; 8010594: 9b04 ldr r3, [sp, #16] 8010596: 601f str r7, [r3, #0] pos += seglen; 8010598: 44a1 add r9, r4 801059a: fa1f f489 uxth.w r4, r9 prev_seg = seg; 801059e: 9704 str r7, [sp, #16] while (pos < len) { 80105a0: 4554 cmp r4, sl 80105a2: d258 bcs.n 8010656 u16_t left = len - pos; 80105a4: ebaa 0904 sub.w r9, sl, r4 80105a8: fa1f f989 uxth.w r9, r9 u16_t seglen = LWIP_MIN(left, max_len); 80105ac: 45d9 cmp r9, fp 80105ae: bf28 it cs 80105b0: 46d9 movcs r9, fp if (apiflags & TCP_WRITE_FLAG_COPY) { 80105b2: 9b05 ldr r3, [sp, #20] 80105b4: f013 0f01 tst.w r3, #1 80105b8: d197 bne.n 80104ea LWIP_ASSERT("oversize == 0", oversize == 0); 80105ba: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e 80105be: 2b00 cmp r3, #0 80105c0: d0b7 beq.n 8010532 80105c2: 4b2e ldr r3, [pc, #184] @ (801067c ) 80105c4: f240 2271 movw r2, #625 @ 0x271 80105c8: 4937 ldr r1, [pc, #220] @ (80106a8 ) 80105ca: 482e ldr r0, [pc, #184] @ (8010684 ) 80105cc: f002 ff1c bl 8013408 80105d0: e7af b.n 8010532 pbuf_free(p2); 80105d2: 9806 ldr r0, [sp, #24] 80105d4: f7fb fbe4 bl 800bda0 goto memerr; 80105d8: e002 b.n 80105e0 pbuf_free(p); 80105da: 4638 mov r0, r7 80105dc: f7fb fbe0 bl 800bda0 tcp_set_flags(pcb, TF_NAGLEMEMERR); 80105e0: f8b8 301a ldrh.w r3, [r8, #26] 80105e4: f043 0380 orr.w r3, r3, #128 @ 0x80 80105e8: f8a8 301a strh.w r3, [r8, #26] if (concat_p != NULL) { 80105ec: 9b0a ldr r3, [sp, #40] @ 0x28 80105ee: b113 cbz r3, 80105f6 pbuf_free(concat_p); 80105f0: 4618 mov r0, r3 80105f2: f7fb fbd5 bl 800bda0 if (queue != NULL) { 80105f6: b115 cbz r5, 80105fe tcp_segs_free(queue); 80105f8: 4628 mov r0, r5 80105fa: f7fc fee4 bl 800d3c6 if (pcb->snd_queuelen != 0) { 80105fe: f8b8 3066 ldrh.w r3, [r8, #102] @ 0x66 8010602: 2b00 cmp r3, #0 8010604: f000 8107 beq.w 8010816 LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || 8010608: f8d8 3070 ldr.w r3, [r8, #112] @ 0x70 801060c: 2b00 cmp r3, #0 801060e: f040 8105 bne.w 801081c 8010612: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c 8010616: 2b00 cmp r3, #0 8010618: f000 80f3 beq.w 8010802 return ERR_MEM; 801061c: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff } 8010620: 4648 mov r0, r9 8010622: b011 add sp, #68 @ 0x44 8010624: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); 8010628: 4b14 ldr r3, [pc, #80] @ (801067c ) 801062a: f240 22ab movw r2, #683 @ 0x2ab 801062e: 491f ldr r1, [pc, #124] @ (80106ac ) 8010630: 4814 ldr r0, [pc, #80] @ (8010684 ) 8010632: f002 fee9 bl 8013408 8010636: e7ad b.n 8010594 queue = seg; 8010638: 4605 mov r5, r0 801063a: e7ad b.n 8010598 801063c: 9c09 ldr r4, [sp, #36] @ 0x24 u16_t extendlen = 0; 801063e: 2300 movs r3, #0 8010640: 930d str r3, [sp, #52] @ 0x34 u16_t oversize_add = 0; 8010642: 930b str r3, [sp, #44] @ 0x2c 8010644: 2500 movs r5, #0 8010646: 9504 str r5, [sp, #16] 8010648: f8cd 9030 str.w r9, [sp, #48] @ 0x30 801064c: e7a8 b.n 80105a0 u16_t extendlen = 0; 801064e: 9b0b ldr r3, [sp, #44] @ 0x2c 8010650: 930d str r3, [sp, #52] @ 0x34 8010652: 9c09 ldr r4, [sp, #36] @ 0x24 8010654: e7f6 b.n 8010644 if ((last_unsent != NULL) && (oversize_add != 0)) { 8010656: f8dd 9030 ldr.w r9, [sp, #48] @ 0x30 801065a: 9a08 ldr r2, [sp, #32] 801065c: 990b ldr r1, [sp, #44] @ 0x2c 801065e: 2a00 cmp r2, #0 8010660: bf18 it ne 8010662: 2900 cmpne r1, #0 8010664: d002 beq.n 801066c last_unsent->oversize_left += oversize_add; 8010666: 8953 ldrh r3, [r2, #10] 8010668: 440b add r3, r1 801066a: 8153 strh r3, [r2, #10] if (oversize_used > 0) { 801066c: 9b09 ldr r3, [sp, #36] @ 0x24 801066e: 2b00 cmp r3, #0 8010670: d03e beq.n 80106f0 for (p = last_unsent->p; p; p = p->next) { 8010672: 9a08 ldr r2, [sp, #32] 8010674: 6854 ldr r4, [r2, #4] 8010676: 469b mov fp, r3 8010678: e01b b.n 80106b2 801067a: bf00 nop 801067c: 080170ec .word 0x080170ec 8010680: 080173e0 .word 0x080173e0 8010684: 080144e8 .word 0x080144e8 8010688: 080173f8 .word 0x080173f8 801068c: 0801742c .word 0x0801742c 8010690: 08017444 .word 0x08017444 8010694: 08017474 .word 0x08017474 8010698: 08017494 .word 0x08017494 801069c: 080174b4 .word 0x080174b4 80106a0: 080174e0 .word 0x080174e0 80106a4: 08017510 .word 0x08017510 80106a8: 08017550 .word 0x08017550 80106ac: 08017560 .word 0x08017560 80106b0: 6824 ldr r4, [r4, #0] 80106b2: b184 cbz r4, 80106d6 p->tot_len += oversize_used; 80106b4: 8923 ldrh r3, [r4, #8] 80106b6: 445b add r3, fp 80106b8: 8123 strh r3, [r4, #8] if (p->next == NULL) { 80106ba: 6823 ldr r3, [r4, #0] 80106bc: 2b00 cmp r3, #0 80106be: d1f7 bne.n 80106b0 TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 80106c0: 6860 ldr r0, [r4, #4] 80106c2: 8963 ldrh r3, [r4, #10] 80106c4: 465a mov r2, fp 80106c6: 9907 ldr r1, [sp, #28] 80106c8: 4418 add r0, r3 80106ca: f003 f8da bl 8013882 p->len += oversize_used; 80106ce: 8963 ldrh r3, [r4, #10] 80106d0: 445b add r3, fp 80106d2: 8163 strh r3, [r4, #10] 80106d4: e7ec b.n 80106b0 last_unsent->len += oversize_used; 80106d6: 9a08 ldr r2, [sp, #32] 80106d8: 8913 ldrh r3, [r2, #8] 80106da: 9909 ldr r1, [sp, #36] @ 0x24 80106dc: 440b add r3, r1 80106de: 8113 strh r3, [r2, #8] LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", 80106e0: 8953 ldrh r3, [r2, #10] 80106e2: 428b cmp r3, r1 80106e4: d342 bcc.n 801076c last_unsent->oversize_left -= oversize_used; 80106e6: 9a08 ldr r2, [sp, #32] 80106e8: 8953 ldrh r3, [r2, #10] 80106ea: 9909 ldr r1, [sp, #36] @ 0x24 80106ec: 1a5b subs r3, r3, r1 80106ee: 8153 strh r3, [r2, #10] pcb->unsent_oversize = oversize; 80106f0: f8bd 303e ldrh.w r3, [sp, #62] @ 0x3e 80106f4: f8a8 3068 strh.w r3, [r8, #104] @ 0x68 if (concat_p != NULL) { 80106f8: 9b0a ldr r3, [sp, #40] @ 0x28 80106fa: 2b00 cmp r3, #0 80106fc: d046 beq.n 801078c LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", 80106fe: 9b08 ldr r3, [sp, #32] 8010700: 2b00 cmp r3, #0 8010702: d03b beq.n 801077c pbuf_cat(last_unsent->p, concat_p); 8010704: f8dd b028 ldr.w fp, [sp, #40] @ 0x28 8010708: 4659 mov r1, fp 801070a: 9c08 ldr r4, [sp, #32] 801070c: 6860 ldr r0, [r4, #4] 801070e: f7fb fcf1 bl 800c0f4 last_unsent->len += concat_p->tot_len; 8010712: 8923 ldrh r3, [r4, #8] 8010714: f8bb 2008 ldrh.w r2, [fp, #8] 8010718: 4413 add r3, r2 801071a: 8123 strh r3, [r4, #8] last_unsent->next = queue; 801071c: 9b08 ldr r3, [sp, #32] 801071e: 601d str r5, [r3, #0] pcb->snd_lbb += len; 8010720: f8d8 305c ldr.w r3, [r8, #92] @ 0x5c 8010724: 4453 add r3, sl 8010726: f8c8 305c str.w r3, [r8, #92] @ 0x5c pcb->snd_buf -= len; 801072a: f8b8 3064 ldrh.w r3, [r8, #100] @ 0x64 801072e: eba3 030a sub.w r3, r3, sl 8010732: f8a8 3064 strh.w r3, [r8, #100] @ 0x64 pcb->snd_queuelen = queuelen; 8010736: f8a8 6066 strh.w r6, [r8, #102] @ 0x66 if (pcb->snd_queuelen != 0) { 801073a: b11e cbz r6, 8010744 LWIP_ASSERT("tcp_write: valid queue length", 801073c: f8d8 3070 ldr.w r3, [r8, #112] @ 0x70 8010740: 2b00 cmp r3, #0 8010742: d04e beq.n 80107e2 if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE) == 0)) { 8010744: 2f00 cmp r7, #0 8010746: f43f af6b beq.w 8010620 801074a: 693b ldr r3, [r7, #16] 801074c: 2b00 cmp r3, #0 801074e: f43f af67 beq.w 8010620 8010752: 9a05 ldr r2, [sp, #20] 8010754: f012 0f02 tst.w r2, #2 8010758: f47f af62 bne.w 8010620 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 801075c: 899c ldrh r4, [r3, #12] 801075e: 2008 movs r0, #8 8010760: f7f7 fb8c bl 8007e7c 8010764: 693b ldr r3, [r7, #16] 8010766: 4304 orrs r4, r0 8010768: 819c strh r4, [r3, #12] 801076a: e759 b.n 8010620 LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", 801076c: 4b2d ldr r3, [pc, #180] @ (8010824 ) 801076e: f240 22d3 movw r2, #723 @ 0x2d3 8010772: 492d ldr r1, [pc, #180] @ (8010828 ) 8010774: 482d ldr r0, [pc, #180] @ (801082c ) 8010776: f002 fe47 bl 8013408 801077a: e7b4 b.n 80106e6 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", 801077c: 4b29 ldr r3, [pc, #164] @ (8010824 ) 801077e: f44f 7238 mov.w r2, #736 @ 0x2e0 8010782: 492b ldr r1, [pc, #172] @ (8010830 ) 8010784: 4829 ldr r0, [pc, #164] @ (801082c ) 8010786: f002 fe3f bl 8013408 801078a: e7bb b.n 8010704 } else if (extendlen > 0) { 801078c: 9b0d ldr r3, [sp, #52] @ 0x34 801078e: b313 cbz r3, 80107d6 LWIP_ASSERT("tcp_write: extension of reference requires reference", 8010790: 9b08 ldr r3, [sp, #32] 8010792: b12b cbz r3, 80107a0 8010794: 685b ldr r3, [r3, #4] 8010796: b11b cbz r3, 80107a0 for (p = last_unsent->p; p->next != NULL; p = p->next) { 8010798: 9b08 ldr r3, [sp, #32] 801079a: 685b ldr r3, [r3, #4] 801079c: 980d ldr r0, [sp, #52] @ 0x34 801079e: e00b b.n 80107b8 LWIP_ASSERT("tcp_write: extension of reference requires reference", 80107a0: 4b20 ldr r3, [pc, #128] @ (8010824 ) 80107a2: f240 22e6 movw r2, #742 @ 0x2e6 80107a6: 4923 ldr r1, [pc, #140] @ (8010834 ) 80107a8: 4820 ldr r0, [pc, #128] @ (801082c ) 80107aa: f002 fe2d bl 8013408 80107ae: e7f3 b.n 8010798 p->tot_len += extendlen; 80107b0: 891a ldrh r2, [r3, #8] 80107b2: 4402 add r2, r0 80107b4: 811a strh r2, [r3, #8] for (p = last_unsent->p; p->next != NULL; p = p->next) { 80107b6: 460b mov r3, r1 80107b8: 6819 ldr r1, [r3, #0] 80107ba: 2900 cmp r1, #0 80107bc: d1f8 bne.n 80107b0 p->tot_len += extendlen; 80107be: 891a ldrh r2, [r3, #8] 80107c0: 990d ldr r1, [sp, #52] @ 0x34 80107c2: 440a add r2, r1 80107c4: 811a strh r2, [r3, #8] p->len += extendlen; 80107c6: 895a ldrh r2, [r3, #10] 80107c8: 440a add r2, r1 80107ca: 815a strh r2, [r3, #10] last_unsent->len += extendlen; 80107cc: 9a08 ldr r2, [sp, #32] 80107ce: 8913 ldrh r3, [r2, #8] 80107d0: 440b add r3, r1 80107d2: 8113 strh r3, [r2, #8] if (last_unsent == NULL) { 80107d4: e7a2 b.n 801071c 80107d6: 9b08 ldr r3, [sp, #32] 80107d8: 2b00 cmp r3, #0 80107da: d19f bne.n 801071c pcb->unsent = queue; 80107dc: f8c8 506c str.w r5, [r8, #108] @ 0x6c 80107e0: e79e b.n 8010720 LWIP_ASSERT("tcp_write: valid queue length", 80107e2: f8d8 306c ldr.w r3, [r8, #108] @ 0x6c 80107e6: 2b00 cmp r3, #0 80107e8: d1ac bne.n 8010744 80107ea: 4b0e ldr r3, [pc, #56] @ (8010824 ) 80107ec: f240 3212 movw r2, #786 @ 0x312 80107f0: 4911 ldr r1, [pc, #68] @ (8010838 ) 80107f2: 480e ldr r0, [pc, #56] @ (801082c ) 80107f4: f002 fe08 bl 8013408 80107f8: e7a4 b.n 8010744 struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 80107fa: 9d0a ldr r5, [sp, #40] @ 0x28 80107fc: e6f0 b.n 80105e0 80107fe: 9d0a ldr r5, [sp, #40] @ 0x28 8010800: e6ee b.n 80105e0 LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || 8010802: 4b08 ldr r3, [pc, #32] @ (8010824 ) 8010804: f240 3227 movw r2, #807 @ 0x327 8010808: 490b ldr r1, [pc, #44] @ (8010838 ) 801080a: 4808 ldr r0, [pc, #32] @ (801082c ) 801080c: f002 fdfc bl 8013408 return ERR_MEM; 8010810: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff 8010814: e704 b.n 8010620 8010816: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff 801081a: e701 b.n 8010620 801081c: f04f 39ff mov.w r9, #4294967295 @ 0xffffffff 8010820: e6fe b.n 8010620 8010822: bf00 nop 8010824: 080170ec .word 0x080170ec 8010828: 08017574 .word 0x08017574 801082c: 080144e8 .word 0x080144e8 8010830: 080175a0 .word 0x080175a0 8010834: 080175d8 .word 0x080175d8 8010838: 08017610 .word 0x08017610 0801083c : { 801083c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8010840: b083 sub sp, #12 8010842: 460c mov r4, r1 LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL); 8010844: 4607 mov r7, r0 8010846: 2800 cmp r0, #0 8010848: d03d beq.n 80108c6 useg = pcb->unsent; 801084a: 6efd ldr r5, [r7, #108] @ 0x6c if (useg == NULL) { 801084c: 2d00 cmp r5, #0 801084e: f000 80bd beq.w 80109cc if (split == 0) { 8010852: 2c00 cmp r4, #0 8010854: d03f beq.n 80108d6 if (useg->len <= split) { 8010856: 892b ldrh r3, [r5, #8] 8010858: 42a3 cmp r3, r4 801085a: f240 80ba bls.w 80109d2 LWIP_ASSERT("split <= mss", split <= pcb->mss); 801085e: 8e7b ldrh r3, [r7, #50] @ 0x32 8010860: 42a3 cmp r3, r4 8010862: d342 bcc.n 80108ea LWIP_ASSERT("useg->len > 0", useg->len > 0); 8010864: 892b ldrh r3, [r5, #8] 8010866: 2b00 cmp r3, #0 8010868: d047 beq.n 80108fa optflags = useg->flags; 801086a: f895 900c ldrb.w r9, [r5, #12] optlen = LWIP_TCP_OPT_LENGTH(optflags); 801086e: ea4f 0b89 mov.w fp, r9, lsl #2 8010872: f00b 0b04 and.w fp, fp, #4 remainder = useg->len - split; 8010876: f8b5 a008 ldrh.w sl, [r5, #8] 801087a: ebaa 0604 sub.w r6, sl, r4 801087e: b2b6 uxth r6, r6 p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM); 8010880: eb0b 0106 add.w r1, fp, r6 8010884: f44f 7220 mov.w r2, #640 @ 0x280 8010888: b289 uxth r1, r1 801088a: 2036 movs r0, #54 @ 0x36 801088c: f7fb faf0 bl 800be70 if (p == NULL) { 8010890: 4680 mov r8, r0 8010892: b170 cbz r0, 80108b2 offset = useg->p->tot_len - useg->len + split; 8010894: 6868 ldr r0, [r5, #4] 8010896: 8903 ldrh r3, [r0, #8] 8010898: 892a ldrh r2, [r5, #8] 801089a: 1a9b subs r3, r3, r2 801089c: fa14 f383 uxtah r3, r4, r3 if (pbuf_copy_partial(useg->p, (u8_t *)p->payload + optlen, remainder, offset ) != remainder) { 80108a0: f8d8 1004 ldr.w r1, [r8, #4] 80108a4: b29b uxth r3, r3 80108a6: 4632 mov r2, r6 80108a8: 4459 add r1, fp 80108aa: f7fb fcfb bl 800c2a4 80108ae: 42b0 cmp r0, r6 80108b0: d02b beq.n 801090a if (p != NULL) { 80108b2: f1b8 0f00 cmp.w r8, #0 80108b6: f000 8090 beq.w 80109da pbuf_free(p); 80108ba: 4640 mov r0, r8 80108bc: f7fb fa70 bl 800bda0 return ERR_MEM; 80108c0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80108c4: e086 b.n 80109d4 LWIP_ASSERT("tcp_split_unsent_seg: invalid pcb", pcb != NULL); 80108c6: 4b46 ldr r3, [pc, #280] @ (80109e0 ) 80108c8: f240 324b movw r2, #843 @ 0x34b 80108cc: 4945 ldr r1, [pc, #276] @ (80109e4 ) 80108ce: 4846 ldr r0, [pc, #280] @ (80109e8 ) 80108d0: f002 fd9a bl 8013408 80108d4: e7b9 b.n 801084a LWIP_ASSERT("Can't split segment into length 0", 0); 80108d6: 4b42 ldr r3, [pc, #264] @ (80109e0 ) 80108d8: f240 3253 movw r2, #851 @ 0x353 80108dc: 4943 ldr r1, [pc, #268] @ (80109ec ) 80108de: 4842 ldr r0, [pc, #264] @ (80109e8 ) 80108e0: f002 fd92 bl 8013408 return ERR_VAL; 80108e4: f06f 0005 mvn.w r0, #5 80108e8: e074 b.n 80109d4 LWIP_ASSERT("split <= mss", split <= pcb->mss); 80108ea: 4b3d ldr r3, [pc, #244] @ (80109e0 ) 80108ec: f240 325b movw r2, #859 @ 0x35b 80108f0: 493f ldr r1, [pc, #252] @ (80109f0 ) 80108f2: 483d ldr r0, [pc, #244] @ (80109e8 ) 80108f4: f002 fd88 bl 8013408 80108f8: e7b4 b.n 8010864 LWIP_ASSERT("useg->len > 0", useg->len > 0); 80108fa: 4b39 ldr r3, [pc, #228] @ (80109e0 ) 80108fc: f44f 7257 mov.w r2, #860 @ 0x35c 8010900: 493c ldr r1, [pc, #240] @ (80109f4 ) 8010902: 4839 ldr r0, [pc, #228] @ (80109e8 ) 8010904: f002 fd80 bl 8013408 8010908: e7af b.n 801086a split_flags = TCPH_FLAGS(useg->tcphdr); 801090a: 692b ldr r3, [r5, #16] 801090c: 8998 ldrh r0, [r3, #12] 801090e: f7f7 fab5 bl 8007e7c 8010912: b2c3 uxtb r3, r0 8010914: f000 063f and.w r6, r0, #63 @ 0x3f if (split_flags & TCP_PSH) { 8010918: f010 0b08 ands.w fp, r0, #8 801091c: d003 beq.n 8010926 split_flags &= ~TCP_PSH; 801091e: f003 0637 and.w r6, r3, #55 @ 0x37 remainder_flags |= TCP_PSH; 8010922: f04f 0b08 mov.w fp, #8 if (split_flags & TCP_FIN) { 8010926: f016 0f01 tst.w r6, #1 801092a: d003 beq.n 8010934 split_flags &= ~TCP_FIN; 801092c: f006 06fe and.w r6, r6, #254 @ 0xfe remainder_flags |= TCP_FIN; 8010930: f04b 0b01 orr.w fp, fp, #1 seg = tcp_create_segment(pcb, p, remainder_flags, lwip_ntohl(useg->tcphdr->seqno) + split, optflags); 8010934: 692b ldr r3, [r5, #16] 8010936: 6858 ldr r0, [r3, #4] 8010938: f7f7 faa5 bl 8007e86 801093c: f8cd 9000 str.w r9, [sp] 8010940: 1823 adds r3, r4, r0 8010942: 465a mov r2, fp 8010944: 4641 mov r1, r8 8010946: 4638 mov r0, r7 8010948: f7ff fad8 bl 800fefc if (seg == NULL) { 801094c: 4681 mov r9, r0 801094e: 2800 cmp r0, #0 8010950: d0af beq.n 80108b2 pcb->snd_queuelen -= pbuf_clen(useg->p); 8010952: 6868 ldr r0, [r5, #4] 8010954: f7fb fba9 bl 800c0aa 8010958: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66 801095c: 1a1b subs r3, r3, r0 801095e: f8a7 3066 strh.w r3, [r7, #102] @ 0x66 pbuf_realloc(useg->p, useg->p->tot_len - remainder); 8010962: 6868 ldr r0, [r5, #4] 8010964: 8901 ldrh r1, [r0, #8] 8010966: eba4 040a sub.w r4, r4, sl 801096a: b2a4 uxth r4, r4 801096c: 4421 add r1, r4 801096e: b289 uxth r1, r1 8010970: f7fb fb2c bl 800bfcc useg->len -= remainder; 8010974: 892b ldrh r3, [r5, #8] 8010976: 4423 add r3, r4 8010978: 812b strh r3, [r5, #8] TCPH_SET_FLAG(useg->tcphdr, split_flags); 801097a: 692b ldr r3, [r5, #16] 801097c: 899c ldrh r4, [r3, #12] 801097e: 4630 mov r0, r6 8010980: f7f7 fa7c bl 8007e7c 8010984: 692b ldr r3, [r5, #16] 8010986: 4304 orrs r4, r0 8010988: 819c strh r4, [r3, #12] useg->oversize_left = 0; 801098a: 2300 movs r3, #0 801098c: 816b strh r3, [r5, #10] pcb->snd_queuelen += pbuf_clen(useg->p); 801098e: 6868 ldr r0, [r5, #4] 8010990: f7fb fb8b bl 800c0aa 8010994: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66 8010998: 4403 add r3, r0 801099a: f8a7 3066 strh.w r3, [r7, #102] @ 0x66 pcb->snd_queuelen += pbuf_clen(seg->p); 801099e: f8d9 0004 ldr.w r0, [r9, #4] 80109a2: f7fb fb82 bl 800c0aa 80109a6: f8b7 3066 ldrh.w r3, [r7, #102] @ 0x66 80109aa: 4403 add r3, r0 80109ac: f8a7 3066 strh.w r3, [r7, #102] @ 0x66 seg->next = useg->next; 80109b0: 682b ldr r3, [r5, #0] 80109b2: f8c9 3000 str.w r3, [r9] useg->next = seg; 80109b6: f8c5 9000 str.w r9, [r5] if (seg->next == NULL) { 80109ba: f8d9 3000 ldr.w r3, [r9] 80109be: b10b cbz r3, 80109c4 return ERR_OK; 80109c0: 2000 movs r0, #0 80109c2: e007 b.n 80109d4 pcb->unsent_oversize = 0; 80109c4: 2000 movs r0, #0 80109c6: f8a7 0068 strh.w r0, [r7, #104] @ 0x68 80109ca: e003 b.n 80109d4 return ERR_MEM; 80109cc: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80109d0: e000 b.n 80109d4 return ERR_OK; 80109d2: 2000 movs r0, #0 } 80109d4: b003 add sp, #12 80109d6: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} return ERR_MEM; 80109da: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80109de: e7f9 b.n 80109d4 80109e0: 080170ec .word 0x080170ec 80109e4: 08017630 .word 0x08017630 80109e8: 080144e8 .word 0x080144e8 80109ec: 08017654 .word 0x08017654 80109f0: 08017678 .word 0x08017678 80109f4: 08017688 .word 0x08017688 080109f8 : { 80109f8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 80109fc: b083 sub sp, #12 80109fe: 4604 mov r4, r0 8010a00: 460d mov r5, r1 LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", 8010a02: f011 0703 ands.w r7, r1, #3 8010a06: d04e beq.n 8010aa6 LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL); 8010a08: 2c00 cmp r4, #0 8010a0a: d054 beq.n 8010ab6 if (flags & TCP_SYN) { 8010a0c: f015 0802 ands.w r8, r5, #2 8010a10: d001 beq.n 8010a16 optflags = TF_SEG_OPTS_MSS; 8010a12: f04f 0801 mov.w r8, #1 optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 8010a16: ea4f 0688 mov.w r6, r8, lsl #2 8010a1a: f006 0604 and.w r6, r6, #4 if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8010a1e: f44f 7220 mov.w r2, #640 @ 0x280 8010a22: 4631 mov r1, r6 8010a24: 2036 movs r0, #54 @ 0x36 8010a26: f7fb fa23 bl 800be70 8010a2a: 4681 mov r9, r0 8010a2c: 2800 cmp r0, #0 8010a2e: d04a beq.n 8010ac6 LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", 8010a30: 8943 ldrh r3, [r0, #10] 8010a32: 429e cmp r6, r3 8010a34: d84e bhi.n 8010ad4 if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { 8010a36: f8cd 8000 str.w r8, [sp] 8010a3a: 6de3 ldr r3, [r4, #92] @ 0x5c 8010a3c: 462a mov r2, r5 8010a3e: 4649 mov r1, r9 8010a40: 4620 mov r0, r4 8010a42: f7ff fa5b bl 800fefc 8010a46: 4606 mov r6, r0 8010a48: 2800 cmp r0, #0 8010a4a: d04b beq.n 8010ae4 LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); 8010a4c: 6903 ldr r3, [r0, #16] 8010a4e: f013 0f03 tst.w r3, #3 8010a52: d14e bne.n 8010af2 LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); 8010a54: 8933 ldrh r3, [r6, #8] 8010a56: 2b00 cmp r3, #0 8010a58: d153 bne.n 8010b02 if (pcb->unsent == NULL) { 8010a5a: 6ee3 ldr r3, [r4, #108] @ 0x6c 8010a5c: 2b00 cmp r3, #0 8010a5e: d058 beq.n 8010b12 for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 8010a60: 461a mov r2, r3 8010a62: 681b ldr r3, [r3, #0] 8010a64: 2b00 cmp r3, #0 8010a66: d1fb bne.n 8010a60 useg->next = seg; 8010a68: 6016 str r6, [r2, #0] pcb->unsent_oversize = 0; 8010a6a: 2300 movs r3, #0 8010a6c: f8a4 3068 strh.w r3, [r4, #104] @ 0x68 if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 8010a70: b117 cbz r7, 8010a78 pcb->snd_lbb++; 8010a72: 6de3 ldr r3, [r4, #92] @ 0x5c 8010a74: 3301 adds r3, #1 8010a76: 65e3 str r3, [r4, #92] @ 0x5c if (flags & TCP_FIN) { 8010a78: f015 0f01 tst.w r5, #1 8010a7c: d003 beq.n 8010a86 tcp_set_flags(pcb, TF_FIN); 8010a7e: 8b63 ldrh r3, [r4, #26] 8010a80: f043 0320 orr.w r3, r3, #32 8010a84: 8363 strh r3, [r4, #26] pcb->snd_queuelen += pbuf_clen(seg->p); 8010a86: 6870 ldr r0, [r6, #4] 8010a88: f7fb fb0f bl 800c0aa 8010a8c: f8b4 3066 ldrh.w r3, [r4, #102] @ 0x66 8010a90: 4418 add r0, r3 8010a92: b280 uxth r0, r0 8010a94: f8a4 0066 strh.w r0, [r4, #102] @ 0x66 if (pcb->snd_queuelen != 0) { 8010a98: 2800 cmp r0, #0 8010a9a: d049 beq.n 8010b30 LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", 8010a9c: 6f23 ldr r3, [r4, #112] @ 0x70 8010a9e: 2b00 cmp r3, #0 8010aa0: d039 beq.n 8010b16 return ERR_OK; 8010aa2: 2000 movs r0, #0 8010aa4: e045 b.n 8010b32 LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", 8010aa6: 4b24 ldr r3, [pc, #144] @ (8010b38 ) 8010aa8: f240 4211 movw r2, #1041 @ 0x411 8010aac: 4923 ldr r1, [pc, #140] @ (8010b3c ) 8010aae: 4824 ldr r0, [pc, #144] @ (8010b40 ) 8010ab0: f002 fcaa bl 8013408 8010ab4: e7a8 b.n 8010a08 LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL); 8010ab6: 4b20 ldr r3, [pc, #128] @ (8010b38 ) 8010ab8: f240 4213 movw r2, #1043 @ 0x413 8010abc: 4921 ldr r1, [pc, #132] @ (8010b44 ) 8010abe: 4820 ldr r0, [pc, #128] @ (8010b40 ) 8010ac0: f002 fca2 bl 8013408 8010ac4: e7a2 b.n 8010a0c tcp_set_flags(pcb, TF_NAGLEMEMERR); 8010ac6: 8b63 ldrh r3, [r4, #26] 8010ac8: f043 0380 orr.w r3, r3, #128 @ 0x80 8010acc: 8363 strh r3, [r4, #26] return ERR_MEM; 8010ace: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8010ad2: e02e b.n 8010b32 LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", 8010ad4: 4b18 ldr r3, [pc, #96] @ (8010b38 ) 8010ad6: f240 4239 movw r2, #1081 @ 0x439 8010ada: 491b ldr r1, [pc, #108] @ (8010b48 ) 8010adc: 4818 ldr r0, [pc, #96] @ (8010b40 ) 8010ade: f002 fc93 bl 8013408 8010ae2: e7a8 b.n 8010a36 tcp_set_flags(pcb, TF_NAGLEMEMERR); 8010ae4: 8b63 ldrh r3, [r4, #26] 8010ae6: f043 0380 orr.w r3, r3, #128 @ 0x80 8010aea: 8363 strh r3, [r4, #26] return ERR_MEM; 8010aec: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8010af0: e01f b.n 8010b32 LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); 8010af2: 4b11 ldr r3, [pc, #68] @ (8010b38 ) 8010af4: f240 4242 movw r2, #1090 @ 0x442 8010af8: 4914 ldr r1, [pc, #80] @ (8010b4c ) 8010afa: 4811 ldr r0, [pc, #68] @ (8010b40 ) 8010afc: f002 fc84 bl 8013408 8010b00: e7a8 b.n 8010a54 LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); 8010b02: 4b0d ldr r3, [pc, #52] @ (8010b38 ) 8010b04: f240 4243 movw r2, #1091 @ 0x443 8010b08: 4911 ldr r1, [pc, #68] @ (8010b50 ) 8010b0a: 480d ldr r0, [pc, #52] @ (8010b40 ) 8010b0c: f002 fc7c bl 8013408 8010b10: e7a3 b.n 8010a5a pcb->unsent = seg; 8010b12: 66e6 str r6, [r4, #108] @ 0x6c 8010b14: e7a9 b.n 8010a6a LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", 8010b16: 6ee3 ldr r3, [r4, #108] @ 0x6c 8010b18: b10b cbz r3, 8010b1e return ERR_OK; 8010b1a: 2000 movs r0, #0 8010b1c: e009 b.n 8010b32 LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", 8010b1e: 4b06 ldr r3, [pc, #24] @ (8010b38 ) 8010b20: f240 4265 movw r2, #1125 @ 0x465 8010b24: 490b ldr r1, [pc, #44] @ (8010b54 ) 8010b26: 4806 ldr r0, [pc, #24] @ (8010b40 ) 8010b28: f002 fc6e bl 8013408 return ERR_OK; 8010b2c: 2000 movs r0, #0 8010b2e: e000 b.n 8010b32 8010b30: 2000 movs r0, #0 } 8010b32: b003 add sp, #12 8010b34: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8010b38: 080170ec .word 0x080170ec 8010b3c: 08017698 .word 0x08017698 8010b40: 080144e8 .word 0x080144e8 8010b44: 080176f0 .word 0x080176f0 8010b48: 08017710 .word 0x08017710 8010b4c: 0801774c .word 0x0801774c 8010b50: 08017764 .word 0x08017764 8010b54: 08017790 .word 0x08017790 08010b58 : { 8010b58: b570 push {r4, r5, r6, lr} LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL); 8010b5a: 4605 mov r5, r0 8010b5c: b188 cbz r0, 8010b82 if (pcb->unsent != NULL) { 8010b5e: 6eeb ldr r3, [r5, #108] @ 0x6c 8010b60: b153 cbz r3, 8010b78 for (last_unsent = pcb->unsent; last_unsent->next != NULL; 8010b62: 461c mov r4, r3 8010b64: 681b ldr r3, [r3, #0] 8010b66: 2b00 cmp r3, #0 8010b68: d1fb bne.n 8010b62 if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 8010b6a: 6923 ldr r3, [r4, #16] 8010b6c: 8998 ldrh r0, [r3, #12] 8010b6e: f7f7 f985 bl 8007e7c 8010b72: f010 0f07 tst.w r0, #7 8010b76: d00c beq.n 8010b92 return tcp_enqueue_flags(pcb, TCP_FIN); 8010b78: 2101 movs r1, #1 8010b7a: 4628 mov r0, r5 8010b7c: f7ff ff3c bl 80109f8 } 8010b80: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL); 8010b82: 4b0b ldr r3, [pc, #44] @ (8010bb0 ) 8010b84: f240 32eb movw r2, #1003 @ 0x3eb 8010b88: 490a ldr r1, [pc, #40] @ (8010bb4 ) 8010b8a: 480b ldr r0, [pc, #44] @ (8010bb8 ) 8010b8c: f002 fc3c bl 8013408 8010b90: e7e5 b.n 8010b5e TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); 8010b92: 6923 ldr r3, [r4, #16] 8010b94: 899e ldrh r6, [r3, #12] 8010b96: 2001 movs r0, #1 8010b98: f7f7 f970 bl 8007e7c 8010b9c: 6923 ldr r3, [r4, #16] 8010b9e: 4306 orrs r6, r0 8010ba0: 819e strh r6, [r3, #12] tcp_set_flags(pcb, TF_FIN); 8010ba2: 8b6b ldrh r3, [r5, #26] 8010ba4: f043 0320 orr.w r3, r3, #32 8010ba8: 836b strh r3, [r5, #26] return ERR_OK; 8010baa: 2000 movs r0, #0 8010bac: e7e8 b.n 8010b80 8010bae: bf00 nop 8010bb0: 080170ec .word 0x080170ec 8010bb4: 080177b8 .word 0x080177b8 8010bb8: 080144e8 .word 0x080144e8 08010bbc : { 8010bbc: b5f8 push {r3, r4, r5, r6, r7, lr} LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL); 8010bbe: 4605 mov r5, r0 8010bc0: b158 cbz r0, 8010bda if (pcb->unacked == NULL) { 8010bc2: 6f2c ldr r4, [r5, #112] @ 0x70 8010bc4: 2c00 cmp r4, #0 8010bc6: d039 beq.n 8010c3c for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) { 8010bc8: 6823 ldr r3, [r4, #0] 8010bca: b173 cbz r3, 8010bea if (tcp_output_segment_busy(seg)) { 8010bcc: 4620 mov r0, r4 8010bce: f7ff f8f7 bl 800fdc0 8010bd2: 2800 cmp r0, #0 8010bd4: d135 bne.n 8010c42 for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) { 8010bd6: 6824 ldr r4, [r4, #0] 8010bd8: e7f6 b.n 8010bc8 LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL); 8010bda: 4b1d ldr r3, [pc, #116] @ (8010c50 ) 8010bdc: f240 6263 movw r2, #1635 @ 0x663 8010be0: 491c ldr r1, [pc, #112] @ (8010c54 ) 8010be2: 481d ldr r0, [pc, #116] @ (8010c58 ) 8010be4: f002 fc10 bl 8013408 8010be8: e7eb b.n 8010bc2 if (tcp_output_segment_busy(seg)) { 8010bea: 4620 mov r0, r4 8010bec: f7ff f8e8 bl 800fdc0 8010bf0: bb50 cbnz r0, 8010c48 seg->next = pcb->unsent; 8010bf2: 6eeb ldr r3, [r5, #108] @ 0x6c 8010bf4: 6023 str r3, [r4, #0] if (pcb->unsent == NULL) { 8010bf6: b1db cbz r3, 8010c30 pcb->unsent = pcb->unacked; 8010bf8: 6f2b ldr r3, [r5, #112] @ 0x70 8010bfa: 66eb str r3, [r5, #108] @ 0x6c pcb->unacked = NULL; 8010bfc: 2300 movs r3, #0 8010bfe: 672b str r3, [r5, #112] @ 0x70 tcp_set_flags(pcb, TF_RTO); 8010c00: 8b6b ldrh r3, [r5, #26] 8010c02: f443 6300 orr.w r3, r3, #2048 @ 0x800 8010c06: 836b strh r3, [r5, #26] pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8010c08: 6923 ldr r3, [r4, #16] 8010c0a: 6858 ldr r0, [r3, #4] 8010c0c: f7f7 f93b bl 8007e86 8010c10: 4606 mov r6, r0 8010c12: 8927 ldrh r7, [r4, #8] 8010c14: 6923 ldr r3, [r4, #16] 8010c16: 8998 ldrh r0, [r3, #12] 8010c18: f7f7 f930 bl 8007e7c 8010c1c: f010 0f03 tst.w r0, #3 8010c20: d00a beq.n 8010c38 8010c22: 2301 movs r3, #1 8010c24: 441f add r7, r3 8010c26: 443e add r6, r7 8010c28: 64ee str r6, [r5, #76] @ 0x4c pcb->rttest = 0; 8010c2a: 2000 movs r0, #0 8010c2c: 6368 str r0, [r5, #52] @ 0x34 } 8010c2e: bdf8 pop {r3, r4, r5, r6, r7, pc} pcb->unsent_oversize = seg->oversize_left; 8010c30: 8963 ldrh r3, [r4, #10] 8010c32: f8a5 3068 strh.w r3, [r5, #104] @ 0x68 8010c36: e7df b.n 8010bf8 pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8010c38: 2300 movs r3, #0 8010c3a: e7f3 b.n 8010c24 return ERR_VAL; 8010c3c: f06f 0005 mvn.w r0, #5 8010c40: e7f5 b.n 8010c2e return ERR_VAL; 8010c42: f06f 0005 mvn.w r0, #5 8010c46: e7f2 b.n 8010c2e return ERR_VAL; 8010c48: f06f 0005 mvn.w r0, #5 8010c4c: e7ef b.n 8010c2e 8010c4e: bf00 nop 8010c50: 080170ec .word 0x080170ec 8010c54: 080177d4 .word 0x080177d4 8010c58: 080144e8 .word 0x080144e8 08010c5c : { 8010c5c: b5f8 push {r3, r4, r5, r6, r7, lr} LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL); 8010c5e: 4607 mov r7, r0 8010c60: b150 cbz r0, 8010c78 if (pcb->unacked == NULL) { 8010c62: 6f3e ldr r6, [r7, #112] @ 0x70 8010c64: b38e cbz r6, 8010cca if (tcp_output_segment_busy(seg)) { 8010c66: 4630 mov r0, r6 8010c68: f7ff f8aa bl 800fdc0 8010c6c: bb80 cbnz r0, 8010cd0 pcb->unacked = seg->next; 8010c6e: 6833 ldr r3, [r6, #0] 8010c70: 673b str r3, [r7, #112] @ 0x70 cur_seg = &(pcb->unsent); 8010c72: f107 056c add.w r5, r7, #108 @ 0x6c while (*cur_seg && 8010c76: e008 b.n 8010c8a LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL); 8010c78: 4b17 ldr r3, [pc, #92] @ (8010cd8 ) 8010c7a: f240 62c1 movw r2, #1729 @ 0x6c1 8010c7e: 4917 ldr r1, [pc, #92] @ (8010cdc ) 8010c80: 4817 ldr r0, [pc, #92] @ (8010ce0 ) 8010c82: f002 fbc1 bl 8013408 8010c86: e7ec b.n 8010c62 cur_seg = &((*cur_seg)->next ); 8010c88: 682d ldr r5, [r5, #0] while (*cur_seg && 8010c8a: 682b ldr r3, [r5, #0] 8010c8c: b15b cbz r3, 8010ca6 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 8010c8e: 691b ldr r3, [r3, #16] 8010c90: 6858 ldr r0, [r3, #4] 8010c92: f7f7 f8f8 bl 8007e86 8010c96: 4604 mov r4, r0 8010c98: 6933 ldr r3, [r6, #16] 8010c9a: 6858 ldr r0, [r3, #4] 8010c9c: f7f7 f8f3 bl 8007e86 8010ca0: 1a24 subs r4, r4, r0 while (*cur_seg && 8010ca2: 2c00 cmp r4, #0 8010ca4: dbf0 blt.n 8010c88 seg->next = *cur_seg; 8010ca6: 682b ldr r3, [r5, #0] 8010ca8: 6033 str r3, [r6, #0] *cur_seg = seg; 8010caa: 602e str r6, [r5, #0] if (seg->next == NULL) { 8010cac: 6833 ldr r3, [r6, #0] 8010cae: b14b cbz r3, 8010cc4 if (pcb->nrtx < 0xFF) { 8010cb0: f897 3042 ldrb.w r3, [r7, #66] @ 0x42 8010cb4: 2bff cmp r3, #255 @ 0xff 8010cb6: d002 beq.n 8010cbe ++pcb->nrtx; 8010cb8: 3301 adds r3, #1 8010cba: f887 3042 strb.w r3, [r7, #66] @ 0x42 pcb->rttest = 0; 8010cbe: 2000 movs r0, #0 8010cc0: 6378 str r0, [r7, #52] @ 0x34 } 8010cc2: bdf8 pop {r3, r4, r5, r6, r7, pc} pcb->unsent_oversize = 0; 8010cc4: f8a7 3068 strh.w r3, [r7, #104] @ 0x68 8010cc8: e7f2 b.n 8010cb0 return ERR_VAL; 8010cca: f06f 0005 mvn.w r0, #5 8010cce: e7f8 b.n 8010cc2 return ERR_VAL; 8010cd0: f06f 0005 mvn.w r0, #5 8010cd4: e7f5 b.n 8010cc2 8010cd6: bf00 nop 8010cd8: 080170ec .word 0x080170ec 8010cdc: 080177f8 .word 0x080177f8 8010ce0: 080144e8 .word 0x080144e8 08010ce4 : { 8010ce4: b510 push {r4, lr} LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL); 8010ce6: 4604 mov r4, r0 8010ce8: b130 cbz r0, 8010cf8 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 8010cea: 6f23 ldr r3, [r4, #112] @ 0x70 8010cec: b11b cbz r3, 8010cf6 8010cee: 8b63 ldrh r3, [r4, #26] 8010cf0: f013 0f04 tst.w r3, #4 8010cf4: d008 beq.n 8010d08 } 8010cf6: bd10 pop {r4, pc} LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL); 8010cf8: 4b16 ldr r3, [pc, #88] @ (8010d54 ) 8010cfa: f240 62f9 movw r2, #1785 @ 0x6f9 8010cfe: 4916 ldr r1, [pc, #88] @ (8010d58 ) 8010d00: 4816 ldr r0, [pc, #88] @ (8010d5c ) 8010d02: f002 fb81 bl 8013408 8010d06: e7f0 b.n 8010cea if (tcp_rexmit(pcb) == ERR_OK) { 8010d08: 4620 mov r0, r4 8010d0a: f7ff ffa7 bl 8010c5c 8010d0e: 2800 cmp r0, #0 8010d10: d1f1 bne.n 8010cf6 pcb->ssthresh = LWIP_MIN(pcb->cwnd, pcb->snd_wnd) / 2; 8010d12: f8b4 3060 ldrh.w r3, [r4, #96] @ 0x60 8010d16: f8b4 2048 ldrh.w r2, [r4, #72] @ 0x48 8010d1a: 4293 cmp r3, r2 8010d1c: bf28 it cs 8010d1e: 4613 movcs r3, r2 8010d20: 105b asrs r3, r3, #1 8010d22: f8a4 304a strh.w r3, [r4, #74] @ 0x4a if (pcb->ssthresh < (2U * pcb->mss)) { 8010d26: b29b uxth r3, r3 8010d28: 8e62 ldrh r2, [r4, #50] @ 0x32 8010d2a: ebb3 0f42 cmp.w r3, r2, lsl #1 8010d2e: d202 bcs.n 8010d36 pcb->ssthresh = 2 * pcb->mss; 8010d30: 0053 lsls r3, r2, #1 8010d32: f8a4 304a strh.w r3, [r4, #74] @ 0x4a pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 8010d36: f8b4 304a ldrh.w r3, [r4, #74] @ 0x4a 8010d3a: eb02 0242 add.w r2, r2, r2, lsl #1 8010d3e: 4413 add r3, r2 8010d40: f8a4 3048 strh.w r3, [r4, #72] @ 0x48 tcp_set_flags(pcb, TF_INFR); 8010d44: 8b63 ldrh r3, [r4, #26] 8010d46: f043 0304 orr.w r3, r3, #4 8010d4a: 8363 strh r3, [r4, #26] pcb->rtime = 0; 8010d4c: 2300 movs r3, #0 8010d4e: 8623 strh r3, [r4, #48] @ 0x30 } 8010d50: e7d1 b.n 8010cf6 8010d52: bf00 nop 8010d54: 080170ec .word 0x080170ec 8010d58: 08017810 .word 0x08017810 8010d5c: 080144e8 .word 0x080144e8 08010d60 : */ void tcp_rst(const struct tcp_pcb *pcb, u32_t seqno, u32_t ackno, const ip_addr_t *local_ip, const ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port) { 8010d60: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8010d64: b084 sub sp, #16 8010d66: 4604 mov r4, r0 8010d68: 460e mov r6, r1 8010d6a: 4615 mov r5, r2 8010d6c: 9f0a ldr r7, [sp, #40] @ 0x28 struct pbuf *p; u16_t wnd; u8_t optlen; LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); 8010d6e: 4698 mov r8, r3 8010d70: b32b cbz r3, 8010dbe LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); 8010d72: b367 cbz r7, 8010dce wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); #else wnd = PP_HTONS(TCP_WND); #endif p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port, 8010d74: 4630 mov r0, r6 8010d76: f7f7 f886 bl 8007e86 8010d7a: 4603 mov r3, r0 8010d7c: f24d 0216 movw r2, #53270 @ 0xd016 8010d80: 9203 str r2, [sp, #12] 8010d82: 2214 movs r2, #20 8010d84: 9202 str r2, [sp, #8] 8010d86: f8bd 2030 ldrh.w r2, [sp, #48] @ 0x30 8010d8a: 9201 str r2, [sp, #4] 8010d8c: f8bd 202c ldrh.w r2, [sp, #44] @ 0x2c 8010d90: 9200 str r2, [sp, #0] 8010d92: 2200 movs r2, #0 8010d94: 4611 mov r1, r2 8010d96: 4628 mov r0, r5 8010d98: f7ff f924 bl 800ffe4 remote_port, TCP_RST | TCP_ACK, wnd); if (p == NULL) { 8010d9c: 4605 mov r5, r0 8010d9e: b158 cbz r0, 8010db8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); return; } tcp_output_fill_options(pcb, p, 0, optlen); 8010da0: 2300 movs r3, #0 8010da2: 461a mov r2, r3 8010da4: 4601 mov r1, r0 8010da6: 4620 mov r0, r4 8010da8: f7ff f824 bl 800fdf4 MIB2_STATS_INC(mib2.tcpoutrsts); tcp_output_control_segment(pcb, p, local_ip, remote_ip); 8010dac: 463b mov r3, r7 8010dae: 4642 mov r2, r8 8010db0: 4629 mov r1, r5 8010db2: 4620 mov r0, r4 8010db4: f7ff fa38 bl 8010228 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8010db8: b004 add sp, #16 8010dba: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); 8010dbe: 4b08 ldr r3, [pc, #32] @ (8010de0 ) 8010dc0: f240 72c4 movw r2, #1988 @ 0x7c4 8010dc4: 4907 ldr r1, [pc, #28] @ (8010de4 ) 8010dc6: 4808 ldr r0, [pc, #32] @ (8010de8 ) 8010dc8: f002 fb1e bl 8013408 8010dcc: e7d1 b.n 8010d72 LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); 8010dce: 4b04 ldr r3, [pc, #16] @ (8010de0 ) 8010dd0: f240 72c5 movw r2, #1989 @ 0x7c5 8010dd4: 4905 ldr r1, [pc, #20] @ (8010dec ) 8010dd6: 4804 ldr r0, [pc, #16] @ (8010de8 ) 8010dd8: f002 fb16 bl 8013408 8010ddc: e7ca b.n 8010d74 8010dde: bf00 nop 8010de0: 080170ec .word 0x080170ec 8010de4: 08017830 .word 0x08017830 8010de8: 080144e8 .word 0x080144e8 8010dec: 0801784c .word 0x0801784c 08010df0 : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 8010df0: b538 push {r3, r4, r5, lr} err_t err; struct pbuf *p; u8_t optlen, optflags = 0; u8_t num_sacks = 0; LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL); 8010df2: 4604 mov r4, r0 8010df4: b1e0 cbz r0, 8010e30 if ((num_sacks = tcp_get_num_sacks(pcb, optlen)) > 0) { optlen += 4 + num_sacks * 8; /* 4 bytes for header (including 2*NOP), plus 8B for each SACK */ } #endif p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt)); 8010df6: 6d20 ldr r0, [r4, #80] @ 0x50 8010df8: f7f7 f845 bl 8007e86 8010dfc: 4603 mov r3, r0 8010dfe: 2200 movs r2, #0 8010e00: 4611 mov r1, r2 8010e02: 4620 mov r0, r4 8010e04: f7ff f93a bl 801007c if (p == NULL) { 8010e08: 4605 mov r5, r0 8010e0a: b1c8 cbz r0, 8010e40 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); return ERR_BUF; } tcp_output_fill_options(pcb, p, optflags, num_sacks); 8010e0c: 2300 movs r3, #0 8010e0e: 461a mov r2, r3 8010e10: 4601 mov r1, r0 8010e12: 4620 mov r0, r4 8010e14: f7fe ffee bl 800fdf4 pcb->ts_lastacksent = pcb->rcv_nxt; #endif LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 8010e18: 1d23 adds r3, r4, #4 8010e1a: 4622 mov r2, r4 8010e1c: 4629 mov r1, r5 8010e1e: 4620 mov r0, r4 8010e20: f7ff fa02 bl 8010228 if (err != ERR_OK) { 8010e24: b198 cbz r0, 8010e4e /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8010e26: 8b63 ldrh r3, [r4, #26] 8010e28: f043 0303 orr.w r3, r3, #3 8010e2c: 8363 strh r3, [r4, #26] /* remove ACK flags from the PCB, as we sent an empty ACK now */ tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); } return err; } 8010e2e: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL); 8010e30: 4b09 ldr r3, [pc, #36] @ (8010e58 ) 8010e32: f240 72ea movw r2, #2026 @ 0x7ea 8010e36: 4909 ldr r1, [pc, #36] @ (8010e5c ) 8010e38: 4809 ldr r0, [pc, #36] @ (8010e60 ) 8010e3a: f002 fae5 bl 8013408 8010e3e: e7da b.n 8010df6 tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8010e40: 8b63 ldrh r3, [r4, #26] 8010e42: f043 0303 orr.w r3, r3, #3 8010e46: 8363 strh r3, [r4, #26] return ERR_BUF; 8010e48: f06f 0001 mvn.w r0, #1 8010e4c: e7ef b.n 8010e2e tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8010e4e: 8b63 ldrh r3, [r4, #26] 8010e50: f023 0303 bic.w r3, r3, #3 8010e54: 8363 strh r3, [r4, #26] 8010e56: e7ea b.n 8010e2e 8010e58: 080170ec .word 0x080170ec 8010e5c: 08017868 .word 0x08017868 8010e60: 080144e8 .word 0x080144e8 08010e64 : { 8010e64: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8010e68: 4605 mov r5, r0 LWIP_ASSERT_CORE_LOCKED(); 8010e6a: f7f2 fe4f bl 8003b0c LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL); 8010e6e: 2d00 cmp r5, #0 8010e70: d037 beq.n 8010ee2 LWIP_ASSERT("don't call tcp_output for listen-pcbs", 8010e72: 7d2b ldrb r3, [r5, #20] 8010e74: 2b01 cmp r3, #1 8010e76: d03c beq.n 8010ef2 if (tcp_input_pcb == pcb) { 8010e78: 4b9f ldr r3, [pc, #636] @ (80110f8 ) 8010e7a: 681b ldr r3, [r3, #0] 8010e7c: 42ab cmp r3, r5 8010e7e: f000 8135 beq.w 80110ec wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8010e82: f8b5 6048 ldrh.w r6, [r5, #72] @ 0x48 8010e86: f8b5 3060 ldrh.w r3, [r5, #96] @ 0x60 8010e8a: 429e cmp r6, r3 8010e8c: bf28 it cs 8010e8e: 461e movcs r6, r3 seg = pcb->unsent; 8010e90: 6eec ldr r4, [r5, #108] @ 0x6c if (seg == NULL) { 8010e92: 2c00 cmp r4, #0 8010e94: d035 beq.n 8010f02 netif = tcp_route(pcb, &pcb->local_ip, &pcb->remote_ip); 8010e96: 1d2a adds r2, r5, #4 8010e98: 4629 mov r1, r5 8010e9a: 4628 mov r0, r5 8010e9c: f7ff f918 bl 80100d0 if (netif == NULL) { 8010ea0: 4680 mov r8, r0 8010ea2: 2800 cmp r0, #0 8010ea4: f000 8124 beq.w 80110f0 if (ip_addr_isany(&pcb->local_ip)) { 8010ea8: b10d cbz r5, 8010eae 8010eaa: 682b ldr r3, [r5, #0] 8010eac: b913 cbnz r3, 8010eb4 ip_addr_copy(pcb->local_ip, *local_ip); 8010eae: f8d8 3004 ldr.w r3, [r8, #4] 8010eb2: 602b str r3, [r5, #0] if (lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd) { 8010eb4: 6923 ldr r3, [r4, #16] 8010eb6: 6858 ldr r0, [r3, #4] 8010eb8: f7f6 ffe5 bl 8007e86 8010ebc: 6c6b ldr r3, [r5, #68] @ 0x44 8010ebe: 1ac0 subs r0, r0, r3 8010ec0: 8923 ldrh r3, [r4, #8] 8010ec2: 4418 add r0, r3 8010ec4: 42b0 cmp r0, r6 8010ec6: d93c bls.n 8010f42 if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) { 8010ec8: f8b5 3060 ldrh.w r3, [r5, #96] @ 0x60 8010ecc: 429e cmp r6, r3 8010ece: d029 beq.n 8010f24 if (pcb->flags & TF_ACK_NOW) { 8010ed0: 8b6b ldrh r3, [r5, #26] 8010ed2: f013 0f02 tst.w r3, #2 8010ed6: d018 beq.n 8010f0a return tcp_send_empty_ack(pcb); 8010ed8: 4628 mov r0, r5 8010eda: f7ff ff89 bl 8010df0 8010ede: 4603 mov r3, r0 8010ee0: e018 b.n 8010f14 LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL); 8010ee2: 4b86 ldr r3, [pc, #536] @ (80110fc ) 8010ee4: f240 42e1 movw r2, #1249 @ 0x4e1 8010ee8: 4985 ldr r1, [pc, #532] @ (8011100 ) 8010eea: 4886 ldr r0, [pc, #536] @ (8011104 ) 8010eec: f002 fa8c bl 8013408 8010ef0: e7bf b.n 8010e72 LWIP_ASSERT("don't call tcp_output for listen-pcbs", 8010ef2: 4b82 ldr r3, [pc, #520] @ (80110fc ) 8010ef4: f240 42e3 movw r2, #1251 @ 0x4e3 8010ef8: 4983 ldr r1, [pc, #524] @ (8011108 ) 8010efa: 4882 ldr r0, [pc, #520] @ (8011104 ) 8010efc: f002 fa84 bl 8013408 8010f00: e7ba b.n 8010e78 if (pcb->flags & TF_ACK_NOW) { 8010f02: 8b6b ldrh r3, [r5, #26] 8010f04: f013 0f02 tst.w r3, #2 8010f08: d107 bne.n 8010f1a tcp_clear_flags(pcb, TF_NAGLEMEMERR); 8010f0a: 8b6b ldrh r3, [r5, #26] 8010f0c: f023 0380 bic.w r3, r3, #128 @ 0x80 8010f10: 836b strh r3, [r5, #26] return ERR_OK; 8010f12: 2300 movs r3, #0 } 8010f14: 4618 mov r0, r3 8010f16: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} return tcp_send_empty_ack(pcb); 8010f1a: 4628 mov r0, r5 8010f1c: f7ff ff68 bl 8010df0 8010f20: 4603 mov r3, r0 8010f22: e7f7 b.n 8010f14 if (wnd == pcb->snd_wnd && pcb->unacked == NULL && pcb->persist_backoff == 0) { 8010f24: 6f2b ldr r3, [r5, #112] @ 0x70 8010f26: 2b00 cmp r3, #0 8010f28: d1d2 bne.n 8010ed0 8010f2a: f895 3099 ldrb.w r3, [r5, #153] @ 0x99 8010f2e: 2b00 cmp r3, #0 8010f30: d1ce bne.n 8010ed0 pcb->persist_cnt = 0; 8010f32: f885 3098 strb.w r3, [r5, #152] @ 0x98 pcb->persist_backoff = 1; 8010f36: 2201 movs r2, #1 8010f38: f885 2099 strb.w r2, [r5, #153] @ 0x99 pcb->persist_probe = 0; 8010f3c: f885 309a strb.w r3, [r5, #154] @ 0x9a 8010f40: e7c6 b.n 8010ed0 pcb->persist_backoff = 0; 8010f42: 2300 movs r3, #0 8010f44: f885 3099 strb.w r3, [r5, #153] @ 0x99 useg = pcb->unacked; 8010f48: 6f2b ldr r3, [r5, #112] @ 0x70 if (useg != NULL) { 8010f4a: 2b00 cmp r3, #0 8010f4c: f000 80cc beq.w 80110e8 for (; useg->next != NULL; useg = useg->next); 8010f50: 461f mov r7, r3 8010f52: 681b ldr r3, [r3, #0] 8010f54: 2b00 cmp r3, #0 8010f56: d1fb bne.n 8010f50 8010f58: e056 b.n 8011008 LWIP_ASSERT("RST not expected here!", 8010f5a: 4b68 ldr r3, [pc, #416] @ (80110fc ) 8010f5c: f240 5236 movw r2, #1334 @ 0x536 8010f60: 496a ldr r1, [pc, #424] @ (801110c ) 8010f62: 4868 ldr r0, [pc, #416] @ (8011104 ) 8010f64: f002 fa50 bl 8013408 8010f68: e061 b.n 801102e if ((tcp_do_output_nagle(pcb) == 0) && 8010f6a: 8911 ldrh r1, [r2, #8] 8010f6c: 8e6a ldrh r2, [r5, #50] @ 0x32 8010f6e: 4291 cmp r1, r2 8010f70: d269 bcs.n 8011046 8010f72: f8b5 2064 ldrh.w r2, [r5, #100] @ 0x64 8010f76: 2a00 cmp r2, #0 8010f78: d065 beq.n 8011046 8010f7a: f8b5 2066 ldrh.w r2, [r5, #102] @ 0x66 8010f7e: 2a0f cmp r2, #15 8010f80: d861 bhi.n 8011046 8010f82: f013 0fa0 tst.w r3, #160 @ 0xa0 8010f86: d15e bne.n 8011046 if (pcb->unsent == NULL) { 8010f88: 6eeb ldr r3, [r5, #108] @ 0x6c 8010f8a: 2b00 cmp r3, #0 8010f8c: d1bd bne.n 8010f0a pcb->unsent_oversize = 0; 8010f8e: f8a5 3068 strh.w r3, [r5, #104] @ 0x68 8010f92: e7ba b.n 8010f0a TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 8010f94: 6923 ldr r3, [r4, #16] 8010f96: f8b3 900c ldrh.w r9, [r3, #12] 8010f9a: 2010 movs r0, #16 8010f9c: f7f6 ff6e bl 8007e7c 8010fa0: 6923 ldr r3, [r4, #16] 8010fa2: ea49 0900 orr.w r9, r9, r0 8010fa6: f8a3 900c strh.w r9, [r3, #12] 8010faa: e04f b.n 801104c tcp_set_flags(pcb, TF_NAGLEMEMERR); 8010fac: 8b6a ldrh r2, [r5, #26] 8010fae: f042 0280 orr.w r2, r2, #128 @ 0x80 8010fb2: 836a strh r2, [r5, #26] return err; 8010fb4: e7ae b.n 8010f14 snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8010fb6: 2300 movs r3, #0 8010fb8: e06a b.n 8011090 pcb->snd_nxt = snd_nxt; 8010fba: 6528 str r0, [r5, #80] @ 0x50 8010fbc: e06f b.n 801109e if (TCP_TCPLEN(seg) > 0) { 8010fbe: 2300 movs r3, #0 8010fc0: e077 b.n 80110b2 pcb->unacked = seg; 8010fc2: 672c str r4, [r5, #112] @ 0x70 useg = seg; 8010fc4: 4627 mov r7, r4 8010fc6: e01e b.n 8011006 struct tcp_seg **cur_seg = &(pcb->unacked); 8010fc8: f105 0a70 add.w sl, r5, #112 @ 0x70 while (*cur_seg && 8010fcc: e001 b.n 8010fd2 cur_seg = &((*cur_seg)->next ); 8010fce: f8da a000 ldr.w sl, [sl] while (*cur_seg && 8010fd2: f8da 3000 ldr.w r3, [sl] 8010fd6: b16b cbz r3, 8010ff4 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 8010fd8: 691b ldr r3, [r3, #16] 8010fda: 6858 ldr r0, [r3, #4] 8010fdc: f7f6 ff53 bl 8007e86 8010fe0: 4681 mov r9, r0 8010fe2: 6923 ldr r3, [r4, #16] 8010fe4: 6858 ldr r0, [r3, #4] 8010fe6: f7f6 ff4e bl 8007e86 8010fea: eba9 0900 sub.w r9, r9, r0 while (*cur_seg && 8010fee: f1b9 0f00 cmp.w r9, #0 8010ff2: dbec blt.n 8010fce seg->next = (*cur_seg); 8010ff4: f8da 3000 ldr.w r3, [sl] 8010ff8: 6023 str r3, [r4, #0] (*cur_seg) = seg; 8010ffa: f8ca 4000 str.w r4, [sl] 8010ffe: e002 b.n 8011006 tcp_seg_free(seg); 8011000: 4620 mov r0, r4 8011002: f7fc f9d3 bl 800d3ac seg = pcb->unsent; 8011006: 6eec ldr r4, [r5, #108] @ 0x6c while (seg != NULL && 8011008: 2c00 cmp r4, #0 801100a: d0bd beq.n 8010f88 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { 801100c: 6923 ldr r3, [r4, #16] 801100e: 6858 ldr r0, [r3, #4] 8011010: f7f6 ff39 bl 8007e86 8011014: 6c6b ldr r3, [r5, #68] @ 0x44 8011016: 1ac0 subs r0, r0, r3 8011018: 8923 ldrh r3, [r4, #8] 801101a: 4418 add r0, r3 while (seg != NULL && 801101c: 42b0 cmp r0, r6 801101e: d8b3 bhi.n 8010f88 LWIP_ASSERT("RST not expected here!", 8011020: 6923 ldr r3, [r4, #16] 8011022: 8998 ldrh r0, [r3, #12] 8011024: f7f6 ff2a bl 8007e7c 8011028: f010 0f04 tst.w r0, #4 801102c: d195 bne.n 8010f5a if ((tcp_do_output_nagle(pcb) == 0) && 801102e: 6f2b ldr r3, [r5, #112] @ 0x70 8011030: b14b cbz r3, 8011046 8011032: 8b6b ldrh r3, [r5, #26] 8011034: f013 0f44 tst.w r3, #68 @ 0x44 8011038: d105 bne.n 8011046 801103a: 6eea ldr r2, [r5, #108] @ 0x6c 801103c: 2a00 cmp r2, #0 801103e: d098 beq.n 8010f72 8011040: 6811 ldr r1, [r2, #0] 8011042: 2900 cmp r1, #0 8011044: d091 beq.n 8010f6a if (pcb->state != SYN_SENT) { 8011046: 7d2b ldrb r3, [r5, #20] 8011048: 2b02 cmp r3, #2 801104a: d1a3 bne.n 8010f94 err = tcp_output_segment(seg, pcb, netif); 801104c: 4642 mov r2, r8 801104e: 4629 mov r1, r5 8011050: 4620 mov r0, r4 8011052: f7ff f849 bl 80100e8 if (err != ERR_OK) { 8011056: 4603 mov r3, r0 8011058: 2800 cmp r0, #0 801105a: d1a7 bne.n 8010fac seg->oversize_left = 0; 801105c: 2300 movs r3, #0 801105e: 8163 strh r3, [r4, #10] pcb->unsent = seg->next; 8011060: 6823 ldr r3, [r4, #0] 8011062: 66eb str r3, [r5, #108] @ 0x6c if (pcb->state != SYN_SENT) { 8011064: 7d2b ldrb r3, [r5, #20] 8011066: 2b02 cmp r3, #2 8011068: d003 beq.n 8011072 tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 801106a: 8b6b ldrh r3, [r5, #26] 801106c: f023 0303 bic.w r3, r3, #3 8011070: 836b strh r3, [r5, #26] snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8011072: 6923 ldr r3, [r4, #16] 8011074: 6858 ldr r0, [r3, #4] 8011076: f7f6 ff06 bl 8007e86 801107a: 4681 mov r9, r0 801107c: f8b4 a008 ldrh.w sl, [r4, #8] 8011080: 6923 ldr r3, [r4, #16] 8011082: 8998 ldrh r0, [r3, #12] 8011084: f7f6 fefa bl 8007e7c 8011088: f010 0f03 tst.w r0, #3 801108c: d093 beq.n 8010fb6 801108e: 2301 movs r3, #1 8011090: 4453 add r3, sl 8011092: eb09 0003 add.w r0, r9, r3 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8011096: 6d2b ldr r3, [r5, #80] @ 0x50 8011098: 1a1b subs r3, r3, r0 801109a: 2b00 cmp r3, #0 801109c: db8d blt.n 8010fba if (TCP_TCPLEN(seg) > 0) { 801109e: f8b4 9008 ldrh.w r9, [r4, #8] 80110a2: 6923 ldr r3, [r4, #16] 80110a4: 8998 ldrh r0, [r3, #12] 80110a6: f7f6 fee9 bl 8007e7c 80110aa: f010 0f03 tst.w r0, #3 80110ae: d086 beq.n 8010fbe 80110b0: 2301 movs r3, #1 80110b2: eb13 0f09 cmn.w r3, r9 80110b6: d0a3 beq.n 8011000 seg->next = NULL; 80110b8: 2300 movs r3, #0 80110ba: 6023 str r3, [r4, #0] if (pcb->unacked == NULL) { 80110bc: 6f2b ldr r3, [r5, #112] @ 0x70 80110be: 2b00 cmp r3, #0 80110c0: f43f af7f beq.w 8010fc2 if (TCP_SEQ_LT(lwip_ntohl(seg->tcphdr->seqno), lwip_ntohl(useg->tcphdr->seqno))) { 80110c4: 6923 ldr r3, [r4, #16] 80110c6: 6858 ldr r0, [r3, #4] 80110c8: f7f6 fedd bl 8007e86 80110cc: 4681 mov r9, r0 80110ce: 693b ldr r3, [r7, #16] 80110d0: 6858 ldr r0, [r3, #4] 80110d2: f7f6 fed8 bl 8007e86 80110d6: eba9 0900 sub.w r9, r9, r0 80110da: f1b9 0f00 cmp.w r9, #0 80110de: f6ff af73 blt.w 8010fc8 useg->next = seg; 80110e2: 603c str r4, [r7, #0] useg = useg->next; 80110e4: 4627 mov r7, r4 80110e6: e78e b.n 8011006 useg = pcb->unacked; 80110e8: 461f mov r7, r3 80110ea: e78d b.n 8011008 return ERR_OK; 80110ec: 2300 movs r3, #0 80110ee: e711 b.n 8010f14 return ERR_RTE; 80110f0: f06f 0303 mvn.w r3, #3 80110f4: e70e b.n 8010f14 80110f6: bf00 nop 80110f8: 24019be8 .word 0x24019be8 80110fc: 080170ec .word 0x080170ec 8011100: 08017888 .word 0x08017888 8011104: 080144e8 .word 0x080144e8 8011108: 080178a0 .word 0x080178a0 801110c: 080178c8 .word 0x080178c8 08011110 : { 8011110: b510 push {r4, lr} LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL); 8011112: 4604 mov r4, r0 8011114: b150 cbz r0, 801112c if (pcb->nrtx < 0xFF) { 8011116: f894 3042 ldrb.w r3, [r4, #66] @ 0x42 801111a: 2bff cmp r3, #255 @ 0xff 801111c: d002 beq.n 8011124 ++pcb->nrtx; 801111e: 3301 adds r3, #1 8011120: f884 3042 strb.w r3, [r4, #66] @ 0x42 tcp_output(pcb); 8011124: 4620 mov r0, r4 8011126: f7ff fe9d bl 8010e64 } 801112a: bd10 pop {r4, pc} LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL); 801112c: 4b03 ldr r3, [pc, #12] @ (801113c ) 801112e: f44f 62d3 mov.w r2, #1688 @ 0x698 8011132: 4903 ldr r1, [pc, #12] @ (8011140 ) 8011134: 4803 ldr r0, [pc, #12] @ (8011144 ) 8011136: f002 f967 bl 8013408 801113a: e7ec b.n 8011116 801113c: 080170ec .word 0x080170ec 8011140: 080178e0 .word 0x080178e0 8011144: 080144e8 .word 0x080144e8 08011148 : { 8011148: b510 push {r4, lr} LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL); 801114a: 4604 mov r4, r0 801114c: b120 cbz r0, 8011158 if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) { 801114e: 4620 mov r0, r4 8011150: f7ff fd34 bl 8010bbc 8011154: b140 cbz r0, 8011168 } 8011156: bd10 pop {r4, pc} LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL); 8011158: 4b05 ldr r3, [pc, #20] @ (8011170 ) 801115a: f240 62ad movw r2, #1709 @ 0x6ad 801115e: 4905 ldr r1, [pc, #20] @ (8011174 ) 8011160: 4805 ldr r0, [pc, #20] @ (8011178 ) 8011162: f002 f951 bl 8013408 8011166: e7f2 b.n 801114e tcp_rexmit_rto_commit(pcb); 8011168: 4620 mov r0, r4 801116a: f7ff ffd1 bl 8011110 } 801116e: e7f2 b.n 8011156 8011170: 080170ec .word 0x080170ec 8011174: 08017904 .word 0x08017904 8011178: 080144e8 .word 0x080144e8 0801117c : * * @param pcb the tcp_pcb for which to send a keepalive packet */ err_t tcp_keepalive(struct tcp_pcb *pcb) { 801117c: b538 push {r3, r4, r5, lr} err_t err; struct pbuf *p; u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL); 801117e: 4604 mov r4, r0 8011180: b1c0 cbz r0, 80111b4 LWIP_DEBUGF(TCP_DEBUG, ("\n")); LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent)); p = tcp_output_alloc_header(pcb, optlen, 0, lwip_htonl(pcb->snd_nxt - 1)); 8011182: 6d20 ldr r0, [r4, #80] @ 0x50 8011184: 3801 subs r0, #1 8011186: f7f6 fe7e bl 8007e86 801118a: 4603 mov r3, r0 801118c: 2200 movs r2, #0 801118e: 4611 mov r1, r2 8011190: 4620 mov r0, r4 8011192: f7fe ff73 bl 801007c if (p == NULL) { 8011196: 4605 mov r5, r0 8011198: b1a0 cbz r0, 80111c4 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: could not allocate memory for pbuf\n")); return ERR_MEM; } tcp_output_fill_options(pcb, p, 0, optlen); 801119a: 2300 movs r3, #0 801119c: 461a mov r2, r3 801119e: 4601 mov r1, r0 80111a0: 4620 mov r0, r4 80111a2: f7fe fe27 bl 800fdf4 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 80111a6: 1d23 adds r3, r4, #4 80111a8: 4622 mov r2, r4 80111aa: 4629 mov r1, r5 80111ac: 4620 mov r0, r4 80111ae: f7ff f83b bl 8010228 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F" err %d.\n", pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err)); return err; } 80111b2: bd38 pop {r3, r4, r5, pc} LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL); 80111b4: 4b05 ldr r3, [pc, #20] @ (80111cc ) 80111b6: f640 0224 movw r2, #2084 @ 0x824 80111ba: 4905 ldr r1, [pc, #20] @ (80111d0 ) 80111bc: 4805 ldr r0, [pc, #20] @ (80111d4 ) 80111be: f002 f923 bl 8013408 80111c2: e7de b.n 8011182 return ERR_MEM; 80111c4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80111c8: e7f3 b.n 80111b2 80111ca: bf00 nop 80111cc: 080170ec .word 0x080170ec 80111d0: 08017920 .word 0x08017920 80111d4: 080144e8 .word 0x080144e8 080111d8 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ err_t tcp_zero_window_probe(struct tcp_pcb *pcb) { 80111d8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t len; u8_t is_fin; u32_t snd_nxt; u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL); 80111dc: 4604 mov r4, r0 80111de: b1a8 cbz r0, 801120c ("tcp_zero_window_probe: tcp_ticks %"U32_F " pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, (u16_t)pcb->keep_cnt_sent)); /* Only consider unsent, persist timer should be off when there is data in-flight */ seg = pcb->unsent; 80111e0: 6ee5 ldr r5, [r4, #108] @ 0x6c if (seg == NULL) { 80111e2: 2d00 cmp r5, #0 80111e4: d05b beq.n 801129e /* increment probe count. NOTE: we record probe even if it fails to actually transmit due to an error. This ensures memory exhaustion/ routing problem doesn't leave a zero-window pcb as an indefinite zombie. RTO mechanism has similar behavior, see pcb->nrtx */ if (pcb->persist_probe < 0xFF) { 80111e6: f894 309a ldrb.w r3, [r4, #154] @ 0x9a 80111ea: 2bff cmp r3, #255 @ 0xff 80111ec: d002 beq.n 80111f4 ++pcb->persist_probe; 80111ee: 3301 adds r3, #1 80111f0: f884 309a strb.w r3, [r4, #154] @ 0x9a } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 80111f4: 692b ldr r3, [r5, #16] 80111f6: 8998 ldrh r0, [r3, #12] 80111f8: f7f6 fe40 bl 8007e7c 80111fc: f010 0f01 tst.w r0, #1 8011200: d00c beq.n 801121c 8011202: 892b ldrh r3, [r5, #8] 8011204: 2b00 cmp r3, #0 8011206: d03b beq.n 8011280 8011208: 2200 movs r2, #0 801120a: e008 b.n 801121e LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL); 801120c: 4b26 ldr r3, [pc, #152] @ (80112a8 ) 801120e: f640 024f movw r2, #2127 @ 0x84f 8011212: 4926 ldr r1, [pc, #152] @ (80112ac ) 8011214: 4826 ldr r0, [pc, #152] @ (80112b0 ) 8011216: f002 f8f7 bl 8013408 801121a: e7e1 b.n 80111e0 is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 801121c: 2200 movs r2, #0 /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; 801121e: f002 08ff and.w r8, r2, #255 @ 0xff p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno); 8011222: 692b ldr r3, [r5, #16] 8011224: 685b ldr r3, [r3, #4] 8011226: f082 0201 eor.w r2, r2, #1 801122a: 2100 movs r1, #0 801122c: 4620 mov r0, r4 801122e: f7fe ff25 bl 801007c if (p == NULL) { 8011232: 4606 mov r6, r0 8011234: b3a8 cbz r0, 80112a2 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return ERR_MEM; } tcphdr = (struct tcp_hdr *)p->payload; 8011236: 6847 ldr r7, [r0, #4] if (is_fin) { 8011238: f1b8 0f00 cmp.w r8, #0 801123c: d022 beq.n 8011284 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 801123e: f8b7 800c ldrh.w r8, [r7, #12] 8011242: 2011 movs r0, #17 8011244: f7f6 fe1a bl 8007e7c 8011248: f428 587c bic.w r8, r8, #16128 @ 0x3f00 801124c: ea40 0008 orr.w r0, r0, r8 8011250: 81b8 strh r0, [r7, #12] Ensure we copy the first TCP data byte: */ pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len); } /* The byte may be acknowledged without the window being opened. */ snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1; 8011252: 692b ldr r3, [r5, #16] 8011254: 6858 ldr r0, [r3, #4] 8011256: f7f6 fe16 bl 8007e86 801125a: 3001 adds r0, #1 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 801125c: 6d23 ldr r3, [r4, #80] @ 0x50 801125e: 1a1b subs r3, r3, r0 8011260: 2b00 cmp r3, #0 8011262: db1a blt.n 801129a pcb->snd_nxt = snd_nxt; } tcp_output_fill_options(pcb, p, 0, optlen); 8011264: 2300 movs r3, #0 8011266: 461a mov r2, r3 8011268: 4631 mov r1, r6 801126a: 4620 mov r0, r4 801126c: f7fe fdc2 bl 800fdf4 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 8011270: 1d23 adds r3, r4, #4 8011272: 4622 mov r2, r4 8011274: 4631 mov r1, r6 8011276: 4620 mov r0, r4 8011278: f7fe ffd6 bl 8010228 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F" err %d.\n", pcb->snd_nxt - 1, pcb->rcv_nxt, (int)err)); return err; } 801127c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 8011280: 2201 movs r2, #1 8011282: e7cc b.n 801121e pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len); 8011284: 6868 ldr r0, [r5, #4] 8011286: 8903 ldrh r3, [r0, #8] 8011288: 892a ldrh r2, [r5, #8] 801128a: 1a9b subs r3, r3, r2 801128c: b29b uxth r3, r3 801128e: 2201 movs r2, #1 8011290: f107 0114 add.w r1, r7, #20 8011294: f7fb f806 bl 800c2a4 8011298: e7db b.n 8011252 pcb->snd_nxt = snd_nxt; 801129a: 6520 str r0, [r4, #80] @ 0x50 801129c: e7e2 b.n 8011264 return ERR_OK; 801129e: 2000 movs r0, #0 80112a0: e7ec b.n 801127c return ERR_MEM; 80112a2: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80112a6: e7e9 b.n 801127c 80112a8: 080170ec .word 0x080170ec 80112ac: 0801793c .word 0x0801793c 80112b0: 080144e8 .word 0x080144e8 080112b4 : * @param mbox the mbox to fetch the message from * @param msg the place to store the message */ static void tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) { 80112b4: b570 push {r4, r5, r6, lr} 80112b6: 4605 mov r5, r0 80112b8: 460e mov r6, r1 80112ba: e00b b.n 80112d4 again: LWIP_ASSERT_CORE_LOCKED(); sleeptime = sys_timeouts_sleeptime(); if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) { UNLOCK_TCPIP_CORE(); 80112bc: f7f2 fc1a bl 8003af4 sys_arch_mbox_fetch(mbox, msg, 0); 80112c0: 2200 movs r2, #0 80112c2: 4631 mov r1, r6 80112c4: 4628 mov r0, r5 80112c6: f7fb fe20 bl 800cf0a LOCK_TCPIP_CORE(); 80112ca: f7f2 fc05 bl 8003ad8 before a message could be fetched. */ sys_check_timeouts(); /* We try again to fetch a message from the mbox. */ goto again; } } 80112ce: bd70 pop {r4, r5, r6, pc} sys_check_timeouts(); 80112d0: f000 f9fe bl 80116d0 LWIP_ASSERT_CORE_LOCKED(); 80112d4: f7f2 fc1a bl 8003b0c sleeptime = sys_timeouts_sleeptime(); 80112d8: f000 fa1c bl 8011714 80112dc: 4604 mov r4, r0 if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) { 80112de: f1b0 3fff cmp.w r0, #4294967295 @ 0xffffffff 80112e2: d0eb beq.n 80112bc } else if (sleeptime == 0) { 80112e4: 2800 cmp r0, #0 80112e6: d0f3 beq.n 80112d0 UNLOCK_TCPIP_CORE(); 80112e8: f7f2 fc04 bl 8003af4 res = sys_arch_mbox_fetch(mbox, msg, sleeptime); 80112ec: 4622 mov r2, r4 80112ee: 4631 mov r1, r6 80112f0: 4628 mov r0, r5 80112f2: f7fb fe0a bl 800cf0a 80112f6: 4604 mov r4, r0 LOCK_TCPIP_CORE(); 80112f8: f7f2 fbee bl 8003ad8 if (res == SYS_ARCH_TIMEOUT) { 80112fc: f1b4 3fff cmp.w r4, #4294967295 @ 0xffffffff 8011300: d1e5 bne.n 80112ce sys_check_timeouts(); 8011302: f000 f9e5 bl 80116d0 goto again; 8011306: e7e5 b.n 80112d4 08011308 : /* Handle a single tcpip_msg * This is in its own function for access by tests only. */ static void tcpip_thread_handle_msg(struct tcpip_msg *msg) { 8011308: b510 push {r4, lr} 801130a: 4604 mov r4, r0 switch (msg->type) { 801130c: 7803 ldrb r3, [r0, #0] 801130e: 2b01 cmp r3, #1 8011310: d017 beq.n 8011342 8011312: 2b02 cmp r3, #2 8011314: d01d beq.n 8011352 8011316: b133 cbz r3, 8011326 msg->msg.cb.function(msg->msg.cb.ctx); break; default: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type)); LWIP_ASSERT("tcpip_thread: invalid message", 0); 8011318: 4b10 ldr r3, [pc, #64] @ (801135c ) 801131a: 22cf movs r2, #207 @ 0xcf 801131c: 4910 ldr r1, [pc, #64] @ (8011360 ) 801131e: 4811 ldr r0, [pc, #68] @ (8011364 ) 8011320: f002 f872 bl 8013408 break; } } 8011324: e008 b.n 8011338 if (msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif) != ERR_OK) { 8011326: 68c3 ldr r3, [r0, #12] 8011328: 6881 ldr r1, [r0, #8] 801132a: 6840 ldr r0, [r0, #4] 801132c: 4798 blx r3 801132e: b920 cbnz r0, 801133a memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8011330: 4621 mov r1, r4 8011332: 2009 movs r0, #9 8011334: f7fa f99c bl 800b670 } 8011338: bd10 pop {r4, pc} pbuf_free(msg->msg.inp.p); 801133a: 6860 ldr r0, [r4, #4] 801133c: f7fa fd30 bl 800bda0 8011340: e7f6 b.n 8011330 msg->msg.cb.function(msg->msg.cb.ctx); 8011342: 6843 ldr r3, [r0, #4] 8011344: 6880 ldr r0, [r0, #8] 8011346: 4798 blx r3 memp_free(MEMP_TCPIP_MSG_API, msg); 8011348: 4621 mov r1, r4 801134a: 2008 movs r0, #8 801134c: f7fa f990 bl 800b670 break; 8011350: e7f2 b.n 8011338 msg->msg.cb.function(msg->msg.cb.ctx); 8011352: 6843 ldr r3, [r0, #4] 8011354: 6880 ldr r0, [r0, #8] 8011356: 4798 blx r3 break; 8011358: e7ee b.n 8011338 801135a: bf00 nop 801135c: 08017960 .word 0x08017960 8011360: 080179c0 .word 0x080179c0 8011364: 080144e8 .word 0x080144e8 08011368 : { 8011368: b500 push {lr} 801136a: b083 sub sp, #12 LWIP_MARK_TCPIP_THREAD(); 801136c: f7f2 fc02 bl 8003b74 LOCK_TCPIP_CORE(); 8011370: f7f2 fbb2 bl 8003ad8 if (tcpip_init_done != NULL) { 8011374: 4b0b ldr r3, [pc, #44] @ (80113a4 ) 8011376: 681b ldr r3, [r3, #0] 8011378: b12b cbz r3, 8011386 tcpip_init_done(tcpip_init_done_arg); 801137a: 4a0b ldr r2, [pc, #44] @ (80113a8 ) 801137c: 6810 ldr r0, [r2, #0] 801137e: 4798 blx r3 8011380: e001 b.n 8011386 tcpip_thread_handle_msg(msg); 8011382: f7ff ffc1 bl 8011308 TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg); 8011386: a901 add r1, sp, #4 8011388: 4808 ldr r0, [pc, #32] @ (80113ac ) 801138a: f7ff ff93 bl 80112b4 if (msg == NULL) { 801138e: 9801 ldr r0, [sp, #4] 8011390: 2800 cmp r0, #0 8011392: d1f6 bne.n 8011382 LWIP_ASSERT("tcpip_thread: invalid message", 0); 8011394: 4b06 ldr r3, [pc, #24] @ (80113b0 ) 8011396: 2291 movs r2, #145 @ 0x91 8011398: 4906 ldr r1, [pc, #24] @ (80113b4 ) 801139a: 4807 ldr r0, [pc, #28] @ (80113b8 ) 801139c: f002 f834 bl 8013408 continue; 80113a0: e7f1 b.n 8011386 80113a2: bf00 nop 80113a4: 24019c30 .word 0x24019c30 80113a8: 24019c2c .word 0x24019c2c 80113ac: 24019c28 .word 0x24019c28 80113b0: 08017960 .word 0x08017960 80113b4: 080179c0 .word 0x080179c0 80113b8: 080144e8 .word 0x080144e8 080113bc : * @param inp the network interface on which the packet was received * @param input_fn input function to call */ err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn) { 80113bc: b5f8 push {r3, r4, r5, r6, r7, lr} 80113be: 4607 mov r7, r0 80113c0: 460e mov r6, r1 80113c2: 4615 mov r5, r2 UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); 80113c4: 4812 ldr r0, [pc, #72] @ (8011410 ) 80113c6: f7fb fdcc bl 800cf62 80113ca: b178 cbz r0, 80113ec msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 80113cc: 2009 movs r0, #9 80113ce: f7fa f919 bl 800b604 if (msg == NULL) { 80113d2: 4604 mov r4, r0 80113d4: b1c0 cbz r0, 8011408 return ERR_MEM; } msg->type = TCPIP_MSG_INPKT; 80113d6: 2300 movs r3, #0 80113d8: 7003 strb r3, [r0, #0] msg->msg.inp.p = p; 80113da: 6047 str r7, [r0, #4] msg->msg.inp.netif = inp; 80113dc: 6086 str r6, [r0, #8] msg->msg.inp.input_fn = input_fn; 80113de: 60c5 str r5, [r0, #12] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 80113e0: 4601 mov r1, r0 80113e2: 480b ldr r0, [pc, #44] @ (8011410 ) 80113e4: f7fb fd81 bl 800ceea 80113e8: b938 cbnz r0, 80113fa memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 80113ea: bdf8 pop {r3, r4, r5, r6, r7, pc} LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); 80113ec: 4b09 ldr r3, [pc, #36] @ (8011414 ) 80113ee: 22fc movs r2, #252 @ 0xfc 80113f0: 4909 ldr r1, [pc, #36] @ (8011418 ) 80113f2: 480a ldr r0, [pc, #40] @ (801141c ) 80113f4: f002 f808 bl 8013408 80113f8: e7e8 b.n 80113cc memp_free(MEMP_TCPIP_MSG_INPKT, msg); 80113fa: 4621 mov r1, r4 80113fc: 2009 movs r0, #9 80113fe: f7fa f937 bl 800b670 return ERR_MEM; 8011402: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8011406: e7f0 b.n 80113ea return ERR_MEM; 8011408: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 801140c: e7ed b.n 80113ea 801140e: bf00 nop 8011410: 24019c28 .word 0x24019c28 8011414: 08017960 .word 0x08017960 8011418: 080179e0 .word 0x080179e0 801141c: 080144e8 .word 0x080144e8 08011420 : * NETIF_FLAG_ETHERNET flags) * @param inp the network interface on which the packet was received */ err_t tcpip_input(struct pbuf *p, struct netif *inp) { 8011420: b508 push {r3, lr} #if LWIP_ETHERNET if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 8011422: f891 3031 ldrb.w r3, [r1, #49] @ 0x31 8011426: f013 0f18 tst.w r3, #24 801142a: d003 beq.n 8011434 return tcpip_inpkt(p, inp, ethernet_input); 801142c: 4a03 ldr r2, [pc, #12] @ (801143c ) 801142e: f7ff ffc5 bl 80113bc } else #endif /* LWIP_ETHERNET */ return tcpip_inpkt(p, inp, ip_input); } 8011432: bd08 pop {r3, pc} return tcpip_inpkt(p, inp, ip_input); 8011434: 4a02 ldr r2, [pc, #8] @ (8011440 ) 8011436: f7ff ffc1 bl 80113bc 801143a: e7fa b.n 8011432 801143c: 08009c99 .word 0x08009c99 8011440: 0800a169 .word 0x0800a169 08011444 : * * @see tcpip_callback */ err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx) { 8011444: b570 push {r4, r5, r6, lr} 8011446: 4606 mov r6, r0 8011448: 460d mov r5, r1 struct tcpip_msg *msg; LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); 801144a: 4812 ldr r0, [pc, #72] @ (8011494 ) 801144c: f7fb fd89 bl 800cf62 8011450: b170 cbz r0, 8011470 msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); 8011452: 2008 movs r0, #8 8011454: f7fa f8d6 bl 800b604 if (msg == NULL) { 8011458: 4604 mov r4, r0 801145a: b1c0 cbz r0, 801148e return ERR_MEM; } msg->type = TCPIP_MSG_CALLBACK; 801145c: 2301 movs r3, #1 801145e: 7003 strb r3, [r0, #0] msg->msg.cb.function = function; 8011460: 6046 str r6, [r0, #4] msg->msg.cb.ctx = ctx; 8011462: 6085 str r5, [r0, #8] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 8011464: 4601 mov r1, r0 8011466: 480b ldr r0, [pc, #44] @ (8011494 ) 8011468: f7fb fd3f bl 800ceea 801146c: b940 cbnz r0, 8011480 memp_free(MEMP_TCPIP_MSG_API, msg); return ERR_MEM; } return ERR_OK; } 801146e: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); 8011470: 4b09 ldr r3, [pc, #36] @ (8011498 ) 8011472: f240 125d movw r2, #349 @ 0x15d 8011476: 4909 ldr r1, [pc, #36] @ (801149c ) 8011478: 4809 ldr r0, [pc, #36] @ (80114a0 ) 801147a: f001 ffc5 bl 8013408 801147e: e7e8 b.n 8011452 memp_free(MEMP_TCPIP_MSG_API, msg); 8011480: 4621 mov r1, r4 8011482: 2008 movs r0, #8 8011484: f7fa f8f4 bl 800b670 return ERR_MEM; 8011488: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 801148c: e7ef b.n 801146e return ERR_MEM; 801148e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8011492: e7ec b.n 801146e 8011494: 24019c28 .word 0x24019c28 8011498: 08017960 .word 0x08017960 801149c: 080179e0 .word 0x080179e0 80114a0: 080144e8 .word 0x080144e8 080114a4 : * @param sem semaphore to wait on * @return ERR_OK if the function was called, another err_t if not */ err_t tcpip_send_msg_wait_sem(tcpip_callback_fn fn, void *apimsg, sys_sem_t *sem) { 80114a4: b538 push {r3, r4, r5, lr} 80114a6: 4604 mov r4, r0 80114a8: 460d mov r5, r1 #if LWIP_TCPIP_CORE_LOCKING LWIP_UNUSED_ARG(sem); LOCK_TCPIP_CORE(); 80114aa: f7f2 fb15 bl 8003ad8 fn(apimsg); 80114ae: 4628 mov r0, r5 80114b0: 47a0 blx r4 UNLOCK_TCPIP_CORE(); 80114b2: f7f2 fb1f bl 8003af4 sys_mbox_post(&tcpip_mbox, &TCPIP_MSG_VAR_REF(msg)); sys_arch_sem_wait(sem, 0); TCPIP_MSG_VAR_FREE(msg); return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING */ } 80114b6: 2000 movs r0, #0 80114b8: bd38 pop {r3, r4, r5, pc} ... 080114bc : * @param initfunc a function to call when tcpip_thread is running and finished initializing * @param arg argument to pass to initfunc */ void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { 80114bc: b530 push {r4, r5, lr} 80114be: b083 sub sp, #12 80114c0: 4605 mov r5, r0 80114c2: 460c mov r4, r1 lwip_init(); 80114c4: f7f8 fdf2 bl 800a0ac tcpip_init_done = initfunc; 80114c8: 4b13 ldr r3, [pc, #76] @ (8011518 ) 80114ca: 601d str r5, [r3, #0] tcpip_init_done_arg = arg; 80114cc: 4b13 ldr r3, [pc, #76] @ (801151c ) 80114ce: 601c str r4, [r3, #0] if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 80114d0: 2106 movs r1, #6 80114d2: 4813 ldr r0, [pc, #76] @ (8011520 ) 80114d4: f7fb fcf2 bl 800cebc 80114d8: b970 cbnz r0, 80114f8 LWIP_ASSERT("failed to create tcpip_thread mbox", 0); } #if LWIP_TCPIP_CORE_LOCKING if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) { 80114da: 4812 ldr r0, [pc, #72] @ (8011524 ) 80114dc: f7fb fd9a bl 800d014 80114e0: b990 cbnz r0, 8011508 LWIP_ASSERT("failed to create lock_tcpip_core", 0); } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO); 80114e2: 2330 movs r3, #48 @ 0x30 80114e4: 9300 str r3, [sp, #0] 80114e6: f44f 5380 mov.w r3, #4096 @ 0x1000 80114ea: 2200 movs r2, #0 80114ec: 490e ldr r1, [pc, #56] @ (8011528 ) 80114ee: 480f ldr r0, [pc, #60] @ (801152c ) 80114f0: f7fb fda8 bl 800d044 } 80114f4: b003 add sp, #12 80114f6: bd30 pop {r4, r5, pc} LWIP_ASSERT("failed to create tcpip_thread mbox", 0); 80114f8: 4b0d ldr r3, [pc, #52] @ (8011530 ) 80114fa: f240 2261 movw r2, #609 @ 0x261 80114fe: 490d ldr r1, [pc, #52] @ (8011534 ) 8011500: 480d ldr r0, [pc, #52] @ (8011538 ) 8011502: f001 ff81 bl 8013408 8011506: e7e8 b.n 80114da LWIP_ASSERT("failed to create lock_tcpip_core", 0); 8011508: 4b09 ldr r3, [pc, #36] @ (8011530 ) 801150a: f240 2265 movw r2, #613 @ 0x265 801150e: 490b ldr r1, [pc, #44] @ (801153c ) 8011510: 4809 ldr r0, [pc, #36] @ (8011538 ) 8011512: f001 ff79 bl 8013408 8011516: e7e4 b.n 80114e2 8011518: 24019c30 .word 0x24019c30 801151c: 24019c2c .word 0x24019c2c 8011520: 24019c28 .word 0x24019c28 8011524: 24019c24 .word 0x24019c24 8011528: 08011369 .word 0x08011369 801152c: 08017a38 .word 0x08017a38 8011530: 08017960 .word 0x08017960 8011534: 080179f0 .word 0x080179f0 8011538: 080144e8 .word 0x080144e8 801153c: 08017a14 .word 0x08017a14 08011540 : #if LWIP_DEBUG_TIMERNAMES sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg, const char *handler_name) #else /* LWIP_DEBUG_TIMERNAMES */ sys_timeout_abs(u32_t abs_time, sys_timeout_handler handler, void *arg) #endif { 8011540: b5f8 push {r3, r4, r5, r6, r7, lr} 8011542: 4604 mov r4, r0 8011544: 460f mov r7, r1 8011546: 4616 mov r6, r2 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8011548: 200a movs r0, #10 801154a: f7fa f85b bl 800b604 if (timeout == NULL) { 801154e: b180 cbz r0, 8011572 8011550: 4605 mov r5, r0 LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); return; } timeout->next = NULL; 8011552: 2300 movs r3, #0 8011554: 6003 str r3, [r0, #0] timeout->h = handler; 8011556: 6087 str r7, [r0, #8] timeout->arg = arg; 8011558: 60c6 str r6, [r0, #12] timeout->time = abs_time; 801155a: 6044 str r4, [r0, #4] timeout->handler_name = handler_name; LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p abs_time=%"U32_F" handler=%s arg=%p\n", (void *)timeout, abs_time, handler_name, (void *)arg)); #endif /* LWIP_DEBUG_TIMERNAMES */ if (next_timeout == NULL) { 801155c: 4b10 ldr r3, [pc, #64] @ (80115a0 ) 801155e: 681a ldr r2, [r3, #0] 8011560: b172 cbz r2, 8011580 next_timeout = timeout; return; } if (TIME_LESS_THAN(timeout->time, next_timeout->time)) { 8011562: 6853 ldr r3, [r2, #4] 8011564: 1ae3 subs r3, r4, r3 8011566: 2b00 cmp r3, #0 8011568: da0f bge.n 801158a timeout->next = next_timeout; 801156a: 6002 str r2, [r0, #0] next_timeout = timeout; 801156c: 4b0c ldr r3, [pc, #48] @ (80115a0 ) 801156e: 6018 str r0, [r3, #0] t->next = timeout; break; } } } } 8011570: bdf8 pop {r3, r4, r5, r6, r7, pc} LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); 8011572: 4b0c ldr r3, [pc, #48] @ (80115a4 ) 8011574: 22be movs r2, #190 @ 0xbe 8011576: 490c ldr r1, [pc, #48] @ (80115a8 ) 8011578: 480c ldr r0, [pc, #48] @ (80115ac ) 801157a: f001 ff45 bl 8013408 return; 801157e: e7f7 b.n 8011570 next_timeout = timeout; 8011580: 6018 str r0, [r3, #0] return; 8011582: e7f5 b.n 8011570 timeout->next = t->next; 8011584: 602b str r3, [r5, #0] t->next = timeout; 8011586: 6015 str r5, [r2, #0] break; 8011588: e7f2 b.n 8011570 for (t = next_timeout; t != NULL; t = t->next) { 801158a: 2a00 cmp r2, #0 801158c: d0f0 beq.n 8011570 if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) { 801158e: 6813 ldr r3, [r2, #0] 8011590: 2b00 cmp r3, #0 8011592: d0f7 beq.n 8011584 8011594: 6859 ldr r1, [r3, #4] 8011596: 1a61 subs r1, r4, r1 8011598: 2900 cmp r1, #0 801159a: dbf3 blt.n 8011584 for (t = next_timeout; t != NULL; t = t->next) { 801159c: 461a mov r2, r3 801159e: e7f4 b.n 801158a 80115a0: 24019c3c .word 0x24019c3c 80115a4: 08017a48 .word 0x08017a48 80115a8: 08017aac .word 0x08017aac 80115ac: 080144e8 .word 0x080144e8 080115b0 : #if !LWIP_TESTMODE static #endif void lwip_cyclic_timer(void *arg) { 80115b0: b538 push {r3, r4, r5, lr} 80115b2: 4604 mov r4, r0 const struct lwip_cyclic_timer *cyclic = (const struct lwip_cyclic_timer *)arg; #if LWIP_DEBUG_TIMERNAMES LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); #endif cyclic->handler(); 80115b4: 6843 ldr r3, [r0, #4] 80115b6: 4798 blx r3 now = sys_now(); 80115b8: f7f2 f85a bl 8003670 80115bc: 4684 mov ip, r0 next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */ 80115be: 6825 ldr r5, [r4, #0] 80115c0: 4b09 ldr r3, [pc, #36] @ (80115e8 ) 80115c2: 6818 ldr r0, [r3, #0] 80115c4: 4428 add r0, r5 if (TIME_LESS_THAN(next_timeout_time, now)) { 80115c6: eba0 030c sub.w r3, r0, ip 80115ca: 2b00 cmp r3, #0 80115cc: da06 bge.n 80115dc /* timer would immediately expire again -> "overload" -> restart without any correction */ #if LWIP_DEBUG_TIMERNAMES sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg, cyclic->handler_name); #else sys_timeout_abs((u32_t)(now + cyclic->interval_ms), lwip_cyclic_timer, arg); 80115ce: 4622 mov r2, r4 80115d0: 4906 ldr r1, [pc, #24] @ (80115ec ) 80115d2: eb05 000c add.w r0, r5, ip 80115d6: f7ff ffb3 bl 8011540 sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg, cyclic->handler_name); #else sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg); #endif } } 80115da: bd38 pop {r3, r4, r5, pc} sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg); 80115dc: 4622 mov r2, r4 80115de: 4903 ldr r1, [pc, #12] @ (80115ec ) 80115e0: f7ff ffae bl 8011540 } 80115e4: e7f9 b.n 80115da 80115e6: bf00 nop 80115e8: 24019c38 .word 0x24019c38 80115ec: 080115b1 .word 0x080115b1 080115f0 : sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char *handler_name) #else /* LWIP_DEBUG_TIMERNAMES */ void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) #endif /* LWIP_DEBUG_TIMERNAMES */ { 80115f0: b570 push {r4, r5, r6, lr} 80115f2: 4604 mov r4, r0 80115f4: 460d mov r5, r1 80115f6: 4616 mov r6, r2 u32_t next_timeout_time; LWIP_ASSERT_CORE_LOCKED(); 80115f8: f7f2 fa88 bl 8003b0c LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4)); 80115fc: f1b4 4f80 cmp.w r4, #1073741824 @ 0x40000000 8011600: d207 bcs.n 8011612 next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */ 8011602: f7f2 f835 bl 8003670 #if LWIP_DEBUG_TIMERNAMES sys_timeout_abs(next_timeout_time, handler, arg, handler_name); #else sys_timeout_abs(next_timeout_time, handler, arg); 8011606: 4632 mov r2, r6 8011608: 4629 mov r1, r5 801160a: 4420 add r0, r4 801160c: f7ff ff98 bl 8011540 #endif } 8011610: bd70 pop {r4, r5, r6, pc} LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4)); 8011612: 4b04 ldr r3, [pc, #16] @ (8011624 ) 8011614: f240 1229 movw r2, #297 @ 0x129 8011618: 4903 ldr r1, [pc, #12] @ (8011628 ) 801161a: 4804 ldr r0, [pc, #16] @ (801162c ) 801161c: f001 fef4 bl 8013408 8011620: e7ef b.n 8011602 8011622: bf00 nop 8011624: 08017a48 .word 0x08017a48 8011628: 08017aec .word 0x08017aec 801162c: 080144e8 .word 0x080144e8 08011630 : { 8011630: b508 push {r3, lr} LWIP_ASSERT_CORE_LOCKED(); 8011632: f7f2 fa6b bl 8003b0c if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8011636: 4b0a ldr r3, [pc, #40] @ (8011660 ) 8011638: 681b ldr r3, [r3, #0] 801163a: b953 cbnz r3, 8011652 801163c: 4b09 ldr r3, [pc, #36] @ (8011664 ) 801163e: 681b ldr r3, [r3, #0] 8011640: b143 cbz r3, 8011654 tcpip_tcp_timer_active = 1; 8011642: 4b07 ldr r3, [pc, #28] @ (8011660 ) 8011644: 2201 movs r2, #1 8011646: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8011648: 2200 movs r2, #0 801164a: 4907 ldr r1, [pc, #28] @ (8011668 ) 801164c: 20fa movs r0, #250 @ 0xfa 801164e: f7ff ffcf bl 80115f0 } 8011652: bd08 pop {r3, pc} if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8011654: 4b05 ldr r3, [pc, #20] @ (801166c ) 8011656: 681b ldr r3, [r3, #0] 8011658: 2b00 cmp r3, #0 801165a: d1f2 bne.n 8011642 801165c: e7f9 b.n 8011652 801165e: bf00 nop 8011660: 24019c34 .word 0x24019c34 8011664: 24019bd8 .word 0x24019bd8 8011668: 08011671 .word 0x08011671 801166c: 24019bd4 .word 0x24019bd4 08011670 : { 8011670: b508 push {r3, lr} tcp_tmr(); 8011672: f7fc fead bl 800e3d0 if (tcp_active_pcbs || tcp_tw_pcbs) { 8011676: 4b08 ldr r3, [pc, #32] @ (8011698 ) 8011678: 681b ldr r3, [r3, #0] 801167a: b12b cbz r3, 8011688 sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 801167c: 2200 movs r2, #0 801167e: 4907 ldr r1, [pc, #28] @ (801169c ) 8011680: 20fa movs r0, #250 @ 0xfa 8011682: f7ff ffb5 bl 80115f0 } 8011686: bd08 pop {r3, pc} if (tcp_active_pcbs || tcp_tw_pcbs) { 8011688: 4b05 ldr r3, [pc, #20] @ (80116a0 ) 801168a: 681b ldr r3, [r3, #0] 801168c: 2b00 cmp r3, #0 801168e: d1f5 bne.n 801167c tcpip_tcp_timer_active = 0; 8011690: 4b04 ldr r3, [pc, #16] @ (80116a4 ) 8011692: 2200 movs r2, #0 8011694: 601a str r2, [r3, #0] } 8011696: e7f6 b.n 8011686 8011698: 24019bd8 .word 0x24019bd8 801169c: 08011671 .word 0x08011671 80116a0: 24019bd4 .word 0x24019bd4 80116a4: 24019c34 .word 0x24019c34 080116a8 : { 80116a8: b510 push {r4, lr} for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { 80116aa: 2401 movs r4, #1 80116ac: e008 b.n 80116c0 sys_timeout(lwip_cyclic_timers[i].interval_ms, lwip_cyclic_timer, LWIP_CONST_CAST(void *, &lwip_cyclic_timers[i])); 80116ae: 4b06 ldr r3, [pc, #24] @ (80116c8 ) 80116b0: eb03 02c4 add.w r2, r3, r4, lsl #3 80116b4: 4905 ldr r1, [pc, #20] @ (80116cc ) 80116b6: f853 0034 ldr.w r0, [r3, r4, lsl #3] 80116ba: f7ff ff99 bl 80115f0 for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { 80116be: 3401 adds r4, #1 80116c0: 2c04 cmp r4, #4 80116c2: d9f4 bls.n 80116ae } 80116c4: bd10 pop {r4, pc} 80116c6: bf00 nop 80116c8: 08017b38 .word 0x08017b38 80116cc: 080115b1 .word 0x080115b1 080116d0 : * * Must be called periodically from your main loop. */ void sys_check_timeouts(void) { 80116d0: b570 push {r4, r5, r6, lr} u32_t now; LWIP_ASSERT_CORE_LOCKED(); 80116d2: f7f2 fa1b bl 8003b0c /* Process only timers expired at the start of the function. */ now = sys_now(); 80116d6: f7f1 ffcb bl 8003670 80116da: 4605 mov r5, r0 sys_timeout_handler handler; void *arg; PBUF_CHECK_FREE_OOSEQ(); tmptimeout = next_timeout; 80116dc: 4b0b ldr r3, [pc, #44] @ (801170c ) 80116de: 6819 ldr r1, [r3, #0] if (tmptimeout == NULL) { 80116e0: b191 cbz r1, 8011708 return; } if (TIME_LESS_THAN(now, tmptimeout->time)) { 80116e2: 684b ldr r3, [r1, #4] 80116e4: 1aea subs r2, r5, r3 80116e6: 2a00 cmp r2, #0 80116e8: db0e blt.n 8011708 return; } /* Timeout has expired */ next_timeout = tmptimeout->next; 80116ea: 6808 ldr r0, [r1, #0] 80116ec: 4a07 ldr r2, [pc, #28] @ (801170c ) 80116ee: 6010 str r0, [r2, #0] handler = tmptimeout->h; 80116f0: 688c ldr r4, [r1, #8] arg = tmptimeout->arg; 80116f2: 68ce ldr r6, [r1, #12] current_timeout_due_time = tmptimeout->time; 80116f4: 4a06 ldr r2, [pc, #24] @ (8011710 ) 80116f6: 6013 str r3, [r2, #0] if (handler != NULL) { LWIP_DEBUGF(TIMERS_DEBUG, ("sct calling h=%s t=%"U32_F" arg=%p\n", tmptimeout->handler_name, sys_now() - tmptimeout->time, arg)); } #endif /* LWIP_DEBUG_TIMERNAMES */ memp_free(MEMP_SYS_TIMEOUT, tmptimeout); 80116f8: 200a movs r0, #10 80116fa: f7f9 ffb9 bl 800b670 if (handler != NULL) { 80116fe: 2c00 cmp r4, #0 8011700: d0ec beq.n 80116dc handler(arg); 8011702: 4630 mov r0, r6 8011704: 47a0 blx r4 8011706: e7e9 b.n 80116dc } LWIP_TCPIP_THREAD_ALIVE(); /* Repeat until all expired timers have been called */ } while (1); } 8011708: bd70 pop {r4, r5, r6, pc} 801170a: bf00 nop 801170c: 24019c3c .word 0x24019c3c 8011710: 24019c38 .word 0x24019c38 08011714 : /** Return the time left before the next timeout is due. If no timeouts are * enqueued, returns 0xffffffff */ u32_t sys_timeouts_sleeptime(void) { 8011714: b510 push {r4, lr} u32_t now; LWIP_ASSERT_CORE_LOCKED(); 8011716: f7f2 f9f9 bl 8003b0c if (next_timeout == NULL) { 801171a: 4b0d ldr r3, [pc, #52] @ (8011750 ) 801171c: 681b ldr r3, [r3, #0] 801171e: b183 cbz r3, 8011742 return SYS_TIMEOUTS_SLEEPTIME_INFINITE; } now = sys_now(); 8011720: f7f1 ffa6 bl 8003670 if (TIME_LESS_THAN(next_timeout->time, now)) { 8011724: 4b0a ldr r3, [pc, #40] @ (8011750 ) 8011726: 681b ldr r3, [r3, #0] 8011728: 685c ldr r4, [r3, #4] 801172a: 1a24 subs r4, r4, r0 801172c: d40c bmi.n 8011748 return 0; } else { u32_t ret = (u32_t)(next_timeout->time - now); LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT); 801172e: 2c00 cmp r4, #0 8011730: da0b bge.n 801174a 8011732: 4b08 ldr r3, [pc, #32] @ (8011754 ) 8011734: f44f 72dc mov.w r2, #440 @ 0x1b8 8011738: 4907 ldr r1, [pc, #28] @ (8011758 ) 801173a: 4808 ldr r0, [pc, #32] @ (801175c ) 801173c: f001 fe64 bl 8013408 return ret; 8011740: e003 b.n 801174a return SYS_TIMEOUTS_SLEEPTIME_INFINITE; 8011742: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 8011746: e000 b.n 801174a return 0; 8011748: 2400 movs r4, #0 } } 801174a: 4620 mov r0, r4 801174c: bd10 pop {r4, pc} 801174e: bf00 nop 8011750: 24019c3c .word 0x24019c3c 8011754: 08017a48 .word 0x08017a48 8011758: 08017b24 .word 0x08017b24 801175c: 080144e8 .word 0x080144e8 08011760 : * @return a new (free) local UDP port number */ static u16_t udp_new_port(void) { u16_t n = 0; 8011760: 2000 movs r0, #0 struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8011762: 4a10 ldr r2, [pc, #64] @ (80117a4 ) 8011764: 8813 ldrh r3, [r2, #0] 8011766: 1c59 adds r1, r3, #1 8011768: 8011 strh r1, [r2, #0] 801176a: f64f 72ff movw r2, #65535 @ 0xffff 801176e: 4293 cmp r3, r2 8011770: d009 beq.n 8011786 udp_port = UDP_LOCAL_PORT_RANGE_START; } /* Check all PCBs. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8011772: 4b0d ldr r3, [pc, #52] @ (80117a8 ) 8011774: 681b ldr r3, [r3, #0] 8011776: b193 cbz r3, 801179e if (pcb->local_port == udp_port) { 8011778: 8a59 ldrh r1, [r3, #18] 801177a: 4a0a ldr r2, [pc, #40] @ (80117a4 ) 801177c: 8812 ldrh r2, [r2, #0] 801177e: 4291 cmp r1, r2 8011780: d006 beq.n 8011790 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8011782: 68db ldr r3, [r3, #12] 8011784: e7f7 b.n 8011776 udp_port = UDP_LOCAL_PORT_RANGE_START; 8011786: 4b07 ldr r3, [pc, #28] @ (80117a4 ) 8011788: f44f 4240 mov.w r2, #49152 @ 0xc000 801178c: 801a strh r2, [r3, #0] 801178e: e7f0 b.n 8011772 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8011790: 3001 adds r0, #1 8011792: b280 uxth r0, r0 8011794: f5b0 4f80 cmp.w r0, #16384 @ 0x4000 8011798: d3e3 bcc.n 8011762 return 0; 801179a: 2000 movs r0, #0 } goto again; } } return udp_port; } 801179c: 4770 bx lr return udp_port; 801179e: 4b01 ldr r3, [pc, #4] @ (80117a4 ) 80117a0: 8818 ldrh r0, [r3, #0] 80117a2: 4770 bx lr 80117a4: 2400002e .word 0x2400002e 80117a8: 24019c40 .word 0x24019c40 080117ac : * @param broadcast 1 if his is an IPv4 broadcast (global or subnet-only), 0 otherwise (only used for IPv4) * @return 1 on match, 0 otherwise */ static u8_t udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast) { 80117ac: b5f8 push {r3, r4, r5, r6, r7, lr} 80117ae: 460e mov r6, r1 80117b0: 4615 mov r5, r2 LWIP_UNUSED_ARG(inp); /* in IPv6 only case */ LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL); 80117b2: 4607 mov r7, r0 80117b4: b1c8 cbz r0, 80117ea LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL); 80117b6: b1fe cbz r6, 80117f8 /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 80117b8: 7a3c ldrb r4, [r7, #8] 80117ba: b13c cbz r4, 80117cc (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 80117bc: 4b1e ldr r3, [pc, #120] @ (8011838 ) 80117be: 685b ldr r3, [r3, #4] 80117c0: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80117c4: 3301 adds r3, #1 80117c6: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 80117c8: 429c cmp r4, r3 80117ca: d125 bne.n 8011818 /* Only need to check PCB if incoming IP version matches PCB IP version */ if (IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ip_current_dest_addr())) { #if LWIP_IPV4 /* Special case: IPv4 broadcast: all or broadcasts in my subnet * Note: broadcast variable can only be 1 if it is an IPv4 broadcast */ if (broadcast != 0) { 80117cc: b1dd cbz r5, 8011806 #if IP_SOF_BROADCAST_RECV if (ip_get_option(pcb, SOF_BROADCAST)) #endif /* IP_SOF_BROADCAST_RECV */ { if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 80117ce: b32f cbz r7, 801181c 80117d0: 683b ldr r3, [r7, #0] 80117d2: b32b cbz r3, 8011820 ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 80117d4: 4a18 ldr r2, [pc, #96] @ (8011838 ) 80117d6: 6952 ldr r2, [r2, #20] if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 80117d8: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 80117dc: d022 beq.n 8011824 ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { 80117de: 68b1 ldr r1, [r6, #8] 80117e0: 4053 eors r3, r2 ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 80117e2: 420b tst r3, r1 80117e4: d020 beq.n 8011828 if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { return 1; } } return 0; 80117e6: 2000 movs r0, #0 80117e8: e017 b.n 801181a LWIP_ASSERT("udp_input_local_match: invalid pcb", pcb != NULL); 80117ea: 4b14 ldr r3, [pc, #80] @ (801183c ) 80117ec: 2287 movs r2, #135 @ 0x87 80117ee: 4914 ldr r1, [pc, #80] @ (8011840 ) 80117f0: 4814 ldr r0, [pc, #80] @ (8011844 ) 80117f2: f001 fe09 bl 8013408 80117f6: e7de b.n 80117b6 LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL); 80117f8: 4b10 ldr r3, [pc, #64] @ (801183c ) 80117fa: 2288 movs r2, #136 @ 0x88 80117fc: 4912 ldr r1, [pc, #72] @ (8011848 ) 80117fe: 4811 ldr r0, [pc, #68] @ (8011844 ) 8011800: f001 fe02 bl 8013408 8011804: e7d8 b.n 80117b8 if (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 8011806: b18f cbz r7, 801182c 8011808: 683b ldr r3, [r7, #0] 801180a: b18b cbz r3, 8011830 801180c: 4a0a ldr r2, [pc, #40] @ (8011838 ) 801180e: 6952 ldr r2, [r2, #20] 8011810: 4293 cmp r3, r2 8011812: d00f beq.n 8011834 return 0; 8011814: 4628 mov r0, r5 8011816: e000 b.n 801181a return 0; 8011818: 2000 movs r0, #0 } 801181a: bdf8 pop {r3, r4, r5, r6, r7, pc} return 1; 801181c: 2001 movs r0, #1 801181e: e7fc b.n 801181a 8011820: 2001 movs r0, #1 8011822: e7fa b.n 801181a 8011824: 2001 movs r0, #1 8011826: e7f8 b.n 801181a 8011828: 2001 movs r0, #1 801182a: e7f6 b.n 801181a return 1; 801182c: 2001 movs r0, #1 801182e: e7f4 b.n 801181a 8011830: 2001 movs r0, #1 8011832: e7f2 b.n 801181a 8011834: 2001 movs r0, #1 8011836: e7f0 b.n 801181a 8011838: 2401301c .word 0x2401301c 801183c: 08017b60 .word 0x08017b60 8011840: 08017bc0 .word 0x08017bc0 8011844: 080144e8 .word 0x080144e8 8011848: 08017be4 .word 0x08017be4 0801184c : { 801184c: b508 push {r3, lr} udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 801184e: f001 fc2f bl 80130b0 8011852: 4b02 ldr r3, [pc, #8] @ (801185c ) 8011854: 4303 orrs r3, r0 8011856: 4a02 ldr r2, [pc, #8] @ (8011860 ) 8011858: 8013 strh r3, [r2, #0] } 801185a: bd08 pop {r3, pc} 801185c: ffffc000 .word 0xffffc000 8011860: 2400002e .word 0x2400002e 08011864 : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8011864: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8011868: b083 sub sp, #12 801186a: 4680 mov r8, r0 801186c: 460f mov r7, r1 u8_t broadcast; u8_t for_us = 0; LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); 801186e: f7f2 f94d bl 8003b0c LWIP_ASSERT("udp_input: invalid pbuf", p != NULL); 8011872: f1b8 0f00 cmp.w r8, #0 8011876: d01a beq.n 80118ae LWIP_ASSERT("udp_input: invalid netif", inp != NULL); 8011878: b307 cbz r7, 80118bc PERF_START; UDP_STATS_INC(udp.recv); /* Check minimum length (UDP header) */ if (p->len < UDP_HLEN) { 801187a: f8b8 300a ldrh.w r3, [r8, #10] 801187e: 2b07 cmp r3, #7 8011880: d923 bls.n 80118ca MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); goto end; } udphdr = (struct udp_hdr *)p->payload; 8011882: f8d8 4004 ldr.w r4, [r8, #4] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); 8011886: 4b53 ldr r3, [pc, #332] @ (80119d4 ) 8011888: 6819 ldr r1, [r3, #0] 801188a: 6958 ldr r0, [r3, #20] 801188c: f7f8 fde1 bl 800a452 8011890: 4681 mov r9, r0 LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len)); /* convert src and dest ports to host byte order */ src = lwip_ntohs(udphdr->src); 8011892: 8820 ldrh r0, [r4, #0] 8011894: f7f6 faf2 bl 8007e7c 8011898: 4682 mov sl, r0 dest = lwip_ntohs(udphdr->dest); 801189a: 8860 ldrh r0, [r4, #2] 801189c: f7f6 faee bl 8007e7c 80118a0: 4605 mov r5, r0 uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 80118a2: 4b4d ldr r3, [pc, #308] @ (80119d8 ) 80118a4: 681c ldr r4, [r3, #0] uncon_pcb = NULL; 80118a6: f04f 0b00 mov.w fp, #0 prev = NULL; 80118aa: 465e mov r6, fp for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 80118ac: e019 b.n 80118e2 LWIP_ASSERT("udp_input: invalid pbuf", p != NULL); 80118ae: 4b4b ldr r3, [pc, #300] @ (80119dc ) 80118b0: 22cf movs r2, #207 @ 0xcf 80118b2: 494b ldr r1, [pc, #300] @ (80119e0 ) 80118b4: 484b ldr r0, [pc, #300] @ (80119e4 ) 80118b6: f001 fda7 bl 8013408 80118ba: e7dd b.n 8011878 LWIP_ASSERT("udp_input: invalid netif", inp != NULL); 80118bc: 4b47 ldr r3, [pc, #284] @ (80119dc ) 80118be: 22d0 movs r2, #208 @ 0xd0 80118c0: 4949 ldr r1, [pc, #292] @ (80119e8 ) 80118c2: 4848 ldr r0, [pc, #288] @ (80119e4 ) 80118c4: f001 fda0 bl 8013408 80118c8: e7d7 b.n 801187a pbuf_free(p); 80118ca: 4640 mov r0, r8 80118cc: f7fa fa68 bl 800bda0 UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); PERF_STOP("udp_input"); #endif /* CHECKSUM_CHECK_UDP */ } 80118d0: b003 add sp, #12 80118d2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} uncon_pcb = pcb; 80118d6: 46a3 mov fp, r4 if ((pcb->remote_port == src) && 80118d8: 8aa3 ldrh r3, [r4, #20] 80118da: 459a cmp sl, r3 80118dc: d026 beq.n 801192c prev = pcb; 80118de: 4626 mov r6, r4 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 80118e0: 68e4 ldr r4, [r4, #12] 80118e2: 2c00 cmp r4, #0 80118e4: d030 beq.n 8011948 if ((pcb->local_port == dest) && 80118e6: 8a63 ldrh r3, [r4, #18] 80118e8: 429d cmp r5, r3 80118ea: d1f8 bne.n 80118de (udp_input_local_match(pcb, inp, broadcast) != 0)) { 80118ec: 464a mov r2, r9 80118ee: 4639 mov r1, r7 80118f0: 4620 mov r0, r4 80118f2: f7ff ff5b bl 80117ac if ((pcb->local_port == dest) && 80118f6: 2800 cmp r0, #0 80118f8: d0f1 beq.n 80118de if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) { 80118fa: 7c23 ldrb r3, [r4, #16] 80118fc: f013 0f04 tst.w r3, #4 8011900: d1ea bne.n 80118d8 if (uncon_pcb == NULL) { 8011902: f1bb 0f00 cmp.w fp, #0 8011906: d0e6 beq.n 80118d6 } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) { 8011908: f1b9 0f00 cmp.w r9, #0 801190c: d0e4 beq.n 80118d8 801190e: 4b31 ldr r3, [pc, #196] @ (80119d4 ) 8011910: 695b ldr r3, [r3, #20] 8011912: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011916: d1df bne.n 80118d8 if (!IP_IS_V4_VAL(uncon_pcb->local_ip) || !ip4_addr_cmp(ip_2_ip4(&uncon_pcb->local_ip), netif_ip4_addr(inp))) { 8011918: f8db 2000 ldr.w r2, [fp] 801191c: 687b ldr r3, [r7, #4] 801191e: 429a cmp r2, r3 8011920: d0da beq.n 80118d8 if (IP_IS_V4_VAL(pcb->local_ip) && ip4_addr_cmp(ip_2_ip4(&pcb->local_ip), netif_ip4_addr(inp))) { 8011922: 6822 ldr r2, [r4, #0] 8011924: 4293 cmp r3, r2 8011926: d1d7 bne.n 80118d8 uncon_pcb = pcb; 8011928: 46a3 mov fp, r4 801192a: e7d5 b.n 80118d8 (ip_addr_isany_val(pcb->remote_ip) || 801192c: 6863 ldr r3, [r4, #4] if ((pcb->remote_port == src) && 801192e: b11b cbz r3, 8011938 ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { 8011930: 4a28 ldr r2, [pc, #160] @ (80119d4 ) 8011932: 6912 ldr r2, [r2, #16] (ip_addr_isany_val(pcb->remote_ip) || 8011934: 4293 cmp r3, r2 8011936: d1d2 bne.n 80118de if (prev != NULL) { 8011938: b136 cbz r6, 8011948 prev->next = pcb->next; 801193a: 68e3 ldr r3, [r4, #12] 801193c: 60f3 str r3, [r6, #12] pcb->next = udp_pcbs; 801193e: 4b26 ldr r3, [pc, #152] @ (80119d8 ) 8011940: 681a ldr r2, [r3, #0] 8011942: 60e2 str r2, [r4, #12] udp_pcbs = pcb; 8011944: 601c str r4, [r3, #0] if (pcb == NULL) { 8011946: e011 b.n 801196c 8011948: b17c cbz r4, 801196a if (pbuf_remove_header(p, UDP_HLEN)) { 801194a: 2108 movs r1, #8 801194c: 4640 mov r0, r8 801194e: f7fa f9e1 bl 800bd14 8011952: b9b0 cbnz r0, 8011982 if (pcb != NULL) { 8011954: b324 cbz r4, 80119a0 if (pcb->recv != NULL) { 8011956: 69a5 ldr r5, [r4, #24] 8011958: b1f5 cbz r5, 8011998 pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 801195a: 69e0 ldr r0, [r4, #28] 801195c: f8cd a000 str.w sl, [sp] 8011960: 4b22 ldr r3, [pc, #136] @ (80119ec ) 8011962: 4642 mov r2, r8 8011964: 4621 mov r1, r4 8011966: 47a8 blx r5 8011968: e7b2 b.n 80118d0 801196a: 465c mov r4, fp if (pcb != NULL) { 801196c: 2c00 cmp r4, #0 801196e: d1ec bne.n 801194a for_us = ip4_addr_cmp(netif_ip4_addr(inp), ip4_current_dest_addr()); 8011970: 687a ldr r2, [r7, #4] 8011972: 4b18 ldr r3, [pc, #96] @ (80119d4 ) 8011974: 695b ldr r3, [r3, #20] if (for_us) { 8011976: 429a cmp r2, r3 8011978: d0e7 beq.n 801194a pbuf_free(p); 801197a: 4640 mov r0, r8 801197c: f7fa fa10 bl 800bda0 return; 8011980: e7a6 b.n 80118d0 LWIP_ASSERT("pbuf_remove_header failed\n", 0); 8011982: 4b16 ldr r3, [pc, #88] @ (80119dc ) 8011984: f44f 72b8 mov.w r2, #368 @ 0x170 8011988: 4919 ldr r1, [pc, #100] @ (80119f0 ) 801198a: 4816 ldr r0, [pc, #88] @ (80119e4 ) 801198c: f001 fd3c bl 8013408 pbuf_free(p); 8011990: 4640 mov r0, r8 8011992: f7fa fa05 bl 800bda0 goto end; 8011996: e79b b.n 80118d0 pbuf_free(p); 8011998: 4640 mov r0, r8 801199a: f7fa fa01 bl 800bda0 goto end; 801199e: e797 b.n 80118d0 if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { 80119a0: f1b9 0f00 cmp.w r9, #0 80119a4: d105 bne.n 80119b2 80119a6: 4b0b ldr r3, [pc, #44] @ (80119d4 ) 80119a8: 695b ldr r3, [r3, #20] 80119aa: f003 03f0 and.w r3, r3, #240 @ 0xf0 80119ae: 2be0 cmp r3, #224 @ 0xe0 80119b0: d103 bne.n 80119ba pbuf_free(p); 80119b2: 4640 mov r0, r8 80119b4: f7fa f9f4 bl 800bda0 80119b8: e78a b.n 80118d0 pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); 80119ba: 4b06 ldr r3, [pc, #24] @ (80119d4 ) 80119bc: 8999 ldrh r1, [r3, #12] 80119be: 3108 adds r1, #8 80119c0: b209 sxth r1, r1 80119c2: 4640 mov r0, r8 80119c4: f7fa f9e6 bl 800bd94 icmp_port_unreach(ip_current_is_v6(), p); 80119c8: 2103 movs r1, #3 80119ca: 4640 mov r0, r8 80119cc: f7f8 fb06 bl 8009fdc 80119d0: e7ef b.n 80119b2 80119d2: bf00 nop 80119d4: 2401301c .word 0x2401301c 80119d8: 24019c40 .word 0x24019c40 80119dc: 08017b60 .word 0x08017b60 80119e0: 08017c0c .word 0x08017c0c 80119e4: 080144e8 .word 0x080144e8 80119e8: 08017c24 .word 0x08017c24 80119ec: 2401302c .word 0x2401302c 80119f0: 08017c40 .word 0x08017c40 080119f4 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 80119f4: b5f8 push {r3, r4, r5, r6, r7, lr} 80119f6: 4605 mov r5, r0 80119f8: 460f mov r7, r1 80119fa: 4616 mov r6, r2 u8_t rebind; #if LWIP_IPV6 && LWIP_IPV6_SCOPES ip_addr_t zoned_ipaddr; #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ LWIP_ASSERT_CORE_LOCKED(); 80119fc: f7f2 f886 bl 8003b0c #if LWIP_IPV4 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 8011a00: b127 cbz r7, 8011a0c } #else /* LWIP_IPV4 */ LWIP_ERROR("udp_bind: invalid ipaddr", ipaddr != NULL, return ERR_ARG); #endif /* LWIP_IPV4 */ LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG); 8011a02: b12d cbz r5, 8011a10 ip_addr_debug_print(UDP_DEBUG | LWIP_DBG_TRACE, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8011a04: 4b23 ldr r3, [pc, #140] @ (8011a94 ) 8011a06: 681b ldr r3, [r3, #0] 8011a08: 461c mov r4, r3 8011a0a: e00c b.n 8011a26 ipaddr = IP4_ADDR_ANY; 8011a0c: 4f22 ldr r7, [pc, #136] @ (8011a98 ) 8011a0e: e7f8 b.n 8011a02 LWIP_ERROR("udp_bind: invalid pcb", pcb != NULL, return ERR_ARG); 8011a10: 4b22 ldr r3, [pc, #136] @ (8011a9c ) 8011a12: f240 32b7 movw r2, #951 @ 0x3b7 8011a16: 4922 ldr r1, [pc, #136] @ (8011aa0 ) 8011a18: 4822 ldr r0, [pc, #136] @ (8011aa4 ) 8011a1a: f001 fcf5 bl 8013408 8011a1e: f06f 000f mvn.w r0, #15 8011a22: e013 b.n 8011a4c for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8011a24: 68e4 ldr r4, [r4, #12] 8011a26: b114 cbz r4, 8011a2e /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 8011a28: 42ac cmp r4, r5 8011a2a: d1fb bne.n 8011a24 rebind = 1; 8011a2c: 2401 movs r4, #1 ipaddr = &zoned_ipaddr; } #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ /* no port specified? */ if (port == 0) { 8011a2e: b97e cbnz r6, 8011a50 port = udp_new_port(); 8011a30: f7ff fe96 bl 8011760 if (port == 0) { 8011a34: 4606 mov r6, r0 8011a36: b1f8 cbz r0, 8011a78 } } } } ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); 8011a38: b1e7 cbz r7, 8011a74 8011a3a: 683b ldr r3, [r7, #0] 8011a3c: 602b str r3, [r5, #0] pcb->local_port = port; 8011a3e: 826e strh r6, [r5, #18] mib2_udp_bind(pcb); /* pcb not active yet? */ if (rebind == 0) { 8011a40: bb34 cbnz r4, 8011a90 /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 8011a42: 4b14 ldr r3, [pc, #80] @ (8011a94 ) 8011a44: 681a ldr r2, [r3, #0] 8011a46: 60ea str r2, [r5, #12] udp_pcbs = pcb; 8011a48: 601d str r5, [r3, #0] } LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to ")); ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, pcb->local_ip); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->local_port)); return ERR_OK; 8011a4a: 2000 movs r0, #0 } 8011a4c: bdf8 pop {r3, r4, r5, r6, r7, pc} for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8011a4e: 68db ldr r3, [r3, #12] 8011a50: 2b00 cmp r3, #0 8011a52: d0f1 beq.n 8011a38 if (pcb != ipcb) { 8011a54: 42ab cmp r3, r5 8011a56: d0fa beq.n 8011a4e if ((ipcb->local_port == port) && 8011a58: 8a58 ldrh r0, [r3, #18] 8011a5a: 4286 cmp r6, r0 8011a5c: d1f7 bne.n 8011a4e (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 8011a5e: 6818 ldr r0, [r3, #0] 8011a60: 683a ldr r2, [r7, #0] if ((ipcb->local_port == port) && 8011a62: 4290 cmp r0, r2 8011a64: d00b beq.n 8011a7e (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 8011a66: b16a cbz r2, 8011a84 8011a68: b17b cbz r3, 8011a8a ip_addr_isany(&ipcb->local_ip))) { 8011a6a: 2800 cmp r0, #0 8011a6c: d1ef bne.n 8011a4e return ERR_USE; 8011a6e: f06f 0007 mvn.w r0, #7 8011a72: e7eb b.n 8011a4c ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); 8011a74: 2300 movs r3, #0 8011a76: e7e1 b.n 8011a3c return ERR_USE; 8011a78: f06f 0007 mvn.w r0, #7 8011a7c: e7e6 b.n 8011a4c return ERR_USE; 8011a7e: f06f 0007 mvn.w r0, #7 8011a82: e7e3 b.n 8011a4c 8011a84: f06f 0007 mvn.w r0, #7 8011a88: e7e0 b.n 8011a4c 8011a8a: f06f 0007 mvn.w r0, #7 8011a8e: e7dd b.n 8011a4c return ERR_OK; 8011a90: 2000 movs r0, #0 8011a92: e7db b.n 8011a4c 8011a94: 24019c40 .word 0x24019c40 8011a98: 080156d8 .word 0x080156d8 8011a9c: 08017b60 .word 0x08017b60 8011aa0: 08017c5c .word 0x08017c5c 8011aa4: 080144e8 .word 0x080144e8 08011aa8 : { 8011aa8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8011aac: b085 sub sp, #20 8011aae: 4604 mov r4, r0 8011ab0: 460d mov r5, r1 8011ab2: 4690 mov r8, r2 8011ab4: 4699 mov r9, r3 8011ab6: f8dd b038 ldr.w fp, [sp, #56] @ 0x38 8011aba: f8dd a03c ldr.w sl, [sp, #60] @ 0x3c LWIP_ASSERT_CORE_LOCKED(); 8011abe: f7f2 f825 bl 8003b0c LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG); 8011ac2: 2c00 cmp r4, #0 8011ac4: d043 beq.n 8011b4e LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG); 8011ac6: 2d00 cmp r5, #0 8011ac8: d04b beq.n 8011b62 LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8011aca: f1b8 0f00 cmp.w r8, #0 8011ace: d052 beq.n 8011b76 LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG); 8011ad0: f1ba 0f00 cmp.w sl, #0 8011ad4: d059 beq.n 8011b8a LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG); 8011ad6: f1bb 0f00 cmp.w fp, #0 8011ada: d060 beq.n 8011b9e if (pcb->local_port == 0) { 8011adc: 8a62 ldrh r2, [r4, #18] 8011ade: 2a00 cmp r2, #0 8011ae0: d067 beq.n 8011bb2 if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) { 8011ae2: 892a ldrh r2, [r5, #8] 8011ae4: f64f 73f7 movw r3, #65527 @ 0xfff7 8011ae8: 429a cmp r2, r3 8011aea: f200 8081 bhi.w 8011bf0 if (pbuf_add_header(p, UDP_HLEN)) { 8011aee: 2108 movs r1, #8 8011af0: 4628 mov r0, r5 8011af2: f7fa f90a bl 800bd0a 8011af6: 2800 cmp r0, #0 8011af8: d163 bne.n 8011bc2 q = p; 8011afa: 462e mov r6, r5 LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", 8011afc: 8973 ldrh r3, [r6, #10] 8011afe: 2b07 cmp r3, #7 8011b00: d96e bls.n 8011be0 udphdr = (struct udp_hdr *)q->payload; 8011b02: 6877 ldr r7, [r6, #4] udphdr->src = lwip_htons(pcb->local_port); 8011b04: 8a60 ldrh r0, [r4, #18] 8011b06: f7f6 f9b9 bl 8007e7c 8011b0a: 8038 strh r0, [r7, #0] udphdr->dest = lwip_htons(dst_port); 8011b0c: 4648 mov r0, r9 8011b0e: f7f6 f9b5 bl 8007e7c 8011b12: 8078 strh r0, [r7, #2] udphdr->chksum = 0x0000; 8011b14: 2300 movs r3, #0 8011b16: 71bb strb r3, [r7, #6] 8011b18: 71fb strb r3, [r7, #7] udphdr->len = lwip_htons(q->tot_len); 8011b1a: 8930 ldrh r0, [r6, #8] 8011b1c: f7f6 f9ae bl 8007e7c 8011b20: 80b8 strh r0, [r7, #4] err = ip_output_if_src(q, src_ip, dst_ip, ttl, pcb->tos, ip_proto, netif); 8011b22: f8cd b008 str.w fp, [sp, #8] 8011b26: 2311 movs r3, #17 8011b28: 9301 str r3, [sp, #4] 8011b2a: 7aa3 ldrb r3, [r4, #10] 8011b2c: 9300 str r3, [sp, #0] 8011b2e: 7ae3 ldrb r3, [r4, #11] 8011b30: 4642 mov r2, r8 8011b32: 4651 mov r1, sl 8011b34: 4630 mov r0, r6 8011b36: f7f8 fbf5 bl 800a324 8011b3a: 4607 mov r7, r0 if (q != p) { 8011b3c: 42ae cmp r6, r5 8011b3e: d002 beq.n 8011b46 pbuf_free(q); 8011b40: 4630 mov r0, r6 8011b42: f7fa f92d bl 800bda0 } 8011b46: 4638 mov r0, r7 8011b48: b005 add sp, #20 8011b4a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG); 8011b4e: 4b2b ldr r3, [pc, #172] @ (8011bfc ) 8011b50: f240 22d1 movw r2, #721 @ 0x2d1 8011b54: 492a ldr r1, [pc, #168] @ (8011c00 ) 8011b56: 482b ldr r0, [pc, #172] @ (8011c04 ) 8011b58: f001 fc56 bl 8013408 8011b5c: f06f 070f mvn.w r7, #15 8011b60: e7f1 b.n 8011b46 LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG); 8011b62: 4b26 ldr r3, [pc, #152] @ (8011bfc ) 8011b64: f240 22d2 movw r2, #722 @ 0x2d2 8011b68: 4927 ldr r1, [pc, #156] @ (8011c08 ) 8011b6a: 4826 ldr r0, [pc, #152] @ (8011c04 ) 8011b6c: f001 fc4c bl 8013408 8011b70: f06f 070f mvn.w r7, #15 8011b74: e7e7 b.n 8011b46 LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8011b76: 4b21 ldr r3, [pc, #132] @ (8011bfc ) 8011b78: f240 22d3 movw r2, #723 @ 0x2d3 8011b7c: 4923 ldr r1, [pc, #140] @ (8011c0c ) 8011b7e: 4821 ldr r0, [pc, #132] @ (8011c04 ) 8011b80: f001 fc42 bl 8013408 8011b84: f06f 070f mvn.w r7, #15 8011b88: e7dd b.n 8011b46 LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG); 8011b8a: 4b1c ldr r3, [pc, #112] @ (8011bfc ) 8011b8c: f44f 7235 mov.w r2, #724 @ 0x2d4 8011b90: 491f ldr r1, [pc, #124] @ (8011c10 ) 8011b92: 481c ldr r0, [pc, #112] @ (8011c04 ) 8011b94: f001 fc38 bl 8013408 8011b98: f06f 070f mvn.w r7, #15 8011b9c: e7d3 b.n 8011b46 LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG); 8011b9e: 4b17 ldr r3, [pc, #92] @ (8011bfc ) 8011ba0: f240 22d5 movw r2, #725 @ 0x2d5 8011ba4: 491b ldr r1, [pc, #108] @ (8011c14 ) 8011ba6: 4817 ldr r0, [pc, #92] @ (8011c04 ) 8011ba8: f001 fc2e bl 8013408 8011bac: f06f 070f mvn.w r7, #15 8011bb0: e7c9 b.n 8011b46 err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 8011bb2: 4621 mov r1, r4 8011bb4: 4620 mov r0, r4 8011bb6: f7ff ff1d bl 80119f4 if (err != ERR_OK) { 8011bba: 4607 mov r7, r0 8011bbc: 2800 cmp r0, #0 8011bbe: d090 beq.n 8011ae2 8011bc0: e7c1 b.n 8011b46 q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); 8011bc2: f44f 7220 mov.w r2, #640 @ 0x280 8011bc6: 2108 movs r1, #8 8011bc8: 2022 movs r0, #34 @ 0x22 8011bca: f7fa f951 bl 800be70 if (q == NULL) { 8011bce: 4606 mov r6, r0 8011bd0: b188 cbz r0, 8011bf6 if (p->tot_len != 0) { 8011bd2: 892b ldrh r3, [r5, #8] 8011bd4: 2b00 cmp r3, #0 8011bd6: d091 beq.n 8011afc pbuf_chain(q, p); 8011bd8: 4629 mov r1, r5 8011bda: f7fa fac7 bl 800c16c 8011bde: e78d b.n 8011afc LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", 8011be0: 4b06 ldr r3, [pc, #24] @ (8011bfc ) 8011be2: f240 320d movw r2, #781 @ 0x30d 8011be6: 490c ldr r1, [pc, #48] @ (8011c18 ) 8011be8: 4806 ldr r0, [pc, #24] @ (8011c04 ) 8011bea: f001 fc0d bl 8013408 8011bee: e788 b.n 8011b02 return ERR_MEM; 8011bf0: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 8011bf4: e7a7 b.n 8011b46 return ERR_MEM; 8011bf6: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 8011bfa: e7a4 b.n 8011b46 8011bfc: 08017b60 .word 0x08017b60 8011c00: 08017c74 .word 0x08017c74 8011c04: 080144e8 .word 0x080144e8 8011c08: 08017c94 .word 0x08017c94 8011c0c: 08017cb4 .word 0x08017cb4 8011c10: 08017cd8 .word 0x08017cd8 8011c14: 08017cfc .word 0x08017cfc 8011c18: 08017d20 .word 0x08017d20 08011c1c : { 8011c1c: b5f0 push {r4, r5, r6, r7, lr} 8011c1e: b083 sub sp, #12 8011c20: 9d08 ldr r5, [sp, #32] LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG); 8011c22: b190 cbz r0, 8011c4a 8011c24: 4604 mov r4, r0 LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG); 8011c26: b1d1 cbz r1, 8011c5e LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8011c28: b31a cbz r2, 8011c72 LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG); 8011c2a: b365 cbz r5, 8011c86 if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 8011c2c: 2800 cmp r0, #0 8011c2e: d034 beq.n 8011c9a 8011c30: 6806 ldr r6, [r0, #0] 8011c32: b396 cbz r6, 8011c9a ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { 8011c34: f006 0cf0 and.w ip, r6, #240 @ 0xf0 if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 8011c38: f1bc 0fe0 cmp.w ip, #224 @ 0xe0 8011c3c: d02d beq.n 8011c9a if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) { 8011c3e: 686f ldr r7, [r5, #4] 8011c40: 42be cmp r6, r7 8011c42: d02b beq.n 8011c9c return ERR_RTE; 8011c44: f06f 0003 mvn.w r0, #3 8011c48: e02d b.n 8011ca6 LWIP_ERROR("udp_sendto_if: invalid pcb", pcb != NULL, return ERR_ARG); 8011c4a: 4b18 ldr r3, [pc, #96] @ (8011cac ) 8011c4c: f44f 7220 mov.w r2, #640 @ 0x280 8011c50: 4917 ldr r1, [pc, #92] @ (8011cb0 ) 8011c52: 4818 ldr r0, [pc, #96] @ (8011cb4 ) 8011c54: f001 fbd8 bl 8013408 8011c58: f06f 000f mvn.w r0, #15 8011c5c: e023 b.n 8011ca6 LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG); 8011c5e: 4b13 ldr r3, [pc, #76] @ (8011cac ) 8011c60: f240 2281 movw r2, #641 @ 0x281 8011c64: 4914 ldr r1, [pc, #80] @ (8011cb8 ) 8011c66: 4813 ldr r0, [pc, #76] @ (8011cb4 ) 8011c68: f001 fbce bl 8013408 8011c6c: f06f 000f mvn.w r0, #15 8011c70: e019 b.n 8011ca6 LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8011c72: 4b0e ldr r3, [pc, #56] @ (8011cac ) 8011c74: f240 2282 movw r2, #642 @ 0x282 8011c78: 4910 ldr r1, [pc, #64] @ (8011cbc ) 8011c7a: 480e ldr r0, [pc, #56] @ (8011cb4 ) 8011c7c: f001 fbc4 bl 8013408 8011c80: f06f 000f mvn.w r0, #15 8011c84: e00f b.n 8011ca6 LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG); 8011c86: 4b09 ldr r3, [pc, #36] @ (8011cac ) 8011c88: f240 2283 movw r2, #643 @ 0x283 8011c8c: 490c ldr r1, [pc, #48] @ (8011cc0 ) 8011c8e: 4809 ldr r0, [pc, #36] @ (8011cb4 ) 8011c90: f001 fbba bl 8013408 8011c94: f06f 000f mvn.w r0, #15 8011c98: e005 b.n 8011ca6 src_ip = netif_ip_addr4(netif); 8011c9a: 1d28 adds r0, r5, #4 return udp_sendto_if_src(pcb, p, dst_ip, dst_port, netif, src_ip); 8011c9c: 9001 str r0, [sp, #4] 8011c9e: 9500 str r5, [sp, #0] 8011ca0: 4620 mov r0, r4 8011ca2: f7ff ff01 bl 8011aa8 } 8011ca6: b003 add sp, #12 8011ca8: bdf0 pop {r4, r5, r6, r7, pc} 8011caa: bf00 nop 8011cac: 08017b60 .word 0x08017b60 8011cb0: 08017d50 .word 0x08017d50 8011cb4: 080144e8 .word 0x080144e8 8011cb8: 08017d6c .word 0x08017d6c 8011cbc: 08017d88 .word 0x08017d88 8011cc0: 08017da8 .word 0x08017da8 08011cc4 : { 8011cc4: b5f0 push {r4, r5, r6, r7, lr} 8011cc6: b083 sub sp, #12 LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG); 8011cc8: b198 cbz r0, 8011cf2 8011cca: 460d mov r5, r1 8011ccc: 4614 mov r4, r2 8011cce: 461e mov r6, r3 8011cd0: 4607 mov r7, r0 LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG); 8011cd2: b1c1 cbz r1, 8011d06 LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8011cd4: b30a cbz r2, 8011d1a if (pcb->netif_idx != NETIF_NO_INDEX) { 8011cd6: 7a00 ldrb r0, [r0, #8] 8011cd8: b348 cbz r0, 8011d2e netif = netif_get_by_index(pcb->netif_idx); 8011cda: f7f9 ff31 bl 800bb40 if (netif == NULL) { 8011cde: b350 cbz r0, 8011d36 return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); 8011ce0: 9000 str r0, [sp, #0] 8011ce2: 4633 mov r3, r6 8011ce4: 4622 mov r2, r4 8011ce6: 4629 mov r1, r5 8011ce8: 4638 mov r0, r7 8011cea: f7ff ff97 bl 8011c1c } 8011cee: b003 add sp, #12 8011cf0: bdf0 pop {r4, r5, r6, r7, pc} LWIP_ERROR("udp_sendto: invalid pcb", pcb != NULL, return ERR_ARG); 8011cf2: 4b12 ldr r3, [pc, #72] @ (8011d3c ) 8011cf4: f44f 7206 mov.w r2, #536 @ 0x218 8011cf8: 4911 ldr r1, [pc, #68] @ (8011d40 ) 8011cfa: 4812 ldr r0, [pc, #72] @ (8011d44 ) 8011cfc: f001 fb84 bl 8013408 8011d00: f06f 000f mvn.w r0, #15 8011d04: e7f3 b.n 8011cee LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG); 8011d06: 4b0d ldr r3, [pc, #52] @ (8011d3c ) 8011d08: f240 2219 movw r2, #537 @ 0x219 8011d0c: 490e ldr r1, [pc, #56] @ (8011d48 ) 8011d0e: 480d ldr r0, [pc, #52] @ (8011d44 ) 8011d10: f001 fb7a bl 8013408 8011d14: f06f 000f mvn.w r0, #15 8011d18: e7e9 b.n 8011cee LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8011d1a: 4b08 ldr r3, [pc, #32] @ (8011d3c ) 8011d1c: f240 221a movw r2, #538 @ 0x21a 8011d20: 490a ldr r1, [pc, #40] @ (8011d4c ) 8011d22: 4808 ldr r0, [pc, #32] @ (8011d44 ) 8011d24: f001 fb70 bl 8013408 8011d28: f06f 000f mvn.w r0, #15 8011d2c: e7df b.n 8011cee netif = ip_route(&pcb->local_ip, dst_ip); 8011d2e: 4610 mov r0, r2 8011d30: f7f8 f9e6 bl 800a100 8011d34: e7d3 b.n 8011cde return ERR_RTE; 8011d36: f06f 0003 mvn.w r0, #3 8011d3a: e7d8 b.n 8011cee 8011d3c: 08017b60 .word 0x08017b60 8011d40: 08017dc8 .word 0x08017dc8 8011d44: 080144e8 .word 0x080144e8 8011d48: 08017de0 .word 0x08017de0 8011d4c: 08017dfc .word 0x08017dfc 08011d50 : { 8011d50: b508 push {r3, lr} LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG); 8011d52: b128 cbz r0, 8011d60 LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG); 8011d54: b171 cbz r1, 8011d74 return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port); 8011d56: 8a83 ldrh r3, [r0, #20] 8011d58: 1d02 adds r2, r0, #4 8011d5a: f7ff ffb3 bl 8011cc4 } 8011d5e: bd08 pop {r3, pc} LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG); 8011d60: 4b09 ldr r3, [pc, #36] @ (8011d88 ) 8011d62: f240 12d5 movw r2, #469 @ 0x1d5 8011d66: 4909 ldr r1, [pc, #36] @ (8011d8c ) 8011d68: 4809 ldr r0, [pc, #36] @ (8011d90 ) 8011d6a: f001 fb4d bl 8013408 8011d6e: f06f 000f mvn.w r0, #15 8011d72: e7f4 b.n 8011d5e LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG); 8011d74: 4b04 ldr r3, [pc, #16] @ (8011d88 ) 8011d76: f44f 72eb mov.w r2, #470 @ 0x1d6 8011d7a: 4906 ldr r1, [pc, #24] @ (8011d94 ) 8011d7c: 4804 ldr r0, [pc, #16] @ (8011d90 ) 8011d7e: f001 fb43 bl 8013408 8011d82: f06f 000f mvn.w r0, #15 8011d86: e7ea b.n 8011d5e 8011d88: 08017b60 .word 0x08017b60 8011d8c: 08017e18 .word 0x08017e18 8011d90: 080144e8 .word 0x080144e8 8011d94: 08017e30 .word 0x08017e30 08011d98 : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 8011d98: b570 push {r4, r5, r6, lr} 8011d9a: 4604 mov r4, r0 8011d9c: 460d mov r5, r1 8011d9e: 4616 mov r6, r2 struct udp_pcb *ipcb; LWIP_ASSERT_CORE_LOCKED(); 8011da0: f7f1 feb4 bl 8003b0c LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 8011da4: b18c cbz r4, 8011dca LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 8011da6: b1d5 cbz r5, 8011dde if (pcb->local_port == 0) { 8011da8: 8a62 ldrh r2, [r4, #18] 8011daa: b312 cbz r2, 8011df2 if (err != ERR_OK) { return err; } } ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); 8011dac: 682b ldr r3, [r5, #0] 8011dae: 6063 str r3, [r4, #4] ip6_addr_lacks_zone(ip_2_ip6(&pcb->remote_ip), IP6_UNKNOWN)) { ip6_addr_select_zone(ip_2_ip6(&pcb->remote_ip), ip_2_ip6(&pcb->local_ip)); } #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ pcb->remote_port = port; 8011db0: 82a6 strh r6, [r4, #20] pcb->flags |= UDP_FLAGS_CONNECTED; 8011db2: 7c23 ldrb r3, [r4, #16] 8011db4: f043 0304 orr.w r3, r3, #4 8011db8: 7423 strb r3, [r4, #16] ip_addr_debug_print_val(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, pcb->remote_ip); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, (", port %"U16_F")\n", pcb->remote_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8011dba: 4b15 ldr r3, [pc, #84] @ (8011e10 ) 8011dbc: 681a ldr r2, [r3, #0] 8011dbe: 4613 mov r3, r2 8011dc0: b1f3 cbz r3, 8011e00 if (pcb == ipcb) { 8011dc2: 429c cmp r4, r3 8011dc4: d021 beq.n 8011e0a for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8011dc6: 68db ldr r3, [r3, #12] 8011dc8: e7fa b.n 8011dc0 LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 8011dca: 4b12 ldr r3, [pc, #72] @ (8011e14 ) 8011dcc: f240 4235 movw r2, #1077 @ 0x435 8011dd0: 4911 ldr r1, [pc, #68] @ (8011e18 ) 8011dd2: 4812 ldr r0, [pc, #72] @ (8011e1c ) 8011dd4: f001 fb18 bl 8013408 8011dd8: f06f 000f mvn.w r0, #15 8011ddc: e014 b.n 8011e08 LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 8011dde: 4b0d ldr r3, [pc, #52] @ (8011e14 ) 8011de0: f240 4236 movw r2, #1078 @ 0x436 8011de4: 490e ldr r1, [pc, #56] @ (8011e20 ) 8011de6: 480d ldr r0, [pc, #52] @ (8011e1c ) 8011de8: f001 fb0e bl 8013408 8011dec: f06f 000f mvn.w r0, #15 8011df0: e00a b.n 8011e08 err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 8011df2: 4621 mov r1, r4 8011df4: 4620 mov r0, r4 8011df6: f7ff fdfd bl 80119f4 if (err != ERR_OK) { 8011dfa: 2800 cmp r0, #0 8011dfc: d0d6 beq.n 8011dac 8011dfe: e003 b.n 8011e08 /* already on the list, just return */ return ERR_OK; } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 8011e00: 60e2 str r2, [r4, #12] udp_pcbs = pcb; 8011e02: 4b03 ldr r3, [pc, #12] @ (8011e10 ) 8011e04: 601c str r4, [r3, #0] return ERR_OK; 8011e06: 2000 movs r0, #0 } 8011e08: bd70 pop {r4, r5, r6, pc} return ERR_OK; 8011e0a: 2000 movs r0, #0 8011e0c: e7fc b.n 8011e08 8011e0e: bf00 nop 8011e10: 24019c40 .word 0x24019c40 8011e14: 08017b60 .word 0x08017b60 8011e18: 08017e48 .word 0x08017e48 8011e1c: 080144e8 .word 0x080144e8 8011e20: 08017e64 .word 0x08017e64 08011e24 : * * @param pcb the udp pcb to disconnect. */ void udp_disconnect(struct udp_pcb *pcb) { 8011e24: b510 push {r4, lr} 8011e26: 4604 mov r4, r0 LWIP_ASSERT_CORE_LOCKED(); 8011e28: f7f1 fe70 bl 8003b0c LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return); 8011e2c: b144 cbz r4, 8011e40 #if LWIP_IPV4 && LWIP_IPV6 if (IP_IS_ANY_TYPE_VAL(pcb->local_ip)) { ip_addr_copy(pcb->remote_ip, *IP_ANY_TYPE); } else { #endif ip_addr_set_any(IP_IS_V6_VAL(pcb->remote_ip), &pcb->remote_ip); 8011e2e: 2300 movs r3, #0 8011e30: 6063 str r3, [r4, #4] #if LWIP_IPV4 && LWIP_IPV6 } #endif pcb->remote_port = 0; 8011e32: 82a3 strh r3, [r4, #20] pcb->netif_idx = NETIF_NO_INDEX; 8011e34: 7223 strb r3, [r4, #8] /* mark PCB as unconnected */ udp_clear_flags(pcb, UDP_FLAGS_CONNECTED); 8011e36: 7c23 ldrb r3, [r4, #16] 8011e38: f003 03fb and.w r3, r3, #251 @ 0xfb 8011e3c: 7423 strb r3, [r4, #16] } 8011e3e: bd10 pop {r4, pc} LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return); 8011e40: 4b03 ldr r3, [pc, #12] @ (8011e50 ) 8011e42: f240 426a movw r2, #1130 @ 0x46a 8011e46: 4903 ldr r1, [pc, #12] @ (8011e54 ) 8011e48: 4803 ldr r0, [pc, #12] @ (8011e58 ) 8011e4a: f001 fadd bl 8013408 8011e4e: e7f6 b.n 8011e3e 8011e50: 08017b60 .word 0x08017b60 8011e54: 08017e80 .word 0x08017e80 8011e58: 080144e8 .word 0x080144e8 08011e5c : * @param recv function pointer of the callback function * @param recv_arg additional argument to pass to the callback function */ void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { 8011e5c: b570 push {r4, r5, r6, lr} 8011e5e: 4604 mov r4, r0 8011e60: 460e mov r6, r1 8011e62: 4615 mov r5, r2 LWIP_ASSERT_CORE_LOCKED(); 8011e64: f7f1 fe52 bl 8003b0c LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return); 8011e68: b114 cbz r4, 8011e70 /* remember recv() callback and user data */ pcb->recv = recv; 8011e6a: 61a6 str r6, [r4, #24] pcb->recv_arg = recv_arg; 8011e6c: 61e5 str r5, [r4, #28] } 8011e6e: bd70 pop {r4, r5, r6, pc} LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return); 8011e70: 4b03 ldr r3, [pc, #12] @ (8011e80 ) 8011e72: f240 428a movw r2, #1162 @ 0x48a 8011e76: 4903 ldr r1, [pc, #12] @ (8011e84 ) 8011e78: 4803 ldr r0, [pc, #12] @ (8011e88 ) 8011e7a: f001 fac5 bl 8013408 8011e7e: e7f6 b.n 8011e6e 8011e80: 08017b60 .word 0x08017b60 8011e84: 08017e9c .word 0x08017e9c 8011e88: 080144e8 .word 0x080144e8 08011e8c : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 8011e8c: b510 push {r4, lr} 8011e8e: 4604 mov r4, r0 struct udp_pcb *pcb2; LWIP_ASSERT_CORE_LOCKED(); 8011e90: f7f1 fe3c bl 8003b0c LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return); 8011e94: b154 cbz r4, 8011eac mib2_udp_unbind(pcb); /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 8011e96: 4b10 ldr r3, [pc, #64] @ (8011ed8 ) 8011e98: 681a ldr r2, [r3, #0] 8011e9a: 42a2 cmp r2, r4 8011e9c: d112 bne.n 8011ec4 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 8011e9e: 68d2 ldr r2, [r2, #12] 8011ea0: 601a str r2, [r3, #0] pcb2->next = pcb->next; break; } } } memp_free(MEMP_UDP_PCB, pcb); 8011ea2: 4621 mov r1, r4 8011ea4: 2000 movs r0, #0 8011ea6: f7f9 fbe3 bl 800b670 } 8011eaa: bd10 pop {r4, pc} LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return); 8011eac: 4b0b ldr r3, [pc, #44] @ (8011edc ) 8011eae: f240 42a1 movw r2, #1185 @ 0x4a1 8011eb2: 490b ldr r1, [pc, #44] @ (8011ee0 ) 8011eb4: 480b ldr r0, [pc, #44] @ (8011ee4 ) 8011eb6: f001 faa7 bl 8013408 8011eba: e7f6 b.n 8011eaa pcb2->next = pcb->next; 8011ebc: 68e3 ldr r3, [r4, #12] 8011ebe: 60d3 str r3, [r2, #12] break; 8011ec0: e7ef b.n 8011ea2 8011ec2: 461a mov r2, r3 for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 8011ec4: 2a00 cmp r2, #0 8011ec6: d0ec beq.n 8011ea2 if (pcb2->next != NULL && pcb2->next == pcb) { 8011ec8: 68d3 ldr r3, [r2, #12] 8011eca: 2b00 cmp r3, #0 8011ecc: d0f9 beq.n 8011ec2 8011ece: 42a3 cmp r3, r4 8011ed0: d0f4 beq.n 8011ebc 8011ed2: 461a mov r2, r3 8011ed4: e7f6 b.n 8011ec4 8011ed6: bf00 nop 8011ed8: 24019c40 .word 0x24019c40 8011edc: 08017b60 .word 0x08017b60 8011ee0: 08017eb4 .word 0x08017eb4 8011ee4: 080144e8 .word 0x080144e8 08011ee8 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8011ee8: b510 push {r4, lr} struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 8011eea: f7f1 fe0f bl 8003b0c pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 8011eee: 2000 movs r0, #0 8011ef0: f7f9 fb88 bl 800b604 /* could allocate UDP PCB? */ if (pcb != NULL) { 8011ef4: 4604 mov r4, r0 8011ef6: b128 cbz r0, 8011f04 /* UDP Lite: by initializing to all zeroes, chksum_len is set to 0 * which means checksum is generated over the whole datagram per default * (recommended as default by RFC 3828). */ /* initialize PCB to all zeroes */ memset(pcb, 0, sizeof(struct udp_pcb)); 8011ef8: 2220 movs r2, #32 8011efa: 2100 movs r1, #0 8011efc: f001 fbdc bl 80136b8 pcb->ttl = UDP_TTL; 8011f00: 23ff movs r3, #255 @ 0xff 8011f02: 72e3 strb r3, [r4, #11] #if LWIP_MULTICAST_TX_OPTIONS udp_set_multicast_ttl(pcb, UDP_TTL); #endif /* LWIP_MULTICAST_TX_OPTIONS */ } return pcb; } 8011f04: 4620 mov r0, r4 8011f06: bd10 pop {r4, pc} 08011f08 : * * @see udp_remove() */ struct udp_pcb * udp_new_ip_type(u8_t type) { 8011f08: b508 push {r3, lr} struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 8011f0a: f7f1 fdff bl 8003b0c pcb = udp_new(); 8011f0e: f7ff ffeb bl 8011ee8 } #else LWIP_UNUSED_ARG(type); #endif /* LWIP_IPV4 && LWIP_IPV6 */ return pcb; } 8011f12: bd08 pop {r3, pc} 08011f14 : */ void udp_netif_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { struct udp_pcb *upcb; if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { 8011f14: b1b8 cbz r0, 8011f46 8011f16: 4602 mov r2, r0 8011f18: 6803 ldr r3, [r0, #0] 8011f1a: b1a3 cbz r3, 8011f46 8011f1c: b199 cbz r1, 8011f46 8011f1e: 680b ldr r3, [r1, #0] 8011f20: b18b cbz r3, 8011f46 for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 8011f22: 4b09 ldr r3, [pc, #36] @ (8011f48 ) 8011f24: 681b ldr r3, [r3, #0] 8011f26: b16b cbz r3, 8011f44 { 8011f28: b410 push {r4} 8011f2a: e001 b.n 8011f30 for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 8011f2c: 68db ldr r3, [r3, #12] 8011f2e: b133 cbz r3, 8011f3e /* PCB bound to current local interface address? */ if (ip_addr_cmp(&upcb->local_ip, old_addr)) { 8011f30: 6810 ldr r0, [r2, #0] 8011f32: 681c ldr r4, [r3, #0] 8011f34: 4284 cmp r4, r0 8011f36: d1f9 bne.n 8011f2c /* The PCB is bound to the old ipaddr and * is set to bound to the new one instead */ ip_addr_copy(upcb->local_ip, *new_addr); 8011f38: 6808 ldr r0, [r1, #0] 8011f3a: 6018 str r0, [r3, #0] 8011f3c: e7f6 b.n 8011f2c } } } } 8011f3e: f85d 4b04 ldr.w r4, [sp], #4 8011f42: 4770 bx lr 8011f44: 4770 bx lr 8011f46: 4770 bx lr 8011f48: 24019c40 .word 0x24019c40 08011f4c : #include "cmsis_os.h" osMutexId_t mqttMutex; static void NewMessageData(MessageData* md, MQTTString* aTopicName, MQTTMessage* aMessage) { md->topicName = aTopicName; 8011f4c: 6041 str r1, [r0, #4] md->message = aMessage; 8011f4e: 6002 str r2, [r0, #0] } 8011f50: 4770 bx lr 08011f52 : static int getNextPacketId(MQTTClient *c) { 8011f52: 4602 mov r2, r0 return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1; 8011f54: 6800 ldr r0, [r0, #0] 8011f56: f64f 71ff movw r1, #65535 @ 0xffff 8011f5a: 4288 cmp r0, r1 8011f5c: d002 beq.n 8011f64 8011f5e: 3001 adds r0, #1 8011f60: 6010 str r0, [r2, #0] } 8011f62: 4770 bx lr return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1; 8011f64: 2001 movs r0, #1 8011f66: e7fb b.n 8011f60 08011f68 : } } static int decodePacket(MQTTClient* c, int* value, int timeout) { 8011f68: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8011f6c: b083 sub sp, #12 8011f6e: 4681 mov r9, r0 8011f70: 460e mov r6, r1 8011f72: 4690 mov r8, r2 unsigned char i; int multiplier = 1; int len = 0; const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4; *value = 0; 8011f74: 2400 movs r4, #0 8011f76: 600c str r4, [r1, #0] int multiplier = 1; 8011f78: 2701 movs r7, #1 do { int rc = MQTTPACKET_READ_ERROR; if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 8011f7a: 3401 adds r4, #1 8011f7c: 2c04 cmp r4, #4 8011f7e: dc15 bgt.n 8011fac { rc = MQTTPACKET_READ_ERROR; /* bad data */ goto exit; } rc = c->ipstack->mqttread(c->ipstack, &i, 1, timeout); 8011f80: f8d9 0054 ldr.w r0, [r9, #84] @ 0x54 8011f84: 6845 ldr r5, [r0, #4] 8011f86: 4643 mov r3, r8 8011f88: 2201 movs r2, #1 8011f8a: f10d 0107 add.w r1, sp, #7 8011f8e: 47a8 blx r5 if (rc != 1) 8011f90: 2801 cmp r0, #1 8011f92: d10b bne.n 8011fac goto exit; *value += (i & 127) * multiplier; 8011f94: f89d 3007 ldrb.w r3, [sp, #7] 8011f98: f003 027f and.w r2, r3, #127 @ 0x7f 8011f9c: 6831 ldr r1, [r6, #0] 8011f9e: fb07 1202 mla r2, r7, r2, r1 8011fa2: 6032 str r2, [r6, #0] multiplier *= 128; 8011fa4: 01ff lsls r7, r7, #7 } while ((i & 128) != 0); 8011fa6: f013 0f80 tst.w r3, #128 @ 0x80 8011faa: d1e6 bne.n 8011f7a exit: return len; } 8011fac: 4620 mov r0, r4 8011fae: b003 add sp, #12 8011fb0: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 08011fb4 : // # can only be at end // + and # can only be next to separator static char isTopicMatched(char* topicFilter, MQTTString* topicName) { char* curf = topicFilter; char* curn = topicName->lenstring.data; 8011fb4: 688b ldr r3, [r1, #8] char* curn_end = curn + topicName->lenstring.len; 8011fb6: 6849 ldr r1, [r1, #4] 8011fb8: 4419 add r1, r3 while (*curf && curn < curn_end) 8011fba: e008 b.n 8011fce { if (*curn == '/' && *curf != '/') 8011fbc: 2a2f cmp r2, #47 @ 0x2f 8011fbe: d00f beq.n 8011fe0 8011fc0: e014 b.n 8011fec break; if (*curf != '+' && *curf != '#' && *curf != *curn) break; if (*curf == '+') 8011fc2: 2a2b cmp r2, #43 @ 0x2b 8011fc4: d016 beq.n 8011ff4 { // skip until we meet the next separator, or end of string char* nextpos = curn + 1; while (nextpos < curn_end && *nextpos != '/') nextpos = ++curn + 1; } else if (*curf == '#') 8011fc6: 2a23 cmp r2, #35 @ 0x23 8011fc8: d01e beq.n 8012008 curn = curn_end - 1; // skip until end of string curf++; 8011fca: 3001 adds r0, #1 curn++; 8011fcc: 3301 adds r3, #1 while (*curf && curn < curn_end) 8011fce: 7802 ldrb r2, [r0, #0] 8011fd0: b162 cbz r2, 8011fec 8011fd2: 428b cmp r3, r1 8011fd4: d20a bcs.n 8011fec if (*curn == '/' && *curf != '/') 8011fd6: f893 c000 ldrb.w ip, [r3] 8011fda: f1bc 0f2f cmp.w ip, #47 @ 0x2f 8011fde: d0ed beq.n 8011fbc if (*curf != '+' && *curf != '#' && *curf != *curn) 8011fe0: 2a2b cmp r2, #43 @ 0x2b 8011fe2: bf18 it ne 8011fe4: 2a23 cmpne r2, #35 @ 0x23 8011fe6: d0ec beq.n 8011fc2 8011fe8: 4594 cmp ip, r2 8011fea: d0ea beq.n 8011fc2 }; return (curn == curn_end) && (*curf == '\0'); 8011fec: 428b cmp r3, r1 8011fee: d00d beq.n 801200c 8011ff0: 2000 movs r0, #0 8011ff2: 4770 bx lr char* nextpos = curn + 1; 8011ff4: 1c5a adds r2, r3, #1 while (nextpos < curn_end && *nextpos != '/') 8011ff6: e001 b.n 8011ffc nextpos = ++curn + 1; 8011ff8: 1c9a adds r2, r3, #2 8011ffa: 3301 adds r3, #1 while (nextpos < curn_end && *nextpos != '/') 8011ffc: 428a cmp r2, r1 8011ffe: d2e4 bcs.n 8011fca 8012000: 7812 ldrb r2, [r2, #0] 8012002: 2a2f cmp r2, #47 @ 0x2f 8012004: d1f8 bne.n 8011ff8 8012006: e7e0 b.n 8011fca curn = curn_end - 1; // skip until end of string 8012008: 1e4b subs r3, r1, #1 801200a: e7de b.n 8011fca return (curn == curn_end) && (*curf == '\0'); 801200c: b10a cbz r2, 8012012 801200e: 2000 movs r0, #0 8012010: 4770 bx lr 8012012: 2001 movs r0, #1 } 8012014: 4770 bx lr 08012016 : { 8012016: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 801201a: 4606 mov r6, r0 801201c: 460f mov r7, r1 801201e: 4690 mov r8, r2 sent = 0; 8012020: 2400 movs r4, #0 while (sent < length && !TimerIsExpired(timer)) 8012022: e000 b.n 8012026 sent += rc; 8012024: 4404 add r4, r0 while (sent < length && !TimerIsExpired(timer)) 8012026: 42bc cmp r4, r7 8012028: da13 bge.n 8012052 801202a: 4640 mov r0, r8 801202c: f000 fc0a bl 8012844 8012030: b978 cbnz r0, 8012052 rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, TimerLeftMS(timer)); 8012032: f8d6 9054 ldr.w r9, [r6, #84] @ 0x54 8012036: f8d9 a008 ldr.w sl, [r9, #8] 801203a: 6935 ldr r5, [r6, #16] 801203c: 4425 add r5, r4 801203e: 4640 mov r0, r8 8012040: f000 fc1a bl 8012878 8012044: 4603 mov r3, r0 8012046: 463a mov r2, r7 8012048: 4629 mov r1, r5 801204a: 4648 mov r0, r9 801204c: 47d0 blx sl if (rc < 0) // there was an error writing the data 801204e: 2800 cmp r0, #0 8012050: dae8 bge.n 8012024 if (sent == length) 8012052: 42bc cmp r4, r7 8012054: d107 bne.n 8012066 TimerCountdown(&c->last_sent, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully sent the packet 8012056: 69b1 ldr r1, [r6, #24] 8012058: f106 0058 add.w r0, r6, #88 @ 0x58 801205c: f000 fc02 bl 8012864 rc = MQTT_SUCCESS; 8012060: 2000 movs r0, #0 } 8012062: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} rc = FAILURE; 8012066: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff return rc; 801206a: e7fa b.n 8012062 0801206c : { 801206c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8012070: b083 sub sp, #12 8012072: 4604 mov r4, r0 8012074: 460e mov r6, r1 MQTTHeader header = {0}; 8012076: 2300 movs r3, #0 int rem_len = 0; 8012078: 9301 str r3, [sp, #4] int rc = c->ipstack->mqttread(c->ipstack, c->readbuf, 1, TimerLeftMS(timer)); 801207a: 6d45 ldr r5, [r0, #84] @ 0x54 801207c: 686f ldr r7, [r5, #4] 801207e: f8d0 8014 ldr.w r8, [r0, #20] 8012082: 4608 mov r0, r1 8012084: f000 fbf8 bl 8012878 8012088: 4603 mov r3, r0 801208a: 2201 movs r2, #1 801208c: 4641 mov r1, r8 801208e: 4628 mov r0, r5 8012090: 47b8 blx r7 8012092: 4605 mov r5, r0 if (rc != 1) 8012094: 2801 cmp r0, #1 8012096: d003 beq.n 80120a0 } 8012098: 4628 mov r0, r5 801209a: b003 add sp, #12 801209c: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} decodePacket(c, &rem_len, TimerLeftMS(timer)); 80120a0: 4630 mov r0, r6 80120a2: f000 fbe9 bl 8012878 80120a6: 4602 mov r2, r0 80120a8: a901 add r1, sp, #4 80120aa: 4620 mov r0, r4 80120ac: f7ff ff5c bl 8011f68 len += MQTTPacket_encode(c->readbuf + 1, rem_len); /* put the original remaining length back into the buffer */ 80120b0: 6960 ldr r0, [r4, #20] 80120b2: 9901 ldr r1, [sp, #4] 80120b4: 3001 adds r0, #1 80120b6: f000 fdd7 bl 8012c68 80120ba: 3001 adds r0, #1 if (rem_len > (c->readbuf_size - len)) 80120bc: 68e3 ldr r3, [r4, #12] 80120be: 1a1b subs r3, r3, r0 80120c0: 9d01 ldr r5, [sp, #4] 80120c2: 42ab cmp r3, r5 80120c4: d31f bcc.n 8012106 if (rem_len > 0 && (rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) { 80120c6: 2d00 cmp r5, #0 80120c8: dc0a bgt.n 80120e0 header.byte = c->readbuf[0]; 80120ca: 6963 ldr r3, [r4, #20] 80120cc: 781d ldrb r5, [r3, #0] rc = header.bits.type; 80120ce: 092d lsrs r5, r5, #4 if (c->keepAliveInterval > 0) 80120d0: 69a1 ldr r1, [r4, #24] 80120d2: 2900 cmp r1, #0 80120d4: d0e0 beq.n 8012098 TimerCountdown(&c->last_received, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully received a packet 80120d6: f104 0060 add.w r0, r4, #96 @ 0x60 80120da: f000 fbc3 bl 8012864 80120de: e7db b.n 8012098 if (rem_len > 0 && (rc = c->ipstack->mqttread(c->ipstack, c->readbuf + len, rem_len, TimerLeftMS(timer)) != rem_len)) { 80120e0: f8d4 8054 ldr.w r8, [r4, #84] @ 0x54 80120e4: f8d8 9004 ldr.w r9, [r8, #4] 80120e8: 6967 ldr r7, [r4, #20] 80120ea: 4407 add r7, r0 80120ec: 4630 mov r0, r6 80120ee: f000 fbc3 bl 8012878 80120f2: 4603 mov r3, r0 80120f4: 462a mov r2, r5 80120f6: 4639 mov r1, r7 80120f8: 4640 mov r0, r8 80120fa: 47c8 blx r9 80120fc: 9b01 ldr r3, [sp, #4] 80120fe: 4298 cmp r0, r3 8012100: d0e3 beq.n 80120ca rc = 0; 8012102: 2500 movs r5, #0 return rc; 8012104: e7c8 b.n 8012098 rc = BUFFER_OVERFLOW; 8012106: f06f 0501 mvn.w r5, #1 801210a: e7c5 b.n 8012098 0801210c : { 801210c: b538 push {r3, r4, r5, lr} 801210e: 4604 mov r4, r0 c->ipstack = network; 8012110: 6541 str r1, [r0, #84] @ 0x54 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8012112: 2100 movs r1, #0 8012114: e004 b.n 8012120 c->messageHandlers[i].topicFilter = 0; 8012116: 1d48 adds r0, r1, #5 8012118: 2500 movs r5, #0 801211a: f844 5030 str.w r5, [r4, r0, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 801211e: 3101 adds r1, #1 8012120: 2904 cmp r1, #4 8012122: ddf8 ble.n 8012116 c->command_timeout_ms = command_timeout_ms; 8012124: 6062 str r2, [r4, #4] c->buf = sendbuf; 8012126: 6123 str r3, [r4, #16] c->buf_size = sendbuf_size; 8012128: 9b04 ldr r3, [sp, #16] 801212a: 60a3 str r3, [r4, #8] c->readbuf = readbuf; 801212c: 9b05 ldr r3, [sp, #20] 801212e: 6163 str r3, [r4, #20] c->readbuf_size = readbuf_size; 8012130: 9b06 ldr r3, [sp, #24] 8012132: 60e3 str r3, [r4, #12] c->isconnected = 0; 8012134: 2300 movs r3, #0 8012136: 6223 str r3, [r4, #32] c->cleansession = 0; 8012138: 6263 str r3, [r4, #36] @ 0x24 c->ping_outstanding = 0; 801213a: 7723 strb r3, [r4, #28] c->defaultMessageHandler = NULL; 801213c: 6523 str r3, [r4, #80] @ 0x50 c->next_packetid = 1; 801213e: 4620 mov r0, r4 8012140: 2301 movs r3, #1 8012142: f840 3b58 str.w r3, [r0], #88 TimerInit(&c->last_sent); 8012146: f000 fba1 bl 801288c TimerInit(&c->last_received); 801214a: f104 0060 add.w r0, r4, #96 @ 0x60 801214e: f000 fb9d bl 801288c if(mqttMutex == NULL) 8012152: 4b05 ldr r3, [pc, #20] @ (8012168 ) 8012154: 681b ldr r3, [r3, #0] 8012156: b103 cbz r3, 801215a } 8012158: bd38 pop {r3, r4, r5, pc} mqttMutex = osMutexNew(NULL); 801215a: 2000 movs r0, #0 801215c: f7f1 feac bl 8003eb8 8012160: 4b01 ldr r3, [pc, #4] @ (8012168 ) 8012162: 6018 str r0, [r3, #0] } 8012164: e7f8 b.n 8012158 8012166: bf00 nop 8012168: 24019c44 .word 0x24019c44 0801216c : int deliverMessage(MQTTClient* c, MQTTString* topicName, MQTTMessage* message) { 801216c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8012170: b082 sub sp, #8 8012172: 4605 mov r5, r0 8012174: 460e mov r6, r1 8012176: 4690 mov r8, r2 int i; int rc = FAILURE; 8012178: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff // we have to find the right message handler - indexed by topic for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 801217c: 2400 movs r4, #0 801217e: e007 b.n 8012190 { if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || isTopicMatched((char*)c->messageHandlers[i].topicFilter, topicName))) 8012180: 1d63 adds r3, r4, #5 8012182: 4631 mov r1, r6 8012184: f855 0033 ldr.w r0, [r5, r3, lsl #3] 8012188: f7ff ff14 bl 8011fb4 if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 801218c: b960 cbnz r0, 80121a8 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 801218e: 3401 adds r4, #1 8012190: 2c04 cmp r4, #4 8012192: dc1c bgt.n 80121ce if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 8012194: 1d63 adds r3, r4, #5 8012196: f855 1033 ldr.w r1, [r5, r3, lsl #3] 801219a: 2900 cmp r1, #0 801219c: d0f7 beq.n 801218e 801219e: 4630 mov r0, r6 80121a0: f000 fe4c bl 8012e3c 80121a4: 2800 cmp r0, #0 80121a6: d0eb beq.n 8012180 { if (c->messageHandlers[i].fp != NULL) 80121a8: 1d63 adds r3, r4, #5 80121aa: eb05 03c3 add.w r3, r5, r3, lsl #3 80121ae: 685b ldr r3, [r3, #4] 80121b0: 2b00 cmp r3, #0 80121b2: d0ec beq.n 801218e { MessageData md; NewMessageData(&md, topicName, message); 80121b4: 4642 mov r2, r8 80121b6: 4631 mov r1, r6 80121b8: 4668 mov r0, sp 80121ba: f7ff fec7 bl 8011f4c c->messageHandlers[i].fp(&md); 80121be: 1d63 adds r3, r4, #5 80121c0: eb05 03c3 add.w r3, r5, r3, lsl #3 80121c4: 685b ldr r3, [r3, #4] 80121c6: 4668 mov r0, sp 80121c8: 4798 blx r3 rc = MQTT_SUCCESS; 80121ca: 2700 movs r7, #0 80121cc: e7df b.n 801218e } } } if (rc == FAILURE && c->defaultMessageHandler != NULL) 80121ce: b91f cbnz r7, 80121d8 c->defaultMessageHandler(&md); rc = MQTT_SUCCESS; } return rc; } 80121d0: 4638 mov r0, r7 80121d2: b002 add sp, #8 80121d4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} if (rc == FAILURE && c->defaultMessageHandler != NULL) 80121d8: 6d2b ldr r3, [r5, #80] @ 0x50 80121da: 2b00 cmp r3, #0 80121dc: d0f8 beq.n 80121d0 NewMessageData(&md, topicName, message); 80121de: 4642 mov r2, r8 80121e0: 4631 mov r1, r6 80121e2: 4668 mov r0, sp 80121e4: f7ff feb2 bl 8011f4c c->defaultMessageHandler(&md); 80121e8: 6d2b ldr r3, [r5, #80] @ 0x50 80121ea: 4668 mov r0, sp 80121ec: 4798 blx r3 rc = MQTT_SUCCESS; 80121ee: 2700 movs r7, #0 return rc; 80121f0: e7ee b.n 80121d0 080121f2 : int keepalive(MQTTClient* c) { int rc = MQTT_SUCCESS; if (c->keepAliveInterval == 0) 80121f2: 6983 ldr r3, [r0, #24] 80121f4: b90b cbnz r3, 80121fa int rc = MQTT_SUCCESS; 80121f6: 2000 movs r0, #0 } } exit: return rc; } 80121f8: 4770 bx lr { 80121fa: b510 push {r4, lr} 80121fc: b082 sub sp, #8 80121fe: 4604 mov r4, r0 if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received)) 8012200: 3058 adds r0, #88 @ 0x58 8012202: f000 fb1f bl 8012844 8012206: b190 cbz r0, 801222e if (c->ping_outstanding) 8012208: 7f23 ldrb r3, [r4, #28] 801220a: bb0b cbnz r3, 8012250 TimerInit(&timer); 801220c: 4668 mov r0, sp 801220e: f000 fb3d bl 801288c TimerCountdownMS(&timer, 1000); 8012212: f44f 717a mov.w r1, #1000 @ 0x3e8 8012216: 4668 mov r0, sp 8012218: f000 fb1c bl 8012854 int len = MQTTSerialize_pingreq(c->buf, c->buf_size); 801221c: 68a1 ldr r1, [r4, #8] 801221e: 6920 ldr r0, [r4, #16] 8012220: f000 fc9a bl 8012b58 if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet 8012224: 1e01 subs r1, r0, #0 8012226: dc0a bgt.n 801223e int rc = MQTT_SUCCESS; 8012228: 2000 movs r0, #0 } 801222a: b002 add sp, #8 801222c: bd10 pop {r4, pc} if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received)) 801222e: f104 0060 add.w r0, r4, #96 @ 0x60 8012232: f000 fb07 bl 8012844 8012236: 2800 cmp r0, #0 8012238: d1e6 bne.n 8012208 int rc = MQTT_SUCCESS; 801223a: 2000 movs r0, #0 801223c: e7f5 b.n 801222a if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet 801223e: 466a mov r2, sp 8012240: 4620 mov r0, r4 8012242: f7ff fee8 bl 8012016 8012246: 2800 cmp r0, #0 8012248: d1ef bne.n 801222a c->ping_outstanding = 1; 801224a: 2301 movs r3, #1 801224c: 7723 strb r3, [r4, #28] 801224e: e7ec b.n 801222a rc = FAILURE; /* PINGRESP not received in keepalive interval */ 8012250: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff return rc; 8012254: e7e9 b.n 801222a 08012256 : void MQTTCleanSession(MQTTClient* c) { int i = 0; for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8012256: 2300 movs r3, #0 8012258: e004 b.n 8012264 c->messageHandlers[i].topicFilter = NULL; 801225a: 1d5a adds r2, r3, #5 801225c: 2100 movs r1, #0 801225e: f840 1032 str.w r1, [r0, r2, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8012262: 3301 adds r3, #1 8012264: 2b04 cmp r3, #4 8012266: ddf8 ble.n 801225a } 8012268: 4770 bx lr 0801226a : void MQTTCloseSession(MQTTClient* c) { 801226a: b508 push {r3, lr} c->ping_outstanding = 0; 801226c: 2300 movs r3, #0 801226e: 7703 strb r3, [r0, #28] c->isconnected = 0; 8012270: 6203 str r3, [r0, #32] if (c->cleansession) 8012272: 6a43 ldr r3, [r0, #36] @ 0x24 8012274: b903 cbnz r3, 8012278 MQTTCleanSession(c); } 8012276: bd08 pop {r3, pc} MQTTCleanSession(c); 8012278: f7ff ffed bl 8012256 } 801227c: e7fb b.n 8012276 0801227e : int cycle(MQTTClient* c, Timer* timer) { 801227e: b570 push {r4, r5, r6, lr} 8012280: b08e sub sp, #56 @ 0x38 8012282: 4606 mov r6, r0 8012284: 460d mov r5, r1 int len = 0, rc = MQTT_SUCCESS; int packet_type = readPacket(c, timer); /* read the socket, see what work is due */ 8012286: f7ff fef1 bl 801206c 801228a: 4604 mov r4, r0 switch (packet_type) 801228c: 280d cmp r0, #13 801228e: dc41 bgt.n 8012314 8012290: 2804 cmp r0, #4 8012292: db0e blt.n 80122b2 8012294: 2301 movs r3, #1 8012296: 4083 lsls r3, r0 8012298: f413 6f29 tst.w r3, #2704 @ 0xa90 801229c: f040 8095 bne.w 80123ca 80122a0: f013 0f60 tst.w r3, #96 @ 0x60 80122a4: d16c bne.n 8012380 80122a6: f413 5f00 tst.w r3, #8192 @ 0x2000 80122aa: d033 beq.n 8012314 } case PUBCOMP: break; case PINGRESP: c->ping_outstanding = 0; 80122ac: 2500 movs r5, #0 80122ae: 7735 strb r5, [r6, #28] break; 80122b0: e03b b.n 801232a switch (packet_type) 80122b2: 2803 cmp r0, #3 80122b4: d12d bne.n 8012312 msg.payloadlen = 0; /* this is a size_t, but deserialize publish sets this as int */ 80122b6: 2300 movs r3, #0 80122b8: 930d str r3, [sp, #52] @ 0x34 (unsigned char**)&msg.payload, (int*)&msg.payloadlen, c->readbuf, c->readbuf_size) != 1) 80122ba: 68f3 ldr r3, [r6, #12] if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName, 80122bc: 9304 str r3, [sp, #16] 80122be: 6973 ldr r3, [r6, #20] 80122c0: 9303 str r3, [sp, #12] 80122c2: ab0d add r3, sp, #52 @ 0x34 80122c4: 9302 str r3, [sp, #8] 80122c6: ab0c add r3, sp, #48 @ 0x30 80122c8: 9301 str r3, [sp, #4] 80122ca: ab07 add r3, sp, #28 80122cc: 9300 str r3, [sp, #0] 80122ce: ab0b add r3, sp, #44 @ 0x2c 80122d0: f10d 0229 add.w r2, sp, #41 @ 0x29 80122d4: a906 add r1, sp, #24 80122d6: f10d 002a add.w r0, sp, #42 @ 0x2a 80122da: f000 fc42 bl 8012b62 80122de: 2801 cmp r0, #1 80122e0: d11b bne.n 801231a msg.qos = (enum QoS)intQoS; 80122e2: f89d 3018 ldrb.w r3, [sp, #24] 80122e6: f88d 3028 strb.w r3, [sp, #40] @ 0x28 deliverMessage(c, &topicName, &msg); 80122ea: aa0a add r2, sp, #40 @ 0x28 80122ec: a907 add r1, sp, #28 80122ee: 4630 mov r0, r6 80122f0: f7ff ff3c bl 801216c if (msg.qos != QOS0) 80122f4: f89d 3028 ldrb.w r3, [sp, #40] @ 0x28 80122f8: 2b00 cmp r3, #0 80122fa: d03f beq.n 801237c if (msg.qos == QOS1) 80122fc: 2b01 cmp r3, #1 80122fe: d01d beq.n 801233c else if (msg.qos == QOS2) 8012300: 2b02 cmp r3, #2 8012302: d02d beq.n 8012360 rc = FAILURE; 8012304: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff if (rc == FAILURE) 8012308: f1b5 3fff cmp.w r5, #4294967295 @ 0xffffffff 801230c: d10d bne.n 801232a goto exit; 801230e: 462c mov r4, r5 8012310: e000 b.n 8012314 switch (packet_type) 8012312: dd05 ble.n 8012320 } exit: if (rc == MQTT_SUCCESS) rc = packet_type; else if (c->isconnected) 8012314: 6a33 ldr r3, [r6, #32] 8012316: 2b00 cmp r3, #0 8012318: d15c bne.n 80123d4 MQTTCloseSession(c); return rc; } 801231a: 4620 mov r0, r4 801231c: b00e add sp, #56 @ 0x38 801231e: bd70 pop {r4, r5, r6, pc} switch (packet_type) 8012320: 2800 cmp r0, #0 8012322: d050 beq.n 80123c6 8012324: 2802 cmp r0, #2 8012326: d1f5 bne.n 8012314 8012328: 2500 movs r5, #0 if (keepalive(c) != MQTT_SUCCESS) { 801232a: 4630 mov r0, r6 801232c: f7ff ff61 bl 80121f2 8012330: 2800 cmp r0, #0 8012332: d14c bne.n 80123ce if (rc == MQTT_SUCCESS) 8012334: 2d00 cmp r5, #0 8012336: d0f0 beq.n 801231a 8012338: 462c mov r4, r5 801233a: e7eb b.n 8012314 len = MQTTSerialize_ack(c->buf, c->buf_size, PUBACK, 0, msg.id); 801233c: f8bd 302c ldrh.w r3, [sp, #44] @ 0x2c 8012340: 9300 str r3, [sp, #0] 8012342: 2300 movs r3, #0 8012344: 2204 movs r2, #4 8012346: 68b1 ldr r1, [r6, #8] 8012348: 6930 ldr r0, [r6, #16] 801234a: f000 fdef bl 8012f2c 801234e: 4601 mov r1, r0 if (len <= 0) 8012350: 2900 cmp r1, #0 8012352: dd10 ble.n 8012376 rc = sendPacket(c, len, timer); 8012354: 462a mov r2, r5 8012356: 4630 mov r0, r6 8012358: f7ff fe5d bl 8012016 801235c: 4605 mov r5, r0 801235e: e7d3 b.n 8012308 len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREC, 0, msg.id); 8012360: f8bd 302c ldrh.w r3, [sp, #44] @ 0x2c 8012364: 9300 str r3, [sp, #0] 8012366: 2300 movs r3, #0 8012368: 2205 movs r2, #5 801236a: 68b1 ldr r1, [r6, #8] 801236c: 6930 ldr r0, [r6, #16] 801236e: f000 fddd bl 8012f2c 8012372: 4601 mov r1, r0 8012374: e7ec b.n 8012350 rc = FAILURE; 8012376: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 801237a: e7c8 b.n 801230e rc = MQTT_SUCCESS; 801237c: 2500 movs r5, #0 break; 801237e: e7d4 b.n 801232a if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 8012380: 68f3 ldr r3, [r6, #12] 8012382: 9300 str r3, [sp, #0] 8012384: 6973 ldr r3, [r6, #20] 8012386: aa0a add r2, sp, #40 @ 0x28 8012388: a906 add r1, sp, #24 801238a: a807 add r0, sp, #28 801238c: f000 fc32 bl 8012bf4 8012390: 2801 cmp r0, #1 8012392: d113 bne.n 80123bc else if ((len = MQTTSerialize_ack(c->buf, c->buf_size, 8012394: 6930 ldr r0, [r6, #16] 8012396: 68b1 ldr r1, [r6, #8] 8012398: 2c05 cmp r4, #5 801239a: d012 beq.n 80123c2 801239c: 2207 movs r2, #7 801239e: f8bd 3028 ldrh.w r3, [sp, #40] @ 0x28 80123a2: 9300 str r3, [sp, #0] 80123a4: 2300 movs r3, #0 80123a6: f000 fdc1 bl 8012f2c 80123aa: 1e01 subs r1, r0, #0 80123ac: dd06 ble.n 80123bc else if ((rc = sendPacket(c, len, timer)) != MQTT_SUCCESS) // send the PUBREL packet 80123ae: 462a mov r2, r5 80123b0: 4630 mov r0, r6 80123b2: f7ff fe30 bl 8012016 80123b6: 4605 mov r5, r0 80123b8: 2800 cmp r0, #0 80123ba: d0b6 beq.n 801232a goto exit; // there was a problem 80123bc: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 80123c0: e7a8 b.n 8012314 else if ((len = MQTTSerialize_ack(c->buf, c->buf_size, 80123c2: 2206 movs r2, #6 80123c4: e7eb b.n 801239e switch (packet_type) 80123c6: 4605 mov r5, r0 80123c8: e7af b.n 801232a 80123ca: 2500 movs r5, #0 80123cc: e7ad b.n 801232a rc = FAILURE; 80123ce: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 80123d2: e79f b.n 8012314 MQTTCloseSession(c); 80123d4: 4630 mov r0, r6 80123d6: f7ff ff48 bl 801226a return rc; 80123da: e79e b.n 801231a 080123dc : int MQTTYield(MQTTClient* c, int timeout_ms) { 80123dc: b530 push {r4, r5, lr} 80123de: b083 sub sp, #12 80123e0: 4604 mov r4, r0 80123e2: 460d mov r5, r1 int rc = MQTT_SUCCESS; Timer timer; TimerInit(&timer); 80123e4: 4668 mov r0, sp 80123e6: f000 fa51 bl 801288c TimerCountdownMS(&timer, timeout_ms); 80123ea: 4629 mov r1, r5 80123ec: 4668 mov r0, sp 80123ee: f000 fa31 bl 8012854 do { if (cycle(c, &timer) < 0) 80123f2: 4669 mov r1, sp 80123f4: 4620 mov r0, r4 80123f6: f7ff ff42 bl 801227e 80123fa: 2800 cmp r0, #0 80123fc: db06 blt.n 801240c { rc = FAILURE; break; } } while (!TimerIsExpired(&timer)); 80123fe: 4668 mov r0, sp 8012400: f000 fa20 bl 8012844 8012404: 2800 cmp r0, #0 8012406: d0f4 beq.n 80123f2 int rc = MQTT_SUCCESS; 8012408: 2000 movs r0, #0 801240a: e001 b.n 8012410 rc = FAILURE; 801240c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff return rc; } 8012410: b003 add sp, #12 8012412: bd30 pop {r4, r5, pc} 08012414 : } #endif int waitfor(MQTTClient* c, int packet_type, Timer* timer) { 8012414: b5f8 push {r3, r4, r5, r6, r7, lr} 8012416: 4607 mov r7, r0 8012418: 460e mov r6, r1 801241a: 4615 mov r5, r2 int rc = FAILURE; 801241c: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff do { if (TimerIsExpired(timer)) 8012420: 4628 mov r0, r5 8012422: f000 fa0f bl 8012844 8012426: b950 cbnz r0, 801243e break; // we timed out rc = cycle(c, timer); 8012428: 4629 mov r1, r5 801242a: 4638 mov r0, r7 801242c: f7ff ff27 bl 801227e 8012430: 4604 mov r4, r0 } while (rc != packet_type && rc >= 0); 8012432: 43c3 mvns r3, r0 8012434: 0fdb lsrs r3, r3, #31 8012436: 42b0 cmp r0, r6 8012438: d001 beq.n 801243e 801243a: 2b00 cmp r3, #0 801243c: d1f0 bne.n 8012420 return rc; } 801243e: 4620 mov r0, r4 8012440: bdf8 pop {r3, r4, r5, r6, r7, pc} ... 08012444 : int MQTTConnectWithResults(MQTTClient* c, MQTTPacket_connectData* options, MQTTConnackData* data) { 8012444: b570 push {r4, r5, r6, lr} 8012446: b098 sub sp, #96 @ 0x60 8012448: 4604 mov r4, r0 801244a: 460d mov r5, r1 801244c: 4616 mov r6, r2 Timer connect_timer; int rc = FAILURE; MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer; 801244e: 2258 movs r2, #88 @ 0x58 8012450: 492c ldr r1, [pc, #176] @ (8012504 ) 8012452: 4668 mov r0, sp 8012454: f001 fa15 bl 8013882 int len = 0; #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif osMutexAcquire(mqttMutex, osWaitForever); 8012458: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 801245c: 4b2a ldr r3, [pc, #168] @ (8012508 ) 801245e: 6818 ldr r0, [r3, #0] 8012460: f7f1 fd78 bl 8003f54 if (c->isconnected) /* don't send connect packet again if we are already connected */ 8012464: 6a23 ldr r3, [r4, #32] 8012466: 2b00 cmp r3, #0 8012468: d140 bne.n 80124ec goto exit; TimerInit(&connect_timer); 801246a: a816 add r0, sp, #88 @ 0x58 801246c: f000 fa0e bl 801288c TimerCountdownMS(&connect_timer, c->command_timeout_ms); 8012470: 6861 ldr r1, [r4, #4] 8012472: a816 add r0, sp, #88 @ 0x58 8012474: f000 f9ee bl 8012854 if (options == 0) 8012478: b1dd cbz r5, 80124b2 options = &default_options; /* set default options if none were supplied */ c->keepAliveInterval = options->keepAliveInterval; 801247a: 8b29 ldrh r1, [r5, #24] 801247c: 61a1 str r1, [r4, #24] c->cleansession = options->cleansession; 801247e: 7eab ldrb r3, [r5, #26] 8012480: 6263 str r3, [r4, #36] @ 0x24 TimerCountdown(&c->last_received, c->keepAliveInterval); 8012482: f104 0060 add.w r0, r4, #96 @ 0x60 8012486: f000 f9ed bl 8012864 if ((len = MQTTSerialize_connect(c->buf, c->buf_size, options)) <= 0) 801248a: 462a mov r2, r5 801248c: 68a1 ldr r1, [r4, #8] 801248e: 6920 ldr r0, [r4, #16] 8012490: f000 fa8c bl 80129ac 8012494: 1e01 subs r1, r0, #0 8012496: dd2c ble.n 80124f2 goto exit; if ((rc = sendPacket(c, len, &connect_timer)) != MQTT_SUCCESS) // send the connect packet 8012498: aa16 add r2, sp, #88 @ 0x58 801249a: 4620 mov r0, r4 801249c: f7ff fdbb bl 8012016 80124a0: 4605 mov r5, r0 80124a2: b140 cbz r0, 80124b6 } #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif osMutexRelease(mqttMutex); 80124a4: 4b18 ldr r3, [pc, #96] @ (8012508 ) 80124a6: 6818 ldr r0, [r3, #0] 80124a8: f7f1 fd83 bl 8003fb2 return rc; } 80124ac: 4628 mov r0, r5 80124ae: b018 add sp, #96 @ 0x60 80124b0: bd70 pop {r4, r5, r6, pc} options = &default_options; /* set default options if none were supplied */ 80124b2: 466d mov r5, sp 80124b4: e7e1 b.n 801247a if (waitfor(c, CONNACK, &connect_timer) == CONNACK) 80124b6: aa16 add r2, sp, #88 @ 0x58 80124b8: 2102 movs r1, #2 80124ba: 4620 mov r0, r4 80124bc: f7ff ffaa bl 8012414 80124c0: 2802 cmp r0, #2 80124c2: d119 bne.n 80124f8 data->rc = 0; 80124c4: 2300 movs r3, #0 80124c6: 7033 strb r3, [r6, #0] data->sessionPresent = 0; 80124c8: 4630 mov r0, r6 80124ca: f800 3f01 strb.w r3, [r0, #1]! if (MQTTDeserialize_connack(&data->sessionPresent, &data->rc, c->readbuf, c->readbuf_size) == 1) 80124ce: 68e3 ldr r3, [r4, #12] 80124d0: 6962 ldr r2, [r4, #20] 80124d2: 4631 mov r1, r6 80124d4: f000 fafc bl 8012ad0 80124d8: 2801 cmp r0, #1 80124da: d110 bne.n 80124fe rc = data->rc; 80124dc: 7835 ldrb r5, [r6, #0] if (rc == MQTT_SUCCESS) 80124de: 2d00 cmp r5, #0 80124e0: d1e0 bne.n 80124a4 c->isconnected = 1; 80124e2: 2301 movs r3, #1 80124e4: 6223 str r3, [r4, #32] c->ping_outstanding = 0; 80124e6: 2300 movs r3, #0 80124e8: 7723 strb r3, [r4, #28] 80124ea: e7db b.n 80124a4 int rc = FAILURE; 80124ec: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 80124f0: e7d8 b.n 80124a4 80124f2: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 80124f6: e7d5 b.n 80124a4 rc = FAILURE; 80124f8: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 80124fc: e7d2 b.n 80124a4 rc = FAILURE; 80124fe: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 8012502: e7cf b.n 80124a4 8012504: 080142d0 .word 0x080142d0 8012508: 24019c44 .word 0x24019c44 0801250c : int MQTTConnect(MQTTClient* c, MQTTPacket_connectData* options) { 801250c: b500 push {lr} 801250e: b083 sub sp, #12 MQTTConnackData data; return MQTTConnectWithResults(c, options, &data); 8012510: aa01 add r2, sp, #4 8012512: f7ff ff97 bl 8012444 } 8012516: b003 add sp, #12 8012518: f85d fb04 ldr.w pc, [sp], #4 0801251c : int MQTTSetMessageHandler(MQTTClient* c, const char* topicFilter, messageHandler messageHandler) { 801251c: b5f8 push {r3, r4, r5, r6, r7, lr} 801251e: 4605 mov r5, r0 8012520: 460f mov r7, r1 8012522: 4616 mov r6, r2 int rc = FAILURE; int i = -1; /* first check for an existing matching slot */ for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8012524: 2400 movs r4, #0 8012526: e000 b.n 801252a 8012528: 3401 adds r4, #1 801252a: 2c04 cmp r4, #4 801252c: dc13 bgt.n 8012556 { if (c->messageHandlers[i].topicFilter != NULL && strcmp(c->messageHandlers[i].topicFilter, topicFilter) == 0) 801252e: 1d63 adds r3, r4, #5 8012530: f855 0033 ldr.w r0, [r5, r3, lsl #3] 8012534: 2800 cmp r0, #0 8012536: d0f7 beq.n 8012528 8012538: 4639 mov r1, r7 801253a: f7ed fed1 bl 80002e0 801253e: 4603 mov r3, r0 8012540: 2800 cmp r0, #0 8012542: d1f1 bne.n 8012528 { if (messageHandler == NULL) /* remove existing */ 8012544: b956 cbnz r6, 801255c { c->messageHandlers[i].topicFilter = NULL; 8012546: 1d62 adds r2, r4, #5 8012548: 2100 movs r1, #0 801254a: f845 1032 str.w r1, [r5, r2, lsl #3] c->messageHandlers[i].fp = NULL; 801254e: eb05 02c2 add.w r2, r5, r2, lsl #3 8012552: 6051 str r1, [r2, #4] } rc = MQTT_SUCCESS; /* return i when adding new subscription */ break; 8012554: e001 b.n 801255a int rc = FAILURE; 8012556: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } } /* if no existing, look for empty slot (unless we are removing) */ if (messageHandler != NULL) { 801255a: b156 cbz r6, 8012572 if (rc == FAILURE) 801255c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012560: d009 beq.n 8012576 rc = MQTT_SUCCESS; break; } } } if (i < MAX_MESSAGE_HANDLERS) 8012562: 2c04 cmp r4, #4 8012564: dc05 bgt.n 8012572 { c->messageHandlers[i].topicFilter = topicFilter; 8012566: 3405 adds r4, #5 8012568: f845 7034 str.w r7, [r5, r4, lsl #3] c->messageHandlers[i].fp = messageHandler; 801256c: eb05 05c4 add.w r5, r5, r4, lsl #3 8012570: 606e str r6, [r5, #4] } } return rc; } 8012572: 4618 mov r0, r3 8012574: bdf8 pop {r3, r4, r5, r6, r7, pc} for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8012576: 2400 movs r4, #0 8012578: 2c04 cmp r4, #4 801257a: dcf2 bgt.n 8012562 if (c->messageHandlers[i].topicFilter == NULL) 801257c: 1d62 adds r2, r4, #5 801257e: f855 2032 ldr.w r2, [r5, r2, lsl #3] 8012582: b10a cbz r2, 8012588 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8012584: 3401 adds r4, #1 8012586: e7f7 b.n 8012578 rc = MQTT_SUCCESS; 8012588: 2300 movs r3, #0 801258a: e7ea b.n 8012562 0801258c : int MQTTSubscribeWithResults(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler, MQTTSubackData* data) { 801258c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8012590: b08e sub sp, #56 @ 0x38 8012592: 4604 mov r4, r0 8012594: 460d mov r5, r1 8012596: 461e mov r6, r3 8012598: f88d 2017 strb.w r2, [sp, #23] int rc = FAILURE; Timer timer; int len = 0; MQTTString topic = MQTTString_initializer; 801259c: 2200 movs r2, #0 801259e: 9209 str r2, [sp, #36] @ 0x24 80125a0: 920a str r2, [sp, #40] @ 0x28 80125a2: 920b str r2, [sp, #44] @ 0x2c topic.cstring = (char *)topicFilter; 80125a4: 9109 str r1, [sp, #36] @ 0x24 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif osMutexAcquire(mqttMutex, osWaitForever); 80125a6: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80125aa: 4b31 ldr r3, [pc, #196] @ (8012670 ) 80125ac: 6818 ldr r0, [r3, #0] 80125ae: f7f1 fcd1 bl 8003f54 if (!c->isconnected) 80125b2: 6a23 ldr r3, [r4, #32] 80125b4: b963 cbnz r3, 80125d0 int rc = FAILURE; 80125b6: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff else rc = FAILURE; exit: if (rc == FAILURE) MQTTCloseSession(c); 80125ba: 4620 mov r0, r4 80125bc: f7ff fe55 bl 801226a #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif osMutexRelease(mqttMutex); 80125c0: 4b2b ldr r3, [pc, #172] @ (8012670 ) 80125c2: 6818 ldr r0, [r3, #0] 80125c4: f7f1 fcf5 bl 8003fb2 return rc; } 80125c8: 4638 mov r0, r7 80125ca: b00e add sp, #56 @ 0x38 80125cc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} TimerInit(&timer); 80125d0: a80c add r0, sp, #48 @ 0x30 80125d2: f000 f95b bl 801288c TimerCountdownMS(&timer, c->command_timeout_ms); 80125d6: 6861 ldr r1, [r4, #4] 80125d8: a80c add r0, sp, #48 @ 0x30 80125da: f000 f93b bl 8012854 len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, (int*)&qos); 80125de: 6927 ldr r7, [r4, #16] 80125e0: f8d4 8008 ldr.w r8, [r4, #8] 80125e4: 4620 mov r0, r4 80125e6: f7ff fcb4 bl 8011f52 80125ea: f10d 0317 add.w r3, sp, #23 80125ee: 9302 str r3, [sp, #8] 80125f0: ab09 add r3, sp, #36 @ 0x24 80125f2: 9301 str r3, [sp, #4] 80125f4: 2301 movs r3, #1 80125f6: 9300 str r3, [sp, #0] 80125f8: b283 uxth r3, r0 80125fa: 2200 movs r2, #0 80125fc: 4641 mov r1, r8 80125fe: 4638 mov r0, r7 8012600: f000 fcd1 bl 8012fa6 if (len <= 0) 8012604: 1e01 subs r1, r0, #0 8012606: dd2f ble.n 8012668 if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 8012608: aa0c add r2, sp, #48 @ 0x30 801260a: 4620 mov r0, r4 801260c: f7ff fd03 bl 8012016 8012610: 4607 mov r7, r0 8012612: b118 cbz r0, 801261c if (rc == FAILURE) 8012614: f1b7 3fff cmp.w r7, #4294967295 @ 0xffffffff 8012618: d1d2 bne.n 80125c0 801261a: e7ce b.n 80125ba if (waitfor(c, SUBACK, &timer) == SUBACK) // wait for suback 801261c: aa0c add r2, sp, #48 @ 0x30 801261e: 2109 movs r1, #9 8012620: 4620 mov r0, r4 8012622: f7ff fef7 bl 8012414 8012626: 2809 cmp r0, #9 8012628: d002 beq.n 8012630 rc = FAILURE; 801262a: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 801262e: e7c4 b.n 80125ba int count = 0; 8012630: 2300 movs r3, #0 8012632: 9308 str r3, [sp, #32] data->grantedQoS = QOS0; 8012634: 9a14 ldr r2, [sp, #80] @ 0x50 8012636: 7013 strb r3, [r2, #0] if (MQTTDeserialize_suback(&mypacketid, 1, &count, (int*)&data->grantedQoS, c->readbuf, c->readbuf_size) == 1) 8012638: 68e3 ldr r3, [r4, #12] 801263a: 9301 str r3, [sp, #4] 801263c: 6963 ldr r3, [r4, #20] 801263e: 9300 str r3, [sp, #0] 8012640: 4613 mov r3, r2 8012642: aa08 add r2, sp, #32 8012644: 2101 movs r1, #1 8012646: f10d 001e add.w r0, sp, #30 801264a: f000 fcf6 bl 801303a 801264e: 2801 cmp r0, #1 8012650: d1e0 bne.n 8012614 if (data->grantedQoS != 0x80) 8012652: 9b14 ldr r3, [sp, #80] @ 0x50 8012654: 781b ldrb r3, [r3, #0] 8012656: 2b80 cmp r3, #128 @ 0x80 8012658: d0dc beq.n 8012614 rc = MQTTSetMessageHandler(c, topicFilter, messageHandler); 801265a: 4632 mov r2, r6 801265c: 4629 mov r1, r5 801265e: 4620 mov r0, r4 8012660: f7ff ff5c bl 801251c 8012664: 4607 mov r7, r0 8012666: e7d5 b.n 8012614 int rc = FAILURE; 8012668: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 801266c: e7a5 b.n 80125ba 801266e: bf00 nop 8012670: 24019c44 .word 0x24019c44 08012674 : int MQTTSubscribe(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler) { 8012674: b510 push {r4, lr} 8012676: b084 sub sp, #16 MQTTSubackData data; return MQTTSubscribeWithResults(c, topicFilter, qos, messageHandler, &data); 8012678: ac03 add r4, sp, #12 801267a: 9400 str r4, [sp, #0] 801267c: f7ff ff86 bl 801258c } 8012680: b004 add sp, #16 8012682: bd10 pop {r4, pc} 08012684 : return rc; } int MQTTPublish(MQTTClient* c, const char* topicName, MQTTMessage* message) { 8012684: b570 push {r4, r5, r6, lr} 8012686: b08e sub sp, #56 @ 0x38 8012688: 4604 mov r4, r0 801268a: 4615 mov r5, r2 int rc = FAILURE; Timer timer; MQTTString topic = MQTTString_initializer; 801268c: 2300 movs r3, #0 801268e: 9309 str r3, [sp, #36] @ 0x24 8012690: 930a str r3, [sp, #40] @ 0x28 8012692: 930b str r3, [sp, #44] @ 0x2c topic.cstring = (char *)topicName; 8012694: 9109 str r1, [sp, #36] @ 0x24 int len = 0; #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif osMutexAcquire(mqttMutex, osWaitForever); 8012696: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 801269a: 4b3e ldr r3, [pc, #248] @ (8012794 ) 801269c: 6818 ldr r0, [r3, #0] 801269e: f7f1 fc59 bl 8003f54 if (!c->isconnected) 80126a2: 6a23 ldr r3, [r4, #32] 80126a4: b95b cbnz r3, 80126be int rc = FAILURE; 80126a6: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff rc = FAILURE; } exit: if (rc == FAILURE) MQTTCloseSession(c); 80126aa: 4620 mov r0, r4 80126ac: f7ff fddd bl 801226a #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif osMutexRelease(mqttMutex); 80126b0: 4b38 ldr r3, [pc, #224] @ (8012794 ) 80126b2: 6818 ldr r0, [r3, #0] 80126b4: f7f1 fc7d bl 8003fb2 return rc; } 80126b8: 4630 mov r0, r6 80126ba: b00e add sp, #56 @ 0x38 80126bc: bd70 pop {r4, r5, r6, pc} TimerInit(&timer); 80126be: a80c add r0, sp, #48 @ 0x30 80126c0: f000 f8e4 bl 801288c TimerCountdownMS(&timer, c->command_timeout_ms); 80126c4: 6861 ldr r1, [r4, #4] 80126c6: a80c add r0, sp, #48 @ 0x30 80126c8: f000 f8c4 bl 8012854 if (message->qos == QOS1 || message->qos == QOS2) 80126cc: 782b ldrb r3, [r5, #0] 80126ce: 3b01 subs r3, #1 80126d0: b2db uxtb r3, r3 80126d2: 2b01 cmp r3, #1 80126d4: d923 bls.n 801271e topic, (unsigned char*)message->payload, message->payloadlen); 80126d6: 68ab ldr r3, [r5, #8] 80126d8: 68ea ldr r2, [r5, #12] len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id, 80126da: 9206 str r2, [sp, #24] 80126dc: 9305 str r3, [sp, #20] 80126de: ab02 add r3, sp, #8 80126e0: aa09 add r2, sp, #36 @ 0x24 80126e2: ca07 ldmia r2, {r0, r1, r2} 80126e4: e883 0007 stmia.w r3, {r0, r1, r2} 80126e8: 88ab ldrh r3, [r5, #4] 80126ea: 9301 str r3, [sp, #4] 80126ec: 786b ldrb r3, [r5, #1] 80126ee: 9300 str r3, [sp, #0] 80126f0: 782b ldrb r3, [r5, #0] 80126f2: 2200 movs r2, #0 80126f4: 68a1 ldr r1, [r4, #8] 80126f6: 6920 ldr r0, [r4, #16] 80126f8: f000 fbcf bl 8012e9a if (len <= 0) 80126fc: 1e01 subs r1, r0, #0 80126fe: dd45 ble.n 801278c if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 8012700: aa0c add r2, sp, #48 @ 0x30 8012702: 4620 mov r0, r4 8012704: f7ff fc87 bl 8012016 8012708: 4606 mov r6, r0 801270a: b920 cbnz r0, 8012716 if (message->qos == QOS1) 801270c: 782b ldrb r3, [r5, #0] 801270e: 2b01 cmp r3, #1 8012710: d00a beq.n 8012728 else if (message->qos == QOS2) 8012712: 2b02 cmp r3, #2 8012714: d021 beq.n 801275a if (rc == FAILURE) 8012716: f1b6 3fff cmp.w r6, #4294967295 @ 0xffffffff 801271a: d1c9 bne.n 80126b0 801271c: e7c5 b.n 80126aa message->id = getNextPacketId(c); 801271e: 4620 mov r0, r4 8012720: f7ff fc17 bl 8011f52 8012724: 80a8 strh r0, [r5, #4] 8012726: e7d6 b.n 80126d6 if (waitfor(c, PUBACK, &timer) == PUBACK) 8012728: aa0c add r2, sp, #48 @ 0x30 801272a: 2104 movs r1, #4 801272c: 4620 mov r0, r4 801272e: f7ff fe71 bl 8012414 8012732: 2804 cmp r0, #4 8012734: d002 beq.n 801273c rc = FAILURE; 8012736: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 801273a: e7b6 b.n 80126aa if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 801273c: 68e3 ldr r3, [r4, #12] 801273e: 9300 str r3, [sp, #0] 8012740: 6963 ldr r3, [r4, #20] 8012742: f10d 0222 add.w r2, sp, #34 @ 0x22 8012746: a908 add r1, sp, #32 8012748: f10d 0021 add.w r0, sp, #33 @ 0x21 801274c: f000 fa52 bl 8012bf4 8012750: 2801 cmp r0, #1 8012752: d0e0 beq.n 8012716 rc = FAILURE; 8012754: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 8012758: e7a7 b.n 80126aa if (waitfor(c, PUBCOMP, &timer) == PUBCOMP) 801275a: aa0c add r2, sp, #48 @ 0x30 801275c: 2107 movs r1, #7 801275e: 4620 mov r0, r4 8012760: f7ff fe58 bl 8012414 8012764: 2807 cmp r0, #7 8012766: d002 beq.n 801276e rc = FAILURE; 8012768: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 801276c: e79d b.n 80126aa if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 801276e: 68e3 ldr r3, [r4, #12] 8012770: 9300 str r3, [sp, #0] 8012772: 6963 ldr r3, [r4, #20] 8012774: f10d 0222 add.w r2, sp, #34 @ 0x22 8012778: a908 add r1, sp, #32 801277a: f10d 0021 add.w r0, sp, #33 @ 0x21 801277e: f000 fa39 bl 8012bf4 8012782: 2801 cmp r0, #1 8012784: d0c7 beq.n 8012716 rc = FAILURE; 8012786: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 801278a: e78e b.n 80126aa int rc = FAILURE; 801278c: f04f 36ff mov.w r6, #4294967295 @ 0xffffffff 8012790: e78b b.n 80126aa 8012792: bf00 nop 8012794: 24019c44 .word 0x24019c44 08012798 : int MQTTDisconnect(MQTTClient* c) { 8012798: b530 push {r4, r5, lr} 801279a: b083 sub sp, #12 801279c: 4604 mov r4, r0 int len = 0; #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif osMutexAcquire(mqttMutex, osWaitForever); 801279e: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80127a2: 4b11 ldr r3, [pc, #68] @ (80127e8 ) 80127a4: 6818 ldr r0, [r3, #0] 80127a6: f7f1 fbd5 bl 8003f54 TimerInit(&timer); 80127aa: 4668 mov r0, sp 80127ac: f000 f86e bl 801288c TimerCountdownMS(&timer, c->command_timeout_ms); 80127b0: 6861 ldr r1, [r4, #4] 80127b2: 4668 mov r0, sp 80127b4: f000 f84e bl 8012854 len = MQTTSerialize_disconnect(c->buf, c->buf_size); 80127b8: 68a1 ldr r1, [r4, #8] 80127ba: 6920 ldr r0, [r4, #16] 80127bc: f000 f9c7 bl 8012b4e if (len > 0) 80127c0: 1e01 subs r1, r0, #0 80127c2: dd0e ble.n 80127e2 rc = sendPacket(c, len, &timer); // send the disconnect packet 80127c4: 466a mov r2, sp 80127c6: 4620 mov r0, r4 80127c8: f7ff fc25 bl 8012016 80127cc: 4605 mov r5, r0 MQTTCloseSession(c); 80127ce: 4620 mov r0, r4 80127d0: f7ff fd4b bl 801226a #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif osMutexRelease(mqttMutex); 80127d4: 4b04 ldr r3, [pc, #16] @ (80127e8 ) 80127d6: 6818 ldr r0, [r3, #0] 80127d8: f7f1 fbeb bl 8003fb2 return rc; } 80127dc: 4628 mov r0, r5 80127de: b003 add sp, #12 80127e0: bd30 pop {r4, r5, pc} int rc = FAILURE; 80127e2: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 80127e6: e7f2 b.n 80127ce 80127e8: 24019c44 .word 0x24019c44 080127ec : int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) { return send(n->socket, buffer, len, 0); } void net_disconnect(Network *n) { 80127ec: b510 push {r4, lr} 80127ee: 4604 mov r4, r0 close(n->socket); 80127f0: 6800 ldr r0, [r0, #0] 80127f2: f7fa f919 bl 800ca28 n->socket = 0; 80127f6: 2300 movs r3, #0 80127f8: 6023 str r3, [r4, #0] } 80127fa: bd10 pop {r4, pc} 080127fc : int net_read(Network *n, unsigned char *buffer, int len, int timeout_ms) { 80127fc: b570 push {r4, r5, r6, lr} 80127fe: b082 sub sp, #8 8012800: 4604 mov r4, r0 8012802: 460d mov r5, r1 8012804: 4616 mov r6, r2 if(ioctl(n->socket, FIONREAD, &available) < 0) return -1; //check receive buffer 8012806: aa01 add r2, sp, #4 8012808: 490a ldr r1, [pc, #40] @ (8012834 ) 801280a: 6800 ldr r0, [r0, #0] 801280c: f7fa fb02 bl 800ce14 8012810: 2800 cmp r0, #0 8012812: db0c blt.n 801282e if(available > 0) 8012814: 9b01 ldr r3, [sp, #4] 8012816: 2b00 cmp r3, #0 8012818: dc02 bgt.n 8012820 return 0; 801281a: 2000 movs r0, #0 } 801281c: b002 add sp, #8 801281e: bd70 pop {r4, r5, r6, pc} return recv(n->socket, buffer, len, 0); 8012820: 2300 movs r3, #0 8012822: 4632 mov r2, r6 8012824: 4629 mov r1, r5 8012826: 6820 ldr r0, [r4, #0] 8012828: f7fa f9e0 bl 800cbec 801282c: e7f6 b.n 801281c if(ioctl(n->socket, FIONREAD, &available) < 0) return -1; //check receive buffer 801282e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8012832: e7f3 b.n 801281c 8012834: 4004667f .word 0x4004667f 08012838 : int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) { 8012838: b508 push {r3, lr} return send(n->socket, buffer, len, 0); 801283a: 2300 movs r3, #0 801283c: 6800 ldr r0, [r0, #0] 801283e: f7fa fa65 bl 800cd0c } 8012842: bd08 pop {r3, pc} 08012844 : long left = timer->end_time - MilliTimer; 8012844: 6840 ldr r0, [r0, #4] 8012846: 4b02 ldr r3, [pc, #8] @ (8012850 ) 8012848: 681b ldr r3, [r3, #0] 801284a: 1ac0 subs r0, r0, r3 } 801284c: 0fc0 lsrs r0, r0, #31 801284e: 4770 bx lr 8012850: 24019c48 .word 0x24019c48 08012854 : timer->end_time = MilliTimer + timeout; 8012854: 4b02 ldr r3, [pc, #8] @ (8012860 ) 8012856: 681b ldr r3, [r3, #0] 8012858: 4419 add r1, r3 801285a: 6041 str r1, [r0, #4] } 801285c: 4770 bx lr 801285e: bf00 nop 8012860: 24019c48 .word 0x24019c48 08012864 : timer->end_time = MilliTimer + (timeout * 1000); 8012864: 4b03 ldr r3, [pc, #12] @ (8012874 ) 8012866: 681b ldr r3, [r3, #0] 8012868: f44f 727a mov.w r2, #1000 @ 0x3e8 801286c: fb02 3301 mla r3, r2, r1, r3 8012870: 6043 str r3, [r0, #4] } 8012872: 4770 bx lr 8012874: 24019c48 .word 0x24019c48 08012878 : long left = timer->end_time - MilliTimer; 8012878: 6840 ldr r0, [r0, #4] 801287a: 4b03 ldr r3, [pc, #12] @ (8012888 ) 801287c: 681b ldr r3, [r3, #0] 801287e: 1ac0 subs r0, r0, r3 } 8012880: ea20 70e0 bic.w r0, r0, r0, asr #31 8012884: 4770 bx lr 8012886: bf00 nop 8012888: 24019c48 .word 0x24019c48 0801288c : timer->end_time = 0; 801288c: 2300 movs r3, #0 801288e: 6043 str r3, [r0, #4] } 8012890: 4770 bx lr ... 08012894 : n->socket = 0; //clear 8012894: 2300 movs r3, #0 8012896: 6003 str r3, [r0, #0] n->mqttread = net_read; //receive function 8012898: 4b03 ldr r3, [pc, #12] @ (80128a8 ) 801289a: 6043 str r3, [r0, #4] n->mqttwrite = net_write; //send function 801289c: 4b03 ldr r3, [pc, #12] @ (80128ac ) 801289e: 6083 str r3, [r0, #8] n->disconnect = net_disconnect; //disconnection function 80128a0: 4b03 ldr r3, [pc, #12] @ (80128b0 ) 80128a2: 60c3 str r3, [r0, #12] } 80128a4: 4770 bx lr 80128a6: bf00 nop 80128a8: 080127fd .word 0x080127fd 80128ac: 08012839 .word 0x08012839 80128b0: 080127ed .word 0x080127ed 080128b4 : int ConnectNetwork(Network *n, char *ip, int port) { 80128b4: b570 push {r4, r5, r6, lr} 80128b6: b084 sub sp, #16 80128b8: 4604 mov r4, r0 80128ba: 460e mov r6, r1 80128bc: 4615 mov r5, r2 if(n->socket) 80128be: 6800 ldr r0, [r0, #0] 80128c0: bb10 cbnz r0, 8012908 n->socket = socket(PF_INET, SOCK_STREAM, 0); //create socket 80128c2: 2200 movs r2, #0 80128c4: 2101 movs r1, #1 80128c6: 2002 movs r0, #2 80128c8: f7fa fa60 bl 800cd8c 80128cc: 6020 str r0, [r4, #0] if(n->socket < 0) 80128ce: 2800 cmp r0, #0 80128d0: db1d blt.n 801290e memset(&server_addr, 0, sizeof(struct sockaddr_in)); //broker address info 80128d2: 2300 movs r3, #0 80128d4: 9300 str r3, [sp, #0] 80128d6: 9301 str r3, [sp, #4] 80128d8: 9302 str r3, [sp, #8] 80128da: 9303 str r3, [sp, #12] server_addr.sin_family = AF_INET; 80128dc: 2302 movs r3, #2 80128de: f88d 3001 strb.w r3, [sp, #1] server_addr.sin_addr.s_addr = inet_addr(ip); 80128e2: 4630 mov r0, r6 80128e4: f7f7 fe86 bl 800a5f4 80128e8: 9001 str r0, [sp, #4] server_addr.sin_port = htons(port); 80128ea: b2a8 uxth r0, r5 80128ec: f7f5 fac6 bl 8007e7c 80128f0: f8ad 0002 strh.w r0, [sp, #2] if(connect(n->socket, (struct sockaddr*)&server_addr, sizeof(struct sockaddr_in)) < 0) //connect to the broker 80128f4: 2210 movs r2, #16 80128f6: 4669 mov r1, sp 80128f8: 6820 ldr r0, [r4, #0] 80128fa: f7fa f8cd bl 800ca98 80128fe: 2800 cmp r0, #0 8012900: db0a blt.n 8012918 return 0; 8012902: 2000 movs r0, #0 } 8012904: b004 add sp, #16 8012906: bd70 pop {r4, r5, r6, pc} close(n->socket); 8012908: f7fa f88e bl 800ca28 801290c: e7d9 b.n 80128c2 n->socket = 0; 801290e: 2300 movs r3, #0 8012910: 6023 str r3, [r4, #0] return -1; 8012912: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8012916: e7f5 b.n 8012904 close(n->socket); 8012918: 6820 ldr r0, [r4, #0] 801291a: f7fa f885 bl 800ca28 return -1; 801291e: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8012922: e7ef b.n 8012904 08012924 : * Determines the length of the MQTT connect packet that would be produced using the supplied connect options. * @param options the options to be used to build the connect packet * @return the length of buffer needed to contain the serialized version of the packet */ int MQTTSerialize_connectLength(MQTTPacket_connectData* options) { 8012924: b570 push {r4, r5, r6, lr} 8012926: 4604 mov r4, r0 int len = 0; FUNC_ENTRY; if (options->MQTTVersion == 3) 8012928: 7a03 ldrb r3, [r0, #8] 801292a: 2b03 cmp r3, #3 801292c: d021 beq.n 8012972 len = 12; /* variable depending on MQTT or MQIsdp */ else if (options->MQTTVersion == 4) 801292e: 2b04 cmp r3, #4 8012930: d021 beq.n 8012976 int len = 0; 8012932: 2500 movs r5, #0 len = 10; len += MQTTstrlen(options->clientID)+2; 8012934: f104 030c add.w r3, r4, #12 8012938: e893 0007 ldmia.w r3, {r0, r1, r2} 801293c: f000 fa71 bl 8012e22 8012940: 3002 adds r0, #2 8012942: 4405 add r5, r0 if (options->willFlag) 8012944: 7ee3 ldrb r3, [r4, #27] 8012946: b9c3 cbnz r3, 801297a len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2; if (options->username.cstring || options->username.lenstring.data) 8012948: 6c23 ldr r3, [r4, #64] @ 0x40 801294a: b33b cbz r3, 801299c len += MQTTstrlen(options->username)+2; 801294c: f104 0340 add.w r3, r4, #64 @ 0x40 8012950: e893 0007 ldmia.w r3, {r0, r1, r2} 8012954: f000 fa65 bl 8012e22 8012958: 3002 adds r0, #2 801295a: 4405 add r5, r0 if (options->password.cstring || options->password.lenstring.data) 801295c: 6ce3 ldr r3, [r4, #76] @ 0x4c 801295e: b30b cbz r3, 80129a4 len += MQTTstrlen(options->password)+2; 8012960: 344c adds r4, #76 @ 0x4c 8012962: e894 0007 ldmia.w r4, {r0, r1, r2} 8012966: f000 fa5c bl 8012e22 801296a: 3002 adds r0, #2 801296c: 4405 add r5, r0 FUNC_EXIT_RC(len); return len; } 801296e: 4628 mov r0, r5 8012970: bd70 pop {r4, r5, r6, pc} len = 12; /* variable depending on MQTT or MQIsdp */ 8012972: 250c movs r5, #12 8012974: e7de b.n 8012934 len = 10; 8012976: 250a movs r5, #10 8012978: e7dc b.n 8012934 len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2; 801297a: f104 0324 add.w r3, r4, #36 @ 0x24 801297e: e893 0007 ldmia.w r3, {r0, r1, r2} 8012982: f000 fa4e bl 8012e22 8012986: 1c86 adds r6, r0, #2 8012988: f104 0330 add.w r3, r4, #48 @ 0x30 801298c: e893 0007 ldmia.w r3, {r0, r1, r2} 8012990: f000 fa47 bl 8012e22 8012994: 4406 add r6, r0 8012996: 3602 adds r6, #2 8012998: 4435 add r5, r6 801299a: e7d5 b.n 8012948 if (options->username.cstring || options->username.lenstring.data) 801299c: 6ca3 ldr r3, [r4, #72] @ 0x48 801299e: 2b00 cmp r3, #0 80129a0: d1d4 bne.n 801294c 80129a2: e7db b.n 801295c if (options->password.cstring || options->password.lenstring.data) 80129a4: 6d63 ldr r3, [r4, #84] @ 0x54 80129a6: 2b00 cmp r3, #0 80129a8: d1da bne.n 8012960 80129aa: e7e0 b.n 801296e 080129ac : * @param len the length in bytes of the supplied buffer * @param options the options to be used to build the connect packet * @return serialized length, or error if 0 */ int MQTTSerialize_connect(unsigned char* buf, int buflen, MQTTPacket_connectData* options) { 80129ac: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80129b0: b082 sub sp, #8 80129b2: 4606 mov r6, r0 80129b4: 460f mov r7, r1 80129b6: 4614 mov r4, r2 unsigned char *ptr = buf; 80129b8: 9001 str r0, [sp, #4] MQTTConnectFlags flags = {0}; int len = 0; int rc = -1; FUNC_ENTRY; if (MQTTPacket_len(len = MQTTSerialize_connectLength(options)) > buflen) 80129ba: 4610 mov r0, r2 80129bc: f7ff ffb2 bl 8012924 80129c0: 4680 mov r8, r0 80129c2: f000 f993 bl 8012cec 80129c6: 42b8 cmp r0, r7 80129c8: dc7b bgt.n 8012ac2 80129ca: 2500 movs r5, #0 goto exit; } header.byte = 0; header.bits.type = CONNECT; writeChar(&ptr, header.byte); /* write header */ 80129cc: 2110 movs r1, #16 80129ce: a801 add r0, sp, #4 80129d0: f000 f9ba bl 8012d48 ptr += MQTTPacket_encode(ptr, len); /* write remaining length */ 80129d4: 4641 mov r1, r8 80129d6: 9801 ldr r0, [sp, #4] 80129d8: f000 f946 bl 8012c68 80129dc: 9b01 ldr r3, [sp, #4] 80129de: 4403 add r3, r0 80129e0: 9301 str r3, [sp, #4] if (options->MQTTVersion == 4) 80129e2: 7a23 ldrb r3, [r4, #8] 80129e4: 2b04 cmp r3, #4 80129e6: d03f beq.n 8012a68 writeCString(&ptr, "MQTT"); writeChar(&ptr, (char) 4); } else { writeCString(&ptr, "MQIsdp"); 80129e8: 4937 ldr r1, [pc, #220] @ (8012ac8 ) 80129ea: a801 add r0, sp, #4 80129ec: f000 f9c9 bl 8012d82 writeChar(&ptr, (char) 3); 80129f0: 2103 movs r1, #3 80129f2: a801 add r0, sp, #4 80129f4: f000 f9a8 bl 8012d48 } flags.all = 0; flags.bits.cleansession = options->cleansession; 80129f8: 7ea3 ldrb r3, [r4, #26] 80129fa: f363 0541 bfi r5, r3, #1, #1 flags.bits.will = (options->willFlag) ? 1 : 0; 80129fe: 7ee3 ldrb r3, [r4, #27] 8012a00: 3b00 subs r3, #0 8012a02: bf18 it ne 8012a04: 2301 movne r3, #1 8012a06: f363 0582 bfi r5, r3, #2, #1 if (flags.bits.will) 8012a0a: f015 0f04 tst.w r5, #4 8012a0e: d007 beq.n 8012a20 { flags.bits.willQoS = options->will.qos; 8012a10: f894 303d ldrb.w r3, [r4, #61] @ 0x3d 8012a14: f363 05c4 bfi r5, r3, #3, #2 flags.bits.willRetain = options->will.retained; 8012a18: f894 303c ldrb.w r3, [r4, #60] @ 0x3c 8012a1c: f363 1545 bfi r5, r3, #5, #1 } if (options->username.cstring || options->username.lenstring.data) 8012a20: 6c23 ldr r3, [r4, #64] @ 0x40 8012a22: b35b cbz r3, 8012a7c flags.bits.username = 1; 8012a24: f045 0580 orr.w r5, r5, #128 @ 0x80 if (options->password.cstring || options->password.lenstring.data) 8012a28: 6ce3 ldr r3, [r4, #76] @ 0x4c 8012a2a: b35b cbz r3, 8012a84 flags.bits.password = 1; 8012a2c: f045 0540 orr.w r5, r5, #64 @ 0x40 writeChar(&ptr, flags.all); 8012a30: b2ed uxtb r5, r5 8012a32: 4629 mov r1, r5 8012a34: a801 add r0, sp, #4 8012a36: f000 f987 bl 8012d48 writeInt(&ptr, options->keepAliveInterval); 8012a3a: 8b21 ldrh r1, [r4, #24] 8012a3c: a801 add r0, sp, #4 8012a3e: f000 f989 bl 8012d54 writeMQTTString(&ptr, options->clientID); 8012a42: f104 030c add.w r3, r4, #12 8012a46: cb0e ldmia r3, {r1, r2, r3} 8012a48: a801 add r0, sp, #4 8012a4a: f000 f9ae bl 8012daa if (options->willFlag) 8012a4e: 7ee3 ldrb r3, [r4, #27] 8012a50: b9e3 cbnz r3, 8012a8c { writeMQTTString(&ptr, options->will.topicName); writeMQTTString(&ptr, options->will.message); } if (flags.bits.username) 8012a52: f015 0f80 tst.w r5, #128 @ 0x80 8012a56: d126 bne.n 8012aa6 writeMQTTString(&ptr, options->username); if (flags.bits.password) 8012a58: f015 0f40 tst.w r5, #64 @ 0x40 8012a5c: d12a bne.n 8012ab4 writeMQTTString(&ptr, options->password); rc = ptr - buf; 8012a5e: 9801 ldr r0, [sp, #4] 8012a60: 1b80 subs r0, r0, r6 exit: FUNC_EXIT_RC(rc); return rc; } 8012a62: b002 add sp, #8 8012a64: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} writeCString(&ptr, "MQTT"); 8012a68: 4918 ldr r1, [pc, #96] @ (8012acc ) 8012a6a: a801 add r0, sp, #4 8012a6c: f000 f989 bl 8012d82 writeChar(&ptr, (char) 4); 8012a70: 2104 movs r1, #4 8012a72: eb0d 0001 add.w r0, sp, r1 8012a76: f000 f967 bl 8012d48 8012a7a: e7bd b.n 80129f8 if (options->username.cstring || options->username.lenstring.data) 8012a7c: 6ca3 ldr r3, [r4, #72] @ 0x48 8012a7e: 2b00 cmp r3, #0 8012a80: d1d0 bne.n 8012a24 8012a82: e7d1 b.n 8012a28 if (options->password.cstring || options->password.lenstring.data) 8012a84: 6d63 ldr r3, [r4, #84] @ 0x54 8012a86: 2b00 cmp r3, #0 8012a88: d1d0 bne.n 8012a2c 8012a8a: e7d1 b.n 8012a30 writeMQTTString(&ptr, options->will.topicName); 8012a8c: f104 0324 add.w r3, r4, #36 @ 0x24 8012a90: cb0e ldmia r3, {r1, r2, r3} 8012a92: a801 add r0, sp, #4 8012a94: f000 f989 bl 8012daa writeMQTTString(&ptr, options->will.message); 8012a98: f104 0330 add.w r3, r4, #48 @ 0x30 8012a9c: cb0e ldmia r3, {r1, r2, r3} 8012a9e: a801 add r0, sp, #4 8012aa0: f000 f983 bl 8012daa 8012aa4: e7d5 b.n 8012a52 writeMQTTString(&ptr, options->username); 8012aa6: f104 0340 add.w r3, r4, #64 @ 0x40 8012aaa: cb0e ldmia r3, {r1, r2, r3} 8012aac: a801 add r0, sp, #4 8012aae: f000 f97c bl 8012daa 8012ab2: e7d1 b.n 8012a58 writeMQTTString(&ptr, options->password); 8012ab4: 344c adds r4, #76 @ 0x4c 8012ab6: e894 000e ldmia.w r4, {r1, r2, r3} 8012aba: a801 add r0, sp, #4 8012abc: f000 f975 bl 8012daa 8012ac0: e7cd b.n 8012a5e rc = MQTTPACKET_BUFFER_TOO_SHORT; 8012ac2: f06f 0001 mvn.w r0, #1 return rc; 8012ac6: e7cc b.n 8012a62 8012ac8: 08017ed4 .word 0x08017ed4 8012acc: 08017ecc .word 0x08017ecc 08012ad0 : * @param buf the raw buffer data, of the correct length determined by the remaining length field * @param len the length in bytes of the data in the supplied buffer * @return error code. 1 is success, 0 is failure */ int MQTTDeserialize_connack(unsigned char* sessionPresent, unsigned char* connack_rc, unsigned char* buf, int buflen) { 8012ad0: b530 push {r4, r5, lr} 8012ad2: b083 sub sp, #12 8012ad4: 4605 mov r5, r0 8012ad6: 460c mov r4, r1 MQTTHeader header = {0}; unsigned char* curdata = buf; 8012ad8: 9201 str r2, [sp, #4] int rc = 0; int mylen; MQTTConnackFlags flags = {0}; FUNC_ENTRY; header.byte = readChar(&curdata); 8012ada: a801 add r0, sp, #4 8012adc: f000 f92e bl 8012d3c if (header.bits.type != CONNACK) 8012ae0: f000 03f0 and.w r3, r0, #240 @ 0xf0 8012ae4: 2b20 cmp r3, #32 8012ae6: d002 beq.n 8012aee int rc = 0; 8012ae8: 2000 movs r0, #0 rc = 1; exit: FUNC_EXIT_RC(rc); return rc; } 8012aea: b003 add sp, #12 8012aec: bd30 pop {r4, r5, pc} curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8012aee: 4669 mov r1, sp 8012af0: 9801 ldr r0, [sp, #4] 8012af2: f000 f90f bl 8012d14 8012af6: 9b01 ldr r3, [sp, #4] 8012af8: 4403 add r3, r0 8012afa: 9301 str r3, [sp, #4] enddata = curdata + mylen; 8012afc: 9b00 ldr r3, [sp, #0] if (enddata - curdata < 2) 8012afe: 2b01 cmp r3, #1 8012b00: ddf3 ble.n 8012aea flags.all = readChar(&curdata); 8012b02: a801 add r0, sp, #4 8012b04: f000 f91a bl 8012d3c *sessionPresent = flags.bits.sessionpresent; 8012b08: f000 0001 and.w r0, r0, #1 8012b0c: 7028 strb r0, [r5, #0] *connack_rc = readChar(&curdata); 8012b0e: a801 add r0, sp, #4 8012b10: f000 f914 bl 8012d3c 8012b14: 7020 strb r0, [r4, #0] rc = 1; 8012b16: 2001 movs r0, #1 8012b18: e7e7 b.n 8012aea 08012b1a : * @param buflen the length in bytes of the supplied buffer, to avoid overruns * @param packettype the message type * @return serialized length, or error if 0 */ int MQTTSerialize_zero(unsigned char* buf, int buflen, unsigned char packettype) { 8012b1a: b510 push {r4, lr} 8012b1c: b082 sub sp, #8 MQTTHeader header = {0}; int rc = -1; unsigned char *ptr = buf; 8012b1e: 9001 str r0, [sp, #4] FUNC_ENTRY; if (buflen < 2) 8012b20: 2901 cmp r1, #1 8012b22: dd11 ble.n 8012b48 8012b24: 4604 mov r4, r0 8012b26: 2300 movs r3, #0 { rc = MQTTPACKET_BUFFER_TOO_SHORT; goto exit; } header.byte = 0; header.bits.type = packettype; 8012b28: f362 1307 bfi r3, r2, #4, #4 writeChar(&ptr, header.byte); /* write header */ 8012b2c: 4619 mov r1, r3 8012b2e: a801 add r0, sp, #4 8012b30: f000 f90a bl 8012d48 ptr += MQTTPacket_encode(ptr, 0); /* write remaining length */ 8012b34: 2100 movs r1, #0 8012b36: 9801 ldr r0, [sp, #4] 8012b38: f000 f896 bl 8012c68 8012b3c: 9b01 ldr r3, [sp, #4] 8012b3e: 4418 add r0, r3 8012b40: 9001 str r0, [sp, #4] rc = ptr - buf; 8012b42: 1b00 subs r0, r0, r4 exit: FUNC_EXIT_RC(rc); return rc; } 8012b44: b002 add sp, #8 8012b46: bd10 pop {r4, pc} rc = MQTTPACKET_BUFFER_TOO_SHORT; 8012b48: f06f 0001 mvn.w r0, #1 return rc; 8012b4c: e7fa b.n 8012b44 08012b4e : * @param buf the buffer into which the packet will be serialized * @param buflen the length in bytes of the supplied buffer, to avoid overruns * @return serialized length, or error if 0 */ int MQTTSerialize_disconnect(unsigned char* buf, int buflen) { 8012b4e: b508 push {r3, lr} return MQTTSerialize_zero(buf, buflen, DISCONNECT); 8012b50: 220e movs r2, #14 8012b52: f7ff ffe2 bl 8012b1a } 8012b56: bd08 pop {r3, pc} 08012b58 : * @param buf the buffer into which the packet will be serialized * @param buflen the length in bytes of the supplied buffer, to avoid overruns * @return serialized length, or error if 0 */ int MQTTSerialize_pingreq(unsigned char* buf, int buflen) { 8012b58: b508 push {r3, lr} return MQTTSerialize_zero(buf, buflen, PINGREQ); 8012b5a: 220c movs r2, #12 8012b5c: f7ff ffdd bl 8012b1a } 8012b60: bd08 pop {r3, pc} 08012b62 : * @param buflen the length in bytes of the data in the supplied buffer * @return error code. 1 is success */ int MQTTDeserialize_publish(unsigned char* dup, int* qos, unsigned char* retained, unsigned short* packetid, MQTTString* topicName, unsigned char** payload, int* payloadlen, unsigned char* buf, int buflen) { 8012b62: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8012b66: b082 sub sp, #8 8012b68: 4680 mov r8, r0 8012b6a: 460d mov r5, r1 8012b6c: 4616 mov r6, r2 8012b6e: 461f mov r7, r3 MQTTHeader header = {0}; 8012b70: 2400 movs r4, #0 unsigned char* curdata = buf; 8012b72: 9b0b ldr r3, [sp, #44] @ 0x2c 8012b74: 9301 str r3, [sp, #4] unsigned char* enddata = NULL; int rc = 0; int mylen = 0; 8012b76: 9400 str r4, [sp, #0] FUNC_ENTRY; header.byte = readChar(&curdata); 8012b78: a801 add r0, sp, #4 8012b7a: f000 f8df bl 8012d3c 8012b7e: f360 0407 bfi r4, r0, #0, #8 if (header.bits.type != PUBLISH) 8012b82: f000 0cf0 and.w ip, r0, #240 @ 0xf0 8012b86: f1bc 0f30 cmp.w ip, #48 @ 0x30 8012b8a: d004 beq.n 8012b96 int rc = 0; 8012b8c: 2400 movs r4, #0 *payload = curdata; rc = 1; exit: FUNC_EXIT_RC(rc); return rc; } 8012b8e: 4620 mov r0, r4 8012b90: b002 add sp, #8 8012b92: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} *dup = header.bits.dup; 8012b96: f3c4 03c0 ubfx r3, r4, #3, #1 8012b9a: f888 3000 strb.w r3, [r8] *qos = header.bits.qos; 8012b9e: f3c4 0341 ubfx r3, r4, #1, #2 8012ba2: 602b str r3, [r5, #0] *retained = header.bits.retain; 8012ba4: f3c4 0400 ubfx r4, r4, #0, #1 8012ba8: 7034 strb r4, [r6, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8012baa: 4669 mov r1, sp 8012bac: 9801 ldr r0, [sp, #4] 8012bae: f000 f8b1 bl 8012d14 8012bb2: 4604 mov r4, r0 8012bb4: 9e01 ldr r6, [sp, #4] 8012bb6: 4406 add r6, r0 8012bb8: 9601 str r6, [sp, #4] enddata = curdata + mylen; 8012bba: 9b00 ldr r3, [sp, #0] 8012bbc: 441e add r6, r3 if (!readMQTTLenString(topicName, &curdata, enddata) || 8012bbe: 4632 mov r2, r6 8012bc0: a901 add r1, sp, #4 8012bc2: 9808 ldr r0, [sp, #32] 8012bc4: f000 f913 bl 8012dee 8012bc8: 2800 cmp r0, #0 8012bca: d0e0 beq.n 8012b8e enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */ 8012bcc: 9b01 ldr r3, [sp, #4] 8012bce: 1af3 subs r3, r6, r3 if (!readMQTTLenString(topicName, &curdata, enddata) || 8012bd0: 2b00 cmp r3, #0 8012bd2: dbdc blt.n 8012b8e if (*qos > 0) 8012bd4: 682b ldr r3, [r5, #0] 8012bd6: 2b00 cmp r3, #0 8012bd8: dc07 bgt.n 8012bea *payloadlen = enddata - curdata; 8012bda: 9b01 ldr r3, [sp, #4] 8012bdc: 1af6 subs r6, r6, r3 8012bde: 9a0a ldr r2, [sp, #40] @ 0x28 8012be0: 6016 str r6, [r2, #0] *payload = curdata; 8012be2: 9a09 ldr r2, [sp, #36] @ 0x24 8012be4: 6013 str r3, [r2, #0] rc = 1; 8012be6: 2401 movs r4, #1 8012be8: e7d1 b.n 8012b8e *packetid = readInt(&curdata); 8012bea: a801 add r0, sp, #4 8012bec: f000 f89e bl 8012d2c 8012bf0: 8038 strh r0, [r7, #0] 8012bf2: e7f2 b.n 8012bda 08012bf4 : * @param buf the raw buffer data, of the correct length determined by the remaining length field * @param buflen the length in bytes of the data in the supplied buffer * @return error code. 1 is success, 0 is failure */ int MQTTDeserialize_ack(unsigned char* packettype, unsigned char* dup, unsigned short* packetid, unsigned char* buf, int buflen) { 8012bf4: b5f0 push {r4, r5, r6, r7, lr} 8012bf6: b083 sub sp, #12 8012bf8: 4605 mov r5, r0 8012bfa: 460f mov r7, r1 8012bfc: 4616 mov r6, r2 MQTTHeader header = {0}; 8012bfe: 2400 movs r4, #0 unsigned char* curdata = buf; 8012c00: 9301 str r3, [sp, #4] unsigned char* enddata = NULL; int rc = 0; int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 8012c02: a801 add r0, sp, #4 8012c04: f000 f89a bl 8012d3c 8012c08: f360 0407 bfi r4, r0, #0, #8 *dup = header.bits.dup; 8012c0c: f3c4 03c0 ubfx r3, r4, #3, #1 8012c10: 703b strb r3, [r7, #0] *packettype = header.bits.type; 8012c12: f3c4 1403 ubfx r4, r4, #4, #4 8012c16: 702c strb r4, [r5, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8012c18: 4669 mov r1, sp 8012c1a: 9801 ldr r0, [sp, #4] 8012c1c: f000 f87a bl 8012d14 8012c20: 9b01 ldr r3, [sp, #4] 8012c22: 4403 add r3, r0 8012c24: 9301 str r3, [sp, #4] enddata = curdata + mylen; 8012c26: 9b00 ldr r3, [sp, #0] if (enddata - curdata < 2) 8012c28: 2b01 cmp r3, #1 8012c2a: dd04 ble.n 8012c36 goto exit; *packetid = readInt(&curdata); 8012c2c: a801 add r0, sp, #4 8012c2e: f000 f87d bl 8012d2c 8012c32: 8030 strh r0, [r6, #0] rc = 1; 8012c34: 2001 movs r0, #1 exit: FUNC_EXIT_RC(rc); return rc; } 8012c36: b003 add sp, #12 8012c38: bdf0 pop {r4, r5, r6, r7, pc} ... 08012c3c : static unsigned char* bufptr; int bufchar(unsigned char* c, int count) { 8012c3c: 4684 mov ip, r0 8012c3e: 4608 mov r0, r1 int i; for (i = 0; i < count; ++i) 8012c40: 2300 movs r3, #0 8012c42: 428b cmp r3, r1 8012c44: da0c bge.n 8012c60 { 8012c46: b430 push {r4, r5} *c = *bufptr++; 8012c48: 4c06 ldr r4, [pc, #24] @ (8012c64 ) 8012c4a: 6822 ldr r2, [r4, #0] 8012c4c: 1c55 adds r5, r2, #1 8012c4e: 6025 str r5, [r4, #0] 8012c50: 7812 ldrb r2, [r2, #0] 8012c52: f88c 2000 strb.w r2, [ip] for (i = 0; i < count; ++i) 8012c56: 3301 adds r3, #1 8012c58: 4283 cmp r3, r0 8012c5a: dbf5 blt.n 8012c48 return count; } 8012c5c: bc30 pop {r4, r5} 8012c5e: 4770 bx lr 8012c60: 4770 bx lr 8012c62: bf00 nop 8012c64: 24019c4c .word 0x24019c4c 08012c68 : { 8012c68: b510 push {r4, lr} 8012c6a: 4604 mov r4, r0 int rc = 0; 8012c6c: f04f 0c00 mov.w ip, #0 8012c70: e00b b.n 8012c8a length /= 128; 8012c72: f101 0e7f add.w lr, r1, #127 @ 0x7f 8012c76: e014 b.n 8012ca2 d |= 0x80; 8012c78: f043 0380 orr.w r3, r3, #128 @ 0x80 buf[rc++] = d; 8012c7c: f10c 0001 add.w r0, ip, #1 8012c80: f804 300c strb.w r3, [r4, ip] } while (length > 0); 8012c84: 2a7f cmp r2, #127 @ 0x7f 8012c86: dd11 ble.n 8012cac buf[rc++] = d; 8012c88: 4684 mov ip, r0 char d = length % 128; 8012c8a: 424a negs r2, r1 8012c8c: f001 037f and.w r3, r1, #127 @ 0x7f 8012c90: f002 027f and.w r2, r2, #127 @ 0x7f 8012c94: bf58 it pl 8012c96: 4253 negpl r3, r2 8012c98: b2db uxtb r3, r3 length /= 128; 8012c9a: 460a mov r2, r1 8012c9c: 468e mov lr, r1 8012c9e: 2900 cmp r1, #0 8012ca0: dbe7 blt.n 8012c72 8012ca2: ea4f 11ee mov.w r1, lr, asr #7 if (length > 0) 8012ca6: 2a7f cmp r2, #127 @ 0x7f 8012ca8: dde8 ble.n 8012c7c 8012caa: e7e5 b.n 8012c78 } 8012cac: bd10 pop {r4, pc} 08012cae : { 8012cae: b5f0 push {r4, r5, r6, r7, lr} 8012cb0: b083 sub sp, #12 8012cb2: 4607 mov r7, r0 8012cb4: 460d mov r5, r1 *value = 0; 8012cb6: 2400 movs r4, #0 8012cb8: 600c str r4, [r1, #0] int multiplier = 1; 8012cba: 2601 movs r6, #1 if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 8012cbc: 3401 adds r4, #1 8012cbe: 2c04 cmp r4, #4 8012cc0: dc11 bgt.n 8012ce6 rc = (*getcharfn)(&c, 1); 8012cc2: 2101 movs r1, #1 8012cc4: f10d 0007 add.w r0, sp, #7 8012cc8: 47b8 blx r7 if (rc != 1) 8012cca: 2801 cmp r0, #1 8012ccc: d10b bne.n 8012ce6 *value += (c & 127) * multiplier; 8012cce: 682b ldr r3, [r5, #0] 8012cd0: f89d 2007 ldrb.w r2, [sp, #7] 8012cd4: f002 017f and.w r1, r2, #127 @ 0x7f 8012cd8: fb06 3301 mla r3, r6, r1, r3 8012cdc: 602b str r3, [r5, #0] multiplier *= 128; 8012cde: 01f6 lsls r6, r6, #7 } while ((c & 128) != 0); 8012ce0: f012 0f80 tst.w r2, #128 @ 0x80 8012ce4: d1ea bne.n 8012cbc } 8012ce6: 4620 mov r0, r4 8012ce8: b003 add sp, #12 8012cea: bdf0 pop {r4, r5, r6, r7, pc} 08012cec : rem_len += 1; /* header byte */ 8012cec: 1c43 adds r3, r0, #1 if (rem_len < 128) 8012cee: 2b7f cmp r3, #127 @ 0x7f 8012cf0: dc01 bgt.n 8012cf6 rem_len += 1; 8012cf2: 3002 adds r0, #2 8012cf4: 4770 bx lr else if (rem_len < 16384) 8012cf6: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 8012cfa: da01 bge.n 8012d00 rem_len += 2; 8012cfc: 3003 adds r0, #3 8012cfe: 4770 bx lr else if (rem_len < 2097151) 8012d00: 4a03 ldr r2, [pc, #12] @ (8012d10 ) 8012d02: 4293 cmp r3, r2 8012d04: dc01 bgt.n 8012d0a rem_len += 3; 8012d06: 3004 adds r0, #4 8012d08: 4770 bx lr rem_len += 4; 8012d0a: 3005 adds r0, #5 } 8012d0c: 4770 bx lr 8012d0e: bf00 nop 8012d10: 001ffffe .word 0x001ffffe 08012d14 : int MQTTPacket_decodeBuf(unsigned char* buf, int* value) { 8012d14: b508 push {r3, lr} bufptr = buf; 8012d16: 4b03 ldr r3, [pc, #12] @ (8012d24 ) 8012d18: 6018 str r0, [r3, #0] return MQTTPacket_decode(bufchar, value); 8012d1a: 4803 ldr r0, [pc, #12] @ (8012d28 ) 8012d1c: f7ff ffc7 bl 8012cae } 8012d20: bd08 pop {r3, pc} 8012d22: bf00 nop 8012d24: 24019c4c .word 0x24019c4c 8012d28: 08012c3d .word 0x08012c3d 08012d2c : * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned * @return the integer value calculated */ int readInt(unsigned char** pptr) { unsigned char* ptr = *pptr; 8012d2c: 6803 ldr r3, [r0, #0] int len = 256*(*ptr) + (*(ptr+1)); 8012d2e: 7819 ldrb r1, [r3, #0] 8012d30: 785a ldrb r2, [r3, #1] *pptr += 2; 8012d32: 3302 adds r3, #2 8012d34: 6003 str r3, [r0, #0] return len; } 8012d36: eb02 2001 add.w r0, r2, r1, lsl #8 8012d3a: 4770 bx lr 08012d3c : * Reads one character from the input buffer. * @param pptr pointer to the input buffer - incremented by the number of bytes used & returned * @return the character read */ char readChar(unsigned char** pptr) { 8012d3c: 4603 mov r3, r0 char c = **pptr; 8012d3e: 6802 ldr r2, [r0, #0] 8012d40: f812 0b01 ldrb.w r0, [r2], #1 (*pptr)++; 8012d44: 601a str r2, [r3, #0] return c; } 8012d46: 4770 bx lr 08012d48 : * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param c the character to write */ void writeChar(unsigned char** pptr, char c) { **pptr = c; 8012d48: 6803 ldr r3, [r0, #0] 8012d4a: 7019 strb r1, [r3, #0] (*pptr)++; 8012d4c: 6803 ldr r3, [r0, #0] 8012d4e: 3301 adds r3, #1 8012d50: 6003 str r3, [r0, #0] } 8012d52: 4770 bx lr 08012d54 : * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param anInt the integer to write */ void writeInt(unsigned char** pptr, int anInt) { **pptr = (unsigned char)(anInt / 256); 8012d54: 460b mov r3, r1 8012d56: 2900 cmp r1, #0 8012d58: db10 blt.n 8012d7c 8012d5a: 6802 ldr r2, [r0, #0] 8012d5c: f3c3 2307 ubfx r3, r3, #8, #8 8012d60: 7013 strb r3, [r2, #0] (*pptr)++; 8012d62: 6802 ldr r2, [r0, #0] 8012d64: 1c53 adds r3, r2, #1 8012d66: 6003 str r3, [r0, #0] **pptr = (unsigned char)(anInt % 256); 8012d68: 424b negs r3, r1 8012d6a: b2c9 uxtb r1, r1 8012d6c: b2db uxtb r3, r3 8012d6e: bf58 it pl 8012d70: 4259 negpl r1, r3 8012d72: 7051 strb r1, [r2, #1] (*pptr)++; 8012d74: 6803 ldr r3, [r0, #0] 8012d76: 3301 adds r3, #1 8012d78: 6003 str r3, [r0, #0] } 8012d7a: 4770 bx lr **pptr = (unsigned char)(anInt / 256); 8012d7c: f101 03ff add.w r3, r1, #255 @ 0xff 8012d80: e7eb b.n 8012d5a 08012d82 : * Writes a "UTF" string to an output buffer. Converts C string to length-delimited. * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param string the C string to write */ void writeCString(unsigned char** pptr, const char* string) { 8012d82: b570 push {r4, r5, r6, lr} 8012d84: 4604 mov r4, r0 8012d86: 460e mov r6, r1 int len = strlen(string); 8012d88: 4608 mov r0, r1 8012d8a: f7ed fab3 bl 80002f4 8012d8e: 4605 mov r5, r0 writeInt(pptr, len); 8012d90: 4601 mov r1, r0 8012d92: 4620 mov r0, r4 8012d94: f7ff ffde bl 8012d54 memcpy(*pptr, string, len); 8012d98: 462a mov r2, r5 8012d9a: 4631 mov r1, r6 8012d9c: 6820 ldr r0, [r4, #0] 8012d9e: f000 fd70 bl 8013882 *pptr += len; 8012da2: 6823 ldr r3, [r4, #0] 8012da4: 442b add r3, r5 8012da6: 6023 str r3, [r4, #0] } 8012da8: bd70 pop {r4, r5, r6, pc} 08012daa : return len; } void writeMQTTString(unsigned char** pptr, MQTTString mqttstring) { 8012daa: b530 push {r4, r5, lr} 8012dac: b085 sub sp, #20 8012dae: 4604 mov r4, r0 8012db0: a804 add r0, sp, #16 8012db2: e900 000e stmdb r0, {r1, r2, r3} if (mqttstring.lenstring.len > 0) 8012db6: 2a00 cmp r2, #0 8012db8: dc05 bgt.n 8012dc6 { writeInt(pptr, mqttstring.lenstring.len); memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len); *pptr += mqttstring.lenstring.len; } else if (mqttstring.cstring) 8012dba: 9901 ldr r1, [sp, #4] 8012dbc: b191 cbz r1, 8012de4 writeCString(pptr, mqttstring.cstring); 8012dbe: 4620 mov r0, r4 8012dc0: f7ff ffdf bl 8012d82 8012dc4: e00c b.n 8012de0 8012dc6: 4615 mov r5, r2 writeInt(pptr, mqttstring.lenstring.len); 8012dc8: 4611 mov r1, r2 8012dca: 4620 mov r0, r4 8012dcc: f7ff ffc2 bl 8012d54 memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len); 8012dd0: 462a mov r2, r5 8012dd2: 9903 ldr r1, [sp, #12] 8012dd4: 6820 ldr r0, [r4, #0] 8012dd6: f000 fd54 bl 8013882 *pptr += mqttstring.lenstring.len; 8012dda: 6823 ldr r3, [r4, #0] 8012ddc: 442b add r3, r5 8012dde: 6023 str r3, [r4, #0] else writeInt(pptr, 0); } 8012de0: b005 add sp, #20 8012de2: bd30 pop {r4, r5, pc} writeInt(pptr, 0); 8012de4: 2100 movs r1, #0 8012de6: 4620 mov r0, r4 8012de8: f7ff ffb4 bl 8012d54 } 8012dec: e7f8 b.n 8012de0 08012dee : * @param pptr pointer to the output buffer - incremented by the number of bytes used & returned * @param enddata pointer to the end of the data: do not read beyond * @return 1 if successful, 0 if not */ int readMQTTLenString(MQTTString* mqttstring, unsigned char** pptr, unsigned char* enddata) { 8012dee: b570 push {r4, r5, r6, lr} 8012df0: 4605 mov r5, r0 int rc = 0; FUNC_ENTRY; /* the first two bytes are the length of the string */ if (enddata - (*pptr) > 1) /* enough length to read the integer? */ 8012df2: 680b ldr r3, [r1, #0] 8012df4: 1ad3 subs r3, r2, r3 8012df6: 2b01 cmp r3, #1 8012df8: dc03 bgt.n 8012e02 int rc = 0; 8012dfa: 2000 movs r0, #0 mqttstring->lenstring.data = (char*)*pptr; *pptr += mqttstring->lenstring.len; rc = 1; } } mqttstring->cstring = NULL; 8012dfc: 2300 movs r3, #0 8012dfe: 602b str r3, [r5, #0] FUNC_EXIT_RC(rc); return rc; } 8012e00: bd70 pop {r4, r5, r6, pc} 8012e02: 460c mov r4, r1 8012e04: 4616 mov r6, r2 mqttstring->lenstring.len = readInt(pptr); /* increments pptr to point past length */ 8012e06: 4608 mov r0, r1 8012e08: f7ff ff90 bl 8012d2c 8012e0c: 6068 str r0, [r5, #4] if (&(*pptr)[mqttstring->lenstring.len] <= enddata) 8012e0e: 6823 ldr r3, [r4, #0] 8012e10: 4418 add r0, r3 8012e12: 42b0 cmp r0, r6 8012e14: d803 bhi.n 8012e1e mqttstring->lenstring.data = (char*)*pptr; 8012e16: 60ab str r3, [r5, #8] *pptr += mqttstring->lenstring.len; 8012e18: 6020 str r0, [r4, #0] rc = 1; 8012e1a: 2001 movs r0, #1 8012e1c: e7ee b.n 8012dfc int rc = 0; 8012e1e: 2000 movs r0, #0 8012e20: e7ec b.n 8012dfc 08012e22 : * Return the length of the MQTTstring - C string if there is one, otherwise the length delimited string * @param mqttstring the string to return the length of * @return the length of the string */ int MQTTstrlen(MQTTString mqttstring) { 8012e22: b500 push {lr} 8012e24: b085 sub sp, #20 8012e26: ab04 add r3, sp, #16 8012e28: e903 0007 stmdb r3, {r0, r1, r2} int rc = 0; if (mqttstring.cstring) 8012e2c: b120 cbz r0, 8012e38 rc = strlen(mqttstring.cstring); 8012e2e: f7ed fa61 bl 80002f4 else rc = mqttstring.lenstring.len; return rc; } 8012e32: b005 add sp, #20 8012e34: f85d fb04 ldr.w pc, [sp], #4 rc = mqttstring.lenstring.len; 8012e38: 9802 ldr r0, [sp, #8] return rc; 8012e3a: e7fa b.n 8012e32 08012e3c : * @param a the MQTTString to compare * @param bptr the C string to compare * @return boolean - equal or not */ int MQTTPacket_equals(MQTTString* a, char* bptr) { 8012e3c: b570 push {r4, r5, r6, lr} 8012e3e: 460c mov r4, r1 int alen = 0, blen = 0; char *aptr; if (a->cstring) 8012e40: 6806 ldr r6, [r0, #0] 8012e42: b156 cbz r6, 8012e5a { aptr = a->cstring; alen = strlen(a->cstring); 8012e44: 4630 mov r0, r6 8012e46: f7ed fa55 bl 80002f4 8012e4a: 4605 mov r5, r0 else { aptr = a->lenstring.data; alen = a->lenstring.len; } blen = strlen(bptr); 8012e4c: 4620 mov r0, r4 8012e4e: f7ed fa51 bl 80002f4 return (alen == blen) && (strncmp(aptr, bptr, alen) == 0); 8012e52: 4285 cmp r5, r0 8012e54: d004 beq.n 8012e60 8012e56: 2000 movs r0, #0 } 8012e58: bd70 pop {r4, r5, r6, pc} aptr = a->lenstring.data; 8012e5a: 6886 ldr r6, [r0, #8] alen = a->lenstring.len; 8012e5c: 6845 ldr r5, [r0, #4] 8012e5e: e7f5 b.n 8012e4c return (alen == blen) && (strncmp(aptr, bptr, alen) == 0); 8012e60: 462a mov r2, r5 8012e62: 4621 mov r1, r4 8012e64: 4630 mov r0, r6 8012e66: f000 fc2f bl 80136c8 8012e6a: b108 cbz r0, 8012e70 8012e6c: 2000 movs r0, #0 8012e6e: e7f3 b.n 8012e58 8012e70: 2001 movs r0, #1 8012e72: e7f1 b.n 8012e58 08012e74 : * @param topicName the topic name to be used in the publish * @param payloadlen the length of the payload to be sent * @return the length of buffer needed to contain the serialized version of the packet */ int MQTTSerialize_publishLength(int qos, MQTTString topicName, int payloadlen) { 8012e74: b510 push {r4, lr} 8012e76: b084 sub sp, #16 8012e78: 4604 mov r4, r0 8012e7a: f10d 0c04 add.w ip, sp, #4 8012e7e: e88c 000e stmia.w ip, {r1, r2, r3} int len = 0; len += 2 + MQTTstrlen(topicName) + payloadlen; 8012e82: e89c 0007 ldmia.w ip, {r0, r1, r2} 8012e86: f7ff ffcc bl 8012e22 8012e8a: 1c83 adds r3, r0, #2 8012e8c: 9a06 ldr r2, [sp, #24] 8012e8e: 1898 adds r0, r3, r2 if (qos > 0) 8012e90: 2c00 cmp r4, #0 8012e92: dd00 ble.n 8012e96 len += 2; /* packetid */ 8012e94: 3002 adds r0, #2 return len; } 8012e96: b004 add sp, #16 8012e98: bd10 pop {r4, pc} 08012e9a : * @param payloadlen integer - the length of the MQTT payload * @return the length of the serialized data. <= 0 indicates error */ int MQTTSerialize_publish(unsigned char* buf, int buflen, unsigned char dup, int qos, unsigned char retained, unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen) { 8012e9a: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8012e9e: b084 sub sp, #16 8012ea0: 4606 mov r6, r0 8012ea2: 460f mov r7, r1 8012ea4: 4690 mov r8, r2 8012ea6: 461c mov r4, r3 8012ea8: f8dd 9048 ldr.w r9, [sp, #72] @ 0x48 unsigned char *ptr = buf; 8012eac: 9003 str r0, [sp, #12] MQTTHeader header = {0}; int rem_len = 0; int rc = 0; FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_publishLength(qos, topicName, payloadlen)) > buflen) 8012eae: f8cd 9000 str.w r9, [sp] 8012eb2: ab0e add r3, sp, #56 @ 0x38 8012eb4: cb0e ldmia r3, {r1, r2, r3} 8012eb6: 4620 mov r0, r4 8012eb8: f7ff ffdc bl 8012e74 8012ebc: 4682 mov sl, r0 8012ebe: f7ff ff15 bl 8012cec 8012ec2: 42b8 cmp r0, r7 8012ec4: dc2f bgt.n 8012f26 8012ec6: 2500 movs r5, #0 { rc = MQTTPACKET_BUFFER_TOO_SHORT; goto exit; } header.bits.type = PUBLISH; 8012ec8: 2303 movs r3, #3 8012eca: f363 1507 bfi r5, r3, #4, #4 header.bits.dup = dup; 8012ece: f368 05c3 bfi r5, r8, #3, #1 header.bits.qos = qos; 8012ed2: f364 0542 bfi r5, r4, #1, #2 header.bits.retain = retained; 8012ed6: f89d 3030 ldrb.w r3, [sp, #48] @ 0x30 8012eda: f363 0500 bfi r5, r3, #0, #1 writeChar(&ptr, header.byte); /* write header */ 8012ede: b2e9 uxtb r1, r5 8012ee0: a803 add r0, sp, #12 8012ee2: f7ff ff31 bl 8012d48 ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 8012ee6: 4651 mov r1, sl 8012ee8: 9803 ldr r0, [sp, #12] 8012eea: f7ff febd bl 8012c68 8012eee: 9b03 ldr r3, [sp, #12] 8012ef0: 4403 add r3, r0 8012ef2: 9303 str r3, [sp, #12] writeMQTTString(&ptr, topicName); 8012ef4: ab0e add r3, sp, #56 @ 0x38 8012ef6: cb0e ldmia r3, {r1, r2, r3} 8012ef8: a803 add r0, sp, #12 8012efa: f7ff ff56 bl 8012daa if (qos > 0) 8012efe: 2c00 cmp r4, #0 8012f00: dc0b bgt.n 8012f1a writeInt(&ptr, packetid); memcpy(ptr, payload, payloadlen); 8012f02: 464a mov r2, r9 8012f04: 9911 ldr r1, [sp, #68] @ 0x44 8012f06: 9803 ldr r0, [sp, #12] 8012f08: f000 fcbb bl 8013882 ptr += payloadlen; 8012f0c: 9a03 ldr r2, [sp, #12] 8012f0e: 444a add r2, r9 8012f10: 9203 str r2, [sp, #12] rc = ptr - buf; 8012f12: 1b90 subs r0, r2, r6 exit: FUNC_EXIT_RC(rc); return rc; } 8012f14: b004 add sp, #16 8012f16: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} writeInt(&ptr, packetid); 8012f1a: f8bd 1034 ldrh.w r1, [sp, #52] @ 0x34 8012f1e: a803 add r0, sp, #12 8012f20: f7ff ff18 bl 8012d54 8012f24: e7ed b.n 8012f02 rc = MQTTPACKET_BUFFER_TOO_SHORT; 8012f26: f06f 0001 mvn.w r0, #1 return rc; 8012f2a: e7f3 b.n 8012f14 08012f2c : * @param dup the MQTT dup flag * @param packetid the MQTT packet identifier * @return serialized length, or error if 0 */ int MQTTSerialize_ack(unsigned char* buf, int buflen, unsigned char packettype, unsigned char dup, unsigned short packetid) { 8012f2c: b510 push {r4, lr} 8012f2e: b082 sub sp, #8 8012f30: 4604 mov r4, r0 MQTTHeader header = {0}; int rc = 0; unsigned char *ptr = buf; 8012f32: 9001 str r0, [sp, #4] FUNC_ENTRY; if (buflen < 4) 8012f34: 2903 cmp r1, #3 8012f36: dd1e ble.n 8012f76 8012f38: 2000 movs r0, #0 { rc = MQTTPACKET_BUFFER_TOO_SHORT; goto exit; } header.bits.type = packettype; 8012f3a: f362 1007 bfi r0, r2, #4, #4 header.bits.dup = dup; 8012f3e: f363 00c3 bfi r0, r3, #3, #1 header.bits.qos = (packettype == PUBREL) ? 1 : 0; 8012f42: 2a06 cmp r2, #6 8012f44: bf14 ite ne 8012f46: 2200 movne r2, #0 8012f48: 2201 moveq r2, #1 8012f4a: f362 0042 bfi r0, r2, #1, #2 writeChar(&ptr, header.byte); /* write header */ 8012f4e: b2c1 uxtb r1, r0 8012f50: a801 add r0, sp, #4 8012f52: f7ff fef9 bl 8012d48 ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */ 8012f56: 2102 movs r1, #2 8012f58: 9801 ldr r0, [sp, #4] 8012f5a: f7ff fe85 bl 8012c68 8012f5e: 9b01 ldr r3, [sp, #4] 8012f60: 4403 add r3, r0 8012f62: 9301 str r3, [sp, #4] writeInt(&ptr, packetid); 8012f64: f8bd 1010 ldrh.w r1, [sp, #16] 8012f68: a801 add r0, sp, #4 8012f6a: f7ff fef3 bl 8012d54 rc = ptr - buf; 8012f6e: 9801 ldr r0, [sp, #4] 8012f70: 1b00 subs r0, r0, r4 exit: FUNC_EXIT_RC(rc); return rc; } 8012f72: b002 add sp, #8 8012f74: bd10 pop {r4, pc} rc = MQTTPACKET_BUFFER_TOO_SHORT; 8012f76: f06f 0001 mvn.w r0, #1 return rc; 8012f7a: e7fa b.n 8012f72 08012f7c : * @param count the number of topic filter strings in topicFilters * @param topicFilters the array of topic filter strings to be used in the publish * @return the length of buffer needed to contain the serialized version of the packet */ int MQTTSerialize_subscribeLength(int count, MQTTString topicFilters[]) { 8012f7c: b5f8 push {r3, r4, r5, r6, r7, lr} 8012f7e: 4606 mov r6, r0 8012f80: 460f mov r7, r1 int i; int len = 2; /* packetid */ 8012f82: 2502 movs r5, #2 for (i = 0; i < count; ++i) 8012f84: 2400 movs r4, #0 8012f86: e00a b.n 8012f9e len += 2 + MQTTstrlen(topicFilters[i]) + 1; /* length + topic + req_qos */ 8012f88: eb04 0344 add.w r3, r4, r4, lsl #1 8012f8c: eb07 0383 add.w r3, r7, r3, lsl #2 8012f90: e893 0007 ldmia.w r3, {r0, r1, r2} 8012f94: f7ff ff45 bl 8012e22 8012f98: 3003 adds r0, #3 8012f9a: 4405 add r5, r0 for (i = 0; i < count; ++i) 8012f9c: 3401 adds r4, #1 8012f9e: 42b4 cmp r4, r6 8012fa0: dbf2 blt.n 8012f88 return len; } 8012fa2: 4628 mov r0, r5 8012fa4: bdf8 pop {r3, r4, r5, r6, r7, pc} 08012fa6 : * @param requestedQoSs - array of requested QoS * @return the length of the serialized data. <= 0 indicates error */ int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid, int count, MQTTString topicFilters[], int requestedQoSs[]) { 8012fa6: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8012faa: b085 sub sp, #20 8012fac: 4607 mov r7, r0 8012fae: 4689 mov r9, r1 8012fb0: 4692 mov sl, r2 8012fb2: 9301 str r3, [sp, #4] 8012fb4: 9c0e ldr r4, [sp, #56] @ 0x38 8012fb6: 9d0f ldr r5, [sp, #60] @ 0x3c 8012fb8: 9e10 ldr r6, [sp, #64] @ 0x40 unsigned char *ptr = buf; 8012fba: 9003 str r0, [sp, #12] int rem_len = 0; int rc = 0; int i = 0; FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_subscribeLength(count, topicFilters)) > buflen) 8012fbc: 4629 mov r1, r5 8012fbe: 4620 mov r0, r4 8012fc0: f7ff ffdc bl 8012f7c 8012fc4: 4683 mov fp, r0 8012fc6: f7ff fe91 bl 8012cec 8012fca: 4548 cmp r0, r9 8012fcc: dc32 bgt.n 8013034 8012fce: f04f 0800 mov.w r8, #0 rc = MQTTPACKET_BUFFER_TOO_SHORT; goto exit; } header.byte = 0; header.bits.type = SUBSCRIBE; 8012fd2: 2308 movs r3, #8 8012fd4: f363 1807 bfi r8, r3, #4, #4 header.bits.dup = dup; 8012fd8: f36a 08c3 bfi r8, sl, #3, #1 header.bits.qos = 1; 8012fdc: 2301 movs r3, #1 8012fde: f363 0842 bfi r8, r3, #1, #2 writeChar(&ptr, header.byte); /* write header */ 8012fe2: fa5f f188 uxtb.w r1, r8 8012fe6: a803 add r0, sp, #12 8012fe8: f7ff feae bl 8012d48 ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 8012fec: 4659 mov r1, fp 8012fee: 9803 ldr r0, [sp, #12] 8012ff0: f7ff fe3a bl 8012c68 8012ff4: 9b03 ldr r3, [sp, #12] 8012ff6: 4403 add r3, r0 8012ff8: 9303 str r3, [sp, #12] writeInt(&ptr, packetid); 8012ffa: 9901 ldr r1, [sp, #4] 8012ffc: a803 add r0, sp, #12 8012ffe: f7ff fea9 bl 8012d54 for (i = 0; i < count; ++i) 8013002: f04f 0800 mov.w r8, #0 8013006: e00e b.n 8013026 { writeMQTTString(&ptr, topicFilters[i]); 8013008: eb08 0348 add.w r3, r8, r8, lsl #1 801300c: eb05 0383 add.w r3, r5, r3, lsl #2 8013010: cb0e ldmia r3, {r1, r2, r3} 8013012: a803 add r0, sp, #12 8013014: f7ff fec9 bl 8012daa writeChar(&ptr, requestedQoSs[i]); 8013018: f816 1028 ldrb.w r1, [r6, r8, lsl #2] 801301c: a803 add r0, sp, #12 801301e: f7ff fe93 bl 8012d48 for (i = 0; i < count; ++i) 8013022: f108 0801 add.w r8, r8, #1 8013026: 45a0 cmp r8, r4 8013028: dbee blt.n 8013008 } rc = ptr - buf; 801302a: 9803 ldr r0, [sp, #12] 801302c: 1bc0 subs r0, r0, r7 exit: FUNC_EXIT_RC(rc); return rc; } 801302e: b005 add sp, #20 8013030: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} rc = MQTTPACKET_BUFFER_TOO_SHORT; 8013034: f06f 0001 mvn.w r0, #1 return rc; 8013038: e7f9 b.n 801302e 0801303a : * @param buf the raw buffer data, of the correct length determined by the remaining length field * @param buflen the length in bytes of the data in the supplied buffer * @return error code. 1 is success, 0 is failure */ int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int buflen) { 801303a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 801303e: b082 sub sp, #8 8013040: 4680 mov r8, r0 8013042: 460d mov r5, r1 8013044: 4614 mov r4, r2 8013046: 461e mov r6, r3 MQTTHeader header = {0}; unsigned char* curdata = buf; 8013048: 9b08 ldr r3, [sp, #32] 801304a: 9301 str r3, [sp, #4] unsigned char* enddata = NULL; int rc = 0; int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 801304c: a801 add r0, sp, #4 801304e: f7ff fe75 bl 8012d3c if (header.bits.type != SUBACK) 8013052: f000 03f0 and.w r3, r0, #240 @ 0xf0 8013056: 2b90 cmp r3, #144 @ 0x90 8013058: d003 beq.n 8013062 int rc = 0; 801305a: 2000 movs r0, #0 rc = 1; exit: FUNC_EXIT_RC(rc); return rc; } 801305c: b002 add sp, #8 801305e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8013062: 4669 mov r1, sp 8013064: 9801 ldr r0, [sp, #4] 8013066: f7ff fe55 bl 8012d14 801306a: 9f01 ldr r7, [sp, #4] 801306c: 4407 add r7, r0 801306e: 9701 str r7, [sp, #4] enddata = curdata + mylen; 8013070: 9b00 ldr r3, [sp, #0] 8013072: 441f add r7, r3 if (enddata - curdata < 2) 8013074: 2b01 cmp r3, #1 8013076: ddf1 ble.n 801305c *packetid = readInt(&curdata); 8013078: a801 add r0, sp, #4 801307a: f7ff fe57 bl 8012d2c 801307e: f8a8 0000 strh.w r0, [r8] *count = 0; 8013082: 2300 movs r3, #0 8013084: 6023 str r3, [r4, #0] while (curdata < enddata) 8013086: 9b01 ldr r3, [sp, #4] 8013088: 42bb cmp r3, r7 801308a: d20b bcs.n 80130a4 if (*count > maxcount) 801308c: 6823 ldr r3, [r4, #0] 801308e: 42ab cmp r3, r5 8013090: dc0a bgt.n 80130a8 grantedQoSs[(*count)++] = readChar(&curdata); 8013092: a801 add r0, sp, #4 8013094: f7ff fe52 bl 8012d3c 8013098: 6822 ldr r2, [r4, #0] 801309a: 1c53 adds r3, r2, #1 801309c: 6023 str r3, [r4, #0] 801309e: f846 0022 str.w r0, [r6, r2, lsl #2] 80130a2: e7f0 b.n 8013086 rc = 1; 80130a4: 2001 movs r0, #1 80130a6: e7d9 b.n 801305c rc = -1; 80130a8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff return rc; 80130ac: e7d6 b.n 801305c ... 080130b0 : 80130b0: 4b16 ldr r3, [pc, #88] @ (801310c ) 80130b2: b510 push {r4, lr} 80130b4: 681c ldr r4, [r3, #0] 80130b6: 6b23 ldr r3, [r4, #48] @ 0x30 80130b8: b9b3 cbnz r3, 80130e8 80130ba: 2018 movs r0, #24 80130bc: f000 fc58 bl 8013970 80130c0: 4602 mov r2, r0 80130c2: 6320 str r0, [r4, #48] @ 0x30 80130c4: b920 cbnz r0, 80130d0 80130c6: 4b12 ldr r3, [pc, #72] @ (8013110 ) 80130c8: 4812 ldr r0, [pc, #72] @ (8013114 ) 80130ca: 2152 movs r1, #82 @ 0x52 80130cc: f000 fbe8 bl 80138a0 <__assert_func> 80130d0: 4911 ldr r1, [pc, #68] @ (8013118 ) 80130d2: 4b12 ldr r3, [pc, #72] @ (801311c ) 80130d4: e9c0 1300 strd r1, r3, [r0] 80130d8: 4b11 ldr r3, [pc, #68] @ (8013120 ) 80130da: 6083 str r3, [r0, #8] 80130dc: 230b movs r3, #11 80130de: 8183 strh r3, [r0, #12] 80130e0: 2100 movs r1, #0 80130e2: 2001 movs r0, #1 80130e4: e9c2 0104 strd r0, r1, [r2, #16] 80130e8: 6b21 ldr r1, [r4, #48] @ 0x30 80130ea: 480e ldr r0, [pc, #56] @ (8013124 ) 80130ec: 690b ldr r3, [r1, #16] 80130ee: 694c ldr r4, [r1, #20] 80130f0: 4a0d ldr r2, [pc, #52] @ (8013128 ) 80130f2: 4358 muls r0, r3 80130f4: fb02 0004 mla r0, r2, r4, r0 80130f8: fba3 3202 umull r3, r2, r3, r2 80130fc: 3301 adds r3, #1 80130fe: eb40 0002 adc.w r0, r0, r2 8013102: e9c1 3004 strd r3, r0, [r1, #16] 8013106: f020 4000 bic.w r0, r0, #2147483648 @ 0x80000000 801310a: bd10 pop {r4, pc} 801310c: 2400003c .word 0x2400003c 8013110: 08017edb .word 0x08017edb 8013114: 08017ef2 .word 0x08017ef2 8013118: abcd330e .word 0xabcd330e 801311c: e66d1234 .word 0xe66d1234 8013120: 0005deec .word 0x0005deec 8013124: 5851f42d .word 0x5851f42d 8013128: 4c957f2d .word 0x4c957f2d 0801312c <__sflush_r>: 801312c: f9b1 200c ldrsh.w r2, [r1, #12] 8013130: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8013134: 0716 lsls r6, r2, #28 8013136: 4605 mov r5, r0 8013138: 460c mov r4, r1 801313a: d454 bmi.n 80131e6 <__sflush_r+0xba> 801313c: 684b ldr r3, [r1, #4] 801313e: 2b00 cmp r3, #0 8013140: dc02 bgt.n 8013148 <__sflush_r+0x1c> 8013142: 6c0b ldr r3, [r1, #64] @ 0x40 8013144: 2b00 cmp r3, #0 8013146: dd48 ble.n 80131da <__sflush_r+0xae> 8013148: 6ae6 ldr r6, [r4, #44] @ 0x2c 801314a: 2e00 cmp r6, #0 801314c: d045 beq.n 80131da <__sflush_r+0xae> 801314e: 2300 movs r3, #0 8013150: f412 5280 ands.w r2, r2, #4096 @ 0x1000 8013154: 682f ldr r7, [r5, #0] 8013156: 6a21 ldr r1, [r4, #32] 8013158: 602b str r3, [r5, #0] 801315a: d030 beq.n 80131be <__sflush_r+0x92> 801315c: 6d62 ldr r2, [r4, #84] @ 0x54 801315e: 89a3 ldrh r3, [r4, #12] 8013160: 0759 lsls r1, r3, #29 8013162: d505 bpl.n 8013170 <__sflush_r+0x44> 8013164: 6863 ldr r3, [r4, #4] 8013166: 1ad2 subs r2, r2, r3 8013168: 6b63 ldr r3, [r4, #52] @ 0x34 801316a: b10b cbz r3, 8013170 <__sflush_r+0x44> 801316c: 6c23 ldr r3, [r4, #64] @ 0x40 801316e: 1ad2 subs r2, r2, r3 8013170: 2300 movs r3, #0 8013172: 6ae6 ldr r6, [r4, #44] @ 0x2c 8013174: 6a21 ldr r1, [r4, #32] 8013176: 4628 mov r0, r5 8013178: 47b0 blx r6 801317a: 1c43 adds r3, r0, #1 801317c: 89a3 ldrh r3, [r4, #12] 801317e: d106 bne.n 801318e <__sflush_r+0x62> 8013180: 6829 ldr r1, [r5, #0] 8013182: 291d cmp r1, #29 8013184: d82b bhi.n 80131de <__sflush_r+0xb2> 8013186: 4a2a ldr r2, [pc, #168] @ (8013230 <__sflush_r+0x104>) 8013188: 410a asrs r2, r1 801318a: 07d6 lsls r6, r2, #31 801318c: d427 bmi.n 80131de <__sflush_r+0xb2> 801318e: 2200 movs r2, #0 8013190: 6062 str r2, [r4, #4] 8013192: 04d9 lsls r1, r3, #19 8013194: 6922 ldr r2, [r4, #16] 8013196: 6022 str r2, [r4, #0] 8013198: d504 bpl.n 80131a4 <__sflush_r+0x78> 801319a: 1c42 adds r2, r0, #1 801319c: d101 bne.n 80131a2 <__sflush_r+0x76> 801319e: 682b ldr r3, [r5, #0] 80131a0: b903 cbnz r3, 80131a4 <__sflush_r+0x78> 80131a2: 6560 str r0, [r4, #84] @ 0x54 80131a4: 6b61 ldr r1, [r4, #52] @ 0x34 80131a6: 602f str r7, [r5, #0] 80131a8: b1b9 cbz r1, 80131da <__sflush_r+0xae> 80131aa: f104 0344 add.w r3, r4, #68 @ 0x44 80131ae: 4299 cmp r1, r3 80131b0: d002 beq.n 80131b8 <__sflush_r+0x8c> 80131b2: 4628 mov r0, r5 80131b4: f000 fb92 bl 80138dc <_free_r> 80131b8: 2300 movs r3, #0 80131ba: 6363 str r3, [r4, #52] @ 0x34 80131bc: e00d b.n 80131da <__sflush_r+0xae> 80131be: 2301 movs r3, #1 80131c0: 4628 mov r0, r5 80131c2: 47b0 blx r6 80131c4: 4602 mov r2, r0 80131c6: 1c50 adds r0, r2, #1 80131c8: d1c9 bne.n 801315e <__sflush_r+0x32> 80131ca: 682b ldr r3, [r5, #0] 80131cc: 2b00 cmp r3, #0 80131ce: d0c6 beq.n 801315e <__sflush_r+0x32> 80131d0: 2b1d cmp r3, #29 80131d2: d001 beq.n 80131d8 <__sflush_r+0xac> 80131d4: 2b16 cmp r3, #22 80131d6: d11e bne.n 8013216 <__sflush_r+0xea> 80131d8: 602f str r7, [r5, #0] 80131da: 2000 movs r0, #0 80131dc: e022 b.n 8013224 <__sflush_r+0xf8> 80131de: f043 0340 orr.w r3, r3, #64 @ 0x40 80131e2: b21b sxth r3, r3 80131e4: e01b b.n 801321e <__sflush_r+0xf2> 80131e6: 690f ldr r7, [r1, #16] 80131e8: 2f00 cmp r7, #0 80131ea: d0f6 beq.n 80131da <__sflush_r+0xae> 80131ec: 0793 lsls r3, r2, #30 80131ee: 680e ldr r6, [r1, #0] 80131f0: bf08 it eq 80131f2: 694b ldreq r3, [r1, #20] 80131f4: 600f str r7, [r1, #0] 80131f6: bf18 it ne 80131f8: 2300 movne r3, #0 80131fa: eba6 0807 sub.w r8, r6, r7 80131fe: 608b str r3, [r1, #8] 8013200: f1b8 0f00 cmp.w r8, #0 8013204: dde9 ble.n 80131da <__sflush_r+0xae> 8013206: 6a21 ldr r1, [r4, #32] 8013208: 6aa6 ldr r6, [r4, #40] @ 0x28 801320a: 4643 mov r3, r8 801320c: 463a mov r2, r7 801320e: 4628 mov r0, r5 8013210: 47b0 blx r6 8013212: 2800 cmp r0, #0 8013214: dc08 bgt.n 8013228 <__sflush_r+0xfc> 8013216: f9b4 300c ldrsh.w r3, [r4, #12] 801321a: f043 0340 orr.w r3, r3, #64 @ 0x40 801321e: 81a3 strh r3, [r4, #12] 8013220: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8013224: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8013228: 4407 add r7, r0 801322a: eba8 0800 sub.w r8, r8, r0 801322e: e7e7 b.n 8013200 <__sflush_r+0xd4> 8013230: dfbffffe .word 0xdfbffffe 08013234 <_fflush_r>: 8013234: b538 push {r3, r4, r5, lr} 8013236: 690b ldr r3, [r1, #16] 8013238: 4605 mov r5, r0 801323a: 460c mov r4, r1 801323c: b913 cbnz r3, 8013244 <_fflush_r+0x10> 801323e: 2500 movs r5, #0 8013240: 4628 mov r0, r5 8013242: bd38 pop {r3, r4, r5, pc} 8013244: b118 cbz r0, 801324e <_fflush_r+0x1a> 8013246: 6a03 ldr r3, [r0, #32] 8013248: b90b cbnz r3, 801324e <_fflush_r+0x1a> 801324a: f000 f8a7 bl 801339c <__sinit> 801324e: f9b4 300c ldrsh.w r3, [r4, #12] 8013252: 2b00 cmp r3, #0 8013254: d0f3 beq.n 801323e <_fflush_r+0xa> 8013256: 6e62 ldr r2, [r4, #100] @ 0x64 8013258: 07d0 lsls r0, r2, #31 801325a: d404 bmi.n 8013266 <_fflush_r+0x32> 801325c: 0599 lsls r1, r3, #22 801325e: d402 bmi.n 8013266 <_fflush_r+0x32> 8013260: 6da0 ldr r0, [r4, #88] @ 0x58 8013262: f000 fb04 bl 801386e <__retarget_lock_acquire_recursive> 8013266: 4628 mov r0, r5 8013268: 4621 mov r1, r4 801326a: f7ff ff5f bl 801312c <__sflush_r> 801326e: 6e63 ldr r3, [r4, #100] @ 0x64 8013270: 07da lsls r2, r3, #31 8013272: 4605 mov r5, r0 8013274: d4e4 bmi.n 8013240 <_fflush_r+0xc> 8013276: 89a3 ldrh r3, [r4, #12] 8013278: 059b lsls r3, r3, #22 801327a: d4e1 bmi.n 8013240 <_fflush_r+0xc> 801327c: 6da0 ldr r0, [r4, #88] @ 0x58 801327e: f000 faf7 bl 8013870 <__retarget_lock_release_recursive> 8013282: e7dd b.n 8013240 <_fflush_r+0xc> 08013284 : 8013284: 2300 movs r3, #0 8013286: b510 push {r4, lr} 8013288: 4604 mov r4, r0 801328a: e9c0 3300 strd r3, r3, [r0] 801328e: e9c0 3304 strd r3, r3, [r0, #16] 8013292: 6083 str r3, [r0, #8] 8013294: 8181 strh r1, [r0, #12] 8013296: 6643 str r3, [r0, #100] @ 0x64 8013298: 81c2 strh r2, [r0, #14] 801329a: 6183 str r3, [r0, #24] 801329c: 4619 mov r1, r3 801329e: 2208 movs r2, #8 80132a0: 305c adds r0, #92 @ 0x5c 80132a2: f000 fa09 bl 80136b8 80132a6: 4b0d ldr r3, [pc, #52] @ (80132dc ) 80132a8: 6263 str r3, [r4, #36] @ 0x24 80132aa: 4b0d ldr r3, [pc, #52] @ (80132e0 ) 80132ac: 62a3 str r3, [r4, #40] @ 0x28 80132ae: 4b0d ldr r3, [pc, #52] @ (80132e4 ) 80132b0: 62e3 str r3, [r4, #44] @ 0x2c 80132b2: 4b0d ldr r3, [pc, #52] @ (80132e8 ) 80132b4: 6323 str r3, [r4, #48] @ 0x30 80132b6: 4b0d ldr r3, [pc, #52] @ (80132ec ) 80132b8: 6224 str r4, [r4, #32] 80132ba: 429c cmp r4, r3 80132bc: d006 beq.n 80132cc 80132be: f103 0268 add.w r2, r3, #104 @ 0x68 80132c2: 4294 cmp r4, r2 80132c4: d002 beq.n 80132cc 80132c6: 33d0 adds r3, #208 @ 0xd0 80132c8: 429c cmp r4, r3 80132ca: d105 bne.n 80132d8 80132cc: f104 0058 add.w r0, r4, #88 @ 0x58 80132d0: e8bd 4010 ldmia.w sp!, {r4, lr} 80132d4: f000 baca b.w 801386c <__retarget_lock_init_recursive> 80132d8: bd10 pop {r4, pc} 80132da: bf00 nop 80132dc: 080134e9 .word 0x080134e9 80132e0: 0801350b .word 0x0801350b 80132e4: 08013543 .word 0x08013543 80132e8: 08013567 .word 0x08013567 80132ec: 24019c50 .word 0x24019c50 080132f0 : 80132f0: 4a02 ldr r2, [pc, #8] @ (80132fc ) 80132f2: 4903 ldr r1, [pc, #12] @ (8013300 ) 80132f4: 4803 ldr r0, [pc, #12] @ (8013304 ) 80132f6: f000 b869 b.w 80133cc <_fwalk_sglue> 80132fa: bf00 nop 80132fc: 24000030 .word 0x24000030 8013300: 08013235 .word 0x08013235 8013304: 24000040 .word 0x24000040 08013308 : 8013308: 6841 ldr r1, [r0, #4] 801330a: 4b0c ldr r3, [pc, #48] @ (801333c ) 801330c: 4299 cmp r1, r3 801330e: b510 push {r4, lr} 8013310: 4604 mov r4, r0 8013312: d001 beq.n 8013318 8013314: f7ff ff8e bl 8013234 <_fflush_r> 8013318: 68a1 ldr r1, [r4, #8] 801331a: 4b09 ldr r3, [pc, #36] @ (8013340 ) 801331c: 4299 cmp r1, r3 801331e: d002 beq.n 8013326 8013320: 4620 mov r0, r4 8013322: f7ff ff87 bl 8013234 <_fflush_r> 8013326: 68e1 ldr r1, [r4, #12] 8013328: 4b06 ldr r3, [pc, #24] @ (8013344 ) 801332a: 4299 cmp r1, r3 801332c: d004 beq.n 8013338 801332e: 4620 mov r0, r4 8013330: e8bd 4010 ldmia.w sp!, {r4, lr} 8013334: f7ff bf7e b.w 8013234 <_fflush_r> 8013338: bd10 pop {r4, pc} 801333a: bf00 nop 801333c: 24019c50 .word 0x24019c50 8013340: 24019cb8 .word 0x24019cb8 8013344: 24019d20 .word 0x24019d20 08013348 : 8013348: b510 push {r4, lr} 801334a: 4b0b ldr r3, [pc, #44] @ (8013378 ) 801334c: 4c0b ldr r4, [pc, #44] @ (801337c ) 801334e: 4a0c ldr r2, [pc, #48] @ (8013380 ) 8013350: 601a str r2, [r3, #0] 8013352: 4620 mov r0, r4 8013354: 2200 movs r2, #0 8013356: 2104 movs r1, #4 8013358: f7ff ff94 bl 8013284 801335c: f104 0068 add.w r0, r4, #104 @ 0x68 8013360: 2201 movs r2, #1 8013362: 2109 movs r1, #9 8013364: f7ff ff8e bl 8013284 8013368: f104 00d0 add.w r0, r4, #208 @ 0xd0 801336c: 2202 movs r2, #2 801336e: e8bd 4010 ldmia.w sp!, {r4, lr} 8013372: 2112 movs r1, #18 8013374: f7ff bf86 b.w 8013284 8013378: 24019d88 .word 0x24019d88 801337c: 24019c50 .word 0x24019c50 8013380: 080132f1 .word 0x080132f1 08013384 <__sfp_lock_acquire>: 8013384: 4801 ldr r0, [pc, #4] @ (801338c <__sfp_lock_acquire+0x8>) 8013386: f000 ba72 b.w 801386e <__retarget_lock_acquire_recursive> 801338a: bf00 nop 801338c: 24019d91 .word 0x24019d91 08013390 <__sfp_lock_release>: 8013390: 4801 ldr r0, [pc, #4] @ (8013398 <__sfp_lock_release+0x8>) 8013392: f000 ba6d b.w 8013870 <__retarget_lock_release_recursive> 8013396: bf00 nop 8013398: 24019d91 .word 0x24019d91 0801339c <__sinit>: 801339c: b510 push {r4, lr} 801339e: 4604 mov r4, r0 80133a0: f7ff fff0 bl 8013384 <__sfp_lock_acquire> 80133a4: 6a23 ldr r3, [r4, #32] 80133a6: b11b cbz r3, 80133b0 <__sinit+0x14> 80133a8: e8bd 4010 ldmia.w sp!, {r4, lr} 80133ac: f7ff bff0 b.w 8013390 <__sfp_lock_release> 80133b0: 4b04 ldr r3, [pc, #16] @ (80133c4 <__sinit+0x28>) 80133b2: 6223 str r3, [r4, #32] 80133b4: 4b04 ldr r3, [pc, #16] @ (80133c8 <__sinit+0x2c>) 80133b6: 681b ldr r3, [r3, #0] 80133b8: 2b00 cmp r3, #0 80133ba: d1f5 bne.n 80133a8 <__sinit+0xc> 80133bc: f7ff ffc4 bl 8013348 80133c0: e7f2 b.n 80133a8 <__sinit+0xc> 80133c2: bf00 nop 80133c4: 08013309 .word 0x08013309 80133c8: 24019d88 .word 0x24019d88 080133cc <_fwalk_sglue>: 80133cc: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80133d0: 4607 mov r7, r0 80133d2: 4688 mov r8, r1 80133d4: 4614 mov r4, r2 80133d6: 2600 movs r6, #0 80133d8: e9d4 9501 ldrd r9, r5, [r4, #4] 80133dc: f1b9 0901 subs.w r9, r9, #1 80133e0: d505 bpl.n 80133ee <_fwalk_sglue+0x22> 80133e2: 6824 ldr r4, [r4, #0] 80133e4: 2c00 cmp r4, #0 80133e6: d1f7 bne.n 80133d8 <_fwalk_sglue+0xc> 80133e8: 4630 mov r0, r6 80133ea: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80133ee: 89ab ldrh r3, [r5, #12] 80133f0: 2b01 cmp r3, #1 80133f2: d907 bls.n 8013404 <_fwalk_sglue+0x38> 80133f4: f9b5 300e ldrsh.w r3, [r5, #14] 80133f8: 3301 adds r3, #1 80133fa: d003 beq.n 8013404 <_fwalk_sglue+0x38> 80133fc: 4629 mov r1, r5 80133fe: 4638 mov r0, r7 8013400: 47c0 blx r8 8013402: 4306 orrs r6, r0 8013404: 3568 adds r5, #104 @ 0x68 8013406: e7e9 b.n 80133dc <_fwalk_sglue+0x10> 08013408 : 8013408: b40f push {r0, r1, r2, r3} 801340a: b507 push {r0, r1, r2, lr} 801340c: 4906 ldr r1, [pc, #24] @ (8013428 ) 801340e: ab04 add r3, sp, #16 8013410: 6808 ldr r0, [r1, #0] 8013412: f853 2b04 ldr.w r2, [r3], #4 8013416: 6881 ldr r1, [r0, #8] 8013418: 9301 str r3, [sp, #4] 801341a: f000 fb89 bl 8013b30 <_vfiprintf_r> 801341e: b003 add sp, #12 8013420: f85d eb04 ldr.w lr, [sp], #4 8013424: b004 add sp, #16 8013426: 4770 bx lr 8013428: 2400003c .word 0x2400003c 0801342c <_puts_r>: 801342c: 6a03 ldr r3, [r0, #32] 801342e: b570 push {r4, r5, r6, lr} 8013430: 6884 ldr r4, [r0, #8] 8013432: 4605 mov r5, r0 8013434: 460e mov r6, r1 8013436: b90b cbnz r3, 801343c <_puts_r+0x10> 8013438: f7ff ffb0 bl 801339c <__sinit> 801343c: 6e63 ldr r3, [r4, #100] @ 0x64 801343e: 07db lsls r3, r3, #31 8013440: d405 bmi.n 801344e <_puts_r+0x22> 8013442: 89a3 ldrh r3, [r4, #12] 8013444: 0598 lsls r0, r3, #22 8013446: d402 bmi.n 801344e <_puts_r+0x22> 8013448: 6da0 ldr r0, [r4, #88] @ 0x58 801344a: f000 fa10 bl 801386e <__retarget_lock_acquire_recursive> 801344e: 89a3 ldrh r3, [r4, #12] 8013450: 0719 lsls r1, r3, #28 8013452: d502 bpl.n 801345a <_puts_r+0x2e> 8013454: 6923 ldr r3, [r4, #16] 8013456: 2b00 cmp r3, #0 8013458: d135 bne.n 80134c6 <_puts_r+0x9a> 801345a: 4621 mov r1, r4 801345c: 4628 mov r0, r5 801345e: f000 f8c5 bl 80135ec <__swsetup_r> 8013462: b380 cbz r0, 80134c6 <_puts_r+0x9a> 8013464: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 8013468: 6e63 ldr r3, [r4, #100] @ 0x64 801346a: 07da lsls r2, r3, #31 801346c: d405 bmi.n 801347a <_puts_r+0x4e> 801346e: 89a3 ldrh r3, [r4, #12] 8013470: 059b lsls r3, r3, #22 8013472: d402 bmi.n 801347a <_puts_r+0x4e> 8013474: 6da0 ldr r0, [r4, #88] @ 0x58 8013476: f000 f9fb bl 8013870 <__retarget_lock_release_recursive> 801347a: 4628 mov r0, r5 801347c: bd70 pop {r4, r5, r6, pc} 801347e: 2b00 cmp r3, #0 8013480: da04 bge.n 801348c <_puts_r+0x60> 8013482: 69a2 ldr r2, [r4, #24] 8013484: 429a cmp r2, r3 8013486: dc17 bgt.n 80134b8 <_puts_r+0x8c> 8013488: 290a cmp r1, #10 801348a: d015 beq.n 80134b8 <_puts_r+0x8c> 801348c: 6823 ldr r3, [r4, #0] 801348e: 1c5a adds r2, r3, #1 8013490: 6022 str r2, [r4, #0] 8013492: 7019 strb r1, [r3, #0] 8013494: 68a3 ldr r3, [r4, #8] 8013496: f816 1f01 ldrb.w r1, [r6, #1]! 801349a: 3b01 subs r3, #1 801349c: 60a3 str r3, [r4, #8] 801349e: 2900 cmp r1, #0 80134a0: d1ed bne.n 801347e <_puts_r+0x52> 80134a2: 2b00 cmp r3, #0 80134a4: da11 bge.n 80134ca <_puts_r+0x9e> 80134a6: 4622 mov r2, r4 80134a8: 210a movs r1, #10 80134aa: 4628 mov r0, r5 80134ac: f000 f85f bl 801356e <__swbuf_r> 80134b0: 3001 adds r0, #1 80134b2: d0d7 beq.n 8013464 <_puts_r+0x38> 80134b4: 250a movs r5, #10 80134b6: e7d7 b.n 8013468 <_puts_r+0x3c> 80134b8: 4622 mov r2, r4 80134ba: 4628 mov r0, r5 80134bc: f000 f857 bl 801356e <__swbuf_r> 80134c0: 3001 adds r0, #1 80134c2: d1e7 bne.n 8013494 <_puts_r+0x68> 80134c4: e7ce b.n 8013464 <_puts_r+0x38> 80134c6: 3e01 subs r6, #1 80134c8: e7e4 b.n 8013494 <_puts_r+0x68> 80134ca: 6823 ldr r3, [r4, #0] 80134cc: 1c5a adds r2, r3, #1 80134ce: 6022 str r2, [r4, #0] 80134d0: 220a movs r2, #10 80134d2: 701a strb r2, [r3, #0] 80134d4: e7ee b.n 80134b4 <_puts_r+0x88> ... 080134d8 : 80134d8: 4b02 ldr r3, [pc, #8] @ (80134e4 ) 80134da: 4601 mov r1, r0 80134dc: 6818 ldr r0, [r3, #0] 80134de: f7ff bfa5 b.w 801342c <_puts_r> 80134e2: bf00 nop 80134e4: 2400003c .word 0x2400003c 080134e8 <__sread>: 80134e8: b510 push {r4, lr} 80134ea: 460c mov r4, r1 80134ec: f9b1 100e ldrsh.w r1, [r1, #14] 80134f0: f000 f974 bl 80137dc <_read_r> 80134f4: 2800 cmp r0, #0 80134f6: bfab itete ge 80134f8: 6d63 ldrge r3, [r4, #84] @ 0x54 80134fa: 89a3 ldrhlt r3, [r4, #12] 80134fc: 181b addge r3, r3, r0 80134fe: f423 5380 biclt.w r3, r3, #4096 @ 0x1000 8013502: bfac ite ge 8013504: 6563 strge r3, [r4, #84] @ 0x54 8013506: 81a3 strhlt r3, [r4, #12] 8013508: bd10 pop {r4, pc} 0801350a <__swrite>: 801350a: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 801350e: 461f mov r7, r3 8013510: 898b ldrh r3, [r1, #12] 8013512: 05db lsls r3, r3, #23 8013514: 4605 mov r5, r0 8013516: 460c mov r4, r1 8013518: 4616 mov r6, r2 801351a: d505 bpl.n 8013528 <__swrite+0x1e> 801351c: f9b1 100e ldrsh.w r1, [r1, #14] 8013520: 2302 movs r3, #2 8013522: 2200 movs r2, #0 8013524: f000 f948 bl 80137b8 <_lseek_r> 8013528: 89a3 ldrh r3, [r4, #12] 801352a: f9b4 100e ldrsh.w r1, [r4, #14] 801352e: f423 5380 bic.w r3, r3, #4096 @ 0x1000 8013532: 81a3 strh r3, [r4, #12] 8013534: 4632 mov r2, r6 8013536: 463b mov r3, r7 8013538: 4628 mov r0, r5 801353a: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 801353e: f000 b95f b.w 8013800 <_write_r> 08013542 <__sseek>: 8013542: b510 push {r4, lr} 8013544: 460c mov r4, r1 8013546: f9b1 100e ldrsh.w r1, [r1, #14] 801354a: f000 f935 bl 80137b8 <_lseek_r> 801354e: 1c43 adds r3, r0, #1 8013550: 89a3 ldrh r3, [r4, #12] 8013552: bf15 itete ne 8013554: 6560 strne r0, [r4, #84] @ 0x54 8013556: f423 5380 biceq.w r3, r3, #4096 @ 0x1000 801355a: f443 5380 orrne.w r3, r3, #4096 @ 0x1000 801355e: 81a3 strheq r3, [r4, #12] 8013560: bf18 it ne 8013562: 81a3 strhne r3, [r4, #12] 8013564: bd10 pop {r4, pc} 08013566 <__sclose>: 8013566: f9b1 100e ldrsh.w r1, [r1, #14] 801356a: f000 b8bf b.w 80136ec <_close_r> 0801356e <__swbuf_r>: 801356e: b5f8 push {r3, r4, r5, r6, r7, lr} 8013570: 460e mov r6, r1 8013572: 4614 mov r4, r2 8013574: 4605 mov r5, r0 8013576: b118 cbz r0, 8013580 <__swbuf_r+0x12> 8013578: 6a03 ldr r3, [r0, #32] 801357a: b90b cbnz r3, 8013580 <__swbuf_r+0x12> 801357c: f7ff ff0e bl 801339c <__sinit> 8013580: 69a3 ldr r3, [r4, #24] 8013582: 60a3 str r3, [r4, #8] 8013584: 89a3 ldrh r3, [r4, #12] 8013586: 071a lsls r2, r3, #28 8013588: d501 bpl.n 801358e <__swbuf_r+0x20> 801358a: 6923 ldr r3, [r4, #16] 801358c: b943 cbnz r3, 80135a0 <__swbuf_r+0x32> 801358e: 4621 mov r1, r4 8013590: 4628 mov r0, r5 8013592: f000 f82b bl 80135ec <__swsetup_r> 8013596: b118 cbz r0, 80135a0 <__swbuf_r+0x32> 8013598: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 801359c: 4638 mov r0, r7 801359e: bdf8 pop {r3, r4, r5, r6, r7, pc} 80135a0: 6823 ldr r3, [r4, #0] 80135a2: 6922 ldr r2, [r4, #16] 80135a4: 1a98 subs r0, r3, r2 80135a6: 6963 ldr r3, [r4, #20] 80135a8: b2f6 uxtb r6, r6 80135aa: 4283 cmp r3, r0 80135ac: 4637 mov r7, r6 80135ae: dc05 bgt.n 80135bc <__swbuf_r+0x4e> 80135b0: 4621 mov r1, r4 80135b2: 4628 mov r0, r5 80135b4: f7ff fe3e bl 8013234 <_fflush_r> 80135b8: 2800 cmp r0, #0 80135ba: d1ed bne.n 8013598 <__swbuf_r+0x2a> 80135bc: 68a3 ldr r3, [r4, #8] 80135be: 3b01 subs r3, #1 80135c0: 60a3 str r3, [r4, #8] 80135c2: 6823 ldr r3, [r4, #0] 80135c4: 1c5a adds r2, r3, #1 80135c6: 6022 str r2, [r4, #0] 80135c8: 701e strb r6, [r3, #0] 80135ca: 6962 ldr r2, [r4, #20] 80135cc: 1c43 adds r3, r0, #1 80135ce: 429a cmp r2, r3 80135d0: d004 beq.n 80135dc <__swbuf_r+0x6e> 80135d2: 89a3 ldrh r3, [r4, #12] 80135d4: 07db lsls r3, r3, #31 80135d6: d5e1 bpl.n 801359c <__swbuf_r+0x2e> 80135d8: 2e0a cmp r6, #10 80135da: d1df bne.n 801359c <__swbuf_r+0x2e> 80135dc: 4621 mov r1, r4 80135de: 4628 mov r0, r5 80135e0: f7ff fe28 bl 8013234 <_fflush_r> 80135e4: 2800 cmp r0, #0 80135e6: d0d9 beq.n 801359c <__swbuf_r+0x2e> 80135e8: e7d6 b.n 8013598 <__swbuf_r+0x2a> ... 080135ec <__swsetup_r>: 80135ec: b538 push {r3, r4, r5, lr} 80135ee: 4b29 ldr r3, [pc, #164] @ (8013694 <__swsetup_r+0xa8>) 80135f0: 4605 mov r5, r0 80135f2: 6818 ldr r0, [r3, #0] 80135f4: 460c mov r4, r1 80135f6: b118 cbz r0, 8013600 <__swsetup_r+0x14> 80135f8: 6a03 ldr r3, [r0, #32] 80135fa: b90b cbnz r3, 8013600 <__swsetup_r+0x14> 80135fc: f7ff fece bl 801339c <__sinit> 8013600: f9b4 300c ldrsh.w r3, [r4, #12] 8013604: 0719 lsls r1, r3, #28 8013606: d422 bmi.n 801364e <__swsetup_r+0x62> 8013608: 06da lsls r2, r3, #27 801360a: d407 bmi.n 801361c <__swsetup_r+0x30> 801360c: 2209 movs r2, #9 801360e: 602a str r2, [r5, #0] 8013610: f043 0340 orr.w r3, r3, #64 @ 0x40 8013614: 81a3 strh r3, [r4, #12] 8013616: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 801361a: e033 b.n 8013684 <__swsetup_r+0x98> 801361c: 0758 lsls r0, r3, #29 801361e: d512 bpl.n 8013646 <__swsetup_r+0x5a> 8013620: 6b61 ldr r1, [r4, #52] @ 0x34 8013622: b141 cbz r1, 8013636 <__swsetup_r+0x4a> 8013624: f104 0344 add.w r3, r4, #68 @ 0x44 8013628: 4299 cmp r1, r3 801362a: d002 beq.n 8013632 <__swsetup_r+0x46> 801362c: 4628 mov r0, r5 801362e: f000 f955 bl 80138dc <_free_r> 8013632: 2300 movs r3, #0 8013634: 6363 str r3, [r4, #52] @ 0x34 8013636: 89a3 ldrh r3, [r4, #12] 8013638: f023 0324 bic.w r3, r3, #36 @ 0x24 801363c: 81a3 strh r3, [r4, #12] 801363e: 2300 movs r3, #0 8013640: 6063 str r3, [r4, #4] 8013642: 6923 ldr r3, [r4, #16] 8013644: 6023 str r3, [r4, #0] 8013646: 89a3 ldrh r3, [r4, #12] 8013648: f043 0308 orr.w r3, r3, #8 801364c: 81a3 strh r3, [r4, #12] 801364e: 6923 ldr r3, [r4, #16] 8013650: b94b cbnz r3, 8013666 <__swsetup_r+0x7a> 8013652: 89a3 ldrh r3, [r4, #12] 8013654: f403 7320 and.w r3, r3, #640 @ 0x280 8013658: f5b3 7f00 cmp.w r3, #512 @ 0x200 801365c: d003 beq.n 8013666 <__swsetup_r+0x7a> 801365e: 4621 mov r1, r4 8013660: 4628 mov r0, r5 8013662: f000 fd43 bl 80140ec <__smakebuf_r> 8013666: f9b4 300c ldrsh.w r3, [r4, #12] 801366a: f013 0201 ands.w r2, r3, #1 801366e: d00a beq.n 8013686 <__swsetup_r+0x9a> 8013670: 2200 movs r2, #0 8013672: 60a2 str r2, [r4, #8] 8013674: 6962 ldr r2, [r4, #20] 8013676: 4252 negs r2, r2 8013678: 61a2 str r2, [r4, #24] 801367a: 6922 ldr r2, [r4, #16] 801367c: b942 cbnz r2, 8013690 <__swsetup_r+0xa4> 801367e: f013 0080 ands.w r0, r3, #128 @ 0x80 8013682: d1c5 bne.n 8013610 <__swsetup_r+0x24> 8013684: bd38 pop {r3, r4, r5, pc} 8013686: 0799 lsls r1, r3, #30 8013688: bf58 it pl 801368a: 6962 ldrpl r2, [r4, #20] 801368c: 60a2 str r2, [r4, #8] 801368e: e7f4 b.n 801367a <__swsetup_r+0x8e> 8013690: 2000 movs r0, #0 8013692: e7f7 b.n 8013684 <__swsetup_r+0x98> 8013694: 2400003c .word 0x2400003c 08013698 : 8013698: b510 push {r4, lr} 801369a: 3901 subs r1, #1 801369c: 4402 add r2, r0 801369e: 4290 cmp r0, r2 80136a0: d101 bne.n 80136a6 80136a2: 2000 movs r0, #0 80136a4: e005 b.n 80136b2 80136a6: 7803 ldrb r3, [r0, #0] 80136a8: f811 4f01 ldrb.w r4, [r1, #1]! 80136ac: 42a3 cmp r3, r4 80136ae: d001 beq.n 80136b4 80136b0: 1b18 subs r0, r3, r4 80136b2: bd10 pop {r4, pc} 80136b4: 3001 adds r0, #1 80136b6: e7f2 b.n 801369e 080136b8 : 80136b8: 4402 add r2, r0 80136ba: 4603 mov r3, r0 80136bc: 4293 cmp r3, r2 80136be: d100 bne.n 80136c2 80136c0: 4770 bx lr 80136c2: f803 1b01 strb.w r1, [r3], #1 80136c6: e7f9 b.n 80136bc 080136c8 : 80136c8: b510 push {r4, lr} 80136ca: b16a cbz r2, 80136e8 80136cc: 3901 subs r1, #1 80136ce: 1884 adds r4, r0, r2 80136d0: f810 2b01 ldrb.w r2, [r0], #1 80136d4: f811 3f01 ldrb.w r3, [r1, #1]! 80136d8: 429a cmp r2, r3 80136da: d103 bne.n 80136e4 80136dc: 42a0 cmp r0, r4 80136de: d001 beq.n 80136e4 80136e0: 2a00 cmp r2, #0 80136e2: d1f5 bne.n 80136d0 80136e4: 1ad0 subs r0, r2, r3 80136e6: bd10 pop {r4, pc} 80136e8: 4610 mov r0, r2 80136ea: e7fc b.n 80136e6 080136ec <_close_r>: 80136ec: b538 push {r3, r4, r5, lr} 80136ee: 4d06 ldr r5, [pc, #24] @ (8013708 <_close_r+0x1c>) 80136f0: 2300 movs r3, #0 80136f2: 4604 mov r4, r0 80136f4: 4608 mov r0, r1 80136f6: 602b str r3, [r5, #0] 80136f8: f7ed fa4a bl 8000b90 <_close> 80136fc: 1c43 adds r3, r0, #1 80136fe: d102 bne.n 8013706 <_close_r+0x1a> 8013700: 682b ldr r3, [r5, #0] 8013702: b103 cbz r3, 8013706 <_close_r+0x1a> 8013704: 6023 str r3, [r4, #0] 8013706: bd38 pop {r3, r4, r5, pc} 8013708: 24019d8c .word 0x24019d8c 0801370c <_reclaim_reent>: 801370c: 4b29 ldr r3, [pc, #164] @ (80137b4 <_reclaim_reent+0xa8>) 801370e: 681b ldr r3, [r3, #0] 8013710: 4283 cmp r3, r0 8013712: b570 push {r4, r5, r6, lr} 8013714: 4604 mov r4, r0 8013716: d04b beq.n 80137b0 <_reclaim_reent+0xa4> 8013718: 69c3 ldr r3, [r0, #28] 801371a: b1ab cbz r3, 8013748 <_reclaim_reent+0x3c> 801371c: 68db ldr r3, [r3, #12] 801371e: b16b cbz r3, 801373c <_reclaim_reent+0x30> 8013720: 2500 movs r5, #0 8013722: 69e3 ldr r3, [r4, #28] 8013724: 68db ldr r3, [r3, #12] 8013726: 5959 ldr r1, [r3, r5] 8013728: 2900 cmp r1, #0 801372a: d13b bne.n 80137a4 <_reclaim_reent+0x98> 801372c: 3504 adds r5, #4 801372e: 2d80 cmp r5, #128 @ 0x80 8013730: d1f7 bne.n 8013722 <_reclaim_reent+0x16> 8013732: 69e3 ldr r3, [r4, #28] 8013734: 4620 mov r0, r4 8013736: 68d9 ldr r1, [r3, #12] 8013738: f000 f8d0 bl 80138dc <_free_r> 801373c: 69e3 ldr r3, [r4, #28] 801373e: 6819 ldr r1, [r3, #0] 8013740: b111 cbz r1, 8013748 <_reclaim_reent+0x3c> 8013742: 4620 mov r0, r4 8013744: f000 f8ca bl 80138dc <_free_r> 8013748: 6961 ldr r1, [r4, #20] 801374a: b111 cbz r1, 8013752 <_reclaim_reent+0x46> 801374c: 4620 mov r0, r4 801374e: f000 f8c5 bl 80138dc <_free_r> 8013752: 69e1 ldr r1, [r4, #28] 8013754: b111 cbz r1, 801375c <_reclaim_reent+0x50> 8013756: 4620 mov r0, r4 8013758: f000 f8c0 bl 80138dc <_free_r> 801375c: 6b21 ldr r1, [r4, #48] @ 0x30 801375e: b111 cbz r1, 8013766 <_reclaim_reent+0x5a> 8013760: 4620 mov r0, r4 8013762: f000 f8bb bl 80138dc <_free_r> 8013766: 6b61 ldr r1, [r4, #52] @ 0x34 8013768: b111 cbz r1, 8013770 <_reclaim_reent+0x64> 801376a: 4620 mov r0, r4 801376c: f000 f8b6 bl 80138dc <_free_r> 8013770: 6ba1 ldr r1, [r4, #56] @ 0x38 8013772: b111 cbz r1, 801377a <_reclaim_reent+0x6e> 8013774: 4620 mov r0, r4 8013776: f000 f8b1 bl 80138dc <_free_r> 801377a: 6ca1 ldr r1, [r4, #72] @ 0x48 801377c: b111 cbz r1, 8013784 <_reclaim_reent+0x78> 801377e: 4620 mov r0, r4 8013780: f000 f8ac bl 80138dc <_free_r> 8013784: 6c61 ldr r1, [r4, #68] @ 0x44 8013786: b111 cbz r1, 801378e <_reclaim_reent+0x82> 8013788: 4620 mov r0, r4 801378a: f000 f8a7 bl 80138dc <_free_r> 801378e: 6ae1 ldr r1, [r4, #44] @ 0x2c 8013790: b111 cbz r1, 8013798 <_reclaim_reent+0x8c> 8013792: 4620 mov r0, r4 8013794: f000 f8a2 bl 80138dc <_free_r> 8013798: 6a23 ldr r3, [r4, #32] 801379a: b14b cbz r3, 80137b0 <_reclaim_reent+0xa4> 801379c: 4620 mov r0, r4 801379e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} 80137a2: 4718 bx r3 80137a4: 680e ldr r6, [r1, #0] 80137a6: 4620 mov r0, r4 80137a8: f000 f898 bl 80138dc <_free_r> 80137ac: 4631 mov r1, r6 80137ae: e7bb b.n 8013728 <_reclaim_reent+0x1c> 80137b0: bd70 pop {r4, r5, r6, pc} 80137b2: bf00 nop 80137b4: 2400003c .word 0x2400003c 080137b8 <_lseek_r>: 80137b8: b538 push {r3, r4, r5, lr} 80137ba: 4d07 ldr r5, [pc, #28] @ (80137d8 <_lseek_r+0x20>) 80137bc: 4604 mov r4, r0 80137be: 4608 mov r0, r1 80137c0: 4611 mov r1, r2 80137c2: 2200 movs r2, #0 80137c4: 602a str r2, [r5, #0] 80137c6: 461a mov r2, r3 80137c8: f7ed f9ec bl 8000ba4 <_lseek> 80137cc: 1c43 adds r3, r0, #1 80137ce: d102 bne.n 80137d6 <_lseek_r+0x1e> 80137d0: 682b ldr r3, [r5, #0] 80137d2: b103 cbz r3, 80137d6 <_lseek_r+0x1e> 80137d4: 6023 str r3, [r4, #0] 80137d6: bd38 pop {r3, r4, r5, pc} 80137d8: 24019d8c .word 0x24019d8c 080137dc <_read_r>: 80137dc: b538 push {r3, r4, r5, lr} 80137de: 4d07 ldr r5, [pc, #28] @ (80137fc <_read_r+0x20>) 80137e0: 4604 mov r4, r0 80137e2: 4608 mov r0, r1 80137e4: 4611 mov r1, r2 80137e6: 2200 movs r2, #0 80137e8: 602a str r2, [r5, #0] 80137ea: 461a mov r2, r3 80137ec: f7ed f9b2 bl 8000b54 <_read> 80137f0: 1c43 adds r3, r0, #1 80137f2: d102 bne.n 80137fa <_read_r+0x1e> 80137f4: 682b ldr r3, [r5, #0] 80137f6: b103 cbz r3, 80137fa <_read_r+0x1e> 80137f8: 6023 str r3, [r4, #0] 80137fa: bd38 pop {r3, r4, r5, pc} 80137fc: 24019d8c .word 0x24019d8c 08013800 <_write_r>: 8013800: b538 push {r3, r4, r5, lr} 8013802: 4d07 ldr r5, [pc, #28] @ (8013820 <_write_r+0x20>) 8013804: 4604 mov r4, r0 8013806: 4608 mov r0, r1 8013808: 4611 mov r1, r2 801380a: 2200 movs r2, #0 801380c: 602a str r2, [r5, #0] 801380e: 461a mov r2, r3 8013810: f7ed f9b0 bl 8000b74 <_write> 8013814: 1c43 adds r3, r0, #1 8013816: d102 bne.n 801381e <_write_r+0x1e> 8013818: 682b ldr r3, [r5, #0] 801381a: b103 cbz r3, 801381e <_write_r+0x1e> 801381c: 6023 str r3, [r4, #0] 801381e: bd38 pop {r3, r4, r5, pc} 8013820: 24019d8c .word 0x24019d8c 08013824 <__libc_init_array>: 8013824: b570 push {r4, r5, r6, lr} 8013826: 4d0d ldr r5, [pc, #52] @ (801385c <__libc_init_array+0x38>) 8013828: 4c0d ldr r4, [pc, #52] @ (8013860 <__libc_init_array+0x3c>) 801382a: 1b64 subs r4, r4, r5 801382c: 10a4 asrs r4, r4, #2 801382e: 2600 movs r6, #0 8013830: 42a6 cmp r6, r4 8013832: d109 bne.n 8013848 <__libc_init_array+0x24> 8013834: 4d0b ldr r5, [pc, #44] @ (8013864 <__libc_init_array+0x40>) 8013836: 4c0c ldr r4, [pc, #48] @ (8013868 <__libc_init_array+0x44>) 8013838: f000 fd12 bl 8014260 <_init> 801383c: 1b64 subs r4, r4, r5 801383e: 10a4 asrs r4, r4, #2 8013840: 2600 movs r6, #0 8013842: 42a6 cmp r6, r4 8013844: d105 bne.n 8013852 <__libc_init_array+0x2e> 8013846: bd70 pop {r4, r5, r6, pc} 8013848: f855 3b04 ldr.w r3, [r5], #4 801384c: 4798 blx r3 801384e: 3601 adds r6, #1 8013850: e7ee b.n 8013830 <__libc_init_array+0xc> 8013852: f855 3b04 ldr.w r3, [r5], #4 8013856: 4798 blx r3 8013858: 3601 adds r6, #1 801385a: e7f2 b.n 8013842 <__libc_init_array+0x1e> 801385c: 080180c4 .word 0x080180c4 8013860: 080180c4 .word 0x080180c4 8013864: 080180c4 .word 0x080180c4 8013868: 080180c8 .word 0x080180c8 0801386c <__retarget_lock_init_recursive>: 801386c: 4770 bx lr 0801386e <__retarget_lock_acquire_recursive>: 801386e: 4770 bx lr 08013870 <__retarget_lock_release_recursive>: 8013870: 4770 bx lr 08013872 : 8013872: 4603 mov r3, r0 8013874: f811 2b01 ldrb.w r2, [r1], #1 8013878: f803 2b01 strb.w r2, [r3], #1 801387c: 2a00 cmp r2, #0 801387e: d1f9 bne.n 8013874 8013880: 4770 bx lr 08013882 : 8013882: 440a add r2, r1 8013884: 4291 cmp r1, r2 8013886: f100 33ff add.w r3, r0, #4294967295 @ 0xffffffff 801388a: d100 bne.n 801388e 801388c: 4770 bx lr 801388e: b510 push {r4, lr} 8013890: f811 4b01 ldrb.w r4, [r1], #1 8013894: f803 4f01 strb.w r4, [r3, #1]! 8013898: 4291 cmp r1, r2 801389a: d1f9 bne.n 8013890 801389c: bd10 pop {r4, pc} ... 080138a0 <__assert_func>: 80138a0: b51f push {r0, r1, r2, r3, r4, lr} 80138a2: 4614 mov r4, r2 80138a4: 461a mov r2, r3 80138a6: 4b09 ldr r3, [pc, #36] @ (80138cc <__assert_func+0x2c>) 80138a8: 681b ldr r3, [r3, #0] 80138aa: 4605 mov r5, r0 80138ac: 68d8 ldr r0, [r3, #12] 80138ae: b954 cbnz r4, 80138c6 <__assert_func+0x26> 80138b0: 4b07 ldr r3, [pc, #28] @ (80138d0 <__assert_func+0x30>) 80138b2: 461c mov r4, r3 80138b4: e9cd 3401 strd r3, r4, [sp, #4] 80138b8: 9100 str r1, [sp, #0] 80138ba: 462b mov r3, r5 80138bc: 4905 ldr r1, [pc, #20] @ (80138d4 <__assert_func+0x34>) 80138be: f000 fbdd bl 801407c 80138c2: f000 fc81 bl 80141c8 80138c6: 4b04 ldr r3, [pc, #16] @ (80138d8 <__assert_func+0x38>) 80138c8: e7f4 b.n 80138b4 <__assert_func+0x14> 80138ca: bf00 nop 80138cc: 2400003c .word 0x2400003c 80138d0: 08018086 .word 0x08018086 80138d4: 08018058 .word 0x08018058 80138d8: 0801804b .word 0x0801804b 080138dc <_free_r>: 80138dc: b538 push {r3, r4, r5, lr} 80138de: 4605 mov r5, r0 80138e0: 2900 cmp r1, #0 80138e2: d041 beq.n 8013968 <_free_r+0x8c> 80138e4: f851 3c04 ldr.w r3, [r1, #-4] 80138e8: 1f0c subs r4, r1, #4 80138ea: 2b00 cmp r3, #0 80138ec: bfb8 it lt 80138ee: 18e4 addlt r4, r4, r3 80138f0: f000 f8e8 bl 8013ac4 <__malloc_lock> 80138f4: 4a1d ldr r2, [pc, #116] @ (801396c <_free_r+0x90>) 80138f6: 6813 ldr r3, [r2, #0] 80138f8: b933 cbnz r3, 8013908 <_free_r+0x2c> 80138fa: 6063 str r3, [r4, #4] 80138fc: 6014 str r4, [r2, #0] 80138fe: 4628 mov r0, r5 8013900: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 8013904: f000 b8e4 b.w 8013ad0 <__malloc_unlock> 8013908: 42a3 cmp r3, r4 801390a: d908 bls.n 801391e <_free_r+0x42> 801390c: 6820 ldr r0, [r4, #0] 801390e: 1821 adds r1, r4, r0 8013910: 428b cmp r3, r1 8013912: bf01 itttt eq 8013914: 6819 ldreq r1, [r3, #0] 8013916: 685b ldreq r3, [r3, #4] 8013918: 1809 addeq r1, r1, r0 801391a: 6021 streq r1, [r4, #0] 801391c: e7ed b.n 80138fa <_free_r+0x1e> 801391e: 461a mov r2, r3 8013920: 685b ldr r3, [r3, #4] 8013922: b10b cbz r3, 8013928 <_free_r+0x4c> 8013924: 42a3 cmp r3, r4 8013926: d9fa bls.n 801391e <_free_r+0x42> 8013928: 6811 ldr r1, [r2, #0] 801392a: 1850 adds r0, r2, r1 801392c: 42a0 cmp r0, r4 801392e: d10b bne.n 8013948 <_free_r+0x6c> 8013930: 6820 ldr r0, [r4, #0] 8013932: 4401 add r1, r0 8013934: 1850 adds r0, r2, r1 8013936: 4283 cmp r3, r0 8013938: 6011 str r1, [r2, #0] 801393a: d1e0 bne.n 80138fe <_free_r+0x22> 801393c: 6818 ldr r0, [r3, #0] 801393e: 685b ldr r3, [r3, #4] 8013940: 6053 str r3, [r2, #4] 8013942: 4408 add r0, r1 8013944: 6010 str r0, [r2, #0] 8013946: e7da b.n 80138fe <_free_r+0x22> 8013948: d902 bls.n 8013950 <_free_r+0x74> 801394a: 230c movs r3, #12 801394c: 602b str r3, [r5, #0] 801394e: e7d6 b.n 80138fe <_free_r+0x22> 8013950: 6820 ldr r0, [r4, #0] 8013952: 1821 adds r1, r4, r0 8013954: 428b cmp r3, r1 8013956: bf04 itt eq 8013958: 6819 ldreq r1, [r3, #0] 801395a: 685b ldreq r3, [r3, #4] 801395c: 6063 str r3, [r4, #4] 801395e: bf04 itt eq 8013960: 1809 addeq r1, r1, r0 8013962: 6021 streq r1, [r4, #0] 8013964: 6054 str r4, [r2, #4] 8013966: e7ca b.n 80138fe <_free_r+0x22> 8013968: bd38 pop {r3, r4, r5, pc} 801396a: bf00 nop 801396c: 24019d98 .word 0x24019d98 08013970 : 8013970: 4b02 ldr r3, [pc, #8] @ (801397c ) 8013972: 4601 mov r1, r0 8013974: 6818 ldr r0, [r3, #0] 8013976: f000 b825 b.w 80139c4 <_malloc_r> 801397a: bf00 nop 801397c: 2400003c .word 0x2400003c 08013980 : 8013980: b570 push {r4, r5, r6, lr} 8013982: 4e0f ldr r6, [pc, #60] @ (80139c0 ) 8013984: 460c mov r4, r1 8013986: 6831 ldr r1, [r6, #0] 8013988: 4605 mov r5, r0 801398a: b911 cbnz r1, 8013992 801398c: f000 fc0c bl 80141a8 <_sbrk_r> 8013990: 6030 str r0, [r6, #0] 8013992: 4621 mov r1, r4 8013994: 4628 mov r0, r5 8013996: f000 fc07 bl 80141a8 <_sbrk_r> 801399a: 1c43 adds r3, r0, #1 801399c: d103 bne.n 80139a6 801399e: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 80139a2: 4620 mov r0, r4 80139a4: bd70 pop {r4, r5, r6, pc} 80139a6: 1cc4 adds r4, r0, #3 80139a8: f024 0403 bic.w r4, r4, #3 80139ac: 42a0 cmp r0, r4 80139ae: d0f8 beq.n 80139a2 80139b0: 1a21 subs r1, r4, r0 80139b2: 4628 mov r0, r5 80139b4: f000 fbf8 bl 80141a8 <_sbrk_r> 80139b8: 3001 adds r0, #1 80139ba: d1f2 bne.n 80139a2 80139bc: e7ef b.n 801399e 80139be: bf00 nop 80139c0: 24019d94 .word 0x24019d94 080139c4 <_malloc_r>: 80139c4: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 80139c8: 1ccd adds r5, r1, #3 80139ca: f025 0503 bic.w r5, r5, #3 80139ce: 3508 adds r5, #8 80139d0: 2d0c cmp r5, #12 80139d2: bf38 it cc 80139d4: 250c movcc r5, #12 80139d6: 2d00 cmp r5, #0 80139d8: 4606 mov r6, r0 80139da: db01 blt.n 80139e0 <_malloc_r+0x1c> 80139dc: 42a9 cmp r1, r5 80139de: d904 bls.n 80139ea <_malloc_r+0x26> 80139e0: 230c movs r3, #12 80139e2: 6033 str r3, [r6, #0] 80139e4: 2000 movs r0, #0 80139e6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80139ea: f8df 80d4 ldr.w r8, [pc, #212] @ 8013ac0 <_malloc_r+0xfc> 80139ee: f000 f869 bl 8013ac4 <__malloc_lock> 80139f2: f8d8 3000 ldr.w r3, [r8] 80139f6: 461c mov r4, r3 80139f8: bb44 cbnz r4, 8013a4c <_malloc_r+0x88> 80139fa: 4629 mov r1, r5 80139fc: 4630 mov r0, r6 80139fe: f7ff ffbf bl 8013980 8013a02: 1c43 adds r3, r0, #1 8013a04: 4604 mov r4, r0 8013a06: d158 bne.n 8013aba <_malloc_r+0xf6> 8013a08: f8d8 4000 ldr.w r4, [r8] 8013a0c: 4627 mov r7, r4 8013a0e: 2f00 cmp r7, #0 8013a10: d143 bne.n 8013a9a <_malloc_r+0xd6> 8013a12: 2c00 cmp r4, #0 8013a14: d04b beq.n 8013aae <_malloc_r+0xea> 8013a16: 6823 ldr r3, [r4, #0] 8013a18: 4639 mov r1, r7 8013a1a: 4630 mov r0, r6 8013a1c: eb04 0903 add.w r9, r4, r3 8013a20: f000 fbc2 bl 80141a8 <_sbrk_r> 8013a24: 4581 cmp r9, r0 8013a26: d142 bne.n 8013aae <_malloc_r+0xea> 8013a28: 6821 ldr r1, [r4, #0] 8013a2a: 1a6d subs r5, r5, r1 8013a2c: 4629 mov r1, r5 8013a2e: 4630 mov r0, r6 8013a30: f7ff ffa6 bl 8013980 8013a34: 3001 adds r0, #1 8013a36: d03a beq.n 8013aae <_malloc_r+0xea> 8013a38: 6823 ldr r3, [r4, #0] 8013a3a: 442b add r3, r5 8013a3c: 6023 str r3, [r4, #0] 8013a3e: f8d8 3000 ldr.w r3, [r8] 8013a42: 685a ldr r2, [r3, #4] 8013a44: bb62 cbnz r2, 8013aa0 <_malloc_r+0xdc> 8013a46: f8c8 7000 str.w r7, [r8] 8013a4a: e00f b.n 8013a6c <_malloc_r+0xa8> 8013a4c: 6822 ldr r2, [r4, #0] 8013a4e: 1b52 subs r2, r2, r5 8013a50: d420 bmi.n 8013a94 <_malloc_r+0xd0> 8013a52: 2a0b cmp r2, #11 8013a54: d917 bls.n 8013a86 <_malloc_r+0xc2> 8013a56: 1961 adds r1, r4, r5 8013a58: 42a3 cmp r3, r4 8013a5a: 6025 str r5, [r4, #0] 8013a5c: bf18 it ne 8013a5e: 6059 strne r1, [r3, #4] 8013a60: 6863 ldr r3, [r4, #4] 8013a62: bf08 it eq 8013a64: f8c8 1000 streq.w r1, [r8] 8013a68: 5162 str r2, [r4, r5] 8013a6a: 604b str r3, [r1, #4] 8013a6c: 4630 mov r0, r6 8013a6e: f000 f82f bl 8013ad0 <__malloc_unlock> 8013a72: f104 000b add.w r0, r4, #11 8013a76: 1d23 adds r3, r4, #4 8013a78: f020 0007 bic.w r0, r0, #7 8013a7c: 1ac2 subs r2, r0, r3 8013a7e: bf1c itt ne 8013a80: 1a1b subne r3, r3, r0 8013a82: 50a3 strne r3, [r4, r2] 8013a84: e7af b.n 80139e6 <_malloc_r+0x22> 8013a86: 6862 ldr r2, [r4, #4] 8013a88: 42a3 cmp r3, r4 8013a8a: bf0c ite eq 8013a8c: f8c8 2000 streq.w r2, [r8] 8013a90: 605a strne r2, [r3, #4] 8013a92: e7eb b.n 8013a6c <_malloc_r+0xa8> 8013a94: 4623 mov r3, r4 8013a96: 6864 ldr r4, [r4, #4] 8013a98: e7ae b.n 80139f8 <_malloc_r+0x34> 8013a9a: 463c mov r4, r7 8013a9c: 687f ldr r7, [r7, #4] 8013a9e: e7b6 b.n 8013a0e <_malloc_r+0x4a> 8013aa0: 461a mov r2, r3 8013aa2: 685b ldr r3, [r3, #4] 8013aa4: 42a3 cmp r3, r4 8013aa6: d1fb bne.n 8013aa0 <_malloc_r+0xdc> 8013aa8: 2300 movs r3, #0 8013aaa: 6053 str r3, [r2, #4] 8013aac: e7de b.n 8013a6c <_malloc_r+0xa8> 8013aae: 230c movs r3, #12 8013ab0: 6033 str r3, [r6, #0] 8013ab2: 4630 mov r0, r6 8013ab4: f000 f80c bl 8013ad0 <__malloc_unlock> 8013ab8: e794 b.n 80139e4 <_malloc_r+0x20> 8013aba: 6005 str r5, [r0, #0] 8013abc: e7d6 b.n 8013a6c <_malloc_r+0xa8> 8013abe: bf00 nop 8013ac0: 24019d98 .word 0x24019d98 08013ac4 <__malloc_lock>: 8013ac4: 4801 ldr r0, [pc, #4] @ (8013acc <__malloc_lock+0x8>) 8013ac6: f7ff bed2 b.w 801386e <__retarget_lock_acquire_recursive> 8013aca: bf00 nop 8013acc: 24019d90 .word 0x24019d90 08013ad0 <__malloc_unlock>: 8013ad0: 4801 ldr r0, [pc, #4] @ (8013ad8 <__malloc_unlock+0x8>) 8013ad2: f7ff becd b.w 8013870 <__retarget_lock_release_recursive> 8013ad6: bf00 nop 8013ad8: 24019d90 .word 0x24019d90 08013adc <__sfputc_r>: 8013adc: 6893 ldr r3, [r2, #8] 8013ade: 3b01 subs r3, #1 8013ae0: 2b00 cmp r3, #0 8013ae2: b410 push {r4} 8013ae4: 6093 str r3, [r2, #8] 8013ae6: da08 bge.n 8013afa <__sfputc_r+0x1e> 8013ae8: 6994 ldr r4, [r2, #24] 8013aea: 42a3 cmp r3, r4 8013aec: db01 blt.n 8013af2 <__sfputc_r+0x16> 8013aee: 290a cmp r1, #10 8013af0: d103 bne.n 8013afa <__sfputc_r+0x1e> 8013af2: f85d 4b04 ldr.w r4, [sp], #4 8013af6: f7ff bd3a b.w 801356e <__swbuf_r> 8013afa: 6813 ldr r3, [r2, #0] 8013afc: 1c58 adds r0, r3, #1 8013afe: 6010 str r0, [r2, #0] 8013b00: 7019 strb r1, [r3, #0] 8013b02: 4608 mov r0, r1 8013b04: f85d 4b04 ldr.w r4, [sp], #4 8013b08: 4770 bx lr 08013b0a <__sfputs_r>: 8013b0a: b5f8 push {r3, r4, r5, r6, r7, lr} 8013b0c: 4606 mov r6, r0 8013b0e: 460f mov r7, r1 8013b10: 4614 mov r4, r2 8013b12: 18d5 adds r5, r2, r3 8013b14: 42ac cmp r4, r5 8013b16: d101 bne.n 8013b1c <__sfputs_r+0x12> 8013b18: 2000 movs r0, #0 8013b1a: e007 b.n 8013b2c <__sfputs_r+0x22> 8013b1c: f814 1b01 ldrb.w r1, [r4], #1 8013b20: 463a mov r2, r7 8013b22: 4630 mov r0, r6 8013b24: f7ff ffda bl 8013adc <__sfputc_r> 8013b28: 1c43 adds r3, r0, #1 8013b2a: d1f3 bne.n 8013b14 <__sfputs_r+0xa> 8013b2c: bdf8 pop {r3, r4, r5, r6, r7, pc} ... 08013b30 <_vfiprintf_r>: 8013b30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8013b34: 460d mov r5, r1 8013b36: b09d sub sp, #116 @ 0x74 8013b38: 4614 mov r4, r2 8013b3a: 4698 mov r8, r3 8013b3c: 4606 mov r6, r0 8013b3e: b118 cbz r0, 8013b48 <_vfiprintf_r+0x18> 8013b40: 6a03 ldr r3, [r0, #32] 8013b42: b90b cbnz r3, 8013b48 <_vfiprintf_r+0x18> 8013b44: f7ff fc2a bl 801339c <__sinit> 8013b48: 6e6b ldr r3, [r5, #100] @ 0x64 8013b4a: 07d9 lsls r1, r3, #31 8013b4c: d405 bmi.n 8013b5a <_vfiprintf_r+0x2a> 8013b4e: 89ab ldrh r3, [r5, #12] 8013b50: 059a lsls r2, r3, #22 8013b52: d402 bmi.n 8013b5a <_vfiprintf_r+0x2a> 8013b54: 6da8 ldr r0, [r5, #88] @ 0x58 8013b56: f7ff fe8a bl 801386e <__retarget_lock_acquire_recursive> 8013b5a: 89ab ldrh r3, [r5, #12] 8013b5c: 071b lsls r3, r3, #28 8013b5e: d501 bpl.n 8013b64 <_vfiprintf_r+0x34> 8013b60: 692b ldr r3, [r5, #16] 8013b62: b99b cbnz r3, 8013b8c <_vfiprintf_r+0x5c> 8013b64: 4629 mov r1, r5 8013b66: 4630 mov r0, r6 8013b68: f7ff fd40 bl 80135ec <__swsetup_r> 8013b6c: b170 cbz r0, 8013b8c <_vfiprintf_r+0x5c> 8013b6e: 6e6b ldr r3, [r5, #100] @ 0x64 8013b70: 07dc lsls r4, r3, #31 8013b72: d504 bpl.n 8013b7e <_vfiprintf_r+0x4e> 8013b74: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8013b78: b01d add sp, #116 @ 0x74 8013b7a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8013b7e: 89ab ldrh r3, [r5, #12] 8013b80: 0598 lsls r0, r3, #22 8013b82: d4f7 bmi.n 8013b74 <_vfiprintf_r+0x44> 8013b84: 6da8 ldr r0, [r5, #88] @ 0x58 8013b86: f7ff fe73 bl 8013870 <__retarget_lock_release_recursive> 8013b8a: e7f3 b.n 8013b74 <_vfiprintf_r+0x44> 8013b8c: 2300 movs r3, #0 8013b8e: 9309 str r3, [sp, #36] @ 0x24 8013b90: 2320 movs r3, #32 8013b92: f88d 3029 strb.w r3, [sp, #41] @ 0x29 8013b96: f8cd 800c str.w r8, [sp, #12] 8013b9a: 2330 movs r3, #48 @ 0x30 8013b9c: f8df 81ac ldr.w r8, [pc, #428] @ 8013d4c <_vfiprintf_r+0x21c> 8013ba0: f88d 302a strb.w r3, [sp, #42] @ 0x2a 8013ba4: f04f 0901 mov.w r9, #1 8013ba8: 4623 mov r3, r4 8013baa: 469a mov sl, r3 8013bac: f813 2b01 ldrb.w r2, [r3], #1 8013bb0: b10a cbz r2, 8013bb6 <_vfiprintf_r+0x86> 8013bb2: 2a25 cmp r2, #37 @ 0x25 8013bb4: d1f9 bne.n 8013baa <_vfiprintf_r+0x7a> 8013bb6: ebba 0b04 subs.w fp, sl, r4 8013bba: d00b beq.n 8013bd4 <_vfiprintf_r+0xa4> 8013bbc: 465b mov r3, fp 8013bbe: 4622 mov r2, r4 8013bc0: 4629 mov r1, r5 8013bc2: 4630 mov r0, r6 8013bc4: f7ff ffa1 bl 8013b0a <__sfputs_r> 8013bc8: 3001 adds r0, #1 8013bca: f000 80a7 beq.w 8013d1c <_vfiprintf_r+0x1ec> 8013bce: 9a09 ldr r2, [sp, #36] @ 0x24 8013bd0: 445a add r2, fp 8013bd2: 9209 str r2, [sp, #36] @ 0x24 8013bd4: f89a 3000 ldrb.w r3, [sl] 8013bd8: 2b00 cmp r3, #0 8013bda: f000 809f beq.w 8013d1c <_vfiprintf_r+0x1ec> 8013bde: 2300 movs r3, #0 8013be0: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8013be4: e9cd 2305 strd r2, r3, [sp, #20] 8013be8: f10a 0a01 add.w sl, sl, #1 8013bec: 9304 str r3, [sp, #16] 8013bee: 9307 str r3, [sp, #28] 8013bf0: f88d 3053 strb.w r3, [sp, #83] @ 0x53 8013bf4: 931a str r3, [sp, #104] @ 0x68 8013bf6: 4654 mov r4, sl 8013bf8: 2205 movs r2, #5 8013bfa: f814 1b01 ldrb.w r1, [r4], #1 8013bfe: 4853 ldr r0, [pc, #332] @ (8013d4c <_vfiprintf_r+0x21c>) 8013c00: f7ec fb86 bl 8000310 8013c04: 9a04 ldr r2, [sp, #16] 8013c06: b9d8 cbnz r0, 8013c40 <_vfiprintf_r+0x110> 8013c08: 06d1 lsls r1, r2, #27 8013c0a: bf44 itt mi 8013c0c: 2320 movmi r3, #32 8013c0e: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 8013c12: 0713 lsls r3, r2, #28 8013c14: bf44 itt mi 8013c16: 232b movmi r3, #43 @ 0x2b 8013c18: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 8013c1c: f89a 3000 ldrb.w r3, [sl] 8013c20: 2b2a cmp r3, #42 @ 0x2a 8013c22: d015 beq.n 8013c50 <_vfiprintf_r+0x120> 8013c24: 9a07 ldr r2, [sp, #28] 8013c26: 4654 mov r4, sl 8013c28: 2000 movs r0, #0 8013c2a: f04f 0c0a mov.w ip, #10 8013c2e: 4621 mov r1, r4 8013c30: f811 3b01 ldrb.w r3, [r1], #1 8013c34: 3b30 subs r3, #48 @ 0x30 8013c36: 2b09 cmp r3, #9 8013c38: d94b bls.n 8013cd2 <_vfiprintf_r+0x1a2> 8013c3a: b1b0 cbz r0, 8013c6a <_vfiprintf_r+0x13a> 8013c3c: 9207 str r2, [sp, #28] 8013c3e: e014 b.n 8013c6a <_vfiprintf_r+0x13a> 8013c40: eba0 0308 sub.w r3, r0, r8 8013c44: fa09 f303 lsl.w r3, r9, r3 8013c48: 4313 orrs r3, r2 8013c4a: 9304 str r3, [sp, #16] 8013c4c: 46a2 mov sl, r4 8013c4e: e7d2 b.n 8013bf6 <_vfiprintf_r+0xc6> 8013c50: 9b03 ldr r3, [sp, #12] 8013c52: 1d19 adds r1, r3, #4 8013c54: 681b ldr r3, [r3, #0] 8013c56: 9103 str r1, [sp, #12] 8013c58: 2b00 cmp r3, #0 8013c5a: bfbb ittet lt 8013c5c: 425b neglt r3, r3 8013c5e: f042 0202 orrlt.w r2, r2, #2 8013c62: 9307 strge r3, [sp, #28] 8013c64: 9307 strlt r3, [sp, #28] 8013c66: bfb8 it lt 8013c68: 9204 strlt r2, [sp, #16] 8013c6a: 7823 ldrb r3, [r4, #0] 8013c6c: 2b2e cmp r3, #46 @ 0x2e 8013c6e: d10a bne.n 8013c86 <_vfiprintf_r+0x156> 8013c70: 7863 ldrb r3, [r4, #1] 8013c72: 2b2a cmp r3, #42 @ 0x2a 8013c74: d132 bne.n 8013cdc <_vfiprintf_r+0x1ac> 8013c76: 9b03 ldr r3, [sp, #12] 8013c78: 1d1a adds r2, r3, #4 8013c7a: 681b ldr r3, [r3, #0] 8013c7c: 9203 str r2, [sp, #12] 8013c7e: ea43 73e3 orr.w r3, r3, r3, asr #31 8013c82: 3402 adds r4, #2 8013c84: 9305 str r3, [sp, #20] 8013c86: f8df a0d4 ldr.w sl, [pc, #212] @ 8013d5c <_vfiprintf_r+0x22c> 8013c8a: 7821 ldrb r1, [r4, #0] 8013c8c: 2203 movs r2, #3 8013c8e: 4650 mov r0, sl 8013c90: f7ec fb3e bl 8000310 8013c94: b138 cbz r0, 8013ca6 <_vfiprintf_r+0x176> 8013c96: 9b04 ldr r3, [sp, #16] 8013c98: eba0 000a sub.w r0, r0, sl 8013c9c: 2240 movs r2, #64 @ 0x40 8013c9e: 4082 lsls r2, r0 8013ca0: 4313 orrs r3, r2 8013ca2: 3401 adds r4, #1 8013ca4: 9304 str r3, [sp, #16] 8013ca6: f814 1b01 ldrb.w r1, [r4], #1 8013caa: 4829 ldr r0, [pc, #164] @ (8013d50 <_vfiprintf_r+0x220>) 8013cac: f88d 1028 strb.w r1, [sp, #40] @ 0x28 8013cb0: 2206 movs r2, #6 8013cb2: f7ec fb2d bl 8000310 8013cb6: 2800 cmp r0, #0 8013cb8: d03f beq.n 8013d3a <_vfiprintf_r+0x20a> 8013cba: 4b26 ldr r3, [pc, #152] @ (8013d54 <_vfiprintf_r+0x224>) 8013cbc: bb1b cbnz r3, 8013d06 <_vfiprintf_r+0x1d6> 8013cbe: 9b03 ldr r3, [sp, #12] 8013cc0: 3307 adds r3, #7 8013cc2: f023 0307 bic.w r3, r3, #7 8013cc6: 3308 adds r3, #8 8013cc8: 9303 str r3, [sp, #12] 8013cca: 9b09 ldr r3, [sp, #36] @ 0x24 8013ccc: 443b add r3, r7 8013cce: 9309 str r3, [sp, #36] @ 0x24 8013cd0: e76a b.n 8013ba8 <_vfiprintf_r+0x78> 8013cd2: fb0c 3202 mla r2, ip, r2, r3 8013cd6: 460c mov r4, r1 8013cd8: 2001 movs r0, #1 8013cda: e7a8 b.n 8013c2e <_vfiprintf_r+0xfe> 8013cdc: 2300 movs r3, #0 8013cde: 3401 adds r4, #1 8013ce0: 9305 str r3, [sp, #20] 8013ce2: 4619 mov r1, r3 8013ce4: f04f 0c0a mov.w ip, #10 8013ce8: 4620 mov r0, r4 8013cea: f810 2b01 ldrb.w r2, [r0], #1 8013cee: 3a30 subs r2, #48 @ 0x30 8013cf0: 2a09 cmp r2, #9 8013cf2: d903 bls.n 8013cfc <_vfiprintf_r+0x1cc> 8013cf4: 2b00 cmp r3, #0 8013cf6: d0c6 beq.n 8013c86 <_vfiprintf_r+0x156> 8013cf8: 9105 str r1, [sp, #20] 8013cfa: e7c4 b.n 8013c86 <_vfiprintf_r+0x156> 8013cfc: fb0c 2101 mla r1, ip, r1, r2 8013d00: 4604 mov r4, r0 8013d02: 2301 movs r3, #1 8013d04: e7f0 b.n 8013ce8 <_vfiprintf_r+0x1b8> 8013d06: ab03 add r3, sp, #12 8013d08: 9300 str r3, [sp, #0] 8013d0a: 462a mov r2, r5 8013d0c: 4b12 ldr r3, [pc, #72] @ (8013d58 <_vfiprintf_r+0x228>) 8013d0e: a904 add r1, sp, #16 8013d10: 4630 mov r0, r6 8013d12: f3af 8000 nop.w 8013d16: 4607 mov r7, r0 8013d18: 1c78 adds r0, r7, #1 8013d1a: d1d6 bne.n 8013cca <_vfiprintf_r+0x19a> 8013d1c: 6e6b ldr r3, [r5, #100] @ 0x64 8013d1e: 07d9 lsls r1, r3, #31 8013d20: d405 bmi.n 8013d2e <_vfiprintf_r+0x1fe> 8013d22: 89ab ldrh r3, [r5, #12] 8013d24: 059a lsls r2, r3, #22 8013d26: d402 bmi.n 8013d2e <_vfiprintf_r+0x1fe> 8013d28: 6da8 ldr r0, [r5, #88] @ 0x58 8013d2a: f7ff fda1 bl 8013870 <__retarget_lock_release_recursive> 8013d2e: 89ab ldrh r3, [r5, #12] 8013d30: 065b lsls r3, r3, #25 8013d32: f53f af1f bmi.w 8013b74 <_vfiprintf_r+0x44> 8013d36: 9809 ldr r0, [sp, #36] @ 0x24 8013d38: e71e b.n 8013b78 <_vfiprintf_r+0x48> 8013d3a: ab03 add r3, sp, #12 8013d3c: 9300 str r3, [sp, #0] 8013d3e: 462a mov r2, r5 8013d40: 4b05 ldr r3, [pc, #20] @ (8013d58 <_vfiprintf_r+0x228>) 8013d42: a904 add r1, sp, #16 8013d44: 4630 mov r0, r6 8013d46: f000 f879 bl 8013e3c <_printf_i> 8013d4a: e7e4 b.n 8013d16 <_vfiprintf_r+0x1e6> 8013d4c: 08018087 .word 0x08018087 8013d50: 08018091 .word 0x08018091 8013d54: 00000000 .word 0x00000000 8013d58: 08013b0b .word 0x08013b0b 8013d5c: 0801808d .word 0x0801808d 08013d60 <_printf_common>: 8013d60: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8013d64: 4616 mov r6, r2 8013d66: 4698 mov r8, r3 8013d68: 688a ldr r2, [r1, #8] 8013d6a: 690b ldr r3, [r1, #16] 8013d6c: f8dd 9020 ldr.w r9, [sp, #32] 8013d70: 4293 cmp r3, r2 8013d72: bfb8 it lt 8013d74: 4613 movlt r3, r2 8013d76: 6033 str r3, [r6, #0] 8013d78: f891 2043 ldrb.w r2, [r1, #67] @ 0x43 8013d7c: 4607 mov r7, r0 8013d7e: 460c mov r4, r1 8013d80: b10a cbz r2, 8013d86 <_printf_common+0x26> 8013d82: 3301 adds r3, #1 8013d84: 6033 str r3, [r6, #0] 8013d86: 6823 ldr r3, [r4, #0] 8013d88: 0699 lsls r1, r3, #26 8013d8a: bf42 ittt mi 8013d8c: 6833 ldrmi r3, [r6, #0] 8013d8e: 3302 addmi r3, #2 8013d90: 6033 strmi r3, [r6, #0] 8013d92: 6825 ldr r5, [r4, #0] 8013d94: f015 0506 ands.w r5, r5, #6 8013d98: d106 bne.n 8013da8 <_printf_common+0x48> 8013d9a: f104 0a19 add.w sl, r4, #25 8013d9e: 68e3 ldr r3, [r4, #12] 8013da0: 6832 ldr r2, [r6, #0] 8013da2: 1a9b subs r3, r3, r2 8013da4: 42ab cmp r3, r5 8013da6: dc26 bgt.n 8013df6 <_printf_common+0x96> 8013da8: f894 3043 ldrb.w r3, [r4, #67] @ 0x43 8013dac: 6822 ldr r2, [r4, #0] 8013dae: 3b00 subs r3, #0 8013db0: bf18 it ne 8013db2: 2301 movne r3, #1 8013db4: 0692 lsls r2, r2, #26 8013db6: d42b bmi.n 8013e10 <_printf_common+0xb0> 8013db8: f104 0243 add.w r2, r4, #67 @ 0x43 8013dbc: 4641 mov r1, r8 8013dbe: 4638 mov r0, r7 8013dc0: 47c8 blx r9 8013dc2: 3001 adds r0, #1 8013dc4: d01e beq.n 8013e04 <_printf_common+0xa4> 8013dc6: 6823 ldr r3, [r4, #0] 8013dc8: 6922 ldr r2, [r4, #16] 8013dca: f003 0306 and.w r3, r3, #6 8013dce: 2b04 cmp r3, #4 8013dd0: bf02 ittt eq 8013dd2: 68e5 ldreq r5, [r4, #12] 8013dd4: 6833 ldreq r3, [r6, #0] 8013dd6: 1aed subeq r5, r5, r3 8013dd8: 68a3 ldr r3, [r4, #8] 8013dda: bf0c ite eq 8013ddc: ea25 75e5 biceq.w r5, r5, r5, asr #31 8013de0: 2500 movne r5, #0 8013de2: 4293 cmp r3, r2 8013de4: bfc4 itt gt 8013de6: 1a9b subgt r3, r3, r2 8013de8: 18ed addgt r5, r5, r3 8013dea: 2600 movs r6, #0 8013dec: 341a adds r4, #26 8013dee: 42b5 cmp r5, r6 8013df0: d11a bne.n 8013e28 <_printf_common+0xc8> 8013df2: 2000 movs r0, #0 8013df4: e008 b.n 8013e08 <_printf_common+0xa8> 8013df6: 2301 movs r3, #1 8013df8: 4652 mov r2, sl 8013dfa: 4641 mov r1, r8 8013dfc: 4638 mov r0, r7 8013dfe: 47c8 blx r9 8013e00: 3001 adds r0, #1 8013e02: d103 bne.n 8013e0c <_printf_common+0xac> 8013e04: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8013e08: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8013e0c: 3501 adds r5, #1 8013e0e: e7c6 b.n 8013d9e <_printf_common+0x3e> 8013e10: 18e1 adds r1, r4, r3 8013e12: 1c5a adds r2, r3, #1 8013e14: 2030 movs r0, #48 @ 0x30 8013e16: f881 0043 strb.w r0, [r1, #67] @ 0x43 8013e1a: 4422 add r2, r4 8013e1c: f894 1045 ldrb.w r1, [r4, #69] @ 0x45 8013e20: f882 1043 strb.w r1, [r2, #67] @ 0x43 8013e24: 3302 adds r3, #2 8013e26: e7c7 b.n 8013db8 <_printf_common+0x58> 8013e28: 2301 movs r3, #1 8013e2a: 4622 mov r2, r4 8013e2c: 4641 mov r1, r8 8013e2e: 4638 mov r0, r7 8013e30: 47c8 blx r9 8013e32: 3001 adds r0, #1 8013e34: d0e6 beq.n 8013e04 <_printf_common+0xa4> 8013e36: 3601 adds r6, #1 8013e38: e7d9 b.n 8013dee <_printf_common+0x8e> ... 08013e3c <_printf_i>: 8013e3c: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 8013e40: 7e0f ldrb r7, [r1, #24] 8013e42: 9e0c ldr r6, [sp, #48] @ 0x30 8013e44: 2f78 cmp r7, #120 @ 0x78 8013e46: 4691 mov r9, r2 8013e48: 4680 mov r8, r0 8013e4a: 460c mov r4, r1 8013e4c: 469a mov sl, r3 8013e4e: f101 0243 add.w r2, r1, #67 @ 0x43 8013e52: d807 bhi.n 8013e64 <_printf_i+0x28> 8013e54: 2f62 cmp r7, #98 @ 0x62 8013e56: d80a bhi.n 8013e6e <_printf_i+0x32> 8013e58: 2f00 cmp r7, #0 8013e5a: f000 80d2 beq.w 8014002 <_printf_i+0x1c6> 8013e5e: 2f58 cmp r7, #88 @ 0x58 8013e60: f000 80b9 beq.w 8013fd6 <_printf_i+0x19a> 8013e64: f104 0642 add.w r6, r4, #66 @ 0x42 8013e68: f884 7042 strb.w r7, [r4, #66] @ 0x42 8013e6c: e03a b.n 8013ee4 <_printf_i+0xa8> 8013e6e: f1a7 0363 sub.w r3, r7, #99 @ 0x63 8013e72: 2b15 cmp r3, #21 8013e74: d8f6 bhi.n 8013e64 <_printf_i+0x28> 8013e76: a101 add r1, pc, #4 @ (adr r1, 8013e7c <_printf_i+0x40>) 8013e78: f851 f023 ldr.w pc, [r1, r3, lsl #2] 8013e7c: 08013ed5 .word 0x08013ed5 8013e80: 08013ee9 .word 0x08013ee9 8013e84: 08013e65 .word 0x08013e65 8013e88: 08013e65 .word 0x08013e65 8013e8c: 08013e65 .word 0x08013e65 8013e90: 08013e65 .word 0x08013e65 8013e94: 08013ee9 .word 0x08013ee9 8013e98: 08013e65 .word 0x08013e65 8013e9c: 08013e65 .word 0x08013e65 8013ea0: 08013e65 .word 0x08013e65 8013ea4: 08013e65 .word 0x08013e65 8013ea8: 08013fe9 .word 0x08013fe9 8013eac: 08013f13 .word 0x08013f13 8013eb0: 08013fa3 .word 0x08013fa3 8013eb4: 08013e65 .word 0x08013e65 8013eb8: 08013e65 .word 0x08013e65 8013ebc: 0801400b .word 0x0801400b 8013ec0: 08013e65 .word 0x08013e65 8013ec4: 08013f13 .word 0x08013f13 8013ec8: 08013e65 .word 0x08013e65 8013ecc: 08013e65 .word 0x08013e65 8013ed0: 08013fab .word 0x08013fab 8013ed4: 6833 ldr r3, [r6, #0] 8013ed6: 1d1a adds r2, r3, #4 8013ed8: 681b ldr r3, [r3, #0] 8013eda: 6032 str r2, [r6, #0] 8013edc: f104 0642 add.w r6, r4, #66 @ 0x42 8013ee0: f884 3042 strb.w r3, [r4, #66] @ 0x42 8013ee4: 2301 movs r3, #1 8013ee6: e09d b.n 8014024 <_printf_i+0x1e8> 8013ee8: 6833 ldr r3, [r6, #0] 8013eea: 6820 ldr r0, [r4, #0] 8013eec: 1d19 adds r1, r3, #4 8013eee: 6031 str r1, [r6, #0] 8013ef0: 0606 lsls r6, r0, #24 8013ef2: d501 bpl.n 8013ef8 <_printf_i+0xbc> 8013ef4: 681d ldr r5, [r3, #0] 8013ef6: e003 b.n 8013f00 <_printf_i+0xc4> 8013ef8: 0645 lsls r5, r0, #25 8013efa: d5fb bpl.n 8013ef4 <_printf_i+0xb8> 8013efc: f9b3 5000 ldrsh.w r5, [r3] 8013f00: 2d00 cmp r5, #0 8013f02: da03 bge.n 8013f0c <_printf_i+0xd0> 8013f04: 232d movs r3, #45 @ 0x2d 8013f06: 426d negs r5, r5 8013f08: f884 3043 strb.w r3, [r4, #67] @ 0x43 8013f0c: 4859 ldr r0, [pc, #356] @ (8014074 <_printf_i+0x238>) 8013f0e: 230a movs r3, #10 8013f10: e011 b.n 8013f36 <_printf_i+0xfa> 8013f12: 6821 ldr r1, [r4, #0] 8013f14: 6833 ldr r3, [r6, #0] 8013f16: 0608 lsls r0, r1, #24 8013f18: f853 5b04 ldr.w r5, [r3], #4 8013f1c: d402 bmi.n 8013f24 <_printf_i+0xe8> 8013f1e: 0649 lsls r1, r1, #25 8013f20: bf48 it mi 8013f22: b2ad uxthmi r5, r5 8013f24: 2f6f cmp r7, #111 @ 0x6f 8013f26: 4853 ldr r0, [pc, #332] @ (8014074 <_printf_i+0x238>) 8013f28: 6033 str r3, [r6, #0] 8013f2a: bf14 ite ne 8013f2c: 230a movne r3, #10 8013f2e: 2308 moveq r3, #8 8013f30: 2100 movs r1, #0 8013f32: f884 1043 strb.w r1, [r4, #67] @ 0x43 8013f36: 6866 ldr r6, [r4, #4] 8013f38: 60a6 str r6, [r4, #8] 8013f3a: 2e00 cmp r6, #0 8013f3c: bfa2 ittt ge 8013f3e: 6821 ldrge r1, [r4, #0] 8013f40: f021 0104 bicge.w r1, r1, #4 8013f44: 6021 strge r1, [r4, #0] 8013f46: b90d cbnz r5, 8013f4c <_printf_i+0x110> 8013f48: 2e00 cmp r6, #0 8013f4a: d04b beq.n 8013fe4 <_printf_i+0x1a8> 8013f4c: 4616 mov r6, r2 8013f4e: fbb5 f1f3 udiv r1, r5, r3 8013f52: fb03 5711 mls r7, r3, r1, r5 8013f56: 5dc7 ldrb r7, [r0, r7] 8013f58: f806 7d01 strb.w r7, [r6, #-1]! 8013f5c: 462f mov r7, r5 8013f5e: 42bb cmp r3, r7 8013f60: 460d mov r5, r1 8013f62: d9f4 bls.n 8013f4e <_printf_i+0x112> 8013f64: 2b08 cmp r3, #8 8013f66: d10b bne.n 8013f80 <_printf_i+0x144> 8013f68: 6823 ldr r3, [r4, #0] 8013f6a: 07df lsls r7, r3, #31 8013f6c: d508 bpl.n 8013f80 <_printf_i+0x144> 8013f6e: 6923 ldr r3, [r4, #16] 8013f70: 6861 ldr r1, [r4, #4] 8013f72: 4299 cmp r1, r3 8013f74: bfde ittt le 8013f76: 2330 movle r3, #48 @ 0x30 8013f78: f806 3c01 strble.w r3, [r6, #-1] 8013f7c: f106 36ff addle.w r6, r6, #4294967295 @ 0xffffffff 8013f80: 1b92 subs r2, r2, r6 8013f82: 6122 str r2, [r4, #16] 8013f84: f8cd a000 str.w sl, [sp] 8013f88: 464b mov r3, r9 8013f8a: aa03 add r2, sp, #12 8013f8c: 4621 mov r1, r4 8013f8e: 4640 mov r0, r8 8013f90: f7ff fee6 bl 8013d60 <_printf_common> 8013f94: 3001 adds r0, #1 8013f96: d14a bne.n 801402e <_printf_i+0x1f2> 8013f98: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 8013f9c: b004 add sp, #16 8013f9e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8013fa2: 6823 ldr r3, [r4, #0] 8013fa4: f043 0320 orr.w r3, r3, #32 8013fa8: 6023 str r3, [r4, #0] 8013faa: 4833 ldr r0, [pc, #204] @ (8014078 <_printf_i+0x23c>) 8013fac: 2778 movs r7, #120 @ 0x78 8013fae: f884 7045 strb.w r7, [r4, #69] @ 0x45 8013fb2: 6823 ldr r3, [r4, #0] 8013fb4: 6831 ldr r1, [r6, #0] 8013fb6: 061f lsls r7, r3, #24 8013fb8: f851 5b04 ldr.w r5, [r1], #4 8013fbc: d402 bmi.n 8013fc4 <_printf_i+0x188> 8013fbe: 065f lsls r7, r3, #25 8013fc0: bf48 it mi 8013fc2: b2ad uxthmi r5, r5 8013fc4: 6031 str r1, [r6, #0] 8013fc6: 07d9 lsls r1, r3, #31 8013fc8: bf44 itt mi 8013fca: f043 0320 orrmi.w r3, r3, #32 8013fce: 6023 strmi r3, [r4, #0] 8013fd0: b11d cbz r5, 8013fda <_printf_i+0x19e> 8013fd2: 2310 movs r3, #16 8013fd4: e7ac b.n 8013f30 <_printf_i+0xf4> 8013fd6: 4827 ldr r0, [pc, #156] @ (8014074 <_printf_i+0x238>) 8013fd8: e7e9 b.n 8013fae <_printf_i+0x172> 8013fda: 6823 ldr r3, [r4, #0] 8013fdc: f023 0320 bic.w r3, r3, #32 8013fe0: 6023 str r3, [r4, #0] 8013fe2: e7f6 b.n 8013fd2 <_printf_i+0x196> 8013fe4: 4616 mov r6, r2 8013fe6: e7bd b.n 8013f64 <_printf_i+0x128> 8013fe8: 6833 ldr r3, [r6, #0] 8013fea: 6825 ldr r5, [r4, #0] 8013fec: 6961 ldr r1, [r4, #20] 8013fee: 1d18 adds r0, r3, #4 8013ff0: 6030 str r0, [r6, #0] 8013ff2: 062e lsls r6, r5, #24 8013ff4: 681b ldr r3, [r3, #0] 8013ff6: d501 bpl.n 8013ffc <_printf_i+0x1c0> 8013ff8: 6019 str r1, [r3, #0] 8013ffa: e002 b.n 8014002 <_printf_i+0x1c6> 8013ffc: 0668 lsls r0, r5, #25 8013ffe: d5fb bpl.n 8013ff8 <_printf_i+0x1bc> 8014000: 8019 strh r1, [r3, #0] 8014002: 2300 movs r3, #0 8014004: 6123 str r3, [r4, #16] 8014006: 4616 mov r6, r2 8014008: e7bc b.n 8013f84 <_printf_i+0x148> 801400a: 6833 ldr r3, [r6, #0] 801400c: 1d1a adds r2, r3, #4 801400e: 6032 str r2, [r6, #0] 8014010: 681e ldr r6, [r3, #0] 8014012: 6862 ldr r2, [r4, #4] 8014014: 2100 movs r1, #0 8014016: 4630 mov r0, r6 8014018: f7ec f97a bl 8000310 801401c: b108 cbz r0, 8014022 <_printf_i+0x1e6> 801401e: 1b80 subs r0, r0, r6 8014020: 6060 str r0, [r4, #4] 8014022: 6863 ldr r3, [r4, #4] 8014024: 6123 str r3, [r4, #16] 8014026: 2300 movs r3, #0 8014028: f884 3043 strb.w r3, [r4, #67] @ 0x43 801402c: e7aa b.n 8013f84 <_printf_i+0x148> 801402e: 6923 ldr r3, [r4, #16] 8014030: 4632 mov r2, r6 8014032: 4649 mov r1, r9 8014034: 4640 mov r0, r8 8014036: 47d0 blx sl 8014038: 3001 adds r0, #1 801403a: d0ad beq.n 8013f98 <_printf_i+0x15c> 801403c: 6823 ldr r3, [r4, #0] 801403e: 079b lsls r3, r3, #30 8014040: d413 bmi.n 801406a <_printf_i+0x22e> 8014042: 68e0 ldr r0, [r4, #12] 8014044: 9b03 ldr r3, [sp, #12] 8014046: 4298 cmp r0, r3 8014048: bfb8 it lt 801404a: 4618 movlt r0, r3 801404c: e7a6 b.n 8013f9c <_printf_i+0x160> 801404e: 2301 movs r3, #1 8014050: 4632 mov r2, r6 8014052: 4649 mov r1, r9 8014054: 4640 mov r0, r8 8014056: 47d0 blx sl 8014058: 3001 adds r0, #1 801405a: d09d beq.n 8013f98 <_printf_i+0x15c> 801405c: 3501 adds r5, #1 801405e: 68e3 ldr r3, [r4, #12] 8014060: 9903 ldr r1, [sp, #12] 8014062: 1a5b subs r3, r3, r1 8014064: 42ab cmp r3, r5 8014066: dcf2 bgt.n 801404e <_printf_i+0x212> 8014068: e7eb b.n 8014042 <_printf_i+0x206> 801406a: 2500 movs r5, #0 801406c: f104 0619 add.w r6, r4, #25 8014070: e7f5 b.n 801405e <_printf_i+0x222> 8014072: bf00 nop 8014074: 08018098 .word 0x08018098 8014078: 080180a9 .word 0x080180a9 0801407c : 801407c: b40e push {r1, r2, r3} 801407e: b503 push {r0, r1, lr} 8014080: 4601 mov r1, r0 8014082: ab03 add r3, sp, #12 8014084: 4805 ldr r0, [pc, #20] @ (801409c ) 8014086: f853 2b04 ldr.w r2, [r3], #4 801408a: 6800 ldr r0, [r0, #0] 801408c: 9301 str r3, [sp, #4] 801408e: f7ff fd4f bl 8013b30 <_vfiprintf_r> 8014092: b002 add sp, #8 8014094: f85d eb04 ldr.w lr, [sp], #4 8014098: b003 add sp, #12 801409a: 4770 bx lr 801409c: 2400003c .word 0x2400003c 080140a0 <__swhatbuf_r>: 80140a0: b570 push {r4, r5, r6, lr} 80140a2: 460c mov r4, r1 80140a4: f9b1 100e ldrsh.w r1, [r1, #14] 80140a8: 2900 cmp r1, #0 80140aa: b096 sub sp, #88 @ 0x58 80140ac: 4615 mov r5, r2 80140ae: 461e mov r6, r3 80140b0: da0d bge.n 80140ce <__swhatbuf_r+0x2e> 80140b2: 89a3 ldrh r3, [r4, #12] 80140b4: f013 0f80 tst.w r3, #128 @ 0x80 80140b8: f04f 0100 mov.w r1, #0 80140bc: bf14 ite ne 80140be: 2340 movne r3, #64 @ 0x40 80140c0: f44f 6380 moveq.w r3, #1024 @ 0x400 80140c4: 2000 movs r0, #0 80140c6: 6031 str r1, [r6, #0] 80140c8: 602b str r3, [r5, #0] 80140ca: b016 add sp, #88 @ 0x58 80140cc: bd70 pop {r4, r5, r6, pc} 80140ce: 466a mov r2, sp 80140d0: f000 f848 bl 8014164 <_fstat_r> 80140d4: 2800 cmp r0, #0 80140d6: dbec blt.n 80140b2 <__swhatbuf_r+0x12> 80140d8: 9901 ldr r1, [sp, #4] 80140da: f401 4170 and.w r1, r1, #61440 @ 0xf000 80140de: f5a1 5300 sub.w r3, r1, #8192 @ 0x2000 80140e2: 4259 negs r1, r3 80140e4: 4159 adcs r1, r3 80140e6: f44f 6380 mov.w r3, #1024 @ 0x400 80140ea: e7eb b.n 80140c4 <__swhatbuf_r+0x24> 080140ec <__smakebuf_r>: 80140ec: 898b ldrh r3, [r1, #12] 80140ee: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 80140f0: 079d lsls r5, r3, #30 80140f2: 4606 mov r6, r0 80140f4: 460c mov r4, r1 80140f6: d507 bpl.n 8014108 <__smakebuf_r+0x1c> 80140f8: f104 0347 add.w r3, r4, #71 @ 0x47 80140fc: 6023 str r3, [r4, #0] 80140fe: 6123 str r3, [r4, #16] 8014100: 2301 movs r3, #1 8014102: 6163 str r3, [r4, #20] 8014104: b003 add sp, #12 8014106: bdf0 pop {r4, r5, r6, r7, pc} 8014108: ab01 add r3, sp, #4 801410a: 466a mov r2, sp 801410c: f7ff ffc8 bl 80140a0 <__swhatbuf_r> 8014110: 9f00 ldr r7, [sp, #0] 8014112: 4605 mov r5, r0 8014114: 4639 mov r1, r7 8014116: 4630 mov r0, r6 8014118: f7ff fc54 bl 80139c4 <_malloc_r> 801411c: b948 cbnz r0, 8014132 <__smakebuf_r+0x46> 801411e: f9b4 300c ldrsh.w r3, [r4, #12] 8014122: 059a lsls r2, r3, #22 8014124: d4ee bmi.n 8014104 <__smakebuf_r+0x18> 8014126: f023 0303 bic.w r3, r3, #3 801412a: f043 0302 orr.w r3, r3, #2 801412e: 81a3 strh r3, [r4, #12] 8014130: e7e2 b.n 80140f8 <__smakebuf_r+0xc> 8014132: 89a3 ldrh r3, [r4, #12] 8014134: 6020 str r0, [r4, #0] 8014136: f043 0380 orr.w r3, r3, #128 @ 0x80 801413a: 81a3 strh r3, [r4, #12] 801413c: 9b01 ldr r3, [sp, #4] 801413e: e9c4 0704 strd r0, r7, [r4, #16] 8014142: b15b cbz r3, 801415c <__smakebuf_r+0x70> 8014144: f9b4 100e ldrsh.w r1, [r4, #14] 8014148: 4630 mov r0, r6 801414a: f000 f81d bl 8014188 <_isatty_r> 801414e: b128 cbz r0, 801415c <__smakebuf_r+0x70> 8014150: 89a3 ldrh r3, [r4, #12] 8014152: f023 0303 bic.w r3, r3, #3 8014156: f043 0301 orr.w r3, r3, #1 801415a: 81a3 strh r3, [r4, #12] 801415c: 89a3 ldrh r3, [r4, #12] 801415e: 431d orrs r5, r3 8014160: 81a5 strh r5, [r4, #12] 8014162: e7cf b.n 8014104 <__smakebuf_r+0x18> 08014164 <_fstat_r>: 8014164: b538 push {r3, r4, r5, lr} 8014166: 4d07 ldr r5, [pc, #28] @ (8014184 <_fstat_r+0x20>) 8014168: 2300 movs r3, #0 801416a: 4604 mov r4, r0 801416c: 4608 mov r0, r1 801416e: 4611 mov r1, r2 8014170: 602b str r3, [r5, #0] 8014172: f7ec fd10 bl 8000b96 <_fstat> 8014176: 1c43 adds r3, r0, #1 8014178: d102 bne.n 8014180 <_fstat_r+0x1c> 801417a: 682b ldr r3, [r5, #0] 801417c: b103 cbz r3, 8014180 <_fstat_r+0x1c> 801417e: 6023 str r3, [r4, #0] 8014180: bd38 pop {r3, r4, r5, pc} 8014182: bf00 nop 8014184: 24019d8c .word 0x24019d8c 08014188 <_isatty_r>: 8014188: b538 push {r3, r4, r5, lr} 801418a: 4d06 ldr r5, [pc, #24] @ (80141a4 <_isatty_r+0x1c>) 801418c: 2300 movs r3, #0 801418e: 4604 mov r4, r0 8014190: 4608 mov r0, r1 8014192: 602b str r3, [r5, #0] 8014194: f7ec fd04 bl 8000ba0 <_isatty> 8014198: 1c43 adds r3, r0, #1 801419a: d102 bne.n 80141a2 <_isatty_r+0x1a> 801419c: 682b ldr r3, [r5, #0] 801419e: b103 cbz r3, 80141a2 <_isatty_r+0x1a> 80141a0: 6023 str r3, [r4, #0] 80141a2: bd38 pop {r3, r4, r5, pc} 80141a4: 24019d8c .word 0x24019d8c 080141a8 <_sbrk_r>: 80141a8: b538 push {r3, r4, r5, lr} 80141aa: 4d06 ldr r5, [pc, #24] @ (80141c4 <_sbrk_r+0x1c>) 80141ac: 2300 movs r3, #0 80141ae: 4604 mov r4, r0 80141b0: 4608 mov r0, r1 80141b2: 602b str r3, [r5, #0] 80141b4: f7ec fcf8 bl 8000ba8 <_sbrk> 80141b8: 1c43 adds r3, r0, #1 80141ba: d102 bne.n 80141c2 <_sbrk_r+0x1a> 80141bc: 682b ldr r3, [r5, #0] 80141be: b103 cbz r3, 80141c2 <_sbrk_r+0x1a> 80141c0: 6023 str r3, [r4, #0] 80141c2: bd38 pop {r3, r4, r5, pc} 80141c4: 24019d8c .word 0x24019d8c 080141c8 : 80141c8: b508 push {r3, lr} 80141ca: 2006 movs r0, #6 80141cc: f000 f82c bl 8014228 80141d0: 2001 movs r0, #1 80141d2: f7ec fcb9 bl 8000b48 <_exit> 080141d6 <_raise_r>: 80141d6: 291f cmp r1, #31 80141d8: b538 push {r3, r4, r5, lr} 80141da: 4605 mov r5, r0 80141dc: 460c mov r4, r1 80141de: d904 bls.n 80141ea <_raise_r+0x14> 80141e0: 2316 movs r3, #22 80141e2: 6003 str r3, [r0, #0] 80141e4: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 80141e8: bd38 pop {r3, r4, r5, pc} 80141ea: 6bc2 ldr r2, [r0, #60] @ 0x3c 80141ec: b112 cbz r2, 80141f4 <_raise_r+0x1e> 80141ee: f852 3021 ldr.w r3, [r2, r1, lsl #2] 80141f2: b94b cbnz r3, 8014208 <_raise_r+0x32> 80141f4: 4628 mov r0, r5 80141f6: f000 f831 bl 801425c <_getpid_r> 80141fa: 4622 mov r2, r4 80141fc: 4601 mov r1, r0 80141fe: 4628 mov r0, r5 8014200: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 8014204: f000 b818 b.w 8014238 <_kill_r> 8014208: 2b01 cmp r3, #1 801420a: d00a beq.n 8014222 <_raise_r+0x4c> 801420c: 1c59 adds r1, r3, #1 801420e: d103 bne.n 8014218 <_raise_r+0x42> 8014210: 2316 movs r3, #22 8014212: 6003 str r3, [r0, #0] 8014214: 2001 movs r0, #1 8014216: e7e7 b.n 80141e8 <_raise_r+0x12> 8014218: 2100 movs r1, #0 801421a: f842 1024 str.w r1, [r2, r4, lsl #2] 801421e: 4620 mov r0, r4 8014220: 4798 blx r3 8014222: 2000 movs r0, #0 8014224: e7e0 b.n 80141e8 <_raise_r+0x12> ... 08014228 : 8014228: 4b02 ldr r3, [pc, #8] @ (8014234 ) 801422a: 4601 mov r1, r0 801422c: 6818 ldr r0, [r3, #0] 801422e: f7ff bfd2 b.w 80141d6 <_raise_r> 8014232: bf00 nop 8014234: 2400003c .word 0x2400003c 08014238 <_kill_r>: 8014238: b538 push {r3, r4, r5, lr} 801423a: 4d07 ldr r5, [pc, #28] @ (8014258 <_kill_r+0x20>) 801423c: 2300 movs r3, #0 801423e: 4604 mov r4, r0 8014240: 4608 mov r0, r1 8014242: 4611 mov r1, r2 8014244: 602b str r3, [r5, #0] 8014246: f7ec fc77 bl 8000b38 <_kill> 801424a: 1c43 adds r3, r0, #1 801424c: d102 bne.n 8014254 <_kill_r+0x1c> 801424e: 682b ldr r3, [r5, #0] 8014250: b103 cbz r3, 8014254 <_kill_r+0x1c> 8014252: 6023 str r3, [r4, #0] 8014254: bd38 pop {r3, r4, r5, pc} 8014256: bf00 nop 8014258: 24019d8c .word 0x24019d8c 0801425c <_getpid_r>: 801425c: f7ec bc6a b.w 8000b34 <_getpid> 08014260 <_init>: 8014260: b5f8 push {r3, r4, r5, r6, r7, lr} 8014262: bf00 nop 8014264: bcf8 pop {r3, r4, r5, r6, r7} 8014266: bc08 pop {r3} 8014268: 469e mov lr, r3 801426a: 4770 bx lr 0801426c <_fini>: 801426c: b5f8 push {r3, r4, r5, r6, r7, lr} 801426e: bf00 nop 8014270: bcf8 pop {r3, r4, r5, r6, r7} 8014272: bc08 pop {r3} 8014274: 469e mov lr, r3 8014276: 4770 bx lr